GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LMC / V0-10-1 > lmc / rad750
#include <LMC_prvdefs.h>
#include <LMC/LMC_msgs.h>
#include <LMC/LMC_tlmdefs.h>
#include <LEM/defs.h>
#include <LEM/encode.h>
#include <LEM/decode.h>
#include <ITC/ITC_pubdefs.h>
#include <ITC/ITC_msgs.h>
#include <CCSDS/CCSDS_pkt.h>
#include <LSF/LSF.h>
#include <LSF/LSF_ids.h>
#include <string.h>
Functions | |
static void | freeBuff (ITC_QueueItem *qitem, unsigned int status, void *prm0, void *prm1, void *prm2, unsigned int tx) |
static unsigned int | getDelta (unsigned int aDelta, unsigned int tRead, unsigned int tClear) |
static unsigned int | sendDiag (LMC_Counter *cnt) |
static unsigned int | sendPacket (LMC_Counter *cnt, int last) |
static unsigned int | sendSSR (LMC_Counter *cnt) |
unsigned int | LMC_decodeCal (LMC_Counter *cnt) |
CAL data decode routine. | |
unsigned int | LMC_decodeTkr (LMC_Counter *cnt) |
TKR data decode routine. | |
unsigned int | LMC_decodeAcd (LMC_Counter *cnt) |
ACD tile data decode routine. | |
unsigned int | LMC_decodeDead (LMC_Counter *cnt) |
TEM deadtime data decode routine. | |
unsigned int | LMC_getBuffer (LMC_Counter *cnt) |
Get a buffer for telemetry data. | |
unsigned int | LMC_freeBuffer (LMC_Counter *cnt) |
Free a telemetry data buffer. | |
void | LMC_sendLastPkt (LMC_Counter *cnt) |
Send the last packet of a set of data. |
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().
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.