![]() |
das2C
das core C utilities (v3)
|
#include <stdbool.h>#include <das2/units.h>#include <das2/util.h>#include <das2/buffer.h>#include <das2/property.h>#include <das2/array.h>

Go to the source code of this file.
Data Structures | |
| struct | DasDesc |
| Base structure for Stream Header Items. More... | |
Enumerations | |
| enum | desc_type_t |
| enumeration of Descriptor types, used internally for type checking. More... | |
Functions | |
| DAS_API DasErrCode | DasDesc_flexSet (DasDesc *pThis, const char *sType, ubyte uType, const char *sName, const char *sVal, char cSep, das_units units, int nStandard) |
| Create or set a existing property. More... | |
| DAS_API DasErrCode | DasDesc_setProp (DasDesc *pThis, const DasProp *pProp) |
| Overwrite, or copy-in a fully formatted property. | |
| const DasProp * | DasDesc_getProp (const DasDesc *pThis, const char *sName) |
| Get a property if present in descriptor or it's parent (das3) More... | |
| const DasProp * | DasDesc_getLocal (const DasDesc *pThis, const char *sName) |
| Get a property if present in this descriptor only (das3) More... | |
| DAS_API size_t | DasDesc_getArray (DasDesc *pThis, const char *sName, char cSep, char *pBuf, size_t uBufSz, char **psVals, size_t uMaxVals) |
| Get string array with given seperator. More... | |
| DAS_API DasErrCode | DasDesc_setBool (DasDesc *pThis, const char *sName, bool bVal) |
| Set a boolean property Encodes the value as either the string "true" or the string "false". More... | |
| DAS_API DasErrCode | DasDesc_encode3 (DasDesc *pThis, DasBuf *pBuf, const char *sIndent) |
| Encode a generic set of properties to a buffer, in das3 format. | |
| enum desc_type_t |
enumeration of Descriptor types, used internally for type checking.
May have one of the following values:
| DAS_API DasErrCode DasDesc_flexSet | ( | DasDesc * | pThis, |
| const char * | sType, | ||
| ubyte | uType, | ||
| const char * | sName, | ||
| const char * | sVal, | ||
| char | cSep, | ||
| das_units | units, | ||
| int | nStandard | ||
| ) |
Create or set a existing property.
Other then memory handling, this is just a wrapper on DasProp_init. See @DasProp_init for the argument description
Get a property if present in descriptor or it's parent (das3)
| pThis | the descriptor object to query |
| sName | the name of the property to retrieve. |
Get a property if present in this descriptor only (das3)
In das3 property cascades don't make as much sense. The label for a particular physical dim axis is not the stream label. Clients may want a property for just this object.
| pThis | the descriptor object to query |
| sName | the name of the property to retrieve. |
| DAS_API size_t DasDesc_getArray | ( | DasDesc * | pThis, |
| const char * | sName, | ||
| char | cSep, | ||
| char * | pBuf, | ||
| size_t | uBufSz, | ||
| char ** | psVals, | ||
| size_t | uMaxVals | ||
| ) |
Get string array with given seperator.
This is just a helper, though you can use it if you like to specify a a separater character. The combination '\SEP' is treated as a literal SEP and does not break a field. Literal '\' characters have no meaning unless followed by a SEP character.
| DAS_API DasErrCode DasDesc_setBool | ( | DasDesc * | pThis, |
| const char * | sName, | ||
| bool | bVal | ||
| ) |
Set a boolean property Encodes the value as either the string "true" or the string "false".
| pThis | The descriptor to receive the property |
| sName | the name of the property |
| bVal | either true or false. |