GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > EFC / V4-2-2
Constituent: defc     Tag: sun-gcc
#include <time.h>
#include "EFC/EFC_time.h"
#include "EFC_time.ih"
#include "EDS/EBF_gem.h"
#include "LSE/LSEW_ctxTim.h"
Include dependency graph for EFC_time.c:
Data Structures | |
struct | _EFC_timeContext |
Holds the time context information. More... | |
Defines | |
#define | SA_OFFSET 0x3a4fc880 |
Offset between the UNIX and Spectrum-Astro time epochs. | |
Typedefs | |
typedef _EFC_timeContext | EFC_timeContext |
Typedef for struct _EFC_timeContext. | |
Functions | |
static void | efc_construct (EFC_timeFlagSpec *tfs) |
Sets the time specification sequence. | |
static void | efc_set (unsigned int seconds, unsigned int flags, unsigned int frequency) |
Sets the initial time, flags word and frequency. | |
static void | efc_elapsedSet (unsigned int elapsed_reg, unsigned int pps_reg) |
Uses the elapsed clock tick and 1-PPS GEM registers to calculate the elapsed time since the last 1-PPS strobe. | |
static unsigned long long int | efc_timestampGet (void) |
Returns the time since the Spectrum-Astro epoch. | |
static unsigned int | efc_timetoneGet (unsigned int pps, unsigned int *secs, unsigned int *flags) |
Fills in the seconds and flag values of a simulated timetone message corresponding to the specified 1-PPS strobe value. | |
static unsigned int | efc_timetonesGet (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. | |
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 long long int | EFC_timeTimestampGet (void) |
Get the current timestamp, i.e. the number of elapsed seconds and micro-seconds since the Spectrum-Astro Epoch. | |
unsigned int | EFC_timeOffset (void) |
Gets the offset from standard UNIX time to Spectrum Astro time. | |
static __inline unsigned int | complete_flags (unsigned int new_flags, unsigned int prv_flags) |
If the new flag value is not error-free (IS_SOURCE_GPS) modifies it to update the error count. | |
Variables | |
EFC_timeServices | EfcTimeServices |
The list of time services needed when filling in such information in the datagrams. | |
static EFC_timeContext | EfcTimeContext |
Captures the static context needed by the default implementation. |
CVS $Id: EFC_time.c,v 1.1 2007/10/10 23:40:43 russell Exp $
|
If the new flag value is not error-free (IS_SOURCE_GPS) modifies it to update the error count.
|
|
Sets the time specification sequence.
|
|
Uses the elapsed clock tick and 1-PPS GEM registers to calculate the elapsed time since the last 1-PPS strobe.
|
|
Sets the initial time, flags word and frequency.
|
|
Constructs/initializes the EFC time emulation services.
|
|
Gets the offset from standard UNIX time to Spectrum Astro time.
|
|
Get the current number of elapsed seconds since the Spectrum-Astro Epoch.
|
|
Sets the initial time and frequency.
|
|
Returns the time since the Spectrum-Astro epoch.
|
|
Get the current timestamp, i.e. the number of elapsed seconds and micro-seconds since the Spectrum-Astro Epoch.
|
|
Fills in the seconds and flag values of a simulated timetone message corresponding to the specified 1-PPS strobe value.
|
|
Fills in the timetone message corresponding to cur_pps and the most recent timetone message occuring prior to cur_pps.
|
|
Initial value: { 0, 0, 0, 0, LSE_CTXTIMFLAGS_M_IS_SOURCE_GPS, LSE_CTXTIMFLAGS_M_IS_SOURCE_GPS, 0, 0, 0}
|
|
Initial value: { (EFC_timeServicesConstruct)efc_construct, efc_set, efc_elapsedSet, efc_timestampGet, efc_timetoneGet, efc_timetonesGet }
|