GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > CCSDS / V3-3-2

Constituent: ccsds_pri     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

CCSDS_pri_hdr.c File Reference

Function definitions for CCSDS primary header packet header library. More...

#include "CCSDS/CCSDS_pri.h"
#include "CCSDS/CCSDS_pkt.h"
#include "CCSDS_pkt_private.h"

Include dependency graph for CCSDS_pri_hdr.c:

Include dependency graph

Functions

unsigned int CCSDS_priHdrSizeof (void)
 Get the size of a CCSDS packet primary header.

unsigned int CCSDS_priHdrVerify (const void *pkt)
 Verify the prescience of a valid CCSDS packet primary header.

unsigned int CCSDS_priHdrGetLength (const void *pkt, unsigned short *length)
 Get the packet length value in a CCSDS packet primary header.

unsigned int CCSDS_priHdrGetType (const void *pkt, unsigned short *type)
 Get the packet type value in a CCSDS packet header.

unsigned int CCSDS_priHdrGetApid (const void *pkt, unsigned short *apid)
 Get the application ID value in a CCSDS packet primary header.

unsigned int CCSDS_priHdrGetSeqCount (const void *pkt, unsigned short *seqCount)
 Get the packet sequence count value in a CCSDS packet primary header.

unsigned int CCSDS_priHdrGetSeqFlags (const void *pkt, unsigned short *seqFlags)
 Get the packet grouping value in a CCSDS packet primary header.


Detailed Description

Function definitions for CCSDS primary header packet header library.

Author:
D.L. Wood

Function Documentation

unsigned int CCSDS_priHdrGetApid const void *  pkt,
unsigned short *  apid
 

Get the application ID value in a CCSDS packet primary header.

Returns the CCSDS packet application ID.

Parameters:
pkt A pointer to the start of the packet buffer.
apid Stores the application ID value.
Returns:
A CSDS MSG value.

unsigned int CCSDS_priHdrGetLength const void *  pkt,
unsigned short *  length
 

Get the packet length value in a CCSDS packet primary header.

Returns the value of the CCSDS packet header length member. The size of the packet secondary header is not taken into account when extracting the packet header length member, so that the return value from this function includes the secondary header size and the size of application data following the packet secondary header.

Parameters:
pkt A pointer to the start of the packet buffer.
length Stores the length in bytes of the user application data to following the packet header.
Returns:
A CSDS MSG value.

int CCSDS_priHdrGetSeqCount const void *  pkt,
unsigned short *  seqCount
 

Get the packet sequence count value in a CCSDS packet primary header.

Returns the CCSDS packet sequence count.

Parameters:
pkt A pointer to the start of the packet buffer.
seqCount Stores the sequence count value.
Returns:
A CSDS MSG value.

unsigned int CCSDS_priHdrGetSeqFlags const void *  pkt,
unsigned short *  seqFlags
 

Get the packet grouping value in a CCSDS packet primary header.

Returns the CCSDS packet sequence flags.

Parameters:
pkt A pointer to the start of the packet buffer.
seqFlags Stores the sequence flags value:
CCSDS_PKT_SEQ_FIRST The packet is the first packet in a group. CCSDS_PKT_SEQ_MID The packet is an intermediate packet in a group. CCSDS_PKT_SEQ_LAST The packet is the last packet in a group. CCSDS_PKT_SEQ_NONE The packet is standalone and not part of a group.
Returns:
A CSDS MSG value.

unsigned int CCSDS_priHdrGetType const void *  pkt,
unsigned short *  type
 

Get the packet type value in a CCSDS packet header.

Returns the CCSDS packet header type.

Parameters:
pkt A pointer to the start of the packet buffer.
type Stores the packet type:
CCSDS_PKT_TYPE_CMD The packet is a Telecommand packet.
CCSDS_PKT_TYPE_TELEM The packet is a Telemetry Source packet.
Returns:
A CSDS MSG value.

unsigned int CCSDS_priHdrSizeof void   ) 
 

Get the size of a CCSDS packet primary header.

Returns the size of the CCSDS packet primary header.

Returns:
The size in bytes of a CCSDS packet primary header.

unsigned int CCSDS_priHdrVerify const void *  pkt  ) 
 

Verify the prescience of a valid CCSDS packet primary header.

Checks to see if the contents of pkt contain a properly formatted CCSDS packet primary header.

Parameters:
pkt A pointer to the start of the packet buffer.
Returns:
A CSDS MSG value.


Generated on Tue Mar 22 22:29:46 2005 by doxygen 1.3.3