GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LMC / V0-10-1 > lmc / rad750
#include <LMC_macro_p.h>
#include <LMC_lem_p.h>
#include <LMC/LMC_pubdefs.h>
#include <LMC/LMC_cmddefs.h>
#include <LEM/list_structs.h>
#include <ITC/ITC_pubdefs.h>
#include <IMM/FPM_pubdefs.h>
#include <PBS/RW.ih>
#include <PBS/WUT_tmr.h>
#include <PBS/WCT.h>
#include <PBS/SEM.h>
#include <PBS/FPA.h>
#include <TRD/TRD_pubdefs.h>
Classes | |
struct | _LMC_reset_valid_bf |
Bitfield definition of turbo-reset command validity. More... | |
union | _LMC_reset_valid |
Union for turbo-reset command validity. More... | |
struct | _LMC_Reset_Row |
Structure to hold the LMC reset cache block. More... | |
struct | _LMC_Reset |
Structure to hold LMC Turbo reset miscelany. More... | |
struct | _LMC_Counter |
Structure to hold an LMC counter control block. More... | |
struct | _LMC_Control |
Structure to hold the LMC main control block. More... | |
Defines | |
#define | LMC_K_RESET_FORMAT_0 (0) |
Turbo Reset Database format version number. | |
Typedefs | |
typedef enum _LMC_ControlState | LMC_ControlState |
LMC control states. | |
typedef enum _LMC_CmdOpcode | LMC_CmdOpcode |
LMC telecommand opcodes. | |
typedef struct _LMC_Control | LMC_Control |
Forward definition of main control block. | |
typedef struct _LMC_Counter | LMC_Counter |
Forward definition of counter control block. | |
typedef unsigned int | LMC_DecodeFn (LMC_Counter *cnt) |
Register read decode function. | |
typedef struct _LMC_reset_valid_bf | LMC_reset_valid_bf |
Bitfield definition of turbo-reset command validity. | |
typedef union _LMC_reset_valid | LMC_reset_valid |
Union for turbo-reset command validity. | |
typedef struct _LMC_Reset_Row | LMC_Reset_Row |
Structure to hold the LMC reset cache block. | |
typedef struct _LMC_Reset | LMC_Reset |
Structure to hold LMC Turbo reset miscelany. | |
Enumerations | |
enum | { N_TICK_USEC = 20, N_NSEC_TICK = 50, TICK_LIMIT = 0x01000000, TICK_MASK = TICK_LIMIT - 1, LMC_CNT_FOREVER = -1, LMC_MIN_INTERVAL = 50, LMC_STOP_TIMEOUT = 2, LMC_NUM_PKTS = 20, LMC_PKT_SIZE = 480, LMC_NUM_DGMS = 8 } |
Miscellaneous constants. More... | |
enum | { LMC_K_NUM_RCMDS = 5, LMC_K_RCMD_CAL = 0, LMC_K_RCMD_TKR = 1, LMC_K_RCMD_ACDP = 2, LMC_K_RCMD_ACDA = 3, LMC_K_RCMD_DT = 4, LMC_K_RCMD_DELAY = 5 } |
Constants used for Turbo-reset. More... | |
enum | _LMC_ControlState { LMC_CTL_UNINITIALIZED = 0, LMC_CTL_INITIALIZING = 1, LMC_CTL_DEINITIALIZING = 2, LMC_CTL_INITIALIZED = 3, LMC_CTL_STARTING = 4, LMC_CTL_STARTED = 5, LMC_CTL_STOPPING = 6, LMC_CTL_BROKEN = 7 } |
LMC control states. More... | |
enum | _LMC_CmdOpcode { LMC_OP_ALL = 0, LMC_OP_CAL = 1, LMC_OP_TKR = 2, LMC_OP_TILE_PAIR = 3, LMC_OP_TILE_ALL = 4, LMC_OP_DEAD = 5 } |
LMC telecommand opcodes. More... | |
Functions | |
unsigned int | LMC_decodeAcd (LMC_Counter *cnt) |
ACD tile data decode routine. | |
unsigned int | LMC_decodeCal (LMC_Counter *cnt) |
CAL data decode routine. | |
unsigned int | LMC_decodeDead (LMC_Counter *cnt) |
TEM deadtime data decode routine. | |
unsigned int | LMC_decodeTkr (LMC_Counter *cnt) |
TKR data decode routine. | |
unsigned int | LMC_freeBuffer (LMC_Counter *cnt) |
Free a telemetry data buffer. | |
unsigned int | LMC_getBuffer (LMC_Counter *cnt) |
Get a buffer for telemetry data. | |
LMC_Control * | LMC_getCtrl (void) |
Get the control block address. | |
void | LMC_sendLastPkt (LMC_Counter *cnt) |
Send the last packet of a set of data. |
anonymous enum |
Miscellaneous constants.
anonymous enum |
Constants used for Turbo-reset.
enum _LMC_CmdOpcode |
enum _LMC_ControlState |
unsigned int LMC_decodeAcd | ( | LMC_Counter * | cnt | ) |
ACD tile data decode routine.
cnt | Counter control handle |
LMC_SUCCESS | Success |
References _LMC_Counter::all_tile, LMC_cl::ci, LMC_ld::cl, _LMC_lmc_acd_Tlm::cntrs, _LMC_Counter::ctrl, _LMC_Control::hdr_size, _LMC_Counter::ld, N_ACD_TILES, N_NSEC_TICK, LMC_ld::nci, NEXT_CI, _LMC_Counter::pkt_cur, _LMC_Counter::pkt_end, _LMC_Counter::pkt_strt, _LMC_Counter::rd, _LMC_Counter::rem_cnt, LMC_cmd_rl::ri, LMC_rsp_rl::ri, LMC_ld::rl, LMC_rd::rl, _LMC_timestamp::secs, _LMC_lmc_acd_Tlm::ts, _LMC_Counter::ts_load, _LMC_Counter::ts_read, and _LMC_timestamp::usecs.
unsigned int LMC_decodeCal | ( | LMC_Counter * | cnt | ) |
CAL data decode routine.
cnt | Counter control handle |
LMC_SUCCESS | Success |
References _LMC_lmc_cal_Tlm::cntrs, _LMC_Counter::ld, _LMC_lmc_cal_Tlm::lmsk, _LMC_Counter::lrs_mask, N_NSEC_TICK, LMC_rd::nci, _LMC_lmc_cal_Tlm::pad, _LMC_Counter::pkt_cur, _LMC_Counter::pkt_strt, _LMC_Counter::rd, LMC_cmd_rl::ri, LMC_rsp_rl::ri, LMC_ld::rl, LMC_rd::rl, _LMC_timestamp::secs, _LMC_Counter::tem_mask, _LMC_lmc_cal_Tlm::tenb, _LMC_lmc_cal_Tlm::ts, _LMC_Counter::ts_load, _LMC_Counter::ts_read, and _LMC_timestamp::usecs.
unsigned int LMC_decodeDead | ( | LMC_Counter * | cnt | ) |
TEM deadtime data decode routine.
cnt | Counter control handle |
LMC_SUCCESS | Success |
References _LMC_lmc_dead_Tlm::cntrs, _LMC_lmc_dead_Tlm::dmsk, _LMC_Counter::ld, _LMC_Counter::lrs_mask, N_NSEC_TICK, LMC_rd::nci, _LMC_Counter::pkt_cur, _LMC_Counter::pkt_strt, _LMC_Counter::rd, LMC_cmd_rl::ri, LMC_rsp_rl::ri, LMC_ld::rl, LMC_rd::rl, _LMC_timestamp::secs, _LMC_Counter::tem_mask, _LMC_lmc_dead_Tlm::tenb, _LMC_lmc_dead_Tlm::ts, _LMC_Counter::ts_load, _LMC_Counter::ts_read, _LMC_dtime_msk::us, and _LMC_timestamp::usecs.
unsigned int LMC_decodeTkr | ( | LMC_Counter * | cnt | ) |
TKR data decode routine.
cnt | Counter control handle |
LMC_SUCCESS | Success |
References _LMC_lmc_tkr_Tlm::cntrs, _LMC_Counter::ld, _LMC_lmc_tkr_Tlm::lmsk, _LMC_Counter::lrs_mask, N_NSEC_TICK, LMC_rd::nci, _LMC_lmc_tkr_Tlm::pad, _LMC_Counter::pkt_cur, _LMC_Counter::pkt_strt, _LMC_Counter::rd, LMC_cmd_rl::ri, LMC_rsp_rl::ri, LMC_ld::rl, LMC_rd::rl, _LMC_timestamp::secs, _LMC_Counter::tem_mask, _LMC_lmc_tkr_Tlm::tenb, _LMC_lmc_tkr_Tlm::ts, _LMC_Counter::ts_load, _LMC_Counter::ts_read, and _LMC_timestamp::usecs.
unsigned int LMC_freeBuffer | ( | LMC_Counter * | cnt | ) |
Free a telemetry data buffer.
cnt | Counter control handle |
LMC_SUCCESS | Success |
References _LMC_Counter::ctrl, _LMC_Control::dtx_fcb, _LMC_Control::stx_fcb, _LMC_Counter::tlm_buff, and _LMC_Counter::use_ssr.
Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_sendLastPkt(), LMC_tem_deadtime(), and LMC_tkr_lrs().
unsigned int LMC_getBuffer | ( | LMC_Counter * | cnt | ) |
Get a buffer for telemetry data.
This routine allocates either a packet buffer or a datagram buffer depending on whether the diagnostic or science data stream is being used.
cnt | Counter control handle |
LMC_SUCCESS | Success | |
LMC_NODGPKT | If diagnostic packet not available | |
LMC_NOSCIPKT | If science datagram not available |
References _LMC_Counter::ctrl, _LMC_Control::dtx_fcb, _LMC_Control::hdr_size, _LMC_Counter::pkt_cur, _LMC_Counter::pkt_end, _LMC_Counter::pkt_size, _LMC_Counter::pkt_strt, _LMC_Control::stx_fcb, _LMC_Counter::tlm_buff, and _LMC_Counter::use_ssr.
Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_tem_deadtime(), and LMC_tkr_lrs().
LMC_Control* LMC_getCtrl | ( | void | ) |
Get the control block address.
Referenced by LMC_acd_tile_all(), LMC_acd_tile_pair(), LMC_cal_lrs(), LMC_stop_count(), LMC_tem_deadtime(), and LMC_tkr_lrs().
void LMC_sendLastPkt | ( | LMC_Counter * | cnt | ) |
Send the last packet of a set of data.
This routine sends the last packet of an accumulated set of counter data, if there is a non-empty incomplete one. In addition, If the science stream is being used, the datagram is sent if it is non-empty. Finally, any remaining packet or datagram buffer is freed.
cnt | Counter control handle |
References LMC_freeBuffer(), and _LMC_Counter::tlm_buff.