Hello All,
I have some questions about epics timestamp,
my environment is EPICS-3.14.8.2 / VxWorks5.5.1 / MVME5100 and RHEL4.0 with ntpd
service.
1. I use <dbpr "wanglin:calcExample",4>
to show the TIME field of a record, is there any better and convenient
method?
2. When I load a EPICS exampleApp and start
the ntpd service on the host,
<dbpr
"wanglin:calcExample",4> will display the information like (I
just show three fields here):
TSE:
0 TSEL:CONSTANT
TIME: 0x284110812d1fe786
While if I stop the ntpd
service on the host, the information will be like:
TSE:
0 TSEL:CONSTANT TIME:
0x0000008c31ab9b64
With and without ntpd
service, the TIME field is very different, where the timestamp is retrieved from
without ntpd,
VxWorks time, VxWorks
internal ticks counter or elsewhere?
3. In the source file
base-3.14.8.2/src/libCom/osi/os/vxWorks/iocClock.c, value piocClockPvt->clock
will keep the EPICS time, routine syncNTP() will retrieve time from ntp server
with the interval of iocClockSyncRate, routine epicsTimeGetCurrent() will update
piocClockPvt->clock and return the current time, and routine
epicsTimeGetEvent() will just return the time in
piocClockPvt->clock.
What I don't understand is that, When a record
is being processed, recGblGetTimeStamp() will be called, which will next call
epicsTimeGetEvent() , but I think routine epicsTimeGetEvent() just return the
time kept in piocClockPvt->clock and does not updated it to the current time,
whereas routine epicsTimeGetCurrent()
updates piocClockPvt->clock to the current time and return
it, but who calls it? Thus I think there must be someting not correct in my
mind.
So, my third question is how EPICS record get
the updated current time when being processed?
Maybe my description above is not very
clear. : )
Thanks,
Lin Wang
|