GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> THS / dev > ths4ddt / rad750
#include <LSF/LSF_statsHdr.h>
#include <PBS/WCT.h>
#include <PBI/Endianness.h>
Classes | |
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 struct _THS_GemTableFlagsBf | THS_GemTableFlagsBf |
Typedef for struct _THS_GemTableFlagsBf. | |
typedef union _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, THS_FSW_FLAG_NO_HACK_TABLE = 8 } |
Functions | |
unsigned int | THS_init (int optionMask) |
Dummy routine. | |
unsigned int | THS_simulatedPPS (void) |
Return the state of the pulse-per-second simulation. | |
unsigned int | THS_simulatedTT (void) |
Return the state of the timetone simulation. | |
unsigned int | THS_wait () |
Dummy routine. | |
unsigned int | THS_timetone (unsigned int absTimeSec, unsigned short saFlags) |
One-time set the wall clock time. | |
WCT_time | THS_gemAbsTimeEvent (int gemStrobeIn, int gemClk) |
Dummy routine. | |
unsigned int | THS_timetoneFromEvent (int gemStrobeIn, int *absTimeSecs, int *flag) |
One-time set the wall clock time. | |
unsigned int | THS_prevTimetoneFromEvent (int gemStrobeIn, int *absTimeSecs, int *flags, int *absTimeSecsPrev, int *flagsPrev, int *gemStrobeInPrev) |
Dummy routine. | |
unsigned int | THS_prevTimtoneFromEvent (int gemStrobeIn, int *absTimeSecs, int *flags, int *absTimeSecsPrev, int *flagsPrev, int *gemStrobeInPrev) |
Dummy routine. | |
unsigned int | THS_cpuSetWarning (unsigned int expectedClkHz, unsigned int expectedDeltaClkHz) |
Dummy routine. | |
unsigned int | THS_gemSetWarning (unsigned int expectedClkHz, unsigned int expectedDeltaClkHz) |
Dummy routine. | |
void | THS_setPpsWarnEvery (unsigned int warnPpsEvery) |
Dummy routine. | |
void | THS_setTimetoneWarnEvery (unsigned int _warnTimetoneEvery) |
Dummy routine. | |
void | THS_setSlaveSend (THS_SendSlaveRtn rtn, void *arg, int lsmId) |
Dummy routine. | |
unsigned int | THS_slaveProcessMsg (int func, void *payload, unsigned int len) |
Dummy routine. | |
void | THS_setGemUpdateMsgs (int maxMsgs) |
Dummy routine. | |
unsigned int | THS_lsfStatFirstEvt (LSF_statsHdr *statsHdr, unsigned long long seq, unsigned int gemClock, unsigned int gemStrobe) |
Sets first event parms within LSF_statsHdr. | |
void | THS_lsfStatIncEvt (LSF_statsHdr *statsHdr, int increment) |
Increment event counter in LSF_statsHdr structure. | |
unsigned int | THS_lsfStatLastEvt (LSF_statsHdr *statsHdr, unsigned long long seq, unsigned int gemClock, unsigned int gemStrobe) |
Sets last event parms within LSF_statsHdr. | |
void | THS_lsfStatClear (LSF_statsHdr *statsHdr) |
Clear the LSF_statsHdr structure. |
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:
void(* THS_SendSlaveRtn)(void *arg, void *payload, int payloadLen) |
stash away routine (from LCM) to send msg to EPU
arg | - given arg to be included with call | |
payload | - buffer with message to send | |
payloadLen | - length of buffer |
enum _THS_FSW_FLAGS |
enum _THS_OPTION |
unsigned int THS_cpuSetWarning | ( | unsigned int | expectedClkHz, | |
unsigned int | expectedDeltaClkHz | |||
) |
Dummy routine.
expectedClkHz | (none) Ignored | |
expectedDeltaClkHz | (none) Ignored |
0 | Always |
WCT_time THS_gemAbsTimeEvent | ( | int | gemStrobeIn, | |
int | gemClk | |||
) |
Dummy routine.
gemStrobeIn | (none) Ignored | |
gemClk | (none) Ignored |
0LL | Always |
unsigned int THS_gemSetWarning | ( | unsigned int | expectedClkHz, | |
unsigned int | expectedDeltaClkHz | |||
) |
Dummy routine.
expectedClkHz | (none) Ignored | |
expectedDeltaClkHz | (none) Ignored |
0 | Always |
unsigned int THS_init | ( | int | mask | ) |
Dummy routine.
mask | (none) Ignored |
0 | Always |
void THS_lsfStatClear | ( | LSF_statsHdr * | statsHdr | ) |
Clear the LSF_statsHdr structure.
statsHdr | pointer to LSF_statsHdr structure to fill in |
unsigned int THS_lsfStatFirstEvt | ( | LSF_statsHdr * | statsHdr, | |
unsigned long long | seq, | |||
unsigned int | gemClock, | |||
unsigned int | gemStrobe | |||
) |
Sets first event parms within LSF_statsHdr.
statsHdr | pointer to LSF_statsHdr structure to fill in | |
seq | extended seqence number of the event | |
gemClock | evt clock register read from GEM contributor of event | |
gemStrobe | evt PPS cock register read from GEM contributor of event |
References THS_prevTimtoneFromEvent().
void THS_lsfStatIncEvt | ( | LSF_statsHdr * | statsHdr, | |
int | increment | |||
) |
Increment event counter in LSF_statsHdr structure.
statsHdr | pointer to LSF_statsHdr structure to fill in | |
increment | number of events to increase evt count by |
unsigned int THS_lsfStatLastEvt | ( | LSF_statsHdr * | statsHdr, | |
unsigned long long | seq, | |||
unsigned int | gemClock, | |||
unsigned int | gemStrobe | |||
) |
Sets last event parms within LSF_statsHdr.
statsHdr | pointer to LSF_statsHdr structure to fill in | |
seq | extended seqence number of the event | |
gemClock | evt clock register read from GEM contributor of event | |
gemStrobe | evt PPS cock register read from GEM contributor of event |
References THS_prevTimtoneFromEvent().
unsigned int THS_prevTimetoneFromEvent | ( | int | gemStrobeIn, | |
int * | absTimeSecs, | |||
int * | flags, | |||
int * | absTimeSecsPrev, | |||
int * | flagsPrev, | |||
int * | gemStrobeInPrev | |||
) |
Dummy routine.
gemStrobeIn | (none) Ignored | |
absTimeSecs | (none) Ignored | |
flags | (none) Ignored | |
absTimeSecsPrev | (none) Ignored | |
flagsPrev | (none) Ignored | |
gemStrobeInPrev | (none) Ignored |
THS_NOINIT | Always |
unsigned int THS_prevTimtoneFromEvent | ( | int | gemStrobeIn, | |
int * | absTimeSecs, | |||
int * | flags, | |||
int * | absTimeSecsPrev, | |||
int * | flagsPrev, | |||
int * | gemStrobeInPrev | |||
) |
Dummy routine.
gemStrobeIn | (none) Ignored | |
absTimeSecs | (none) Ignored | |
flags | (none) Ignored | |
absTimeSecsPrev | (none) Ignored | |
flagsPrev | (none) Ignored | |
gemStrobeInPrev | (none) Ignored |
THS_NOINIT | Always |
Referenced by THS_lsfStatFirstEvt(), and THS_lsfStatLastEvt().
void THS_setGemUpdateMsgs | ( | int | maxMsgs | ) |
Dummy routine.
maxMsgs | (none) Ignored |
void THS_setPpsWarnEvery | ( | unsigned int | warnPpsEvery | ) |
Dummy routine.
warnPpsEvery | (none) Ignored |
void THS_setSlaveSend | ( | THS_SendSlaveRtn | rtn, | |
void * | arg, | |||
int | lsmID | |||
) |
Dummy routine.
rtn | (none) Ignored | |
arg | (none) Ignored | |
lsmID | (none) Ignored |
void THS_setTimetoneWarnEvery | ( | unsigned int | warnTimetoneEvery | ) |
Dummy routine.
warnTimetoneEvery | (none) Ignored |
unsigned int THS_simulatedPPS | ( | void | ) |
Return the state of the pulse-per-second simulation.
1 | Pulse-per-second is being simulated |
unsigned int THS_simulatedTT | ( | void | ) |
Return the state of the timetone simulation.
1 | Timetone is being simulated |
unsigned int THS_slaveProcessMsg | ( | int | func, | |
void * | payload, | |||
unsigned int | len | |||
) |
Dummy routine.
func | (none) Ignored | |
payload | (none) Ignored | |
len | (none) Ignored |
0 | Always |
unsigned int THS_timetone | ( | unsigned int | absTimeSec, | |
unsigned short | saFlags | |||
) |
One-time set the wall clock time.
absTimeSec | (none) Ignored | |
saFlags | (none) Ignored |
0 | Always |
unsigned int THS_timetoneFromEvent | ( | int | gemStrobeIn, | |
int * | absTimeSec, | |||
int * | flags | |||
) |
One-time set the wall clock time.
gemStrobeIn | (none) Ignored | |
absTimeSec | (none) Ignored | |
flags | (none) Ignored |
THS_NOINIT | Always |
unsigned int THS_wait | ( | ) |
Dummy routine.
For compatibility with the THS_wait() entry point in THS proper.