2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Adding userTag to epicsTimeStamp |
From: | Ralph Lange <[email protected]> |
To: | EPICS Core Talk <[email protected]> |
Date: | Mon, 9 Oct 2017 15:26:12 +0200 |
I just tried modifying the definition of the epicsTimeStamp object, adding an epicsUInt64 userTag member to it. Everything built without problems and the tests all passed. Then I looked through pvDataCPP and connected this to the userTag in property/timeStamp.cpp.
Any lab that wants to use this would have to set the userTag in their generalTime time provider(s).
Observations:
1. I have not added userTag to the epicsTime class, which is different to an epicsTimeStamp. C++ code tends to pass around epicsTime objects by value, and I’m reluctant to double the size of that object unnecessarily.
2. Some work would be needed to support the userTag in epicsTimeToStrftime(). There are some free conversion format characters left: %i %J %K %L %N %o %q %Q (comparing MacOS and Linux docs plus a few others inline).
3. There are few tests for userTag in pvData/testApp, not sure if any could really check what I did.
4. I used an epicsUInt64 because someone (maybe Dirk Zimoch?) asked for it to be 64 rather than 32 bits. The PVA timeStamp userTag was defined to be 32 bits, should we consider changing it to 64?
Is doing this a good idea, and if so is it the right approach?
- Andrew