GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > THS / V1-3-1
Constituent: ths     Tag: mv2304
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _THS_GemTableFlagsBf |
Structure to map out the bit fields time hack flags stored as 32 bits in gemTable. More... | |
struct | _THS_GemTableFlags |
Union for different access of 32 bit flags in gemTable. More... | |
Typedefs | |
typedef enum _THS_OPTION | THS_OPTION |
Masks for option mask into THS_init. | |
typedef enum _THS_FSW_FLAGS | THS_THS_FSW_FLAGS |
Masks for FSW flags in gem table. | |
typedef _THS_GemTableFlagsBf | THS_GemTableFlagsBf |
Typedef for struct _THS_GemTableFlagsBf. | |
typedef _THS_GemTableFlags | THS_GemTableFlags |
Typedef for struct _THS_GemTableFlags. | |
typedef unsigned int( | THS_SendSlaveRtn )(void *lsmArg, short lsmID, short thsId, int nid, void *payload, int payloadLen, void *payloadFreeRtn, void *payloadFreeRtnArg) |
stash away routine (from LCM) to send msg to EPU | |
Enumerations | |
enum | _THS_OPTION { THS_GEM_HACK = 1, THS_CPU_HACK = 2, THS_SIU_HACK = 4 } |
enum | _THS_FSW_FLAGS { THS_FSW_FLAG_TT_SIM = 1, THS_FSW_FLAG_CPU_PPS_SIM = 2, THS_FSW_FLAG_GEM_PPS_SIM = 4 } |
Functions | |
unsigned int | THS_init (int optionMask) |
Inits the TimeHackService module. | |
unsigned int | THS_wait () |
Wait for TimeHackService module to be fully operational. | |
unsigned int | THS_timetone (unsigned int absTimeSec, unsigned short saFlags) |
Provide absTime for next entry in table (on next PPS). | |
WCT_time | THS_gemAbsTimeEvent (int gemStrobeIn, int gemClk) |
Calculate absolute time for event from strobe and clk provided with event (20MHz clk). | |
unsigned int | THS_timetoneFromEvent (int gemStrobeIn, int *absTimeSecs, int *flag) |
get timetone/flags from table for this event | |
unsigned int | THS_prevTimtoneFromEvent (int gemStrobeIn, int *absTimeSecs, int *flags, int *absTimeSecsPrev, int *flagsPrev, int *gemStrobeInPrev) |
get timetone/flags from table for this event and for prev entry in table | |
unsigned int | THS_cpuSetWarning (unsigned int expectedClkHz, unsigned int expectedDeltaClkHz) |
Set range for cpu clock warning messages. | |
unsigned int | THS_gemSetWarning (unsigned int expectedClkHz, unsigned int expectedDeltaClkHz) |
Set range for gem clock warning messages. | |
void | THS_setPpsWarnEvery (unsigned int warnPpsEvery) |
Set how often get warning when no PPS. | |
void | THS_setTimetoneWarnEvery (unsigned int _warnTimetoneEvery) |
Set how often get warning when no timetone. | |
void | THS_setSlaveSend (THS_SendSlaveRtn rtn, void *arg, int lsmId) |
stash away routine (from LCM) to send msg to EPU | |
unsigned int | THS_slaveProcessMsg (int func, void *payload, unsigned int len) |
routine called from ITC dispatch in LSM to process each message it receives (this routine is run on EPU when it receives message) | |
void | THS_setGemUpdateMsgs (int maxMsgs) |
set size of memory pool for gemUpdate msgs, must be called before THS_init |
This file has routines for adjusting the time on the CPU clock by using the WCT_set/get routines, therefore one can only get the current time thru WCT_get(). THese are based on a sub-multiple of the CPU's 33 MHz PCI clock.
The determination of the absolute time from event and LCB times is handled in other time hack files.
This module only truely works on the Rad750 which has the PPS input thru the PID registers. The mv2304 version starts up a task to simulate the PPS but it should therefore show no drift (since its locked with the clock)
Inputs:
Output:
|
stash away routine (from LCM) to send msg to EPU
|
|
|
|
|
|
Set range for cpu clock warning messages.
|
|
Calculate absolute time for event from strobe and clk provided with event (20MHz clk).
|
|
Set range for gem clock warning messages.
|
|
Inits the TimeHackService module.
|
|
get timetone/flags from table for this event and for prev entry in table
|
|
set size of memory pool for gemUpdate msgs, must be called before THS_init
|
|
Set how often get warning when no PPS.
|
|
stash away routine (from LCM) to send msg to EPU
|
|
Set how often get warning when no timetone.
|
|
routine called from ITC dispatch in LSM to process each message it receives (this routine is run on EPU when it receives message)
|
|
Provide absTime for next entry in table (on next PPS).
|
|
get timetone/flags from table for this event
|
|
Wait for TimeHackService module to be fully operational.
The sequence is: THS_init(); 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_wait() (this routine waits till receives two THS_timeTone() followed by PPS interrupt) |