GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LTC / V6-2-3 > ltct / mv2304
#include "string.h"
#include "stdlib.h"
#include "LTC/LTC_msgs.h"
#include "PBS/FPA.h"
#include "PBS/WUT.h"
#include "PBS/TOV.h"
#include "PBS/TOC.h"
#include "CCSDS/CCSDS_pkt.h"
#include "LEM/defs.h"
#include "LEM/encode.h"
#include "LEM/encode_structs.h"
#include "LEM/decode.h"
#include "IMM/FPM_pubdefs.h"
#include "ITC/ITC_pubdefs.h"
#include "LCBD/LCBD.h"
#include "MSG/MSG_pubdefs.h"
#include "ltcPrivate.h"
Functions | |
static unsigned int | LTC_LcbRspCB (LTC_Wrk *tw, LCBD_xcb *xcb) |
LCB callback to process responses from reads of PDU registers. | |
static void | LTC_freeCmd (ITC_QueueItem *qitem, unsigned int status, LTC_Wrk *tw, void *prm1, void *prm2) |
static void | LTC_freePdu (ITC_QueueItem *qitem, unsigned int status, LTC_Wrk *tw, void *prm1, void *prm2) |
static void | LTC_freeTelem (ITC_QueueItem *qitem, unsigned int status, LTC_Wrk *tw, void *prm1, void *prm2) |
static unsigned int | LTC_CnvSmthSnsrs (LTC_Wrk *tw, LTC_HeatPipe *hp, LTC_SnsrType sTyp) |
Converts sensor values to smoothed temperature for a heat pipe. | |
static int | LTC_IsGoodTemps (const LTC_HeatPipe *hp) |
Check goodness of collected temperature values for this heat pipe. | |
static void | LTC_CalcHtrOnOff (LTC_Wrk *tw, const int h) |
Calculate on or off commands for a HP reservoir heater. | |
static signed int | LTC_EstTmp (const LTC_Temperature *tmp) |
Estimates temperature for next cycle. | |
static signed int | LTC_Smooth (LTC_Temperature *tmp) |
Returns smoothed value for temperature. | |
static void | LTC_CnvAdcToTmp (LTC_Sensor *snsr, LTC_Temperature *tmp) |
Converts sensor values to temperature for given heat pipe. | |
unsigned short | GetADCBits (const unsigned int *pduR, const int adc) |
Get 12-bit ADC values from PDU register given ADC number. | |
static void | LTC_CmdHtrs (LTC_Wrk *ltcW) |
Issue "on" or off commands to HP reservoir heaters. | |
static void | LTC_SndTlm (LTC_Wrk *tw) |
Collect, format and send telemetry for LTC. | |
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. | |
void | LTC_ReadSensors (LTC_Wrk *tw) |
Start cycle of LTC control - issue LCB commands. | |
WUT_cb_status | LTC_WkUp (void *p, WUT_tmr *wut) |
Wake up LTC for another processing cycle and restart wake timer. |
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) |
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
static void LTC_CalcHtrOnOff | ( | LTC_Wrk * | tw, | |
const int | h | |||
) | [static] |
Calculate on or off commands for a HP reservoir heater.
tw | - LTC working storage. | |
h | - Heat pipe index. |
static void LTC_CmdHtrs | ( | LTC_Wrk * | ltcW | ) | [static] |
Issue "on" or off commands to HP reservoir heaters.
ltcW | - LTC working storage. |
void LTC_CnvAdcToTmp | ( | LTC_Sensor * | snsr, | |
LTC_Temperature * | tmp | |||
) | [static] |
Converts sensor values to temperature for given heat pipe.
snsr | - Heat pipe sensor record. | |
tmp | - Heat pipe temperature. |
unsigned int LTC_CnvSmthSnsrs | ( | LTC_Wrk * | tw, | |
LTC_HeatPipe * | hp, | |||
LTC_SnsrType | sTyp | |||
) | [static] |
Converts sensor values to smoothed temperature for a heat pipe.
tw | - LTC working storage. | |
hp | - Heat pipe record to get smoothed celsius temperature. | |
sTyp | - Sensor type. |
A | LTC MSG code. |
signed int LTC_EstTmp | ( | const LTC_Temperature * | tmp | ) | [static] |
Estimates temperature for next cycle.
tmp | - Heat pipe temperature structure. |
static void LTC_freeCmd | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
LTC_Wrk * | tw, | |||
void * | prm1, | |||
void * | prm2 | |||
) | [static] |
Free memory after sending ITC command packets.
qitem | The memory buffer. | |
status | Status of telemetry. | |
tw | LTC control structure. | |
prm1 | Completion callback paramter 1. | |
prm2 | Completion callback paramter 2. |
static void LTC_freePdu | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
LTC_Wrk * | tw, | |||
void * | prm1, | |||
void * | prm2 | |||
) | [static] |
Free memory after receiving PDU response packet.
qitem | The memory buffer. | |
status | Status of telemetry. | |
tw | LTC control structure. | |
prm1 | Completion callback paramter 1. | |
prm2 | Completion callback paramter 2. |
static void LTC_freeTelem | ( | ITC_QueueItem * | qitem, | |
unsigned int | status, | |||
LTC_Wrk * | tw, | |||
void * | prm1, | |||
void * | prm2 | |||
) | [static] |
Free memory after sending ITC telemetry packets.
qitem | The memory buffer. | |
status | Status of telemetry. | |
tw | LTC control structure. | |
prm1 | Completion callback paramter 1. | |
prm2 | Completion callback paramter 2. |
static int LTC_IsGoodTemps | ( | const LTC_HeatPipe * | hp | ) | [static] |
Check goodness of collected temperature values for this heat pipe.
hp | - Heat pipe data structure. |
static unsigned int LTC_LcbRspCB | ( | LTC_Wrk * | tw, | |
LCBD_xcb * | xcb | |||
) | [static] |
LCB callback to process responses from reads of PDU registers.
tw | - LTC working storage. | |
xcb | - LCBD control block. |
'0'. |
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. |
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 |
static void LTC_Smooth | ( | LTC_Temperature * | tmp | ) | [static] |
Returns smoothed value for temperature.
tmp | - Temperature record for heat pipe. |
static void LTC_SndTlm | ( | LTC_Wrk * | tw | ) | [static] |
Collect, format and send telemetry for LTC.
tw | - LTC working storage. |
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. |