GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> THS / dev > ths / rhel5-64
#include <PBS/LSU.h>
#include <PBS/WCT.h>
#include <THS/THS.h>
Functions | |
unsigned int | THS_getLastPpsAbsTimeSec () |
Get the absolute time value at last PPS. | |
unsigned int | THS_cpuInit () |
Inits the TimeHackService module. | |
unsigned int | THS_cpuWait () |
Start the TimeHackService module. | |
unsigned int | THS_getLastPpsClock () |
Get the CPU clk value at last PPS. | |
void | THS_setLastPpsClock (unsigned int snapshot) |
Set the CPU clk value at last PPS. | |
void | THS_cpuIsr (unsigned int absTimeSec, int newTimetone, unsigned int snapshot) |
interrupt routine for CPU specfic time hack | |
unsigned int | THS_gemInit (int siu) |
Inits the TimeHackService module. | |
unsigned int | THS_gemWait () |
Start the TimeHackService module. | |
unsigned int | THS_gemGetTableInfo (int count, unsigned int *gemStrobe, LSU_factors *Kgem, unsigned int *flags) |
get info from hack table | |
unsigned int | THS_gemCalcClkDiff (unsigned int clk, unsigned int prevClk) |
calculate diff between clks assuming 25 bit clock | |
void | THS_gemIsr (unsigned int absTimeSec, THS_GemTableFlags flags) |
interrupt routine for gem specfic time hack | |
void | THS_gemSetTable (unsigned int absTimeSec, THS_GemTableFlags flags, unsigned int gemStrobeIn, LSU_factors Kgem) |
Set a single entry in the gem hack table. | |
void | THS_sendSlaveGemSetTableMsg (unsigned int absTime, THS_GemTableFlags flags, unsigned int gemStrobe, LSU_factors Kgem) |
send gmHack from SIU to EPU (this runs on SIU) |
unsigned int THS_cpuInit | ( | ) |
Inits the TimeHackService module.
Referenced by THS_init().
void THS_cpuIsr | ( | unsigned int | absTimeSec, | |
int | realPps, | |||
unsigned int | snapshot | |||
) |
interrupt routine for CPU specfic time hack
absTimeSec | absolute time at PPS | |
realPps | 1=indicates snapshot is real, 0=indicates snapshot is estimated | |
snapshot | snapshot clk value at PPS |
unsigned int THS_cpuWait | ( | ) |
Start the TimeHackService module.
The sequence is: THS_cpuInit();
start up bunch of things including Sw to call THS_timeTone() every second as result of message from spacecraft Hw to cause PPS interrupt every second
THS_cpuWait() (this routine waits till received first THS_cpuTimeTone() followed by PPS interrupt)
Referenced by THS_wait().
unsigned int THS_gemCalcClkDiff | ( | unsigned int | clk, | |
unsigned int | prevClk | |||
) |
calculate diff between clks assuming 25 bit clock
clk | latest gem clk value | |
prevClk | previous gem clock value |
Referenced by THS_gemAbsTimeEvent(), and THS_stats().
unsigned int THS_gemGetTableInfo | ( | int | count, | |
unsigned int * | gemStrobe, | |||
LSU_factors * | Kgem, | |||
unsigned int * | flags | |||
) |
get info from hack table
count | count value from gemStrobe, this is a 7 bit index into table | |
gemStrobe | gemStrobe register value for this | |
Kgem | ptr to extrapolation constants struct to fill | |
flags | return flags from tt message for this entry |
Referenced by THS_stats().
unsigned int THS_gemInit | ( | int | siu | ) |
Inits the TimeHackService module.
siu | 1=SIU(=commander on cmd/response), 0=EPU |
Referenced by THS_init().
THS_gemIsr | ( | unsigned int | absTimeSec, | |
THS_GemTableFlags | flags | |||
) |
interrupt routine for gem specfic time hack
absTimeSec | absolute time at PPS from tt message | |
flags | Spectrum Astro and FSW flags |
void THS_gemSetTable | ( | unsigned int | absTimeSec, | |
THS_GemTableFlags | flags, | |||
unsigned int | gemStrobeIn, | |||
LSU_factors | Kgem | |||
) |
Set a single entry in the gem hack table.
absTimeSec | ||
flags | combined SA and FSW flags | |
gemStrobeIn | register read from GEM | |
Kgem | coeffients to calc absolute time |
References _THS_GemTableFlags::ui.
Referenced by THS_slaveProcessMsg().
unsigned int THS_gemWait | ( | ) |
Start the TimeHackService module.
start up bunch of things including LCB driver Sw to call THS_timeTone() every second as result of message from spacecraft Hw to cause PPS interrupt every second
THS_gemWait() (this routine waits till received first THS_gemTimeTone() followed by PPS interrupt)
Referenced by THS_wait().
unsigned int THS_getLastPpsAbsTimeSec | ( | ) |
Get the absolute time value at last PPS.
unsigned int THS_getLastPpsClock | ( | ) |
Get the CPU clk value at last PPS.
void THS_sendSlaveGemSetTableMsg | ( | unsigned int | absTime, | |
THS_GemTableFlags | flags, | |||
unsigned int | gemStrobe, | |||
LSU_factors | Kgem | |||
) |
send gmHack from SIU to EPU (this runs on SIU)
absTime | - time in sec since 1/1/2001 from tt message | |
flags | - flags from tt message | |
gemStrobe | - contents of gemStrobe reg with clk on last PPS and clk counter | |
Kgem | - multiplcation constants for calcs |
void THS_setLastPpsClock | ( | unsigned int | snapshot | ) |
Set the CPU clk value at last PPS.
snapshot | snapshow value from Rad750 HW |