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

Constituent: ccsds_pkt     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

CCSDS_pkt_chksum.c File Reference

Function definitions for CCSDS packet checksum library. More...

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

Include dependency graph for CCSDS_pkt_chksum.c:

Include dependency graph

Packet Checksum Functions

unsigned int CCSDS_pktChksumSizeof (void)
 Get the size of a CCSDS telecommand packet checksum.

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.


Detailed Description

Function definitions for CCSDS packet checksum library.

Author:
D.L. Wood

Function Documentation

unsigned short CCSDS_pktChksumCalc const void *  pkt,
int  size
 

Calculate a packet checksum value.

Calculates the value of a packet checksum over a range of packet data. The algorithm is:

  1. Start with an initial checksum value of '0'.
  2. Add the next byte from the data to the running checksum value.
  3. Advance to the next word and go to step 2.

Parameters:
pkt A pointer to the beginning of the range to checksum.
size The number of bytes to checksum.
Returns:
The checksum value.

unsigned int CCSDS_pktChksumInsert void *  pkt,
int  size
 

Calculate and insert a packet checksum.

Calculates the value of a packet checksum over a range of packet data. The checksum value is inserted at the proper location at the end of the packet application data.

Parameters:
pkt A pointer to the beginning of the range to checksum (packet header).
size The total number of bytes in the packet including packet header and checksum slot.
Returns:
A CSDS MSG value.

Here is the call graph for this function:

unsigned int CCSDS_pktChksumSizeof void   ) 
 

Get the size of a CCSDS telecommand packet checksum.

Returns the size in bytes of a CCSDS telecommand packet checksum word.

Returns:
The checksum size.

unsigned int CCSDS_pktChksumVerify const void *  pkt,
int  size
 

Verify a packet checksum value.

Calculates the value of a packet checksum over a range of packet data. The checksum value is compared to the value stored at the end of the packet application data.

Parameters:
pkt A pointer to the beginning of the range to checksum (packet header).
size The total number of bytes in the packet including packet header and checksum slot.
Returns:
A CSDS MSG value.

Here is the call graph for this function:


Generated on Sun Dec 12 05:51:34 2004 by doxygen 1.3.3