Hi Ralph,
On 04/26/2016 09:20 AM, Ralph Lange wrote:
> I am puzzled:
>
> Base's devTimestamp.c provides "Soft Timestamp" support for ai and
> stringin records.
>
> However,
>
> * the stringin version converts to the POSIX epoch when producing a
> time string in VAL based in the format in INP, while
The stringin support converts the IOC's current time (or some other
timestamp if you've set the record's TSEL or TSE) to a string, using the
standard epicsTimeToStrftime() function and the IOC's timezone settings.
This lets you display the current wall-clock time on an MEDM display for
example, or have a screen one showing the time when a beam diagnostic
hardware event triggered.
record(stringin, "$(IOC):now") {
field(INP, "@%F %T")
field(DTYP, "Soft Timestamp")
field(SCAN, "1 second")
}
> * the ai version converts the plain EPICS time stamp (using the EPICS
> epoch) to a double VAL.
The main point of this is to allow IOC databases to calculate time
differences between events or measure frequencies etc. The EPOCH doesn't
matter as long as the units are seconds. I guess we could add the
ability to choose the EPOCH if someone needs that; the INP field is
currently ignored.
> Is that on purpose?
> If yes, what purpose?
APS had various device support in different IOC and/or support modules
that performed both the above operations, which we have now replaced
with devTimestamp.
Does that un-puzzle you?
- Andrew
--
There are only two hard problems in distributed systems:
2. Exactly-once delivery
1. Guaranteed order of messages
2. Exactly-once delivery
-- Mathias Verraes
- Replies:
- Re: Feature [?] of Soft Timestamp support Michael Davidsaver
- References:
- Feature [?] of Soft Timestamp support Ralph Lange
- Navigate by Date:
- Prev:
Feature [?] of Soft Timestamp support Ralph Lange
- Next:
Re: Feature [?] of Soft Timestamp support Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Feature [?] of Soft Timestamp support Ralph Lange
- Next:
Re: Feature [?] of Soft Timestamp support Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
|