![]() |
das2C
das core C utilities (v3)
|
Reading and writing Das2 Stream objects to standard I/O. More...
Go to the source code of this file.
Data Structures | |
struct | DasIO |
Tracks input and output operations for das2 stream headers and data. More... | |
Functions | |
DAS_API void | del_DasIO (DasIO *pThis) |
Free resources associated with a DasIO structure Typically you don't need to do this as heap memory is free'ed when the program exits anyway. More... | |
DAS_API const char * | LogLvl_string (int logLevel) |
Returns a string identifying the log level. More... | |
DAS_API int | DasIO_serverExcept (DasIO *pThis, const char *fmt,...) |
Throw a server exception and close the stream. More... | |
DAS_API int | DasIO_queryExcept (DasIO *pThis, const char *fmt,...) |
Throw a bad query exception and close the stream. More... | |
DAS_API int | DasIO_closeNoData (DasIO *pThis, const char *fmt,...) |
Send a "no data in interval" message and close the stream. More... | |
Reading and writing Das2 Stream objects to standard I/O.
DAS_API void del_DasIO | ( | DasIO * | pThis | ) |
Free resources associated with a DasIO structure Typically you don't need to do this as heap memory is free'ed when the program exits anyway.
But if you need a destructor, here it is.
pThis | The DasIO abject to delete. Any associated file handles except for standard input and standard output are closed. The pointer given to this function should be set to NULL after the function completes. |
DAS_API const char* LogLvl_string | ( | int | logLevel | ) |
Returns a string identifying the log level.
logLevel | a log level value as defined in DasIO_setLogLvl() |
DAS_API int DasIO_serverExcept | ( | DasIO * | pThis, |
const char * | fmt, | ||
... | |||
) |
Throw a server exception and close the stream.
If no stream descriptor has been sent then a stub descriptor is output first. The output is encoded for XML transport so there is no need to escape the text prior to sending. The total mesage may not exceed 2047 UTF-8 bytes.
If this function is called on an input stream the program will immediately exit with the value 10.
DAS_API int DasIO_queryExcept | ( | DasIO * | pThis, |
const char * | fmt, | ||
... | |||
) |
Throw a bad query exception and close the stream.
If no stream descriptor has been sent then a stub descriptor is output first. The output is encoded for XML transport so there is no need to escape the text prior to sending. The total mesage may not exceed 2047 UTF-8 bytes.
Not having any data for the requested parameter range is not cause for throwing an exception. Send a no data in interval response instead.
If this function is called on an input stream the program will immediately exit with the value 10.
DAS_API int DasIO_closeNoData | ( | DasIO * | pThis, |
const char * | fmt, | ||
... | |||
) |
Send a "no data in interval" message and close the stream.
If no stream descriptor has been sent then a stub descriptor is output first. The output is encoded for XML transport so there is no need to escape the text prior to sending. The total mesage may not exceed 2047 UTF-8 bytes.
Not having any data for the requested parameter range is not cause for throwing an exception. Send a no data in interval response instead.
If this function is called on an input stream the program will immediately exit with the value 10.