GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LTC / V6-2-4 > ltc / linux-gcc
#include <LTC_DB/LTC_DB_schema.h>
#include <LTC/ltc.h>
#include <LTC/LTC_tlmdefs.h>
#include <LTC/LTC_cmddefs.h>
#include <ITC/ITC_pubdefs.h>
#include <TRD/TRD_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <IMM/FPM_pubdefs.h>
#include <LCBD/LCBD_cr.h>
#include <LCBD/LCBD_rst.h>
#include <LEM/defs.h>
#include <LEM/encode_structs.h>
#include <LEM/decode_structs.h>
#include <MSG/MSG_pubdefs.h>
#include <PBS/FPA.h>
#include <PBS/RW.h>
#include <PBS/WUT.h>
Classes | |
struct | LTC_FileDef |
Definition record for file. More... | |
struct | LTC_BinFileHeader |
Binary file header for LTC input files. More... | |
struct | LTC_Cntrl |
Control algorithm heater "on/off" and history bit masks. More... | |
struct | LTC_Sensor |
Temperature sensor counts read per cycle. More... | |
struct | LTC_FltDf |
Data defining temperature smoothing filter. More... | |
struct | LTC_Filter |
Data for smoothing filter. More... | |
struct | LTC_FilterDefFile |
Storage for LTC filter definition values. More... | |
struct | LTC_TempConvertFile |
Storage for LTC ADC/temperature conversion lookup table. More... | |
struct | LTC_Temperature |
Heat pipe (VCHP) temperatures. More... | |
union | LTC_SnsrDef |
Sensor definition (connected heat pipe and sensor type). More... | |
struct | LTC_SnsrDef::LTC_SnsrDef::LTC_SnsrDef_BitField |
Sensor definition bit field.. More... | |
struct | LTC_Options |
HP processing options, sensor and sel bits. More... | |
struct | LTC_HeatPipe |
All data associated with a heat pipe (VCHP). More... | |
struct | LTC_HpConfigRec |
Configuration data for a single heat pipe. More... | |
struct | LTC_HpConfigFile |
Storage for heat pipe configuration data read from file. More... | |
struct | LTC_FileOfFiles |
Storage for LTC master FMX file of files pointing to all of the other LTC configuration files. More... | |
struct | _LTC_cl |
Command list to read PDU env register. More... | |
struct | _LTC_rl |
Response list to read PDU environment registers. More... | |
struct | _LTC_Reset |
Structure used to restore LTC operation after a turbo reset. More... | |
struct | _LTC_Wrk |
LTC working storage. More... | |
Defines | |
#define | MSG_SIGNAL(_errno, _na, args...) _msg_report( _errno, 0, _na, ## args) |
Wrapper to simplify MSG_report calls. | |
#define | PRINTF(format,...) |
NOPs terminal debug output. | |
#define | TSCL LTC_DB_TSCL |
Temperature scaling within signed int. | |
#define | TSCLF LTC_DB_TSCLF |
Temperature scaling in floating point format. | |
#define | CFSCL 8192 |
Scaling for smoothing filter coefficients. | |
#define | LTC_NUM_HPs LTC_DB_NUM_HPs |
Number of heat pipes on LAT. | |
#define | LTC_PDUs LTC_DB_PDUs |
Maximum number PDUs. | |
#define | LTC_PDU_GRPS LTC_DB_PDU_GRPS |
Maximum ADC groups in PDU. | |
#define | LTC_PDU_CNV_TIME 300 |
Conversion time for PDU group in sys clk ticks. | |
#define | LTC_NUM_SNSRS LTC_DB_NUM_SNSRS |
Number sensors input for LTC per PDU (2 RITS + 1 res heater per HP). | |
#define | LTC_PDU_MAX_ADCS_PER_REG 7 |
Number ADCs in a PDU group. | |
#define | LTC_PDU_REGS 3 |
Number environment registers in the PDU. | |
#define | LTC_CNV_TBL_SZ 4096 |
Maximum temp conversion table size in elemets. | |
#define | LTC_SENTINEL_TEMP ((signed short) 0x8000) |
Special temperature value used to indicate out-of-range sensor. | |
#define | LTC_MAX_FLT_SZ 20 |
Maximum smoothing filter length (number coefficients). | |
#define | LTC_MIN_FLT_SZ 4 |
Minimum smoothing filter length (number coefficients). | |
#define | LTC_COEFF_SUM 1 |
Allowed error for smoothing filter coefficients (1-sum scaled). | |
#define | LTC_EXTERNAL_CMD_APID 0x658 |
The CCSDS APID for LTC package external telecommands. | |
#define | LTC_INTERNAL_CMD_APID 0x659 |
The CCSDS APID for LTC package internal telecommands. | |
#define | LTC_K_RESET_FORMAT_0 0 |
Format of LTC entries in the turbo reset database. | |
#define | LTC_NULL_FILE_ID 0 |
The LTC null file ID value used to indicate built-in defaults. | |
Typedefs | |
typedef LTC_DB_CntrlParams | LTC_CntrlParams |
Control algogrithm parameters for a heat pipe. | |
typedef LTC_DB_PduMeasRec | LTC_PduMeasRec |
Info for needed to acquire measurement from PDU group. | |
typedef LTC_DB_PduTbl | LTC_PduTbl |
Info for inputting sensor measurements from PDU. | |
typedef LTC_DB_CommonParams | LTC_CommonParams |
LTC common configuration parameters. | |
typedef struct _LTC_cl | LTC_cl |
Typedef for structure _LTC_cl. | |
typedef struct _LTC_rl | LTC_rl |
Typedef for structure _LTC_rl. | |
typedef struct _LTC_Reset | LTC_Reset |
Typedef for structure _LTC_Reset. | |
typedef struct _LTC_Wrk | LTC_Wrk |
LTC working storage. | |
Enumerations | |
enum | LTC_YesNo { LTC_YES = 1, LTC_NO = 0 } |
Specify booleans for LTC. More... | |
enum | LTC_OnOff { LTC_ON = 1, LTC_OFF = 0 } |
Specify booleans for LTC. More... | |
enum | LTC_CmdModes { LTC_ACTIVE = 1, LTC_PASSIVE = 0 } |
Specify booleans for LTC. More... | |
enum | LTC_RunModes { LTC_RUNNING = 1, LTC_STOPPED = 0 } |
Specify booleans for LTC. More... | |
enum | LTC_Cntl_Modes { LTC_CTL_UNINITIALIZED = 0, LTC_CTL_INITIALIZING = 1, LTC_CTL_DEINITIALIZING = 2, LTC_CTL_INITIALIZED = 3, LTC_CTL_STARTING = 4, LTC_CTL_RUNNING = 5, LTC_CTL_STOPPING = 6, LTC_CTL_BROKEN = 7 } |
LTC process states. More... | |
enum | LTC_FileIdTypes { LTC_FILE_BUILT_IN = LTC_DB_FILE_BUILT_IN, LTC_FILE_BY_NAME = LTC_DB_FILE_BY_NAME, LTC_FILE_BY_ID = LTC_DB_FILE_BY_ID } |
Specifies FILE ID methods. More... | |
enum | LTC_FileHdrCodes { LTC_BIN_CFG = 1, LTC_BIN_SNSR = 2, LTC_BIN_FILT = 3, LTC_BIN_TEMP = 4, LTC_BIN_FOF = 5 } |
Specifies LTC binary file type. More... | |
enum | LTC_FileVerCodes { LTC_BIN_CFG_MJV = 4, LTC_BIN_CFG_MNV = 0 } |
Specifies LTC binary file format version numbers. More... | |
enum | LTC_SnsrType { DSHP_RIT = LTC_DB_DSHP_RIT, DSHP_RIT_R = LTC_DB_DSHP_RIT_R, XLHP_RIT = LTC_DB_XLHP_RIT, XLHP_RIT_R = LTC_DB_XLHP_RIT_R, RSVR_HTR = LTC_DB_RSVR_HTR, RSVR_HTR_R = LTC_DB_RSVR_HTR_R, LTC_SNSR_TYPS = LTC_DB_LTC_SNSR_TYPS } |
Values for LAT sensor types used as array index by LTC. More... | |
enum | LTC_TempType { RIT_TMP = 0, RES_TMP = 1, LTC_TMP_TYPS = 2 } |
Temperature type codes used as array index by LTC. More... | |
enum | LTC_SensorStatus { NOT_READ = 0, READ_GOOD = 1, READ_BAD = 2, BROKEN = 3 } |
Status indicator for sensor data. More... | |
enum | LTC_HpControlMode { LTC_AUTO = 0, LTC_ALWAYS_ON = 1, LTC_ALWAYS_OFF = 2 } |
Heat pipe control mode. More... | |
Functions | |
void | LTC_InitBuiltIn (LTC_Wrk *tw) |
Initialization for built-in constants. | |
unsigned int | LTC_InitCfg (LTC_Wrk *tw) |
Initialization for working storage from configuration files. | |
unsigned int | LTC_InitFile (LTC_Wrk *tw) |
Initialize file buffer storage. | |
unsigned int | LTC_InitSmooth (LTC_Wrk *tw) |
Allocates and inits storage for smoothing filters. | |
void | LTC_InitSensors (LTC_Wrk *tw) |
Sets initial values for LAT sensors. | |
unsigned short | GetADCBits (const unsigned int *pduR, const int adc) |
Get 12-bit ADC values from PDU register given ADC number. | |
void | LTC_ReadSensors (LTC_Wrk *tw) |
Start cycle of LTC control - issue LCB commands. | |
unsigned int | LTC_ProcPduRsp (LTC_Wrk *tw, LTC_CntlProc_Prm *rb, const LTC_rl *rl) |
Callback to process responses from asynchrous reads of PDU registers. | |
WUT_cb_status | LTC_WkUp (void *p, WUT_tmr *wut) |
Wake up LTC for another processing cycle and restart wake timer. |
enum LTC_CmdModes |
enum LTC_Cntl_Modes |
enum LTC_FileHdrCodes |
enum LTC_FileIdTypes |
enum LTC_FileVerCodes |
enum LTC_HpControlMode |
enum LTC_OnOff |
enum LTC_RunModes |
enum LTC_SensorStatus |
enum LTC_SnsrType |
enum LTC_TempType |
enum LTC_YesNo |
unsigned short GetADCBits | ( | const unsigned int * | pduR, | |
const int | adc | |||
) |
Get 12-bit ADC values from PDU register given ADC number.
pduR | - PDU register bits (96 bits or 3 x 32) | |
adc | - adc number relative to this register (0 - 7) Byte Offsets 0 1 2 3 4 5 6 7 8 9 0 11 12 |
Referenced by LTC_ProcPduRsp().
void LTC_InitBuiltIn | ( | LTC_Wrk * | tw | ) |
Initialization for built-in constants.
Initialization from built-in constants.
tw | - LTC working storage. |
References LTC_Options::actv, LTC_Options::cntrlMode, LTC_Temperature::cnv, _LTC_Wrk::config, LTC_Temperature::estTol, LTC_Options::fail, LTC_Filter::fdf, LTC_Temperature::flt, _LTC_Wrk::htP, LTC_AUTO, LTC_NUM_HPs, LTC_ON, LTC_rtdCnvTbl, LTC_thrmCnvTbl, LTC_YES, LTC_HeatPipe::opts, LTC_HeatPipe::param, PRINTF, RES_TMP, _LTC_Wrk::resFailLimit, LTC_Options::resSel, RIT_TMP, _LTC_Wrk::ritFailLimit, LTC_Options::ritSel, LTC_HeatPipe::temp, and TSCLF.
Referenced by LTC_Init(), and LTC_ReStart().
unsigned int LTC_InitCfg | ( | LTC_Wrk * | tw | ) |
Initialization for working storage from configuration files.
tw | - LTC working storage. |
A | LTC MSG code |
References LTC_RdFileOfFiles(), and PRINTF.
Referenced by LTC_Init(), and LTC_ReStart().
unsigned int LTC_InitFile | ( | LTC_Wrk * | tw | ) |
Initialize file buffer storage.
tw | - LTC working storage. |
A | LTC MSG code. |
References LTC_FileDef::bff, _LTC_Wrk::cfgF, LTC_Temperature::cnvF, _LTC_Wrk::filePath, LTC_Temperature::fltF, _LTC_Wrk::fofF, _LTC_Wrk::htP, LTC_NUM_HPs, RES_TMP, RIT_TMP, and LTC_HeatPipe::temp.
Referenced by LTC_Init().
static void LTC_InitSensors | ( | LTC_Wrk * | tw | ) |
Sets initial values for LAT sensors.
tw | - LTC working storage |
References LTC_Sensor::bdRd, LTC_Sensor::cnt, DSHP_RIT, DSHP_RIT_R, LTC_Sensor::failLimit, _LTC_Wrk::htP, LTC_NUM_HPs, NOT_READ, PRINTF, RES_TMP, _LTC_Wrk::resFailLimit, RIT_TMP, _LTC_Wrk::ritFailLimit, RSVR_HTR, RSVR_HTR_R, LTC_HeatPipe::snsr, LTC_Sensor::stat, LTC_Sensor::tTyp, XLHP_RIT, and XLHP_RIT_R.
Referenced by LTC_Init(), and LTC_ReStart().
static unsigned int LTC_InitSmooth | ( | LTC_Wrk * | tw | ) |
Allocates and inits storage for smoothing filters.
tw | - LTC working storage. |
A | LTC MSG code. |
References LTC_Filter::fdf, LTC_FltDf::fln, LTC_Temperature::flt, _LTC_Wrk::htP, LTC_MAX_FLT_SZ, LTC_MIN_FLT_SZ, LTC_NUM_HPs, MSG_SIGNAL, LTC_Filter::nv, PRINTF, RES_TMP, RIT_TMP, LTC_HeatPipe::temp, and LTC_Filter::zn.
Referenced by LTC_Init(), LTC_ReStart(), and LTC_Start().
unsigned int LTC_ProcPduRsp | ( | LTC_Wrk * | tw, | |
LTC_CntlProc_Prm * | rb, | |||
const LTC_rl * | rl | |||
) |
Callback to process responses from asynchrous reads of PDU registers.
tw | - LTC working storage. | |
rb | - Response processing block. | |
rl | - A pointer to the LTC PDU response data. |
A | LTC MSG code. |
References _LTC_Wrk::cmdMode, LTC_Sensor::cnt, GetADCBits(), _LTC_CntlProc_Prm::grp, _LTC_Wrk::htP, _LTC_Wrk::lastClNum, LTC_ACTIVE, LTC_CalcHtrOnOff(), LTC_CmdHtrs(), LTC_CnvSmthSnsrs(), LTC_NO, LTC_SndTlm(), LTC_YES, _LTC_CntlProc_Prm::mr, _LTC_CntlProc_Prm::ncl, _LTC_CntlProc_Prm::pdu, _LTC_Wrk::pduReg, _LTC_Wrk::pduTbl, PRINTF, _LTC_rl::rd_rsp, READ_BAD, READ_GOOD, LTC_HeatPipe::snsr, _LTC_Wrk::tlmCnt, and _LTC_Wrk::tlmFreq.
Referenced by LTC_CntlProc().
void LTC_ReadSensors | ( | LTC_Wrk * | tw | ) |
Start cycle of LTC control - issue LCB commands.
Queue-up commands (LCBD command list) to read sensors from actvie PDUs.
tw | - LTC working storage |
References _LTC_Wrk::cl, _LTC_Wrk::cmdHdrSize, _LTC_CntlProc_Prm::grp, _LTC_Wrk::htP, _LTC_Wrk::itcHdrSize, _LTC_Wrk::lcb, LTC_CNTLPROC_FCODE, LTC_freePdu(), LTC_INTERNAL_CMD_APID, LTC_LcbRspCB(), LTC_NUM_HPs, LTC_PDU_GRPS, LTC_PDUs, LTC_SNSR_TYPS, _LTC_CntlProc_Prm::mr, MSG_SIGNAL, _LTC_CntlProc_Prm::ncl, NOT_READ, _LTC_CntlProc_Prm::pdu, _LTC_Wrk::pdu, _LTC_Wrk::pduPool, _LTC_Wrk::pduReg, _LTC_Wrk::pduTbl, PRINTF, LTC_HeatPipe::snsr, and LTC_Sensor::stat.
Referenced by LTC_CntlStart().
WUT_cb_status LTC_WkUp | ( | void * | p, | |
WUT_tmr * | wut | |||
) |
Wake up LTC for another processing cycle and restart wake timer.
p | - LTC Working storage. | |
wut | - LTC wake up timer. |
References _LTC_Wrk::cmdHdrSize, _LTC_Wrk::cmdPool, _LTC_Wrk::itcHdrSize, LTC_CNTLSTART_FCODE, LTC_freeCmd(), LTC_INTERNAL_CMD_APID, MSG_SIGNAL, PRINTF, _LTC_CntlStart_Prm::spare, and _LTC_Wrk::wutNSecs.
Referenced by LTC_StartTask().