GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EFC / dev > defc / rhel6-64
Classes | |
struct | _EFC_timeServices |
The set of virtual functions needed to implement the time emulation routines. More... | |
struct | _EFC_timeFlagSpec |
Time hack flag specification. More... | |
Typedefs | |
typedef enum _EFC_TIME_K | EFC_TIME_K |
Typedef for enum _EFC_TIME_K. | |
typedef void(* | EFC_timeServicesConstruct )(void *prm) |
Constructs/initializes the time services. | |
typedef void(* | EFC_timeServicesSet )(unsigned int seconds, unsigned int flags, unsigned int frequency) |
Establishes the initial time and clock frequency. | |
typedef void(* | EFC_timeServicesElapsedSet )(unsigned int evt_reg, unsigned int pps_reg) |
Sets the elapsed time since the last 1-PPS. | |
typedef unsigned long long int(* | EFC_timeServicesTimestampGet )(void) |
Gets the current timestamp. | |
typedef unsigned int(* | EFC_timeServicesTimetoneGet )(unsigned int pps_reg, unsigned int *secs, unsigned int *flags) |
Fills in the current seconds and flags. | |
typedef unsigned int(* | EFC_timeServicesTimetonesGet )(unsigned int cur_pps, unsigned int *cur_secs, unsigned int *cur_flags, unsigned int *prv_secs, unsigned int *prv_flags, unsigned int *prv_pps) |
Fills in the timetone message corresponding to cur_pps and the most recent timetone message occuring prior to cur_pps. | |
typedef struct _EFC_timeServices | EFC_timeServices |
Typedef for struct _EFC_timeServices. | |
typedef struct _EFC_timeFlagSpec | EFC_timeFlagSpec |
Typedef for struct _TimeFlagSpec. | |
Enumerations | |
enum | _EFC_TIME_K { EFC_TIME_K_ASIS = 0, EFC_TIME_K_DEFAULT = -1 } |
Used to specify the use of ASIS or DEFAULT parameters. More... | |
Functions | |
void | EFC_timeConstruct (const EFC_timeServices *services, void *prm) |
Constructs/initializes the EFC time emulation services. | |
void | EFC_timeSet (unsigned int seconds, unsigned int flags, unsigned int frequency) |
Sets the initial time and frequency. | |
unsigned int | EFC_timeSecsGet (void) |
Get the current number of elapsed seconds since the Spectrum-Astro Epoch. | |
unsigned int | EFC_timeOffset (void) |
Gets the offset from standard UNIX time to Spectrum Astro time. |
CVS $Id: EFC_time.h,v 1.1 2007/10/10 23:40:42 russell Exp $
Typedef for struct _TimeFlagSpec.
void(* EFC_timeServicesConstruct)(void *prm) |
Constructs/initializes the time services.
prm | An arbitrary user context parameter. For the standard services this is a pointer to an EFC_timeflagSpec |
void(* EFC_timeServicesElapsedSet)(unsigned int evt_reg, unsigned int pps_reg) |
Sets the elapsed time since the last 1-PPS.
evt_reg | The value of the event time register in the GEM | |
pps_reg | The value of the 1-PPS time register in the GEM |
void(* EFC_timeServicesSet)(unsigned int seconds, unsigned int flags, unsigned int frequency) |
Establishes the initial time and clock frequency.
seconds | The initial time, specified in the number of seconds since the Spectrum-Astro epoch. If specified as 0, EFC_TIME_K_ASIS, then the time is not adjusted. If specified as -1, EFC_TIME_K_DEFAULT, then use the current time. | |
flags | The initial value of the timetone message's flag word. There is no default value, but 0 would be a good choice as a default (no errors). | |
frequency | The frequency, in Hertz. If specified as 0, then the frequency will not be changed. If specified as 0, EFC_TIME_K_ASIS, then the time is not adjusted. If specified as -1, EFC_TIME_K_DEFAULT, then use the current time. |
unsigned long long int(* EFC_timeServicesTimestampGet)(void) |
Gets the current timestamp.
typedef unsigned int(* EFC_timeServicesTimetoneGet)(unsigned int pps_reg unsigned int *secs, unsigned int *flags) |
Fills in the current seconds and flags.
pps_reg | The 1-PPS register used as a key to get the seconds | |
secs | Returned with the elapsed time in seconds | |
flags | Returned with the status flag value (0= no errors) |
unsigned int(* EFC_timeServicesTimetonesGet)(unsigned int cur_pps, unsigned int *cur_secs, unsigned int *cur_flags, unsigned int *prv_secs, unsigned int *prv_flags, unsigned int *prv_pps) |
Fills in the timetone message corresponding to cur_pps and the most recent timetone message occuring prior to cur_pps.
cur_pps | The value of the GEM's 1-PPS register to use as a key in locating the timetone messages | |
cur_secs | Filled in with the time since the Spectrum-Astro epoch corresponding the current timetone message | |
cur_flags | Filled in with status flags/values (see THS) corresponding the current timetone message | |
prv_secs | Filled in with the time since the Spectrum-Astro epoch corresponding the previous timetone message | |
prv_flags | Filled in with status flags/values (see THS) corresponding the previous timetone message | |
prv_pps | Filled in with the value of GEM's 1-PPS register corresponding the previous timetone message |
enum _EFC_TIME_K |
void EFC_timeConstruct | ( | const EFC_timeServices * | services, | |
void * | prm | |||
) |
Constructs/initializes the EFC time emulation services.
services | A pointer to the virtual functions. If NULL, the standard services are used. | |
prm | Arbitrary user parameter passed to the constructor |
References _EFC_timeServices::construct.
unsigned int EFC_timeOffset | ( | void | ) |
Gets the offset from standard UNIX time to Spectrum Astro time.
References SA_OFFSET.
unsigned int EFC_timeSecsGet | ( | void | ) |
Get the current number of elapsed seconds since the Spectrum-Astro Epoch.
References _EFC_timeServices::timestampGet.
void EFC_timeSet | ( | unsigned int | seconds, | |
unsigned int | flags, | |||
unsigned int | frequency | |||
) |
Sets the initial time and frequency.
seconds | The initial time, specified in the number of seconds since the Spectrum-Astro epoch. If specified as 0, then the time is not adjusted | |
flags | The initial value of the timetone message's flag word. There is no default value, but bit 16 (source = GPS) would be a good choice as a default (no errors). | |
frequency | The frequency, in Hertz. If specified as 0, then the frequency will not be changed |
References _EFC_timeServices::set.