das2/stream.h File Reference
Objects representing a Das2 Stream as a whole.
More...
Detailed Description
Objects representing a Das2 Stream as a whole.
#include <stdbool.h>
#include <das2/packet.h>
Go to the source code of this file.
Function Documentation
Delete a stream descriptor and all it's sub objects.
- Parameters:
-
| pThis | The stream descriptor to erase, the pointer should be set to NULL by the caller. |
size_t StreamDesc_getNPktDesc |
( |
const StreamDesc * |
pThis |
) |
|
Get the number of packet descriptors defined for this stream.
- Warning:
- It is possible to have a non-contiguous set of Packet IDs. Unless the application insures by some mechanism that packet IDs are not skipped when calling functions like StreamDesc_addPktDesc() then the results of this function will not useful for iteration.
- Parameters:
-
| pThis | The stream descriptor to query |
- Returns:
- Then number of packet descriptors attached to this stream descriptor. For better performance the caller should reused the return value as all possible packet ID's are tested to see home many are defined.
bool StreamDesc_isValidId |
( |
const StreamDesc * |
pThis, |
|
|
int |
nPktId | |
|
) |
| | |
Check to see if an packet ID has been defined for the stream.
- Parameters:
-
| pThis | The stream to check |
| nPktId | The ID in question |
- Returns:
- true if a packet of that type is defined on the stream false otherwise
Das2 Stream Descriptor Factory Function.
- Returns:
- Either a StreamDesc or a PktDesc object depending on the data received, or NULL if the input could not be parsed.