libdas2
das2 core C utilities
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
Streams

Classes for handling interleaved self-describing data streams. More...

Detailed Description

Classes for handling interleaved self-describing data streams.

Data Structures

class  DasEncoding
 Reading and writing values on das2 streams. More...
 
struct  DasIO
 Tracks input and output operations for das2 stream headers and data. More...
 
struct  OobExcept
 describes an exception that can live in a stream. More...
 
struct  OobComment
 describes human-consumable messages that exist on the stream. More...
 
struct  PktDesc
 Holds information for a single packet type in a Das2 stream. More...
 
struct  PlaneDesc
 Describes a data plane within a packet type. More...
 
struct  StreamDesc
 Describes the stream itself, in particular the compression used, current packetDescriptors, etc. More...
 
interface  StreamHandler
 A set of callbacks used for input and output stream processing. More...
 

Functions

DasEncodingnew_DasEncoding (int nCat, int nWidth, const char *sFmt)
 Make a new data encoder/decoder. More...
 

Function Documentation

DasEncoding * new_DasEncoding ( int  nCat,
int  nWidth,
const char *  sFmt 
)

Make a new data encoder/decoder.

There is no corresponding destructor for DasEncoding structures, since these are self-contained and have no sub-pointers to heap objects. Use free() to delete structures returned by this function.

Parameters
nCatThe basic encoding category one of:
  • DAS2DT_BE_REAL
  • DAS2DT_LE_REAL
  • DAS2DT_HOST_REAL
  • DAS2DT_BE_INT
  • DAS2DT_LE_INT
  • DAS2DT_HOST_INT
  • DAS2DT_BE_UINT
  • DAS2DT_LE_UINT
  • DAS2DT_HOST_UINT
  • DAS2DT_ASCII
  • DAS2DT_TIME
nWidthThe width in bytes of each encoded value, ASCII and TIME types can have arbitrary widths, REAL can be 4 or 8, and INT and UINT can be 1, 2, 4, or 8 bytes wide. Half-floats, although useful in some applications are not supported
sFmtIf not NULL then this sprintf style string will be use to format the values for output. If the encoding is just used for input then a format string is not required. If the encoding is used for output and no format string has been set the library will assign a reasonable default.
Returns
A new DasEncoding structure allocated on the heap.