GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-4-0

Constituent: qsd     Tag: linux-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_apidDsc
 Description of a packet for a specified APID. More...

Typedefs

typedef _CCSDS_apidDscTbl CCSDS_apidDscTbl
 Typedef for struct _CCSDS_apidDscTbl.
typedef _CCSDS_apidDsc CCSDS_apidDsc
 Typedef for struct _CCSDS_apidDsc.
typedef _CCSDS_apidDscNode CCSDS_apidDscNode
 Typedef for _CCSDS_apidDscNode.
typedef enum _CCSDS_APIDDSC_K CCSDS_APIDDSC_K
 Typedef for enum _CCSDS_APIDDSC_K.

Enumerations

enum  _CCSDS_APIDDSC_K { CCSDS_APIDDSC_K_SEQ_RESET = 0xffff }
 Encapsulates know constants of the Apid Descriptor. More...

Functions

int CCSDS_apidDscRegister (CCSDS_apidDscTbl *tbl, CCSDS_apidDsc *dsc, void *ctx, unsigned short int apid, unsigned char *buf, unsigned int buf_size)
 Registers an APID descriptor.
void CCSDS_apidDscConstruct (CCSDS_apidDsc *dsc, void *ctx, unsigned short int apid, unsigned char *buf, unsigned int buf_size)
 Constructs (initializes) an CCSDS_apidDsc, an APID descriptor.
void CCSDS_apidDscReset (CCSDS_apidDsc *dsc)
 Resets the specified APID descriptor to its initial state. This routine is used mainly for error recovery.
CCSDS_apidDscCCSDS_apidDscFind (CCSDS_apidDscTbl *tbl, const CCSDS_istreamHdr *hdr)
 Built-in method to locate the descriptor associated with the specified APID as read from the header.
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.

Detailed Description

CCSDS APID input stream descriptor (interface).

Author:
JJRussell - russell@slac.stanford.edu
   CVS $Id: CCSDS_apidDsc.h,v 1.4 2006/05/08 17:47:07 russell Exp $

Enumeration Type Documentation

enum _CCSDS_APIDDSC_K
 

Encapsulates know 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


Function Documentation

void CCSDS_apidDscConstruct CCSDS_apidDsc dsc,
void *  ctx,
unsigned short int  apid,
unsigned char *  buf,
unsigned int  buf_size
 

Constructs (initializes) an CCSDS_apidDsc, an APID descriptor.

Parameters:
dsc The descriptor to construct/initialize
ctx User provided context parameter
apid The apid used as a key to identify this descriptor
buf A buffer to receive the data for this apid
buf_size The size, in bytes, of buf. This needs to be as large as the biggest CCSDS packet (including data that spans multiple packets).

CCSDS_apidDsc * CCSDS_apidDscFind CCSDS_apidDscTbl tbl,
const CCSDS_istreamHdr hdr
 

Built-in method to locate the descriptor associated with the specified APID as read from the header.

Return values:
Non-NULL,the descriptor
NULL,error,either the descriptor with the specified APID does not exist or the APID cannot be gotten from the header because the header is unreadable (rare)
Parameters:
tbl The table to search
hdr The CCSDS header containing the APID to locate

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

int CCSDS_apidDscRegister CCSDS_apidDscTbl tbl,
CCSDS_apidDsc dsc,
void *  ctx,
unsigned short int  apid,
unsigned char *  buf,
unsigned int  buf_size
 

Registers an APID descriptor.

Return values:
0,Successful 
-1,APID has been previously registered
Parameters:
tbl The apid table
dsc The descriptor to construct/initialize
ctx User provided context parameter
apid The apid used as a key to identify this descriptor
buf A buffer to receive the data for this apid
buf_size The size, in bytes, of buf. This needs to be as large as the biggest CCSDS packet (including data that spans multiple packets).

void CCSDS_apidDscReset CCSDS_apidDsc dsc  ) 
 

Resets the specified APID descriptor to its initial state. This routine is used mainly for error recovery.

Parameters:
dsc The descriptor to reset

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 Thu Sep 14 08:21:02 2006 by  doxygen 1.4.4