GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CCSDS / V3-5-3 > ccsds_pkt_boot / rhel6-64
#include <CCSDS/CCSDS_pkt.h>
#include <CCSDS_pkt_private.h>
#include <PBI/PTR.h>
Functions | |
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. |
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:
pkt | A pointer to the beginning of the range to checksum. | |
size | The number of bytes to checksum. |
Referenced by CCSDS_pktChksumInsert(), and CCSDS_pktChksumVerify().
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.
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. |
References CCSDS_PKT_MSG, CCSDS_pktChksumCalc(), and NULL.
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.
References CCSDS_PKT_CHKSUM_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.
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. |
References CCSDS_PKT_MSG, CCSDS_pktChksumCalc(), and NULL.