GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FBS / V0-3-1 > fbs_rtos / rad750
#include <string.h>
#include <FBS/FBS_pubrtos.h>
#include <FBS/FBS_msgs.h>
#include <ZLIB/zlib.h>
#include <PBI/Endianness.h>
#include <PBI/PTR.h>
#include <FBS_prvrtos.h>
Functions | |
unsigned int | FILE_hdrSizeof (void) |
Get the size of a file header. | |
unsigned int | FILE_hdrCreate (void *buf, unsigned int length, unsigned int time, unsigned int chksum, unsigned short type, unsigned int key, FILE_Hdr_Compression_Flag compress, const char *name) |
Create a new file header. | |
unsigned int | FILE_hdrGetLength (const void *buf, unsigned int *length) |
Get the file data size. | |
unsigned int | FILE_hdrGetChksum (const void *buf, unsigned int *chksum) |
Get the file checksum. | |
unsigned int | FILE_hdrGetTime (const void *buf, unsigned int *time) |
Get the file timestamp. | |
unsigned int | FILE_hdrGetType (const void *buf, unsigned short *type) |
Get the file type. | |
unsigned int | FILE_hdrGetKey (const void *buf, unsigned int *key) |
Get the file key. | |
unsigned int | FILE_hdrGetCompression (const void *buf, unsigned short *compress) |
Get the file compression flag. | |
unsigned int | FILE_hdrGetName (const void *buf, char *name) |
Get the file name string. | |
unsigned int | FILE_hdrVerify (const void *buf) |
Verify the integrety of a file header. |
unsigned int FILE_hdrCreate | ( | void * | buf, | |
unsigned int | length, | |||
unsigned int | time, | |||
unsigned int | chksum, | |||
unsigned short | type, | |||
unsigned int | key, | |||
FILE_Hdr_Compression_Flag | compress, | |||
const char * | name | |||
) |
Create a new file header.
buf | A pointer to the file header buffer. | |
length | The size in bytes of file data to follow the file header. | |
time | The file timestamp, in seconds. | |
chksum | The checksum of the remainder of the file header and file data. | |
type | The file type code. | |
key | The file key value. | |
compress | #FILE_HDR_UNCOMPRESSED - The file data following the header is uncompressed. #FILE_HDR_COMPRESSED The file data following the header is compressed. | |
name | The ASCII file name. This parameter should point to a buffer containing #FILE_HDR_NAME_SIZE characters. |
References _FILE_Hdr::file_chksum_lsw, _FILE_Hdr::file_chksum_msw, FILE_HDR_M_COMPRESS, FILE_HDR_MSG, FILE_HDR_NAME_SIZE, FILE_HDR_SIZE, FILE_HDR_VERSION_2, _FILE_Hdr::file_info, _FILE_Hdr::file_key_lsw, _FILE_Hdr::file_key_msw, _FILE_Hdr::file_length_lsw, _FILE_Hdr::file_length_msw, _FILE_Hdr::file_name, _FILE_Hdr::file_time_lsw, _FILE_Hdr::file_time_msw, _FILE_Hdr::file_type, _FILE_Hdr::hdr_chksum_lsw, and _FILE_Hdr::hdr_chksum_msw.
unsigned int FILE_hdrGetChksum | ( | const void * | buf, | |
unsigned int * | chksum | |||
) |
Get the file checksum.
buf | A pointer to the start of the file header buffer. | |
chksum | Stores the checksum value. |
References _FILE_Hdr::file_chksum_lsw, _FILE_Hdr::file_chksum_msw, and FILE_HDR_MSG.
unsigned int FILE_hdrGetCompression | ( | const void * | buf, | |
unsigned short * | compress | |||
) |
Get the file compression flag.
buf | A pointer to the start of the file header buffer. | |
compress | Stores the compression flag value. |
References FILE_HDR_M_COMPRESS, FILE_HDR_MSG, and _FILE_Hdr::file_info.
unsigned int FILE_hdrGetKey | ( | const void * | buf, | |
unsigned int * | key | |||
) |
Get the file key.
buf | A pointer to the start of the file header buffer. | |
key | Stores the key value. |
References FILE_HDR_MSG, _FILE_Hdr::file_key_lsw, and _FILE_Hdr::file_key_msw.
unsigned int FILE_hdrGetLength | ( | const void * | buf, | |
unsigned int * | length | |||
) |
Get the file data size.
buf | A pointer to the start of the file header buffer. | |
length | Stores the length value. |
References FILE_HDR_MSG, _FILE_Hdr::file_length_lsw, and _FILE_Hdr::file_length_msw.
unsigned int FILE_hdrGetName | ( | const void * | buf, | |
char * | name | |||
) |
Get the file name string.
buf | A pointer to the start of the file header buffer. | |
name | Stores the name string. Should be at least FILE_HDR_NAME_SIZE bytes in size. |
References FILE_HDR_MSG, FILE_HDR_NAME_SIZE, and _FILE_Hdr::file_name.
unsigned int FILE_hdrGetTime | ( | const void * | buf, | |
unsigned int * | time | |||
) |
Get the file timestamp.
buf | A pointer to the start of the file header buffer. | |
time | Stores the timestamp value. |
References FILE_HDR_MSG, _FILE_Hdr::file_time_lsw, and _FILE_Hdr::file_time_msw.
unsigned int FILE_hdrGetType | ( | const void * | buf, | |
unsigned short * | type | |||
) |
Get the file type.
buf | A pointer to the start of the file header buffer. | |
type | Stores the type value. |
References FILE_HDR_MSG, and _FILE_Hdr::file_type.
unsigned int FILE_hdrSizeof | ( | void | ) |
Get the size of a file header.
References FILE_HDR_SIZE.
unsigned int FILE_hdrVerify | ( | const void * | buf | ) |
Verify the integrety of a file header.
buf | A pointer to the start of the file header buffer. |
References FILE_HDR_M_LENGTH, FILE_HDR_M_VERSION, FILE_HDR_MSG, FILE_HDR_SIZE, FILE_HDR_VERSION_2, _FILE_Hdr::file_info, _FILE_Hdr::hdr_chksum_lsw, and _FILE_Hdr::hdr_chksum_msw.