GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSD / V0-5-0 > qsd_print / rhel5-64
#include <QSD/CCSDS_telemetryPrint.h>
Classes | |
struct | _CCSDS_istreamCsb |
The stream's completion status block. This contains more detailed information about why processing was stopped. More... | |
Typedefs | |
typedef struct _CCSDS_istream | CCSDS_istream |
typedef enum _CCSDS_ISTREAM_SIV_S | CCSDS_ISTREAM_SIV_S |
Typedef for CCSDS_ISTREAM_SIV_S. | |
typedef enum _CCSDS_ISTREAM_SIV_V | CCSDS_ISTREAM_SIV_V |
Typedef for CCSDS_ISTREAM_SIV_V. | |
typedef enum _CCSDS_ISTREAM_SIV_M | CCSDS_ISTREAM_SIV_M |
Typedef for CCSDS_ISTREAM_SIV_M. | |
typedef enum _CCSDS_ISTREAM_PKT_STATE_K | CCSDS_ISTREAM_PKT_STATE_K |
Typedef for enum _CCSDS_ISTREAM_PKT_STATE_K. | |
typedef enum _CCSDS_ISTREAM_SIV_K | CCSDS_ISTREAM_SIV_K |
Typedef for enum _CCSDS_ISTREAM_SIV_K. | |
typedef enum _CCSDS_ISTREAM_PKT_CHECK_OPTS_M | CCSDS_ISTREAM_PKT_CHECK_OPTS_M |
Typedef for CCSDS_ISTREAM_PKT_CHECK_OPTS_M. | |
typedef int(* | CCSDS_istreamReader )(void *prm, void *buf, int nbytes, int pbytes) |
Routine to read the specified number of bytes from the input stream. | |
typedef int(* | CCSDS_istreamTeller )(void const *prm) |
Routine to give the current position in the stream. As an example, for files, this will do an ftell. | |
typedef int(* | CCSDS_istreamCloser )(void *prm) |
Routine to read the specified number of bytes from the input stream. | |
typedef int(* | CCSDS_istreamResolver )(void *ctx, CCSDS_telemetry const *pkt, CCSDS_apidDsc **dsc) |
User callback to CCSDS_istreamProcess that resolves an apid to its controlling APID descriptor. | |
typedef struct _CCSDS_istreamCsb | CCSDS_istreamCsb |
Typedef for struct _CCSDS_istreamCsb. | |
Enumerations | |
enum | _CCSDS_ISTREAM_SIV_S { CCSDS_ISTREAM_SIV_S_SEQGAP = 16, CCSDS_ISTREAM_SIV_S_PRV_FIRST = 1, CCSDS_ISTREAM_SIV_S_PRV_LAST = 1, CCSDS_ISTREAM_SIV_S_PRV = 2, CCSDS_ISTREAM_SIV_S_CUR_FIRST = 1, CCSDS_ISTREAM_SIV_S_CUR_LAST = 1, CCSDS_ISTREAM_SIV_S_CUR = 2, CCSDS_ISTREAM_SIV_S_RSVD_20 = 1, CCSDS_ISTREAM_SIV_S_RSVD_21 = 1, CCSDS_ISTREAM_SIV_S_RSVD_22 = 1, CCSDS_ISTREAM_SIV_S_RSVD_23 = 1, CCSDS_ISTREAM_SIV_S_ERR = 8, CCSDS_ISTREAM_SIV_S_ERR_EOS = 1, CCSDS_ISTREAM_SIV_S_ERR_RDHDR = 1, CCSDS_ISTREAM_SIV_S_ERR_BADHDR = 1, CCSDS_ISTREAM_SIV_S_ERR_SEQ = 1, CCSDS_ISTREAM_SIV_S_ERR_SEQNUM = 1, CCSDS_ISTREAM_SIV_S_ERR_RDDAT = 1, CCSDS_ISTREAM_SIV_S_ERR_OVRRUN = 1, CCSDS_ISTREAM_SIV_S_ERR_SUMMARY = 1 } |
State Information Vector, bit field sizes. More... | |
enum | _CCSDS_ISTREAM_SIV_V { CCSDS_ISTREAM_SIV_V_SEQGAP = 0, CCSDS_ISTREAM_SIV_V_PRV_FIRST = 16, CCSDS_ISTREAM_SIV_V_PRV_LAST = 17, CCSDS_ISTREAM_SIV_V_PRV = 16, CCSDS_ISTREAM_SIV_V_CUR_FIRST = 18, CCSDS_ISTREAM_SIV_V_CUR_LAST = 19, CCSDS_ISTREAM_SIV_V_CUR = 18, CCSDS_ISTREAM_SIV_V_RSVD_20 = 20, CCSDS_ISTREAM_SIV_V_RSVD_21 = 21, CCSDS_ISTREAM_SIV_V_RSVD_22 = 22, CCSDS_ISTREAM_SIV_V_RSVD_23 = 23, CCSDS_ISTREAM_SIV_V_ERR = 24, CCSDS_ISTREAM_SIV_V_ERR_EOS = 24, CCSDS_ISTREAM_SIV_V_ERR_RDHDR = 25, CCSDS_ISTREAM_SIV_V_ERR_BADHDR = 26, CCSDS_ISTREAM_SIV_V_ERR_SEQ = 27, CCSDS_ISTREAM_SIV_V_ERR_SEQNUM = 28, CCSDS_ISTREAM_SIV_V_ERR_RDDAT = 29, CCSDS_ISTREAM_SIV_V_ERR_OVRRUN = 30, CCSDS_ISTREAM_SIV_V_ERR_SUMMARY = 31 } |
State Information Vector, right justified bit field offsets. More... | |
enum | _CCSDS_ISTREAM_SIV_M { CCSDS_ISTREAM_SIV_M_SEQGAP, CCSDS_ISTREAM_SIV_M_PRV_FIRST, CCSDS_ISTREAM_SIV_M_PRV_LAST, CCSDS_ISTREAM_SIV_M_PRV, CCSDS_ISTREAM_SIV_M_CUR_FIRST, CCSDS_ISTREAM_SIV_M_CUR_LAST, CCSDS_ISTREAM_SIV_M_CUR, CCSDS_ISTREAM_SIV_M_RSVD_20, CCSDS_ISTREAM_SIV_M_RSVD_21, CCSDS_ISTREAM_SIV_M_RSVD_22, CCSDS_ISTREAM_SIV_M_RSVD_23, CCSDS_ISTREAM_SIV_M_ERR_EOS, CCSDS_ISTREAM_SIV_M_ERR_RDHDR, CCSDS_ISTREAM_SIV_M_ERR_BADHDR, CCSDS_ISTREAM_SIV_M_ERR_SEQ, CCSDS_ISTREAM_SIV_M_ERR_SEQNUM, CCSDS_ISTREAM_SIV_M_ERR_RDDAT, CCSDS_ISTREAM_SIV_M_ERR_OVRRUN, CCSDS_ISTREAM_SIV_M_ERR_SUMMARY, CCSDS_ISTREAM_SIV_M_ERR, CCSDS_ISTREAM_SIV_M_ERR_SYNCH } |
State Information Vector, in place mask. More... | |
enum | _CCSDS_ISTREAM_PKT_STATE_K { CCSDS_ISTREAM_PKT_STATE_K_MID = 0, CCSDS_ISTREAM_PKT_STATE_K_FIRST = 1, CCSDS_ISTREAM_PKT_STATE_K_LAST = 2, CCSDS_ISTREAM_PKT_STATE_K_ONLY = 3 } |
Enumerates the values of a packet's state. More... | |
enum | _CCSDS_ISTREAM_SIV_K { CCSDS_ISTREAM_SIV_K_PRV_ONLY, CCSDS_ISTREAM_SIV_K_PRV_FIRST, CCSDS_ISTREAM_SIV_K_PRV_MID, CCSDS_ISTREAM_SIV_K_PRV_LAST, CCSDS_ISTREAM_SIV_K_CUR_ONLY, CCSDS_ISTREAM_SIV_K_CUR_FIRST, CCSDS_ISTREAM_SIV_K_CUR_MID, CCSDS_ISTREAM_SIV_K_CUR_LAST } |
Enumerates the values of in place fields of the SIV word. These are all convenience symbols, all being derived from previously defined symbols. More... | |
enum | _CCSDS_ISTREAM_PKT_CHECK_OPTS_M { CCSDS_ISTREAM_PKT_CHECK_OPTS_M_NORESYNCH = 1 << 0, CCSDS_ISTREAM_PKT_CHECK_OPTS_M_PRINT_HDR = 1 << 4, CCSDS_ISTREAM_PKT_CHECK_OPTS_M_NOPRINT_SYNCH_ERR = 1 << 8, CCSDS_ISTREAM_PKT_CHECK_OPTS_M_NOPRINT_SIV_ERR = 1 << 9 } |
Options, in the form of bit masks, for the precanned CCSDS_istream packet checker routine. More... | |
enum | _CCSDS_ISTREAM_RESOLVER_STATUS_K { CCSDS_ISTREAM_RESOLVER_STATUS_K_SUCCESS = 0, CCSDS_ISTREAM_RESOLVER_STATUS_K_IGNORE = 1, CCSDS_ISTREAM_RESOLVER_STATUS_K_NOTFOUND = 2, CCSDS_ISTREAM_RESOLVER_STATUS_K_STOP = 3 } |
Permitted return values of the CCSDS APID resolver routine. More... | |
enum | _CCSDS_ISTREAM_STATUS_K { CCSDS_ISTREAM_STATUS_K_IO_READ_ERROR = -5, CCSDS_ISTREAM_STATUS_K_PACKET_ERROR = -4, CCSDS_ISTREAM_STATUS_K_IO_SKIP_ERROR = -3, CCSDS_ISTREAM_STATUS_K_VERIFY_ERROR = -2, CCSDS_ISTREAM_STATUS_K_IO_HEADER_ERROR = -1, CCSDS_ISTREAM_STATUS_K_EOS = 0, CCSDS_ISTREAM_STATUS_K_RESOLVER_STOP = 1, CCSDS_ISTREAM_STATUS_K_CHECKER_STOP = 2, CCSDS_ISTREAM_STATUS_K_PROCESSOR_STOP = 3 } |
Enumerates the return status codes. More... | |
Functions | |
int | CCSDS_istreamSizeof (void) |
CCSDS_istream * | CCSDS_istreamNew (void) |
int | CCSDS_istreamConstruct (CCSDS_istream *istream) |
int | CCSDS_istreamConnect (CCSDS_istream *istream, void *prm, CCSDS_istreamReader read, CCSDS_istreamCloser close, CCSDS_istreamTeller tell) |
int | CCSDS_istreamDatAdvance (CCSDS_istream *istream, CCSDS_telemetry const *packet, CCSDS_apidDsc *dsc) |
int | CCSDS_istreamHdrRead (CCSDS_istream *istream, CCSDS_telemetry *packet) |
int | CCSDS_istreamDatRead (CCSDS_istream *istream, CCSDS_telemetry const *packet, CCSDS_apidDsc *dsc) |
int | CCSDS_istreamPktCheck (unsigned int opts, CCSDS_istream *istream, CCSDS_telemetry const *packet, CCSDS_apidDsc *dsc) |
int | CCSDS_istreamPktResynch (CCSDS_istream *istream, CCSDS_telemetry const *packet, CCSDS_apidDsc *dsc) |
int | CCSDS_istreamFileOpen (CCSDS_istream *istream, char const *filename, unsigned int options, unsigned char *buf, unsigned int buf_size) |
unsigned int | CCSDS_istreamTell (CCSDS_istream const *istream) |
int | CCSDS_istreamProcess (CCSDS_istream *stream, CCSDS_istreamCsb *csb, CCSDS_istreamResolver resolve_rtn, void *resolve_ctx) |
int | CCSDS_istreamClose (CCSDS_istream *istream) |
int | CCSDS_istreamDestroy (CCSDS_istream *istream) |
void | CCSDS_istreamHdrPrint (CCSDS_telemetry const *packet) |
static __inline int | CCSDS_istreamSivConstruct (void) |
Initializes the State Information Vector to a known and beign state. | |
static __inline int | CCSDS_istreamSivCurFlags (int siv) |
Returns the flags associated with the current packet packet. | |
static __inline int | CCSDS_istreamSivPrvFlags (int siv) |
Returns the flags associated with the last previously read packet. | |
static __inline int | CCSDS_istreamSivIsError (int siv) |
Returns non-zero if State Information Vector, siv, is in error. | |
static __inline int | CCSDS_istreamSivIsResynchable (int siv) |
Returns non-zero if State Information Vector, siv, has a recoverable synchronization error. | |
static __inline int | CCSDS_istreamSivIsFirst (int siv) |
Returns non-zero if the current packet is the first packet, either alone or in a sequence. | |
static __inline int | CCSDS_istreamSivIsLast (int siv) |
Returns non-zero if the current packet is the last packet, either alone or in a sequence. | |
static __inline int | CCSDS_istreamSivIsMid (int siv) |
Returns non-zero if the current packet is the middle packet in a sequence. | |
static __inline int | CCSDS_istreamSivIsOnly (int siv) |
Returns non-zero if the current packet is the only packet, i.e. bare packet, not a member of a sequence. | |
static __inline int | CCSDS_istreamSivIoUpdate (int siv, unsigned int status) |
Updates the SIV according to the IO status. | |
static __inline int | CCSDS_istreamSivFlagsUpdate (int siv, unsigned int flags) |
Updates the sequencing state of the SIV. | |
Variables | |
enum _CCSDS_ISTREAM_RESOLVER_STATUS_K | CCSDS_ISTREAM_RESOLVER_STATUS_K |
Typedef for enum _CCSDS_ISTREAM_RESOLVER_STATUS_K. | |
enum _CCSDS_ISTREAM_STATUS_K | CCSDS_ISTREAM_STATUS_K |
Typedef enum _CCSDS_ISTREAM_STATUS_K. |
CVS $Id: CCSDS_istream.h,v 1.8 2011/03/26 21:06:58 russell Exp $
Typedef for CCSDS_ISTREAM_PKT_CHECK_OPTS_M.
Typedef for enum _CCSDS_ISTREAM_PKT_STATE_K.
A packet's state is determined by the values of 2 bits, with bit 0 representing the 'is first packet' and bit 1 representing 'is last packet' Under these definitions
int(* CCSDS_istreamCloser)(void *prm) |
Routine to read the specified number of bytes from the input stream.
prm | User specified parameter |
int(* CCSDS_istreamReader)(void *prm, void *buf, int nbytes, int pbytes) |
Routine to read the specified number of bytes from the input stream.
0,All | is well | |
-1,EOF,this | should only occur when the file read is being done from CCSDS_istreamHdrRead. | |
>0,Any | error other error. These should never occur. |
prm | User specified parameter | |
buf | The destination buffer | |
nbytes | The number of bytes to read | |
pbytes | The number of pad bytes to skip at the end. This number is guaranteed to be no larger than 16 bytes. |
int(* CCSDS_istreamResolver)(void *ctx, CCSDS_telemetry const *pkt, CCSDS_apidDsc **dsc) |
User callback to CCSDS_istreamProcess that resolves an apid to its controlling APID descriptor.
ctx | Context parameter | |
pkt | The CCSDS telemetry packet (only the header) | |
dsc | Returned as a pointer to the apid descriptor |
int(* CCSDS_istreamTeller)(void const *prm) |
Routine to give the current position in the stream. As an example, for files, this will do an ftell.
prm | User specified parameter |
Options, in the form of bit masks, for the precanned CCSDS_istream packet checker routine.
Enumerates the values of a packet's state.
Permitted return values of the CCSDS APID resolver routine.
enum _CCSDS_ISTREAM_SIV_K |
Enumerates the values of in place fields of the SIV word. These are all convenience symbols, all being derived from previously defined symbols.
enum _CCSDS_ISTREAM_SIV_M |
State Information Vector, in place mask.
enum _CCSDS_ISTREAM_SIV_S |
State Information Vector, bit field sizes.
enum _CCSDS_ISTREAM_SIV_V |
State Information Vector, right justified bit field offsets.
Enumerates the return status codes.
static __inline int CCSDS_istreamSivConstruct | ( | void | ) | [static] |
Initializes the State Information Vector to a known and beign state.
References CCSDS_ISTREAM_SIV_K_CUR_ONLY, and CCSDS_ISTREAM_SIV_K_PRV_ONLY.
static __inline int CCSDS_istreamSivCurFlags | ( | int | siv | ) | [static] |
Returns the flags associated with the current packet packet.
siv | The state information vector |
References CCSDS_ISTREAM_SIV_M_CUR, and CCSDS_ISTREAM_SIV_V_CUR.
static __inline int CCSDS_istreamSivFlagsUpdate | ( | int | siv, | |
unsigned int | flags | |||
) | [static] |
Updates the sequencing state of the SIV.
siv | The current SIV | |
flags | The new sequence flags |
References CCSDS_ISTREAM_SIV_M_CUR, CCSDS_ISTREAM_SIV_M_PRV, and CCSDS_ISTREAM_SIV_V_PRV.
static __inline int CCSDS_istreamSivIoUpdate | ( | int | siv, | |
unsigned int | status | |||
) | [static] |
Updates the SIV according to the IO status.
siv | The current SIV | |
status | The io status |
References CCSDS_ISTREAM_SIV_M_ERR_EOS, CCSDS_ISTREAM_SIV_M_ERR_RDDAT, and CCSDS_ISTREAM_SIV_M_ERR_SUMMARY.
static __inline int CCSDS_istreamSivIsError | ( | int | siv | ) | [static] |
Returns non-zero if State Information Vector, siv, is in error.
=0 | Is not in error | |
!=0 | Is in error |
siv | The state information vector |
Referenced by QSD_process().
static __inline int CCSDS_istreamSivIsFirst | ( | int | siv | ) | [static] |
Returns non-zero if the current packet is the first packet, either alone or in a sequence.
=0 | Is not the first packet, either alone or in a sequence | |
!=0 | Is the first packet, either alone or in a sequence |
siv | The state information vector |
References CCSDS_ISTREAM_SIV_M_CUR_FIRST.
static __inline int CCSDS_istreamSivIsLast | ( | int | siv | ) | [static] |
Returns non-zero if the current packet is the last packet, either alone or in a sequence.
=0 | Is not the last packet, either alone or in a sequence | |
!=0 | Is the last packet, either alone or in a sequence |
siv | The state information vector |
References CCSDS_ISTREAM_SIV_M_CUR_LAST.
Referenced by QSD_process().
static __inline int CCSDS_istreamSivIsMid | ( | int | siv | ) | [static] |
Returns non-zero if the current packet is the middle packet in a sequence.
=0 | Is not the last packet in a sequence | |
!=0 | Is the last packet in a sequence |
siv | The state information vector |
References CCSDS_ISTREAM_SIV_K_CUR_MID, and CCSDS_ISTREAM_SIV_M_CUR.
static __inline int CCSDS_istreamSivIsOnly | ( | int | siv | ) | [static] |
Returns non-zero if the current packet is the only packet, i.e. bare packet, not a member of a sequence.
=0 | Is not the only packet | |
!=0 | Is the only packet |
siv | The state information vector |
References CCSDS_ISTREAM_SIV_K_CUR_ONLY, and CCSDS_ISTREAM_SIV_M_CUR.
static __inline int CCSDS_istreamSivIsResynchable | ( | int | siv | ) | [static] |
Returns non-zero if State Information Vector, siv, has a recoverable synchronization error.
=0 | Packet stream cannot be resynchronized | |
!=0 | Resynchronization may be attempted, although there is no guarantee of success |
siv | The state information vector |
References CCSDS_ISTREAM_SIV_M_ERR_SYNCH.
static __inline int CCSDS_istreamSivPrvFlags | ( | int | siv | ) | [static] |
Returns the flags associated with the last previously read packet.
siv | The state information vector |
References CCSDS_ISTREAM_SIV_M_PRV, and CCSDS_ISTREAM_SIV_V_PRV.
Typedef enum _CCSDS_ISTREAM_STATUS_K.
The codes are organized so that < 0 End of stream or internal errors, either IO errors or the CCSDS packets are mal-formed or sequenced. > 0 User requested stops = 0 Continue, processing so far has been successfully completed but user requested control be returned to calling program. After completing what every processing, the user should recall the processing routine.