GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > THS / V1-5-2

Constituent: timetone     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

THS_sntpReader.h File Reference

TimeTone simulation for testing THS (Time Hack Services). More...

#include <time.h>

Include dependency graph for THS_sntpReader.h:

This graph shows which files directly or indirectly include this file:


Typedefs

typedef unsigned int(* THS_sntp_timetone_cb )(unsigned int absTimeSec, unsigned int flags)
 Typedef for THS_sntp timetone callback routine.

Functions

unsigned int THS_sntpGetTime (struct timespec *curTime, char *remoteHost, time_t *tripTime)
 Read a Sntp server over net (RFC2030).
unsigned int THS_sntpGetRfc868Time (time_t *curTime, char *remoteHost)
 Read a time server over net (RFC868) (actually simpiler than SNTP).
unsigned int THS_sntpTimeStr (time_t *timeIn, char *buff)
 convert 32b time in sec to ascii string
unsigned int THS_sntpTimeLoop (char *server)
 Simple loop to just read the timeserver.
unsigned int THS_sntpTimetoneTask (char *server, THS_sntp_timetone_cb cb, int printIt)
 Timetone task to run as SC simulator (probably mv2304 with 1553).

Detailed Description

TimeTone simulation for testing THS (Time Hack Services).

Author:
Ed Bacho -- ebacho@slac.stanford.edu
The LAT receives a "timeTOne" message from the spacecraft once a second telling the LAT the absolute time on the next PPS hardware pulse. It should arrive at the LAT 500-800 milliSec before the PPS (PulsePerSec).

This file implements routines to simluate the once a second timetone messgae.

These routines poll a NTP or SNTP time server over the net and call the given callback when there is a change in the secconds field of the time.

Although these routines can use any timeserver, for accurate testing we expect to poll the XLi time server that also provides a correlated PPS signal to the LAT.


Typedef Documentation

unsigned int(* THS_sntp_timetone_cb)(void *prm, WCT_time absTime)
 

Typedef for THS_sntp timetone callback routine.

Parameters:
absTimeSec Seconds since 1/1/2001 provided by timetone
flags User provided flags
Returns:
status


Function Documentation

unsigned int THS_sntpGetRfc868Time time_t *  curTime,
char *  remoteHost
 

Read a time server over net (RFC868) (actually simpiler than SNTP).

Parameters:
curTime - fill in current time in this buffer
remoteHost - SNTP server to talk to
Returns:
status
Read a TIME server (RFC868) -- very simple and low res (secs) -- returns time in sec since 1/1/1900

unsigned int THS_sntpGetTime struct timespec *  curTime,
char *  remoteHost,
time_t *  tripTime
 

Read a Sntp server over net (RFC2030).

Parameters:
curTime - fill in current time in this buffer
remoteHost - SNTP server to talk to
tripTime - fill in trip time in this buffer
Returns:
status
Read a Sntp (RFC2030) -- reads from single server -- returns time in sec and partial sec since 1/1/1900

unsigned int THS_sntpTimeLoop char *  server  ) 
 

Simple loop to just read the timeserver.

Parameters:
server - SNTP server to talk to
Returns:
status

unsigned int THS_sntpTimeStr time_t *  timeIn,
char *  buff
 

convert 32b time in sec to ascii string

Parameters:
timeIn time to convert
buff buffer to fill with ascii
Returns:
status

unsigned int THS_sntpTimetoneTask char *  server,
THS_sntp_timetone_cb  cb,
int  printIt
 

Timetone task to run as SC simulator (probably mv2304 with 1553).

Parameters:
server SNTP server to talk to
cb if not NULL, run the callback once a sec where cb(absTime, flags)
printIt Sprint info as process
Returns:
status


Generated on Wed Feb 14 07:55:21 2007 by  doxygen 1.4.4