49 typedef struct das_prop {
110 ubyte* pBuf,
size_t uBufSz,
const char* sType, ubyte uType,
const char* sName,
111 const char* sValue,
char cSep,
das_units units,
int nStandard
210 #define DASPROP_MULTI_MASK 0x00000003
212 #define DASPROP_VALID_MASK 0x00000003
214 #define DASPROP_INVALID 0x00000000
215 #define DASPROP_SINGLE 0x00000001
216 #define DASPROP_RANGE 0x00000002
217 #define DASPROP_SET 0x00000003
222 #define DASPROP_TYPE_MASK 0x000000F0
224 #define DASPROP_STRING 0x00000010
225 #define DASPROP_BOOL 0x00000020
226 #define DASPROP_INT 0x00000030
227 #define DASPROP_REAL 0x00000040
228 #define DASPROP_DATETIME 0x00000050
230 #define DASPROP_DAS1 1
231 #define DASPROP_DAS2 2
232 #define DASPROP_DAS3 3
237 #define DasProp_isRange(P) (P->flags & DASPROP_RANGE)
Minimal definitions for das2 utilities that can safely be run without calling das_init().
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition: defs.h:164
const char * das_units
Handle SI and other units, with accommodations for Epoch systems, from units.h.
Definition: units.h:139
size_t dasprop_memsz(const char *sName, const char *sValue)
Get required storage space for a property given a name and value.
Individual properties of a desciptor.
Definition: property.h:49
int DasProp_convertReal(const DasProp *pProp, double *pBuf, size_t uBufLen)
Convert real-value properties to double.
int DasProp_convertInt(const DasProp *pProp, int64_t *pBuf, size_t uBufLen)
Convert integer property values to 64-bit ints.
DasErrCode DasProp_init(ubyte *pBuf, size_t uBufSz, const char *sType, ubyte uType, const char *sName, const char *sValue, char cSep, das_units units, int nStandard)
Flexible das1, das2 and das3 compatable property memory initializer.
bool DasProp_isValid(const DasProp *pProp)
Determine if this property has a valid type definition.
const char * DasProp_typeStr3(const DasProp *pProp)
Get a das3 type string for this property.
size_t DasProp_size(const DasProp *pProp)
Return the memory footprint of a property.
int DasProp_convertTime(const DasProp *pProp, uint64_t *pBuf, size_t uBufLen)
Convert datatime properties to a double based value of units.
int DasProp_items(const DasProp *pProp)
Determine the number of items in a multi valued property.
void DasProp_invalidate(DasProp *pProp)
Mark this property as invalid, this erases the type information and is thus a non-reversable operatio...
int DasProp_convertTt2k(const DasProp *pProp, int64_t *pBuf, size_t uBufLen)
Convert datatime properties TT2K long integers.
int DasProp_convertBool(const DasProp *pProp, uint8_t *pBuf, size_t uBufLen)
Convert boolean property values to bytes.
const char * DasProp_typeStr2(const DasProp *pProp)
Get a das2 type string for this property
char DasProp_sep(const DasProp *pProp)
Get the value separator character for array-style properties.
bool DasProp_equal(const DasProp *pOne, const DasProp *pTwo)
Determine if two properties contain equal content.
const char * DasProp_name(const DasProp *pProp)
Get name of a property.
const char * DasProp_value(const DasProp *pProp)
Get the string value for a property.
ubyte DasProp_type(const DasProp *pProp)
Get a property type code.
Defines units used for items in the stream, most notably time units that reference an epoch and a ste...