21 #ifndef _das_stream_h_
22 #define _das_stream_h_
31 #define STREAMDESC_CMP_SZ 48
32 #define STREAMDESC_VER_SZ 48
34 #define MAX_PKTIDS 100
46 typedef struct stream_descriptor{
62 char compression[STREAMDESC_CMP_SZ];
63 char version[STREAMDESC_VER_SZ];
DasErrCode StreamDesc_freePktDesc(StreamDesc *pThis, int nPktId)
Free any resources associated with this PacketDescriptor, and release it's id number for use with a n...
int DasErrCode
return code type 0 indicates success, negative integer indicates failure
Definition: util.h:117
PktDesc * StreamDesc_clonePktDescById(StreamDesc *pThis, const StreamDesc *pOther, int nPktId)
Deepcopy a PacketDescriptor from one stream to another.
void * pUser
User data pointer.
Definition: stream.h:73
PktDesc * StreamDesc_createPktDesc(StreamDesc *pThis, DasEncoding *pXEncoder, das_units xUnits)
Creates a descriptor structure that for a stream packet type.
Holds information for a single packet type in a Das2 stream.
Definition: packet.h:138
bool StreamDesc_isValidId(const StreamDesc *pThis, int nPktId)
Check to see if an packet ID has been defined for the stream.
Little buffer class to handle accumulating string data.
Definition: buffer.h:49
StreamDesc * new_StreamDesc(void)
Creates a new blank StreamDesc.
Base structure for Stream Header Items.
Definition: descriptor.h:80
PktDesc * StreamDesc_getPktDesc(const StreamDesc *pThis, int id)
Get the packet descriptor associated with an ID.
void StreamDesc_addCmdLineProp(StreamDesc *pThis, int argc, char *argv[])
Adds the command line into the property set of the StreamDesc.
Reading and writing values on das2 streams.
Definition: encoding.h:108
DasErrCode StreamDesc_addPktDesc(StreamDesc *pThis, PktDesc *pPd, int nPktId)
Attach a standalone packet descriptor to this stream.
StreamDesc * StreamDesc_copy(const StreamDesc *pThis)
Creates a deep-copy of an existing StreamDesc object.
void StreamDesc_setMonotonic(StreamDesc *pThis, bool isMonotonic)
Indicates if the xtags on the stream are monotonic, in which case there might be optimal ways of proc...
Describes the stream itself, in particular the compression used, current packetDescriptors, etc.
Definition: stream.h:46
PktDesc * StreamDesc_clonePktDesc(StreamDesc *pThis, const PktDesc *pd)
Make a deep copy of a PacketDescriptor on a new stream.
DasDesc base
The base structure.
Definition: stream.h:48
size_t StreamDesc_getNPktDesc(const StreamDesc *pThis)
Get the number of packet descriptors defined for this stream.
void StreamDesc_addStdProps(StreamDesc *pThis)
Adds metadata into the property set of the StreamDesc.
DasErrCode StreamDesc_encode(StreamDesc *pThis, DasBuf *pBuf)
Encode a StreamDesc to an XML string.
void del_StreamDesc(StreamDesc *pThis)
Delete a stream descriptor and all it's sub objects.
DasDesc * Das2Desc_decode(DasBuf *pBuf)
Das2 Stream Descriptor Factory Function.
int StreamDesc_getOffset(StreamDesc *pThis)
An I/O function that makes sense to use for either operation.
const char * das_units
Enumeration of unit types, that correspond to physical unit types.
Definition: units.h:135