GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> PBC / V4-12-3 > pbc_scp / sun-gcc
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <MSG/MSG_pubdefs.h>
#include <CCSDS/CCSDS_pkt.h>
#include <ITC/ITC_dump.h>
#include <ITC/ITC_pubdefs.h>
#include <PBC/PBC_apid.h>
#include <PBC/PBC_dump.h>
#include <PBC/PBC_msgs.h>
#include <PBC/PBC_tlmdefs.h>
Classes | |
struct | _Pbc_House_Field |
Description of a boot housekeeping telemetry field. More... | |
Typedefs | |
typedef struct _Pbc_House_Field | Pbc_House_Field |
Typedef for _Pbc_House_Field. | |
Functions | |
int | PBC_setDumpDisplayLimit (int limit) |
Set the max number of words to display from a single dump. | |
static const char * | pbc_interp_unit (unsigned int value) |
Interpret a LAT unit identifier value. | |
static void | pbc_interp_yes_no (unsigned int value) |
Interpret a value as 'yes' or 'no'. | |
static void | pbc_interp_enabled (unsigned int value) |
Interpret a value as 'enabled' or 'disabled'. | |
static void | pbc_interp_failed (unsigned int value) |
Interpret a value as 'failed' or 'passed'. | |
static void | pbc_interp_boot_mode (unsigned int value) |
Interpret a softwareBootMode value. | |
static void | pbc_interp_qerr_count (unsigned int value) |
Interpret a queuedErrorCount value. | |
static void | pbc_interp_err_word (unsigned int value) |
Interpret an error word value. | |
static void | pbc_interp_hex (unsigned int value) |
Interpret a hex value. | |
static void | pbc_interp_upl_state (unsigned int value) |
Interpret a fileUploadState value. | |
static void | pbc_interp_boot_type (unsigned int value) |
Interpret a bootType value. | |
static void | pbc_interp_dump_addr (unsigned int value) |
Interpret a dump address value. | |
static void | pbc_interp_spare (unsigned int value) |
Interpret a spare value. | |
static void | pbc_interp_source (unsigned int value) |
Interpret an SBC source value. | |
static void | pbc_interp_reset_cause (unsigned int value) |
Interpret a reset cause value. | |
static void | pbc_interp_reset_source (unsigned int value) |
Interpret a reset source value. | |
static void | pbc_interp_ram_test (unsigned int value) |
Interpret a RAM test value. | |
static void | pbc_interp_byte_sel (unsigned int value) |
Interpret a byte selection value. | |
static void | pbc_interp_exc_vector (unsigned int value) |
Interpret an exception vector value. | |
static void | pbc_interp_test_result (unsigned int value) |
Interpret a RAM test result value. | |
static void | pbc_dump_boilerplate (char *pkt_name) |
Dump some boilerplate header information. | |
static unsigned int | pbc_dump_unit (unsigned char *pay, unsigned int offset) |
Dump the LAT unit value from a packet. | |
static unsigned int | pbc_dump_padding (unsigned char *pay, unsigned int offset, unsigned int num_bytes) |
Dump the padding field from a packet. | |
static void | pbc_show_house_field (unsigned char *new_pay, unsigned char *prev_pay, unsigned int start_byte, unsigned int end_byte, unsigned int start_bit, unsigned int end_bit, char *desc_p, void(*interp_p)(unsigned int val)) |
Show a field from a boot housekeeping telemetry value. | |
static unsigned int | pbc_dump_house_fields (Pbc_House_Field *field_p, unsigned int num_fields, unsigned char *new_pkt, unsigned char *prev_pkt, unsigned int start_byte) |
Dump boot housekeeping telemetry fields. | |
void | PBC_dumpHouse (unsigned char *pkt, unsigned char *prev_pkt) |
Dump boot housekeeping telemetry. | |
void | PBC_dumpHouseBgLow (unsigned char *pkt, unsigned char *prev_pkt) |
Dump first 64 bytes of background dump data. | |
void | PBC_dumpHouseBgHigh (unsigned char *pkt, unsigned char *prev_pkt) |
Dump last 64 bytes of background dump data. | |
void | PBC_dumpHouseData (unsigned char *pkt) |
Dump the memory data portion of boot housekeeping telemetry. | |
void | PBC_dumpBoot (char *pkt) |
Dump the Boot RTOS Execute command. | |
void | PBC_dumpErrDump (char *pkt) |
Dump the Boot Error Dump command. | |
void | PBC_dumpReset (char *pkt) |
Dump the Boot Reset command. | |
void | PBC_dumpStart (char *pkt) |
Dump the Boot Start command. | |
Variables | |
int | PBC_dumpDisplayLimit = 256 |
The maximum number of words to display from a single dump. |
CVS $Id: PBC_dump.c,v 1.19 2011/03/29 23:14:58 apw Exp $
void pbc_dump_boilerplate | ( | char * | pkt_name | ) | [static] |
Dump some boilerplate header information.
Dumps a boilerplate header for the payload portion of a packet.
pkt_name | Pointer to name for the information in the packet. |
Referenced by PBC_dumpBoot(), PBC_dumpErrDump(), PBC_dumpReset(), and PBC_dumpStart().
unsigned int pbc_dump_house_fields | ( | Pbc_House_Field * | field_p, | |
unsigned int | num_fields, | |||
unsigned char * | new_pkt, | |||
unsigned char * | prev_pkt, | |||
unsigned int | start_byte | |||
) | [static] |
Dump boot housekeeping telemetry fields.
field_p | Pointer to first telemetry field description. | |
num_fields | Number of fields to dump. | |
new_pkt | Pointer to new telemetry packet. | |
prev_pkt | Pointer to previous telemetry packet. | |
start_byte | Starting offset within the telemetry packet. |
References _Pbc_House_Field::desc_p, _Pbc_House_Field::interp_p, _Pbc_House_Field::num_bits, _Pbc_House_Field::num_bytes, and pbc_show_house_field().
Referenced by PBC_dumpHouse(), PBC_dumpHouseBgHigh(), and PBC_dumpHouseBgLow().
unsigned int pbc_dump_padding | ( | unsigned char * | pay, | |
unsigned int | offset, | |||
unsigned int | num_bytes | |||
) | [static] |
Dump the padding field from a packet.
Dumps the padding field from a packet.
pay | Pointer to CCSDS packet. | |
offset | Starting offset of the padding field. | |
num_bytes | Length of the padding field, in bytes. |
Referenced by PBC_dumpBoot(), and PBC_dumpReset().
unsigned int pbc_dump_unit | ( | unsigned char * | pay, | |
unsigned int | offset | |||
) | [static] |
Dump the LAT unit value from a packet.
Dumps the LAT unit value from a packet.
pay | Pointer to CCSDS packet. | |
offset | Starting offset of the LAT-unit field. |
References pbc_interp_unit().
Referenced by PBC_dumpBoot(), PBC_dumpErrDump(), PBC_dumpReset(), and PBC_dumpStart().
void PBC_dumpBoot | ( | char * | pkt | ) |
Dump the Boot RTOS Execute command.
Dumps the contents of a Boot RTOS Execute command packet. The fields of the payload are assumed to be in native byte order.
pkt | Pointer to CCSDS packet. |
References pbc_dump_boilerplate(), pbc_dump_padding(), pbc_dump_unit(), and pbc_interp_source().
Referenced by PBC_sendBoot().
void PBC_dumpErrDump | ( | char * | pkt | ) |
Dump the Boot Error Dump command.
Dumps the contents of a Boot Error Dump command packet. The fields of the payload are assumed to be in native byte order.
pkt | Pointer to CCSDS packet. |
References pbc_dump_boilerplate(), and pbc_dump_unit().
Referenced by PBC_sendErrDump().
void PBC_dumpHouse | ( | unsigned char * | pkt, | |
unsigned char * | prev_pkt | |||
) |
Dump boot housekeeping telemetry.
Dumps the contents of a Boot Housekeeping telemetry packet. The fields of the payload are assumed to be in native byte order.
pkt | Pointer to CCSDS packet. | |
prev_pkt | Pointer to previous boot hkp telemetry CCSDS packet. |
References PBC_APID_TLM_EPU0, PBC_APID_TLM_EPU1, PBC_APID_TLM_EPU2, PBC_APID_TLM_SIU, pbc_dump_house_fields(), pbc_interp_boot_mode(), pbc_interp_boot_type(), pbc_interp_dump_addr(), pbc_interp_err_word(), pbc_interp_hex(), pbc_interp_qerr_count(), and pbc_interp_upl_state().
Referenced by PBC_dispatchTlm().
void PBC_dumpHouseBgHigh | ( | unsigned char * | pkt, | |
unsigned char * | prev_pkt | |||
) |
Dump last 64 bytes of background dump data.
Dumps the contents of the last 64 bytes of the background dump data found in the Boot Housekeeping telemetry packet. The data is assumed to be in native byte order.
pkt | Pointer to CCSDS packet. | |
prev_pkt | Pointer to previous boot hkp telemetry CCSDS packet. |
References PBC_APID_TLM_EPU0, PBC_APID_TLM_EPU1, PBC_APID_TLM_EPU2, PBC_APID_TLM_SIU, and pbc_dump_house_fields().
Referenced by PBC_dispatchTlm().
void PBC_dumpHouseBgLow | ( | unsigned char * | pkt, | |
unsigned char * | prev_pkt | |||
) |
Dump first 64 bytes of background dump data.
Dumps the contents of the first 64 bytes of the background dump data found in the Boot Housekeeping telemetry packet. The data is assumed to be in native byte order.
pkt | Pointer to CCSDS packet. | |
prev_pkt | Pointer to previous boot hkp telemetry CCSDS packet. |
References PBC_APID_TLM_EPU0, PBC_APID_TLM_EPU1, PBC_APID_TLM_EPU2, PBC_APID_TLM_SIU, pbc_dump_house_fields(), pbc_interp_byte_sel(), pbc_interp_enabled(), pbc_interp_exc_vector(), pbc_interp_failed(), pbc_interp_ram_test(), pbc_interp_reset_cause(), pbc_interp_reset_source(), pbc_interp_source(), pbc_interp_spare(), pbc_interp_test_result(), and pbc_interp_yes_no().
Referenced by PBC_dispatchTlm().
void PBC_dumpHouseData | ( | unsigned char * | pkt | ) |
Dump the memory data portion of boot housekeeping telemetry.
Dumps the memory data dump portion of a boot housekeeping telemetry packet.
pkt | Pointer to CCSDS packet. |
Referenced by PBC_dispatchTlm().
void PBC_dumpReset | ( | char * | pkt | ) |
Dump the Boot Reset command.
Dumps the contents of a Boot Reset command packet. The fields of the payload are assumed to be in native byte order.
pkt | Pointer to CCSDS packet. |
References pbc_dump_boilerplate(), pbc_dump_padding(), and pbc_dump_unit().
Referenced by PBC_sendReset().
void PBC_dumpStart | ( | char * | pkt | ) |
Dump the Boot Start command.
Dumps the contents of a Boot Start command packet. The fields of the payload are assumed to be in native byte order.
pkt | Pointer to CCSDS packet. |
References pbc_dump_boilerplate(), and pbc_dump_unit().
Referenced by PBC_sendStart().
void pbc_interp_boot_mode | ( | unsigned int | value | ) | [static] |
Interpret a softwareBootMode value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_boot_type | ( | unsigned int | value | ) | [static] |
Interpret a bootType value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_byte_sel | ( | unsigned int | value | ) | [static] |
Interpret a byte selection value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_dump_addr | ( | unsigned int | value | ) | [static] |
Interpret a dump address value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_enabled | ( | unsigned int | value | ) | [static] |
Interpret a value as 'enabled' or 'disabled'.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_err_word | ( | unsigned int | value | ) | [static] |
Interpret an error word value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_exc_vector | ( | unsigned int | value | ) | [static] |
Interpret an exception vector value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_failed | ( | unsigned int | value | ) | [static] |
Interpret a value as 'failed' or 'passed'.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_hex | ( | unsigned int | value | ) | [static] |
Interpret a hex value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_qerr_count | ( | unsigned int | value | ) | [static] |
Interpret a queuedErrorCount value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_ram_test | ( | unsigned int | value | ) | [static] |
Interpret a RAM test value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_reset_cause | ( | unsigned int | value | ) | [static] |
Interpret a reset cause value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_reset_source | ( | unsigned int | value | ) | [static] |
Interpret a reset source value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_source | ( | unsigned int | value | ) | [static] |
Interpret an SBC source value.
value | Value to interpret. |
Referenced by PBC_dumpBoot(), and PBC_dumpHouseBgLow().
void pbc_interp_spare | ( | unsigned int | value | ) | [static] |
Interpret a spare value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
void pbc_interp_test_result | ( | unsigned int | value | ) | [static] |
Interpret a RAM test result value.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
const char * pbc_interp_unit | ( | unsigned int | value | ) | [static] |
Interpret a LAT unit identifier value.
value | LAT unit identifier value. |
Referenced by pbc_dump_unit().
void pbc_interp_upl_state | ( | unsigned int | value | ) | [static] |
Interpret a fileUploadState value.
value | Value to interpret. |
Referenced by PBC_dumpHouse().
void pbc_interp_yes_no | ( | unsigned int | value | ) | [static] |
Interpret a value as 'yes' or 'no'.
value | Value to interpret. |
Referenced by PBC_dumpHouseBgLow().
int PBC_setDumpDisplayLimit | ( | int | limit | ) |
Set the max number of words to display from a single dump.
limit | Max number of words to display. |
Referenced by PBC_setDumpDisplayLimit_cli().
void pbc_show_house_field | ( | unsigned char * | new_pay, | |
unsigned char * | prev_pay, | |||
unsigned int | start_byte, | |||
unsigned int | end_byte, | |||
unsigned int | start_bit, | |||
unsigned int | end_bit, | |||
char * | desc_p, | |||
void(*)(unsigned int val) | interp_p | |||
) | [static] |
Show a field from a boot housekeeping telemetry value.
new_pay | Pointer to payload buffer. | |
prev_pay | Pointer to previous payload buffer. | |
start_byte | First byte of the value within the packet. | |
end_byte | Last byte of the value within the packet. | |
start_bit | First bit of the field within the value. | |
end_bit | Last bit of the field within the value. | |
desc_p | Pointer to field description string. | |
interp_p | Pointer to field interpretation function. |
Referenced by pbc_dump_house_fields().