das2C
das core C utilities (v3)
Loading...
Searching...
No Matches
Functions
datum.h File Reference
#include <das3/value.h>
#include <das3/units.h>
Include dependency graph for datum.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

DAS_API void das_datum_init (das_datum *pThis, const ubyte *pSrc, das_val_type vt, uint32_t vsize, das_units units)
 General datum initialization.
 
char * das_datum_toStrValOnlySep (const das_datum *pThis, char *sStr, size_t uLen, int nFracDigits, const char *sSep)
 Similar to das_datum_toStr, but can specify a separator for vectors.
 

Function Documentation

◆ das_datum_init()

DAS_API void das_datum_init ( das_datum *  pThis,
const ubyte *  pSrc,
das_val_type  vt,
uint32_t  vsize,
das_units  units 
)

General datum initialization.

Parameters
pSrcA pointer to the source location. If the source bytes are less then DATUM_BUF_SZ they are copied internally, otherwise the pointer itself is stored in the first member of the struct.
vtThe value type, one of the 15 types listed in the das_val_type enum.
vsizeThe value size, for anything other then vtUnknown, vtByteSeq and vtText this parameter is ignored.
unitsThe units associated with the value.

@member of das_datum

◆ das_datum_toStrValOnlySep()

char * das_datum_toStrValOnlySep ( const das_datum *  pThis,
char *  sStr,
size_t  uLen,
int  nFracDigits,
const char *  sSep 
)

Similar to das_datum_toStr, but can specify a separator for vectors.

The separator is ignored if the element type is not multi-valued