GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSD / V0-3-0

Constituent: qsd_print     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

CCSDS_apidDsc.h File Reference

CCSDS APID input stream descriptor (interface). More...

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _CCSDS_apidDscNode
 APID Descriptor node. More...
struct  _CCSDS_apidHandlers
 The list handlers for the APID. More...
struct  _CCSDS_apidDsc
 Description of a packet for a specified APID. More...

Typedefs

typedef _CCSDS_istreamHdr CCSDS_istreamHdr
typedef _CCSDS_apidDscTbl CCSDS_apidDscTbl
typedef _CCSDS_apidDscNode CCSDS_apidDscNode
 Typedef for _CCSDS_apidDscNode.
typedef _CCSDS_apidHandlers CCSDS_apidHandlers
 Typedef for struct _CCSDS_apidHandlers.
typedef _CCSDS_apidDsc CCSDS_apidDsc
 Typedef for struct _CCSDS_apidDsc.
typedef _CCSDS_telemetry CCSDS_telemetry
typedef enum _CCSDS_APIDDSC_BRIDGE_K CCSDS_APIDDSC_BRIDGE_K
 Typedef for enum _CCSDS_APIDDSC_BRIDGE_K.
typedef enum _CCSDS_APIDDSC_K CCSDS_APIDDSC_K
 Typedef for enum _CCSDS_APIDDSC_K.
typedef int(* CCSDS_packetChecker )(void *ctx, const CCSDS_telemetry *pkt, CCSDS_apidDsc *dsc)
 This routine is callback immediately after a CCSDS packet has been read.
typedef int(* CCSDS_payloadProcessor )(void *ctx, const void *payload, int nbytes)
typedef enum _CCSDS_APIDDSC_POPTS_V CCSDS_APIDDSC_POPTS_V
 Typedef for enum _CCSDS_APIDDSC_POPTS_V.
typedef enum _CCSDS_APIDDSC_POPTS_M CCSDS_APIDDSC_POPTS_M
 Typedef for enum _CCSDS_APIDDSC_POPTS_M.

Enumerations

enum  _CCSDS_APIDDSC_BRIDGE_K {
  CCSDS_APIDDSC_BRIDGE_K_PAYLOAD = 0,
  CCSDS_APIDDSC_BRIDGE_K_HEADER = 1,
  CCSDS_APIDDSC_BRIDGE_K_RSVD_2 = 2,
  CCSDS_APIDDSC_BRIDGE_K_PAD = 3
}
 Enumerates how the odd 16-bit word, hereafter called the bridge word, that follows the normal 7 x 16-bit CCSDS header is to be treated. More...
enum  _CCSDS_APIDDSC_K { CCSDS_APIDDSC_K_SEQ_RESET = 0xffff }
 Encapsulates known constants of the Apid Descriptor. More...
enum  _CCSDS_APIDDSC_POPTS_V {
  CCSDS_APIDDSC_POPTS_V_CHECKER = 0,
  CCSDS_APIDDSC_POPTS_V_PROCESSOR = 1,
  CCSDS_APIDDSC_POPTS_V_SWAP = 2
}
 Processing options, right shifts. More...
enum  _CCSDS_APIDDSC_POPTS_M {
  CCSDS_APIDDSC_POPTS_M_CHECKER = (1 << CCSDS_APIDDSC_POPTS_V_CHECKER),
  CCSDS_APIDDSC_POPTS_M_PROCESSOR = (1 << CCSDS_APIDDSC_POPTS_V_PROCESSOR),
  CCSDS_APIDDSC_POPTS_M_SWAP = (1 << CCSDS_APIDDSC_POPTS_V_SWAP)
}
 Processing options, inplace masks. More...

Functions

int CCSDS_apidDscRegister (CCSDS_apidDscTbl *tbl, CCSDS_apidDsc *dsc, void *ctx, unsigned short int apid, CCSDS_APIDDSC_BRIDGE_K bridge, unsigned char *buf, unsigned int buf_size)
void CCSDS_apidDscConstruct (CCSDS_apidDsc *dsc, void *ctx, unsigned short int apid, CCSDS_APIDDSC_BRIDGE_K bridge, unsigned char *buf, unsigned int buf_size)
void CCSDS_apidDscReset (CCSDS_apidDsc *dsc)
CCSDS_apidDscCCSDS_apidDscFind (CCSDS_apidDscTbl *tbl, const CCSDS_istreamHdr *hdr)
int CCSDS_apidDscSwap32 (CCSDS_apidDsc *dsc)
int CCSDS_apidDscSwap16 (CCSDS_apidDsc *dsc)
static __inline const void * CCSDS_apidDscPktBeg (const CCSDS_apidDsc *dsc)
 Returns a pointer to the beginning of the current LDF datagram.
static __inline const void * CCSDS_apidDscPktEnd (const CCSDS_apidDsc *dsc)
 Returns a pointer to the end (actually one bytes past the end) of the current LDF datagram.
static __inline int CCSDS_apidDscPktLen (const CCSDS_apidDsc *dsc)
 Returns the length, in bytes, of the current LDF record.
static __inline void CCSDS_apidDscSeqReset (CCSDS_apidDsc *dsc)
 Resets the sequence number to indicate that the next packet encountered is the first. Since the sequence number of the first packet to be processed is unknown, this effectively disables the sequence checking.
static __inline void CCSDS_apidDscSeqSet (CCSDS_apidDsc *dsc, unsigned short int seq)
 Sets the sequence number to the indicated value. This routine is only of interested when trying to resynch to a stream.
static __inline void CCSDS_apidDscPacketCheckerSet (CCSDS_apidDsc *dsc, int enb, CCSDS_packetChecker rtn, void *ctx)
static __inline void CCSDS_apidDscPayloadProcessorSet (CCSDS_apidDsc *dsc, int enb, CCSDS_payloadProcessor rtn, void *ctx)
static __inline void CCSDS_apidDscPoptsEnable (CCSDS_apidDsc *dsc, unsigned int popt)
static __inline void CCSDS_apidDscPoptsDisable (CCSDS_apidDsc *dsc, unsigned int popt)
static __inline void CCSDS_apidDscPoptsSet (CCSDS_apidDsc *dsc, unsigned int popts)
static __inline unsigned int CCSDS_apidDscPopts (CCSDS_apidDsc *dsc)
static __inline void CCSDS_apidDscPoptsSwapEnable (CCSDS_apidDsc *dsc)
static __inline void CCSDS_apidDscPoptsSwapDisable (CCSDS_apidDsc *dsc)

Detailed Description

CCSDS APID input stream descriptor (interface).

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: CCSDS_apidDsc.h,v 1.3 2008/09/19 18:08:46 russell Exp $

Typedef Documentation

CCSDS_APIDDSC_BRIDGE_K
 

Typedef for enum _CCSDS_APIDDSC_BRIDGE_K.

The three basic styles are
  • Treat it as part of the payload
  • Treat it as part of a (secondary) header
  • Treat it as part of a (secondary) header and interpret it as the number of pad bytes

The first option is treating the packet like a plain vanilla CCSDS packet.
The second option is common, using this word like a bridge word. If this type is selected, then it is read and unpacked as part of the header, but no special meaning is ascribed to it.
The third option is to treat this word as the number of pad bytes. This is would be used, for example, to describe CCSDS packets from the SSR.

typedef int(* CCSDS_packetChecker)(void *ctx, const CCSDS_telemetry *pkt, CCSDS_apidDsc *dsc)
 

This routine is callback immediately after a CCSDS packet has been read.

Returns:
Anything but 0 will stop the processing
Parameters:
ctx The checker's context parameter
pkt The packet header
dsc The APID descriptor. This contains all the information about the current state of the packet plus the last read operation.
This routine can be used for two purposes. If provided, one responsibility is mandatory, it must check the integrity of the packet. This would usually include a call to CCSDS_istreamSivIsError to check the integrity of the IO operation and the basic packet integrity (mainly the sequencing). It could also include other APID specific tests.

int(* CCSDS_payloadProcessor)(void *ctx, const void *payload, int nbytes)
 

Return values:
== 0 Continue
!= 0 Stop
Parameters:
ctx Context parameter
payload The payload to process
nbytes The length, in bytes, of the payload


Enumeration Type Documentation

enum _CCSDS_APIDDSC_BRIDGE_K
 

Enumerates how the odd 16-bit word, hereafter called the bridge word, that follows the normal 7 x 16-bit CCSDS header is to be treated.

Enumerator:
CCSDS_APIDDSC_BRIDGE_K_PAYLOAD  Plan old CCSDS packet
CCSDS_APIDDSC_BRIDGE_K_HEADER  Consider the orphaned 16-bit word as part of the secondary header, that is process it as part of the header reading
CCSDS_APIDDSC_BRIDGE_K_RSVD_2  Reserved for future use, illegal to specify
CCSDS_APIDDSC_BRIDGE_K_PAD  Consider the orphaned 16-bit word as part of the secondary header and interpret it as the number of pad bytes

enum _CCSDS_APIDDSC_K
 

Encapsulates known constants of the Apid Descriptor.

Enumerator:
CCSDS_APIDDSC_K_SEQ_RESET  The initial and reset value of the sequence number. This serves as a flag that there is no store context and so the sequence number of the next packet cannot be checked against the previous, because there is no previous one

enum _CCSDS_APIDDSC_POPTS_M
 

Processing options, inplace masks.

Enumerator:
CCSDS_APIDDSC_POPTS_M_CHECKER  Enable packet checking routine
CCSDS_APIDDSC_POPTS_M_PROCESSOR  Enable payload processing
CCSDS_APIDDSC_POPTS_M_SWAP  Swap payload before processing

enum _CCSDS_APIDDSC_POPTS_V
 

Processing options, right shifts.

Enumerator:
CCSDS_APIDDSC_POPTS_V_CHECKER  Enable packet checking
CCSDS_APIDDSC_POPTS_V_PROCESSOR  Enable payload processing
CCSDS_APIDDSC_POPTS_V_SWAP  Swap payload before processing


Function Documentation

static __inline const void * CCSDS_apidDscPktBeg const CCSDS_apidDsc dsc  )  [static]
 

Returns a pointer to the beginning of the current LDF datagram.

Returns:
A pointer to the beginning of the current LDF datagram
Parameters:
dsc The APID descriptor

static __inline const void * CCSDS_apidDscPktEnd const CCSDS_apidDsc dsc  )  [static]
 

Returns a pointer to the end (actually one bytes past the end) of the current LDF datagram.

Returns:
A pointer to the end of the current LDF datagram
Parameters:
dsc The APID descriptor

static __inline int CCSDS_apidDscPktLen const CCSDS_apidDsc dsc  )  [static]
 

Returns the length, in bytes, of the current LDF record.

Returns:
The length, in bytes, of the current LDF record
Parameters:
dsc The APID descriptor

static __inline void CCSDS_apidDscSeqReset CCSDS_apidDsc dsc  )  [static]
 

Resets the sequence number to indicate that the next packet encountered is the first. Since the sequence number of the first packet to be processed is unknown, this effectively disables the sequence checking.

Parameters:
dsc The APID descriptor

static __inline void CCSDS_apidDscSeqSet CCSDS_apidDsc dsc,
unsigned short int  seq
[static]
 

Sets the sequence number to the indicated value. This routine is only of interested when trying to resynch to a stream.

Parameters:
dsc The APID descriptor
seq The new sequence number. This should be only a maximum of 14 bits.


Generated on Sat Sep 20 02:29:07 2008 by  doxygen 1.4.4