libdas2
das2 core C utilities
|
#include <das2/oob.h>
describes human-consumable messages that exist on the stream.
One exception is progress messages, which utilize StreamComments and are consumed on the client side by software.
Public Member Functions | |
void | OobComment_init (OobComment *pThis) |
Initialize an Exception Structure This only needs to be called once, the same structure will be reused each time OutOfBand_decode() is called. More... | |
DasErrCode | OutOfBand_decode (DasBuf *pBuf, OutOfBand **ppObjs, int *which) |
Factory function to produce out of band objects from general data. More... | |
Data Fields | |
char * | sType |
The type of comment, for example log:info, taskProgress, taskSize, etc. More... | |
char * | sSrc |
The source of the comment, typically the name of a program. | |
char * | sVal |
The Comment body, for some messages this is an ASCII value. | |
void OobComment_init | ( | OobComment * | pThis | ) |
Initialize an Exception Structure This only needs to be called once, the same structure will be reused each time OutOfBand_decode() is called.
Memory is not re-allocated for each call, it only expands as needed.
pThis | A pointer to the stream comment object to initialize |
|
inherited |
Factory function to produce out of band objects from general data.
Unlike Header packets which are read in-frequently, out of band objects may occur frequently in the input stream. To avoid alot of memory allocations This factory function takes an array of pointers to out of band objects.
If one of the given OOB's in the input array corresponds to the parsed object then it is initialize with the values in the buffer. If the out of band object is a proper XML item but is not understood by this function it is just ignored and which will be set to -1
[in] | pBuf | a readable buffer containing up to one out of band object |
[in] | ppObjs | a NULL terminated array of out of band objects to possibly populate with data |
[out] | which | A pointer to an integer. The integer will be set to -1 if the object was not parseable or if no structure was provided in ppObjs to hold the parsed item. |
char* sType |
The type of comment, for example log:info, taskProgress, taskSize, etc.