34#define STREAM_MODEL_MIXED -1
35#define STREAM_MODEL_V2 2
36#define STREAM_MODEL_V3 3
38#define STREAMDESC_CMP_SZ 48
39#define STREAMDESC_VER_SZ 48
40#define STREAMDESC_TYPE_SZ 48
91typedef struct das_stream{
104 DasDesc* descriptors[MAX_PKTIDS];
107 char compression[STREAMDESC_CMP_SZ];
108 char type[STREAMDESC_TYPE_SZ];
109 char version[STREAMDESC_VER_SZ];
110 bool bDescriptorSent;
134#define StreamDesc DasStream
143#define DasStream_getEmbedAsBytes(P) ((P)->bEmbedAsBytes)
153#define new_StreamDesc new_DasStream
157#define new_StreamDesc_str new_DasStream_str
166#define StreamDesc_info DasStream_info
188#define StreamDesc_copy DasStream_copy
199#define del_StreamDesc del_DasStream
219#define StreamDesc_getNPktDesc DasStream_getNPktDesc
246#define StreamDesc_nextPktDesc DasStream_nextDesc
266#define StreamDesc_addPktDesc DasStream_addDesc
324#define DasStream_rmPktDesc DasStream_rmDesc
332#define StreamDesc_setMonotonic DasStream_setMonotonic
341#define StreamDesc_addStdProps DasStream_addStdProps
349#define StreamDesc_addCmdLineProp DasStream_addCmdLineProp
378#define StreamDesc_createPktDesc DasStream_createPktDesc
395#define StreamDesc_clonePktDesc DasStream_clonePktDesc
413#define StreamDesc_clonePktDescById DasStream_clonePktDescById
424#define StreamDesc_isValidId DasStream_isValidId
437#define StreamDesc_getPktDesc DasStream_getPktDesc
468#define StreamDesc_freeDesc DasStream_freeDatDesc
475#define StreamDesc_getOffset DasStream_getOffset
486#define StreamDesc_encode DasStream_encode2
Objects which correlate arrays in index space.
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition defs.h:184
const char * das_units
Handle SI and other units, with accommodations for Epoch systems, from units.h.
Definition units.h:144
DAS_API bool DasStream_isValidId(const DasStream *pThis, int nPktId)
Check to see if an packet ID has been defined for the stream.
DAS_API DasDesc * DasDesc_decode(DasBuf *pBuf, DasStream *pSd, int nPktId, int nModel)
Packetized Stream Descriptor Factory Function.
Buffer class to handle accumulating byte streams.
Definition buffer.h:47
Base structure for Stream Header Items.
Definition descriptor.h:74
Reading and writing values to buffers.
Definition encoding.h:108
Describes the stream itself, in particular the compression used, current packetDescriptors,...
Definition stream.h:91
DAS_API PktDesc * DasStream_createPktDesc(DasStream *pThis, DasEncoding *pXEncoder, das_units xUnits)
Creates a descriptor structure that for a stream packet type.
DAS_API DasErrCode DasStream_takePktDesc(DasStream *pThis, DasDesc *pDesc, int nPktId)
Take ownership of a dataset (DasDs or PktDesc)
DAS_API DasErrCode DasStream_addDesc(DasStream *pThis, DasDesc *pDesc, int nPktId)
Attach a packet descriptor to this stream.
DAS_API DasErrCode DasStream_encode3(DasStream *pThis, DasBuf *pBuf)
Encode a DasStream to an version 3 XML string.
DAS_API PktDesc * DasStream_getPktDesc(const DasStream *pThis, int id)
Get the packet descriptor associated with an ID.
DAS_API DasDesc * DasStream_getDesc(const DasStream *pThis, int id)
Get any descriptor associated with a packet ID.
DAS_API void del_DasStream(DasStream *pThis)
Delete a stream descriptor and all it's sub objects.
DAS_API int DasStream_getOffset(DasStream *pThis)
An I/O function that makes sense to use for either operation.
DAS_API DasStream * new_DasStream(void)
Creates a new blank StreamDesc.
DAS_API char * DasStream_info(const DasStream *pSd, char *sBuf, int nLen)
Print a short description of the stream to a string buffer, This is not a serialization,...
DAS_API DasErrCode DasStream_shadowPktDesc(DasStream *pThis, DasDesc *pDesc, int nPktId)
Loosely attach a dataset (DasDs or PktDesc) to this stream.
DAS_API int DasStream_getPktId(DasStream *pThis, const DasDesc *pDesc)
If a data container is owned by this stream object, return it's packet ID.
DAS_API void DasStream_setMonotonic(DasStream *pThis, bool isMonotonic)
Indicates if the xtags on the stream are monotonic, in which case there might be optimal ways of proc...
DAS_API void DasStream_addStdProps(DasStream *pThis)
Adds metadata into the property set of the DasStream.
DAS_API DasErrCode DasStream_encode2(DasStream *pThis, DasBuf *pBuf)
Encode a DasStream to an version 2 XML string.
DAS_API PktDesc * DasStream_clonePktDescById(DasStream *pThis, const DasStream *pOther, int nPktId)
Deepcopy a PacketDescriptor from one stream to another.
DAS_API void DasStream_addCmdLineProp(DasStream *pThis, int argc, char *argv[])
Adds the command line into the property set of the DasStream.
DasDesc base
The base structure.
Definition stream.h:93
DAS_API DasErrCode DasStream_rmDesc(DasStream *pThis, DasDesc *pDesc, int nPktId)
Detach a packet descriptor from this stream.
DAS_API DasDesc * DasStream_nextDesc(const DasStream *pThis, int *pPrevPktId)
Iterate over packet descriptors.
DAS_API DasStream * DasStream_copy(const DasStream *pThis)
Creates a deep-copy of an existing DasStream object.
DAS_API size_t DasStream_getNPktDesc(const DasStream *pThis)
Get the number of packet descriptors defined for this stream.
DAS_API PktDesc * DasStream_clonePktDesc(DasStream *pThis, const PktDesc *pd)
Make a deep copy of a PacketDescriptor on a new stream.
void * pUser
User data pointer.
Definition stream.h:125
Holds information for a single packet type in a Das2 stream.
Definition packet.h:138