EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Adding userTag to epicsTimeStamp
From: Marty Kraimer <[email protected]>
To: "Johnson, Andrew N." <[email protected]>, EPICS core-talk <[email protected]>
Date: Wed, 11 Oct 2017 06:46:15 -0400
On 10/10/2017 09:23 AM, Johnson, Andrew N. wrote:
Thanks for all the discussion, I appreciate everyone’s thoughts about this idea.

I am not now considering this for inclusion in EPICS 7.0, I think it’s too late to be adding this kind of a change, but the proof of concept and the responses are encouraging enough that I think this should be something we include in 7.1 – there are enough sites wanting it that the IOC should be able to record a userTag in record timestamps. Whether it should be 32 or 64 bits and signed or unsigned is something that should be considered separately based on input from those asking for it.

Marty: if you think you have found bugs in the PVTimeStamp code which should be fixed even without making this addition to the IOC, feel free to go ahead and create a pull request to fix them.

The set method of PVTimeStamp, PVAlarm, PVDisplay,and  PVControl all need to be changed.

I am willing to make the changes in both pvDataCPP and pvDataJava but I am not the owner of either.

Michael,
Do You want me to make the changes in pvDataCPP.

Kunal,

Do You want me to make the changes in pvDataJava?

Marty

I have filed a bug in Launchpad to keep track of this enhancement proposal, see https://bugs.launchpad.net/epics-base/+bug/1722530 which also refers to this thread.

Thanks,

- Andrew



On Oct 10, 2017, at 12:14 PM, Marty Kraimer <[email protected]> wrote:

On 10/09/2017 11:09 AM, Kasemir, Kay wrote:
Not saying that this specific tag should not be 64 bits wide, but to change an existing approved design,
I would like to see a minimum amount of justification and discussion.
A time tag change from 32 to 64 bits makes no difference to those who simply use pvAccess via qsrv/pvaSrv since the EPICS database never provided a value, anyway.

And even though the time stamp is part of most updates, if I understand correctly this change will hardly affect the network package size because when you leave the tag at its default value of 0 and don't change, the monitor deltas won't include the tag, only the secs & nanosecs, correct?
Not quite but can be fixed.

I think the only problem is in the  timeStamp support code.
In particular
bool PVTimeStamp::set(TimeStamp const & timeStamp)
{
     if(pvSecs.get()==NULL) {
         throw std::logic_error(notAttached);
     }
     if(pvSecs->isImmutable() || pvNano->isImmutable()) return false;
     pvSecs->put(timeStamp.getSecondsPastEpoch());
     pvUserTag->put(timeStamp.getUserTag());
     pvNano->put(timeStamp.getNanoseconds());
     return true;
}
Note that it always sets userTag. The same problem exists in Java.

Both timeStamp and pvTimeStamp require changes in both Java and C++.

I agree that going to a 64 bit integer is a good idea.
But it should be a signed 64 bit integer for two reasons:
1) Keeps better compatibility between Java and C++.
2) The other fields of a timeStamp are signed, which is useful for computing time differences.

If we are going to make this change for first release of EPICS 7 changes must be made soon in both C++ and Java.
Will this also require changes to any of normativeTypes,  pvaPy, and p4p?
Will this cause compatibility problems?

Marty
The SNS beam line neutron data does use the user tag for a sequence number, incremented by server to allow double-checking for missing updates. So our software might need to be updated. I believe this could be done beam line by beam line, won't be a show stopper.

-Kay



References:
Adding userTag to epicsTimeStamp Johnson, Andrew N.
Re: Adding userTag to epicsTimeStamp Ralph Lange
Re: Adding userTag to epicsTimeStamp Marty Kraimer
RE: Adding userTag to epicsTimeStamp Mark Rivers
Re: Adding userTag to epicsTimeStamp Kasemir, Kay
Re: Adding userTag to epicsTimeStamp Marty Kraimer
Re: Adding userTag to epicsTimeStamp Johnson, Andrew N.

Navigate by Date:
Prev: Re: Adding userTag to epicsTimeStamp Johnson, Andrew N.
Next: Re: Adding userTag to epicsTimeStamp Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Adding userTag to epicsTimeStamp Johnson, Andrew N.
Next: Re: Adding userTag to epicsTimeStamp Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·