das2C
das core C utilities (v3)
Data Structures | Typedefs | Functions
processor.h File Reference

Callback processing for das2 stream reads and writes. More...

#include <das2/stream.h>
#include <das2/oob.h>
Include dependency graph for processor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

interface  StreamHandler
 A set of callbacks used for input and output stream processing. More...
 

Typedefs

typedef DasErrCode(* StreamDescHandler) (StreamDesc *sd, void *ud)
 Definition of the callback function invoked when a stream header is encountered in the input. More...
 
typedef DasErrCode(* PktDescHandler) (StreamDesc *sd, PktDesc *pd, void *ud)
 Definition of the callback function invoked when a packet header is encountered in the input. More...
 
typedef DasErrCode(* PktRedefHandler) (StreamDesc *sd, PktDesc *pd, void *ud)
 Definition of the callback function invoked when a packet header is going to be deleted. More...
 
typedef DasErrCode(* PktDataHandler) (PktDesc *pd, void *ud)
 Callback function invoked when a data packet is encountered in the input. More...
 
typedef DasErrCode(* DsDescHandler) (StreamDesc *sd, DasDs *dd, void *ud)
 Callback function invoked when a dataset header is encountered on the input stream. More...
 
typedef DasErrCode(* DsDataHandler) (StreamDesc *sd, DasDs *dd, void *ud)
 Callback function invoked when a new data packets for a dataset are encountered on the stream. More...
 
typedef DasErrCode(* CloseHandler) (StreamDesc *sd, void *ud)
 Callback functions that are invoked on Stream Close callback function that is called at the end of the stream. More...
 
typedef DasErrCode(* ExceptionHandler) (OobExcept *se, void *ud)
 Callback functions that handle exceptions. More...
 
typedef DasErrCode(* CommentHandler) (OobComment *se, void *ud)
 Callback functions that handle comments. More...
 

Functions

DAS_API void del_StreamHandler (StreamHandler *pThis)
 Type safe wrapper around free()
 

Detailed Description

Callback processing for das2 stream reads and writes.

These structure allow one to hook in Das2 Stream object processing that is triggered when Headers and Data are read or written to a file.

Typedef Documentation

◆ StreamDescHandler

typedef DasErrCode(* StreamDescHandler) (StreamDesc *sd, void *ud)

Definition of the callback function invoked when a stream header is encountered in the input.

Parameters
sdA pointer to the parsed StreamDesc
pdA pointer to a user data structure, may be NULL.
See also
StreamHandler

◆ PktDescHandler

typedef DasErrCode(* PktDescHandler) (StreamDesc *sd, PktDesc *pd, void *ud)

Definition of the callback function invoked when a packet header is encountered in the input.

Parameters
sdA pointer to the parsed Stream Descriptor
pdA pointer to the parsed Packet Descriptor
udA pointer to a user data structure, may be NULL.
See also
StreamHandler

◆ PktRedefHandler

typedef DasErrCode(* PktRedefHandler) (StreamDesc *sd, PktDesc *pd, void *ud)

Definition of the callback function invoked when a packet header is going to be deleted.

This only occurs if streams re-define packet IDs

Parameters

◆ PktDataHandler

typedef DasErrCode(* PktDataHandler) (PktDesc *pd, void *ud)

Callback function invoked when a data packet is encountered in the input.

Parameters
sdA pointer to the parsed Packet Descriptor
udA pointer to a user data structure, may be NULL.
See also
StreamHandler

◆ DsDescHandler

typedef DasErrCode(* DsDescHandler) (StreamDesc *sd, DasDs *dd, void *ud)

Callback function invoked when a dataset header is encountered on the input stream.

Parameters
sdA pointer to the parsed Stream Descriptor
ddA poirter to a parsed DasDs (dataset) definition
udA pointer to a user data structure, may be NULL

◆ DsDataHandler

typedef DasErrCode(* DsDataHandler) (StreamDesc *sd, DasDs *dd, void *ud)

Callback function invoked when a new data packets for a dataset are encountered on the stream.

Parameters
sdA pointer to the parsed Stream Descriptor
ddA poirter to a parsed DasDs (dataset) definition
piA pointer to the max index of the dataset before the new data were added
udA pointer to a user data structure, may be NULL

◆ CloseHandler

typedef DasErrCode(* CloseHandler) (StreamDesc *sd, void *ud)

Callback functions that are invoked on Stream Close callback function that is called at the end of the stream.

Parameters
sdA pointer to the parsed Stream Descriptor
udA pointer to a user data structure, may be NULL.
See also
StreamHandler

◆ ExceptionHandler

typedef DasErrCode(* ExceptionHandler) (OobExcept *se, void *ud)

Callback functions that handle exceptions.

Parameters
seA pointer to the parsed Exception
udA pointer to a user data structure, may be NULL.
See also
StreamHandler

◆ CommentHandler

typedef DasErrCode(* CommentHandler) (OobComment *se, void *ud)

Callback functions that handle comments.

Parameters
seA pointer to the parsed Comment
udA pointer to a user data structure, may be NULL.
See also
StreamHandler