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

Constituent: ccsds_dump     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

CCSDS_pkt.h File Reference

CCSDS Packet Format Library. More...

#include "CCSDS/CCSDS_msg.h"

Include dependency graph for CCSDS_pkt.h:

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


Packet Header Functions

unsigned int CCSDS_pktHdrCreate (void *pkt, CCSDS_Pkt_Type type, unsigned short apid, CCSDS_Pkt_Seq_Flags seqFlags, unsigned short seqCount, unsigned short length, unsigned int secs, unsigned int fc_ss)
 Create a CCSDS packet header.
unsigned int CCSDS_pktHdrSizeof (CCSDS_Pkt_Type type)
 Get the size of a CCSDS packet header.
unsigned int CCSDS_pktHdrVerify (const void *pkt)
 Verify the prescience of a valid CCSDS packet header.
unsigned int CCSDS_pktHdrSetApid (void *pkt, unsigned short apid)
 Set the application ID value in a CCSDS packet header.
unsigned int CCSDS_pktHdrSetLength (void *pkt, unsigned short length)
 Set the packet length value in a CCSDS packet header.
unsigned int CCSDS_pktHdrSetSeqCount (void *pkt, unsigned short seqCount)
 Set the sequence count value in a CCSDS packet header.
unsigned int CCSDS_pktHdrSetSeqFlags (void *pkt, CCSDS_Pkt_Seq_Flags seqFlags)
 Set the sequence flags value in a CCSDS packet header.
unsigned int CCSDS_pktHdrSetTime (void *pkt, unsigned int sec, unsigned int subSec)
 Set the timestamp value in a CCSDS telemetry packet header.
unsigned int CCSDS_pktHdrSetFuncCode (void *pkt, unsigned short funcCode)
 Set the function code value in a CCSDS command packet header.
unsigned int CCSDS_pktHdrGetLength (const void *pkt, unsigned short *length)
 Get the packet length value in a CCSDS packet header.
unsigned int CCSDS_pktHdrGetType (const void *pkt, unsigned short *type)
 Get the packet type value in a CCSDS packet header.
unsigned int CCSDS_pktHdrGetApid (const void *pkt, unsigned short *apid)
 Get the application ID value in a CCSDS packet header.
unsigned int CCSDS_pktHdrGetSeqCount (const void *pkt, unsigned short *seqCount)
 Get the packet sequence count value in a CCSDS packet header.
unsigned int CCSDS_pktHdrGetSeqFlags (const void *pkt, unsigned short *seqFlags)
 Get the packet grouping value in a CCSDS packet header.
unsigned int CCSDS_pktHdrGetTime (const void *pkt, unsigned int *sec, unsigned int *subSec)
 Get the timestamp value in a CCSDS telemetry packet header.
unsigned int CCSDS_pktHdrGetFuncCode (const void *pkt, unsigned short *funcCode)
 Get the function code value in a CCSDS command packet header.

Packet Checksum Functions

unsigned short CCSDS_pktChksumCalc (const void *pkt, int size)
 Calculate a packet checksum value.
unsigned int CCSDS_pktChksumInsert (void *pkt, int size)
 Calculate and insert a packet checksum.
unsigned int CCSDS_pktChksumVerify (const void *pkt, int size)
 Verify a packet checksum value.
unsigned int CCSDS_pktChksumSizeof (void)
 Get the size of a CCSDS telecommand packet checksum.

Typedefs

typedef enum _CCSDS_Pkt_Version CCSDS_Pkt_Version
typedef enum _CCSDS_Pkt_Type CCSDS_Pkt_Type
typedef enum _CCSDS_Pkt_Sec_Hdr_Flag CCSDS_Pkt_Sec_Hdr_Flag
typedef enum _CCSDS_Pkt_Seq_Flags CCSDS_Pkt_Seq_Flags

Enumerations

enum  _CCSDS_Pkt_Version { CCSDS_PKT_VERSION_1 = 0x0000 }
enum  _CCSDS_Pkt_Type {
  CCSDS_PKT_TYPE_TELEM = 0x0000,
  CCSDS_PKT_TYPE_CMD = 0x1000
}
enum  _CCSDS_Pkt_Sec_Hdr_Flag {
  CCSDS_PKT_SEC_HDR_FALSE = 0x0000,
  CCSDS_PKT_SEC_HDR_TRUE = 0x0800
}
enum  _CCSDS_Pkt_Seq_Flags {
  CCSDS_PKT_SEQ_MID = 0x0000,
  CCSDS_PKT_SEQ_FIRST = 0x4000,
  CCSDS_PKT_SEQ_LAST = 0x8000,
  CCSDS_PKT_SEQ_NONE = 0xc000
}

Detailed Description

CCSDS Packet Format Library.

Author:
D.L. Wood
This library contains functions and definitions for manipulating and examining the values in the GLAST LAT CCSDS Version 1 Packet headers. The functions will work with both Telecommand Packets (uplink and SC command) and Telemetry Source Packets (downlink).

The specifications for the CCSDS Packet header formats may be found in the following documents:

Telecommand - CCSDS Telecommand Part 3 (203.0-B-1 Blue Book)
Telemetry - CCSDS Packet Telemetry (102.0-B-5 Blue Book)
Time Formats - CCSDS Time Code Formats (301.0-B-2 Blue Book)
GLAST Specific Formats - GLAST LAT - SC Interface Control Document
CCSDS Packet Library User Manual

There is a function CCSDS_pktHdrCreate(), which will create a new packet header in user memory from scratch. All header member values must be specified. For each of the header members, the function CCSDS_pktHdrGetXXX() and CCSDS_pktHdrSetXXX() will selectively retrive or alter an existing CCSDS packet header in user memory. The packet checksum functions are primarily intented for telecommand packets, and implement the checksum algoritm detailed in the SC-LAT ICD.


Typedef Documentation

CCSDS_Pkt_Sec_Hdr_Flag
 

The typedef for _CCSDS_Pkt_Sec_Hdr_Flag.

CCSDS_Pkt_Seq_Flags
 

The typedef for _CCSDS_Pkt_Seq_Flags

CCSDS_Pkt_Type
 

The typedef for _CCSDS_Pkt_Type.

CCSDS_Pkt_Version
 

The typedef for _CCSDS_Pkt_Version.


Enumeration Type Documentation

enum _CCSDS_Pkt_Sec_Hdr_Flag
 

CCSDS packet secondary header flag. The functions in this library support using either a 6 byte telemetry secondary header or a 2 byte telecommand secondary header.

Enumerator:
CCSDS_PKT_SEC_HDR_FALSE  The packet does not contain a secondary header.
CCSDS_PKT_SEC_HDR_TRUE  The packet does contain a secondary header.

enum _CCSDS_Pkt_Seq_Flags
 

CCSDS packet sequence flags.

Enumerator:
CCSDS_PKT_SEQ_MID  This packet is in the middle of a sequence.
CCSDS_PKT_SEQ_FIRST  This packet is the first of a sequence.
CCSDS_PKT_SEQ_LAST  This packet is the last of a sequence.
CCSDS_PKT_SEQ_NONE  This packet is not part of a sequence.

enum _CCSDS_Pkt_Type
 

CCSDS packet type.

Enumerator:
CCSDS_PKT_TYPE_TELEM  Telemetry Source packet.
CCSDS_PKT_TYPE_CMD  Telecommand packet.

enum _CCSDS_Pkt_Version
 

CCSDS packet version number. Only CCSDS_PKT_VERSION_1 specifics are supported by the library functions.

Enumerator:
CCSDS_PKT_VERSION_1  Version 1 CCSDS packet.


Generated on Tue Oct 11 22:52:07 2005 by  doxygen 1.4.4