GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > QSE / V1-5-2

Constituent: qsd     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

CCSDS_apidDsc.c File Reference

APID descriptor management. More...

#include "QSE/CCSDS_apidDsc.h"
#include "QSE/CCSDS_istream.h"
#include "CCSDS/CCSDS_pkt.h"
#include "MSG/MSG_macdefs.h"

Include dependency graph for CCSDS_apidDsc.c:


Data Structures

struct  _CCSDS_apidDscTbl
 The table of APID descriptors. More...

Functions

static __inline CCSDS_apidDscNodeinsert (CCSDS_apidDscNode *head, CCSDS_apidDscNode *node)
 Inserts an APID descriptor on the que.
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.
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_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.

Detailed Description

APID descriptor management.

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

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

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 CCSDS_apidDscNode insert CCSDS_apidDscNode head,
CCSDS_apidDscNode node
[static]
 

Inserts an APID descriptor on the que.

Returns:
The previous last descriptor on the que
Parameters:
head The que head
node The node to insert on the que


Generated on Tue Nov 21 01:38:45 2006 by  doxygen 1.4.4