GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LFS / dev > lfs_dump / sun-gcc
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <PBI/Endianness.h>
#include <PBS/WCT.h>
#include <PBS/MBA.h>
#include <CCSDS/CCSDS_pkt.h>
#include <LFS/LFS_dump.h>
#include <LFS/LFS_tlmdefs.h>
#include <LFS/LFS_cmddefs.h>
#include <FBS/FBS_pubrtos.h>
#include <MSG/MSG_pubdefs.h>
Defines | |
#define | ASCTIME(_tstruct, _str, _size) asctime_r((_tstruct), (_str), (_size)) |
#define | FILE_DUMP_LINE_SIZE 16 |
Functions | |
static void | print_header (const char *str) |
static void | print_trailer (void) |
void | LFS_dumpFileDumpCmd (const unsigned char *pkt) |
Display LLFSFILEDUMPC telecommand packet. | |
void | LFS_dumpFileDeleteCmd (const unsigned char *pkt) |
Display LLFSFILEDELETE telecommand packet. | |
void | LFS_dumpFileCopyCmd (const unsigned char *pkt) |
Display LLFSFILECOPY telecommand packet. | |
void | LFS_dumpDirCreateCmd (const unsigned char *pkt) |
Display LLFSDIRCREATE telecommand packet. | |
void | LFS_dumpDirDeleteCmd (const unsigned char *pkt) |
Display LLFSDIRDELETE telecommand packet. | |
void | LFS_dumpDirDumpCmd (const unsigned char *pkt) |
Display LLFSDIRDUMP telecommand packet. | |
void | LFS_dumpSysStatCmd (const unsigned char *pkt) |
Display LLFSSYSSTATUS telecommand packet. | |
void | LFS_dumpSysMountCmd (const unsigned char *pkt) |
Display LLFSSYSCHECK telecommand packet. | |
void | LFS_dumpSysCheckCmd (const unsigned char *pkt) |
Display LLFSSYSCHECK telecommand packet. | |
void | LFS_dumpSysRepairCmd (const unsigned char *pkt) |
Display LLFSSYSREPAIR telecommand packet. | |
void | LFS_dumpSysFormatCmd (const unsigned char *pkt) |
Display LLFSSYSCHECK telecommand packet. | |
void | LFS_dumpNoopCmd (const unsigned char *pkt) |
Display LLFSNOOP telecommand packet. | |
void | LFS_dumpDirDumpTlm (const unsigned char *pkt) |
Display LLFSDIRLIST telemetry packets. | |
void | LFS_dumpRootDumpTlm (const unsigned char *pkt) |
Display LLFSROOTLIST telemetry packets. | |
void | LFS_dumpEmptyDirTlm (const unsigned char *pkt) |
Display LLFSDIREMPTY telemetry packets. | |
void | LFS_dumpSysStatTlm (const unsigned char *pkt) |
Display LLFSSYSLIST telemetry packets. | |
void | LFS_dumpFileDumpTlm (const unsigned char *pkt) |
Display LFSDUMPCTDB telemetry packets. | |
Variables | |
static const char * | re = "======================================" |
static const char * | rm = "--------------------------------------" |
static const char * | devNames [8] |
static const char * | unitStr [16] |
#define ASCTIME | ( | _tstruct, | |||
_str, | |||||
_size | ) | asctime_r((_tstruct), (_str), (_size)) |
Portable call to asctime_r() function.
Referenced by LFS_dumpDirDumpTlm(), and LFS_dumpRootDumpTlm().
#define FILE_DUMP_LINE_SIZE 16 |
The number of bytes in one line of file dump data display.
Referenced by LFS_dumpFileDumpTlm().
void LFS_dumpDirCreateCmd | ( | const unsigned char * | pkt | ) |
Display LLFSDIRCREATE telecommand packet.
Display a LFS directory create telecommand packet (LFSDIRCREATE).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpDirDeleteCmd | ( | const unsigned char * | pkt | ) |
Display LLFSDIRDELETE telecommand packet.
Display a LFS directory delete telecommand packet (LFSDIRDELETE).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpDirDumpCmd | ( | const unsigned char * | pkt | ) |
Display LLFSDIRDUMP telecommand packet.
Display a LFS directory dump telecommand packet (LFSDIRDUMP).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpDirDumpTlm | ( | const unsigned char * | pkt | ) |
Display LLFSDIRLIST telemetry packets.
Display a LFS directory dump telemetry packet.
pkt | The telemetry packet. |
References ASCTIME, _LFS_FILESTID::bf, _LFS_FILESTFLAGS::bf, _LFS_DUMPSTFLAGS::bf, devNames, _LFS_LLFSDIRLIST_Tlm::dmpFlags, _LFS_LLFSDIRLIST_Tlm::fileBlocks, _LFS_LLFSDIRLIST_Tlm::fileFlags, _LFS_LLFSDIRLIST_Tlm::fileHdr, _LFS_LLFSDIRLIST_Tlm::fileId, _LFS_LLFSDIRLIST_Tlm::fileSize, _LFS_LLFSDIRLIST_Tlm::fileTime, print_header(), print_trailer(), rm, _LFS_FILESTID::ui, unitStr, _LFS_FILESTFLAGS::us, and _LFS_DUMPSTFLAGS::us.
void LFS_dumpEmptyDirTlm | ( | const unsigned char * | pkt | ) |
Display LLFSDIREMPTY telemetry packets.
Display a LFS empty directory dump telemetry packet.
pkt | The telemetry packet. |
References _LFS_FILESTID::bf, _LFS_DUMPSTFLAGS::bf, devNames, _LFS_LLFSDIREMPTY_Tlm::dmpFlags, _LFS_LLFSDIREMPTY_Tlm::fileId, print_header(), print_trailer(), _LFS_FILESTID::ui, unitStr, and _LFS_DUMPSTFLAGS::us.
void LFS_dumpFileCopyCmd | ( | const unsigned char * | pkt | ) |
Display LLFSFILECOPY telecommand packet.
Display a LFS file copy telecommand packet (LFSFILECOPY).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpFileDeleteCmd | ( | const unsigned char * | pkt | ) |
Display LLFSFILEDELETE telecommand packet.
Display a LFS file delete telecommand packet (LFSFILEDELETE) .
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpFileDumpCmd | ( | const unsigned char * | pkt | ) |
Display LLFSFILEDUMPC telecommand packet.
Display a LFS file dump CTDB or a file dump SSR telecommand packet (LFSFILEDUMPC or LFSFILEDUMPS).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpFileDumpTlm | ( | const unsigned char * | pkt | ) |
Display LFSDUMPCTDB telemetry packets.
Display a LFS file dump data telemetry packet.
pkt | The telemetry packet. |
References _LFS_FILESTID::bf, _LFS_DUMPSTFLAGS::bf, devNames, _LFS_LLFSDUMPCTDB_Tlm::dmpFlags, _LFS_LLFSDUMPCTDB_Tlm::dmpSize, FILE_DUMP_LINE_SIZE, _LFS_LLFSDUMPCTDB_Tlm::fileData, _LFS_LLFSDUMPCTDB_Tlm::fileId, _LFS_LLFSDUMPCTDB_Tlm::fileOffset, print_header(), rm, _LFS_FILESTID::ui, unitStr, and _LFS_DUMPSTFLAGS::us.
void LFS_dumpNoopCmd | ( | const unsigned char * | pkt | ) |
Display LLFSNOOP telecommand packet.
Display a LFS file no-op telecommand packet (LFSNOOP).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpRootDumpTlm | ( | const unsigned char * | pkt | ) |
Display LLFSROOTLIST telemetry packets.
Display a LFS root dump telemetry packet.
pkt | The telemetry packet. |
References ASCTIME, _LFS_FILESTID::bf, _LFS_FILESTFLAGS::bf, _LFS_DUMPSTFLAGS::bf, devNames, _LFS_LLFSROOTLIST_Tlm::dmpFlags, _LFS_LLFSROOTLIST_Tlm::fileBlocks, _LFS_LLFSROOTLIST_Tlm::fileFlags, _LFS_LLFSROOTLIST_Tlm::fileId, _LFS_LLFSROOTLIST_Tlm::fileSize, _LFS_LLFSROOTLIST_Tlm::fileTime, print_header(), print_trailer(), _LFS_FILESTID::ui, unitStr, _LFS_FILESTFLAGS::us, and _LFS_DUMPSTFLAGS::us.
void LFS_dumpSysCheckCmd | ( | const unsigned char * | pkt | ) |
Display LLFSSYSCHECK telecommand packet.
Display a LFS file system check telecommand packet (LFSSYSCHECK).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpSysFormatCmd | ( | const unsigned char * | pkt | ) |
Display LLFSSYSCHECK telecommand packet.
Display a LFS file system check telecommand packet (LFSSYSFORMAT).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpSysMountCmd | ( | const unsigned char * | pkt | ) |
Display LLFSSYSCHECK telecommand packet.
Display a LFS file system mount telecommand packet (LFSSYSMOUNT).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpSysRepairCmd | ( | const unsigned char * | pkt | ) |
Display LLFSSYSREPAIR telecommand packet.
Display a LFS file system repair telecommand packet (LFSSYSREPAIR).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpSysStatCmd | ( | const unsigned char * | pkt | ) |
Display LLFSSYSSTATUS telecommand packet.
Display a LFS file system status request telecommand packet (LFSSYSSTATUS).
pkt | The telecommand packet. |
References print_header(), print_trailer(), and unitStr.
void LFS_dumpSysStatTlm | ( | const unsigned char * | pkt | ) |
Display LLFSSYSLIST telemetry packets.
Display a LFS file system status telemetry packet.
pkt | The telemetry packet. |
References _LFS_FILESTID::bf, _LFS_DUMPSTFLAGS::bf, _LFS_LLFSSYSLIST_Tlm::blkFree, _LFS_LLFSSYSLIST_Tlm::blkSize, _LFS_LLFSSYSLIST_Tlm::blkTotal, devNames, _LFS_LLFSSYSLIST_Tlm::dmpFlags, _LFS_LLFSSYSLIST_Tlm::fileId, print_header(), print_trailer(), _LFS_FILESTID::ui, unitStr, and _LFS_DUMPSTFLAGS::us.
static void print_header | ( | const char * | str | ) | [static] |
Print display header.
str | A string to print with the header. |
Referenced by LFS_dumpDirCreateCmd(), LFS_dumpDirDeleteCmd(), LFS_dumpDirDumpCmd(), LFS_dumpDirDumpTlm(), LFS_dumpEmptyDirTlm(), LFS_dumpFileCopyCmd(), LFS_dumpFileDeleteCmd(), LFS_dumpFileDumpCmd(), LFS_dumpFileDumpTlm(), LFS_dumpNoopCmd(), LFS_dumpRootDumpTlm(), LFS_dumpSysCheckCmd(), LFS_dumpSysFormatCmd(), LFS_dumpSysMountCmd(), LFS_dumpSysRepairCmd(), LFS_dumpSysStatCmd(), and LFS_dumpSysStatTlm().
static void print_trailer | ( | void | ) | [static] |
Print display trailer.
References re.
Referenced by LFS_dumpDirCreateCmd(), LFS_dumpDirDeleteCmd(), LFS_dumpDirDumpCmd(), LFS_dumpDirDumpTlm(), LFS_dumpEmptyDirTlm(), LFS_dumpFileCopyCmd(), LFS_dumpFileDeleteCmd(), LFS_dumpFileDumpCmd(), LFS_dumpNoopCmd(), LFS_dumpRootDumpTlm(), LFS_dumpSysCheckCmd(), LFS_dumpSysFormatCmd(), LFS_dumpSysMountCmd(), LFS_dumpSysRepairCmd(), LFS_dumpSysStatCmd(), and LFS_dumpSysStatTlm().
devNames [static] |
Initial value:
{ FILE_DEV_NAME_BOOT, FILE_DEV_NAME_RAM, FILE_DEV_NAME_EE0, FILE_DEV_NAME_EE1, FILE_DEV_NAME_TMP, "USR0", "USR1", "UNKNOWN" }
Referenced by LFS_dumpDirDumpTlm(), LFS_dumpEmptyDirTlm(), LFS_dumpFileDumpTlm(), LFS_dumpRootDumpTlm(), and LFS_dumpSysStatTlm().
const char* re = "======================================" [static] |
A seperator string.
Referenced by print_header(), and print_trailer().
const char* rm = "--------------------------------------" [static] |
A seperator string.
Referenced by LFS_dumpDirDumpTlm(), LFS_dumpFileDumpTlm(), and print_header().
unitStr [static] |
Initial value:
{ "SIU", "EPU0", "EPU1", "EPU2", "EPU3", "SDI", "SC", "BCAST", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", "UNKNOWN", }
Referenced by LFS_dumpDirCreateCmd(), LFS_dumpDirDeleteCmd(), LFS_dumpDirDumpCmd(), LFS_dumpDirDumpTlm(), LFS_dumpEmptyDirTlm(), LFS_dumpFileCopyCmd(), LFS_dumpFileDeleteCmd(), LFS_dumpFileDumpCmd(), LFS_dumpFileDumpTlm(), LFS_dumpNoopCmd(), LFS_dumpRootDumpTlm(), LFS_dumpSysCheckCmd(), LFS_dumpSysFormatCmd(), LFS_dumpSysMountCmd(), LFS_dumpSysRepairCmd(), LFS_dumpSysStatCmd(), and LFS_dumpSysStatTlm().