GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LTC / dev > ltct / rad750


Interface   Data Structures   File List   Data Fields   Globals  

ltcPrivate.h File Reference

Private definitions for thermal control package. More...

#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.


Detailed Description

Private definitions for thermal control package.


Enumeration Type Documentation

Specify booleans for LTC.

Enumerator:
LTC_ACTIVE  cmd HPs
LTC_PASSIVE  do not cmd HPs

LTC process states.

Enumerator:
LTC_CTL_UNINITIALIZED  Uninitialized
LTC_CTL_INITIALIZING  Initializing
LTC_CTL_DEINITIALIZING  De-initializing
LTC_CTL_INITIALIZED  Initialized
LTC_CTL_STARTING  Starting
LTC_CTL_RUNNING  Running
LTC_CTL_STOPPING  Stopping
LTC_CTL_BROKEN  Broken (irrecoverable)

Specifies LTC binary file type.

Enumerator:
LTC_BIN_CFG  LTC Binary Configuration file
LTC_BIN_SNSR  LTC Binary Sensor Definition file (obsolete)
LTC_BIN_FILT  LTC Filter Coefficient Definition file
LTC_BIN_TEMP  LTC ADC-Temperature Conversion file
LTC_BIN_FOF  LTC File-of-Files (really from FMX)

Specifies FILE ID methods.

Enumerator:
LTC_FILE_BUILT_IN  Use built-in configuration
LTC_FILE_BY_NAME  File identified by string (obsolete)
LTC_FILE_BY_ID  File identified by ID number

Specifies LTC binary file format version numbers.

Enumerator:
LTC_BIN_CFG_MJV  LTC Bin Cnfg file major version number
LTC_BIN_CFG_MNV  LTC Bin Cnfg file minor version number

Heat pipe control mode.

Enumerator:
LTC_AUTO  Use control algorithm to turn heater on/off
LTC_ALWAYS_ON  heater always on
LTC_ALWAYS_OFF  heater always off

enum LTC_OnOff

Specify booleans for LTC.

Enumerator:
LTC_ON  On for LTC
LTC_OFF  Off for LTC

Specify booleans for LTC.

Enumerator:
LTC_RUNNING  LTC cycles running
LTC_STOPPED  LTC cycles stopped

Status indicator for sensor data.

Enumerator:
NOT_READ  Not read on this cycle
READ_GOOD  Sensor read on this cycle
READ_BAD  Sensor read but bad
BROKEN  Sensor has been designated as broken

Values for LAT sensor types used as array index by LTC.

Enumerator:
DSHP_RIT  Downspout RIT
DSHP_RIT_R  Downspout RIT redundant
XLHP_RIT  X-LAT RIT
XLHP_RIT_R  X-LAT RIT redundant
RSVR_HTR  Reservoir heater
RSVR_HTR_R  Reservoir heater redundant
LTC_SNSR_TYPS  Number sensor types

Temperature type codes used as array index by LTC.

Enumerator:
RIT_TMP  Radiator Interface Temperature
RES_TMP  Heater Reservoir Temperature
LTC_TMP_TYPS  Number temp type codes

enum LTC_YesNo

Specify booleans for LTC.

Enumerator:
LTC_YES  Yes for LTC
LTC_NO  No for LTC


Function Documentation

unsigned short GetADCBits ( const unsigned int *  pduR,
const int  adc 
)

Get 12-bit ADC values from PDU register given ADC number.

Parameters:
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
8-----8-----8-----8-----8-----8-----8-----8-----8-----8-----8-----8-----8 | | | | | | | | | | | | | | | | | | | | | | | | | --mbz-^-m^----6---^----5---^----4---^---3----^---2----^---1----^----0---- ADC Numbers Byte ADC# OffSet Operation ---- ------ --------- 6 1 0xFFF 5 3 >>4 4 4 0xFFF 3 6 >>4 2 7 0xFFF 1 9 >>4 0 10 0xFFF

Referenced by LTC_ProcPduRsp().

void LTC_InitBuiltIn ( LTC_Wrk tw  ) 

unsigned int LTC_InitCfg ( LTC_Wrk tw  ) 

Initialization for working storage from configuration files.

Parameters:
tw - LTC working storage.
Return values:
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.

Parameters:
tw - LTC working storage.
Return values:
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  ) 

static unsigned int LTC_InitSmooth ( LTC_Wrk tw  ) 

Allocates and inits storage for smoothing filters.

Parameters:
tw - LTC working storage.
Return values:
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.

Parameters:
tw - LTC working storage.
rb - Response processing block.
rl - A pointer to the LTC PDU response data.
Return values:
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.

Parameters:
tw - LTC working storage
The command lists are already built (LTC_InitIO) during initialization. This logic sends each command list to the LCB queue were they are executed. As responses are generated, the callback LTC_LcbRspCB is executed which in turn executes LTC_ProcPduRsp to process the sensor data.

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.

Parameters:
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().


Generated on Mon Mar 28 15:07:40 2011 by  doxygen 1.5.8