21 #ifndef _das_dataset_h_ 
   22 #define _das_dataset_h_ 
   24 #include <das2/dimension.h> 
   97 #define DASDS_LOC_ENC_SZ 32 
  139 typedef struct dataset {
 
  185    DasCodec aPktEncs[DASDS_LOC_ENC_SZ];
 
  186    int nPktItems[DASDS_LOC_ENC_SZ];
 
  234    const char* sId, 
const char* sGroupId, 
int nRank
 
  271 #define DasDs_mutable(P) P->_mutable 
  375 typedef struct dasds_iterator_t{
 
  444 #define DasDs_group(P) ((const char*)(P)->sGroupId) 
  452 #define DasDs_id(P) ((const char*)(P)->sId) 
  471 #define DasDs_rank(P) ((P)->nRank) 
  500 #define DasDs_numAry(P) ((P)->uArrays) 
  509 #define DasDs_getAry(P, I) ((P)->lArrays[(I)]) 
  614    DasDs* pThis, 
const char* sAryId, 
const char* sSemantic, 
 
  615    const char* sEncType, 
int nItemBytes, 
int nNumItems
 
  652    DasDs* pThis, 
const char* sAryId, 
const char* sEncType, 
 
  653    int nItemBytes, 
int nSeps, ubyte uSepLen, 
const ubyte* pSepByIdx
 
  695     DasDs* pThis, 
enum dim_type dType, 
const char* sDim, 
const char* sId
 
  740    const DasDs* pThis, 
size_t idx, 
enum dim_type vt
 
#define DASIDX_MAX
The maximum number of array indices in das2.
Definition: array.h:43
 
Encoding/Decoding arrays to and from buffers.
 
DAS_API size_t DasDs_memIndexed(const DasDs *pThis)
The apparent memory usage of all arrays in the dataset.
 
DAS_API DasErrCode DasDs_addDim(DasDs *pThis, DasDim *pDim)
Add a physical dimension to the dataset.
 
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition: defs.h:164
 
Dynamic recursive ragged arrays.
Definition: array.h:270
 
DAS_API size_t DasDs_clearRagged0Arrays(DasDs *pThis)
Clear any arrays that are ragged in index l.
 
Reading and writing array data to buffers.
Definition: codec.h:40
 
Base structure for Stream Header Items.
Definition: descriptor.h:74
 
Das Physical Dimensions.
Definition: dimension.h:128
 
Das Datasets.
Definition: dataset.h:139
 
DAS_API DasErrCode DasDs_addRaggedCodec(DasDs *pThis, const char *sAryId, const char *sEncType, int nItemBytes, int nSeps, ubyte uSepLen, const ubyte *pSepByIdx)
Define a packet data encoder for variable length items and arrays.
 
DAS_API const DasDim * DasDs_getDimByIdx(const DasDs *pThis, size_t idx, enum dim_type vt)
Get a dimension by index.
 
DAS_API DasDim * DasDs_makeDim(DasDs *pThis, enum dim_type dType, const char *sDim, const char *sId)
Make a new dimension within this dataset.
 
DAS_API const DasDim * DasDs_getDimById(const DasDs *pThis, const char *sId)
Get a dimension by string id.
 
DAS_API DasDs * new_DasDs(const char *sId, const char *sGroupId, int nRank)
Create a new dataset object.
 
DAS_API size_t DasDs_memUsed(const DasDs *pThis)
Get the currently used memory of all arrays in the dataset.
 
DAS_API void del_DasDs(DasDs *pThis)
Delete a Data object, cleaning up it's memory.
 
DAS_API char * DasDs_toStr(const DasDs *pThis, char *sBuf, int nLen)
Print a string representation of this dataset.
 
DAS_API size_t DasDs_memOwned(const DasDs *pThis)
Get the currently allocated memory of all arrays in the dataset.
 
DAS_API void DasDs_setMutable(DasDs *pThis, bool bChangeAllowed)
Lock/Unlock the dataset for changes.
 
DAS_API DasErrCode DasDs_addAry(DasDs *pThis, DasAry *pAry)
Add an array to the dataset, stealing it's reference.
 
DAS_API size_t DasDs_numDims(const DasDs *pThis, enum dim_type vt)
Get the number of physical dimensions in this dataset.
 
DAS_API DasErrCode DasDs_addFixedCodec(DasDs *pThis, const char *sAryId, const char *sSemantic, const char *sEncType, int nItemBytes, int nNumItems)
Define a packet data encoded/decoder for fixed length items and arrays.
 
DAS_API const DasDim * DasDs_getDim(const DasDs *pThis, const char *sDim)
Get a dimension by it's basic kind.
 
DAS_API int DasDs_shape(const DasDs *pThis, ptrdiff_t *pShape)
Return current valid ranges for whole data set iteration.
 
DAS_API DasAry * DasDs_getAryById(DasDs *pThis, const char *sAryId)
Get a dataset array given it's identifier.
 
DAS_API ptrdiff_t DasDs_lengthIn(const DasDs *pThis, int nIdx, ptrdiff_t *pLoc)
Return the current max value index value + 1 for any partial index.
 
void * pUser
User data pointer.
Definition: dataset.h:195
 
Dataset iterator structure.
Definition: dataset.h:375
 
bool done
If true the value in index is valid, false otherwise.
Definition: dataset.h:378
 
DAS_API bool dasds_iter_next(dasds_iterator *pIter)
Increment the iterator's index by one position, rolling as needed at data boundaries.
 
DAS_API void dasds_iter_init(dasds_iterator *pIter, const DasDs *pDs)
Initialize a const dataset iterator.
 
#define DAS_MAX_ID_BUFSZ
The size of an char buffer large enough to hold valid object IDs.
Definition: util.h:311