fix misspelled field names: nanoSecond => nanosecond; hystersis=>hysteresis

This commit is contained in:
Marty Kraimer
2014-08-20 06:27:24 -04:00
parent 16fb3f0339
commit 15d85c2f87
16 changed files with 170 additions and 143 deletions

View File

@@ -3,6 +3,7 @@
<ul>
<li>array semantics now enforce Copy On Write.</li>
<li>String no longer defined.</li>
<li>timeStamp and valueAlarm name changes</li>
<li>toString replaced by stream I/O </li>
<li>union is new type.</li>
<li>copy is new.</li>
@@ -15,6 +16,9 @@ This allows multiple instances of array data to use the shared raw data.
COW is implemented via shared_vectors of const data, i. e. data that can not be modified.</p>
<h2>String no longer defined</h2>
<p>This is replaced by std::string.</p>
<h2>timeStamp and valueAlarm name changes</h2>
<p>In timeStamp nanoSeconds is changed to nanoseconds.</p>
<p>In valueAlarm hystersis is changed to hysteresis</p>
<h2>toString replaced by stream I/O</h2>
<p>pvData.h and pvIntrospect no longer defines toString
Instead they have stream support.

View File

@@ -5,6 +5,7 @@ The main changes since release 3.0.2 are:
* array semantics now enforce Copy On Write.
* String no longer defined.
* timeStamp and valueAlarm name changes
* toString replaced by stream I/O
* union is new type.
* copy is new.
@@ -25,6 +26,14 @@ String no longer defined
This is replaced by std::string.
timeStamp and valueAlarm name changes
--------------
In timeStamp nanoSeconds is changed to nanoseconds.
In valueAlarm hystersis is changed to hysteresis
toString replaced by stream I/O
---------

View File

@@ -199,7 +199,7 @@ It uses only createField.
fields.reserve(n);
names.push_back("secondsPastEpoch");
fields.push_back(fieldCreate-&gt;createScalar(pvLong));
names.push_back("nanoSeconds");
names.push_back("nanoseconds");
fields.push_back(fieldCreate-&gt;createScalar(pvInt));
names.push_back("userTag");
fields.push_back(fieldCreate-&gt;createScalar(pvInt));
@@ -225,7 +225,7 @@ It uses only createField.
addNestedStructure("timeStamp")-&gt;
setId("time_t")-&gt;
add("secondsPastEpoch", pvLong)-&gt;
add("nanoSeconds", pvInt)-&gt;
add("nanoseconds", pvInt)-&gt;
add("userTag", pvInt)-&gt;
endNested()-&gt;
createStructure();
@@ -264,7 +264,7 @@ uri:ev4:nt/2012/pwd:NTScalarArray
string message
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
</pre>
<p>An easy way to create a structure with a string array value field and an alarm and time stamp is
@@ -284,7 +284,7 @@ uri:ev4:nt/2012/pwd:NTScalarArray
string message
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
0x607188
</pre>
@@ -309,7 +309,7 @@ A hard way to create an structure with an enumerated value field and a time stam
addNestedStructure("timeStamp")-&gt;
setId("time_t")-&gt;
add("secondsPastEpoch", pvLong)-&gt;
add("nanoSeconds", pvInt)-&gt;
add("nanoseconds", pvInt)-&gt;
add("userTag", pvInt)-&gt;
endNested()-&gt;
createStructure();
@@ -323,7 +323,7 @@ uri:ev4:nt/2012/pwd/NTEnum
string[] choices
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
</pre>
<p>The following is an easy way. Note that it has two additional
@@ -344,7 +344,7 @@ uri:ev4:nt/2012/pwd:NTEnum
string message
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
</pre>
@@ -370,7 +370,7 @@ union
int intValue
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
structure with value field being a union
@@ -380,7 +380,7 @@ uri:ev4:nt/2012/pwd:NTUnion
int intValue
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
alarm_t alarm
int severity
@@ -388,7 +388,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
</pre>
@@ -436,7 +436,7 @@ structure
string message
time_t timestamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
structure power
double value
@@ -480,7 +480,7 @@ uri:ev4:nt/2012/pwd:NTScalar
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x607268
from get 100000
@@ -513,7 +513,7 @@ uri:ev4:nt/2012/pwd:NTScalarArray
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x607268
via getData 0 1 2 3 4 5 6 7 8 9
@@ -536,7 +536,7 @@ uri:ev4:nt/2012/pwd:NTEnum
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x607268
</pre>
@@ -571,7 +571,7 @@ structure
string message
time_t timestamp_t
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
structure power
double value 0
@@ -616,7 +616,7 @@ uri:ev4:nt/2012/pwd:NTUnion
union value
time_t
long secondsPastEpoch 1000
int nanoSeconds 0
int nanoseconds 0
int userTag 0
alarm_t alarm
int severity 0
@@ -624,7 +624,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
uri:ev4:nt/2012/pwd:NTUnion
@@ -636,7 +636,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
</pre>
@@ -663,7 +663,7 @@ uri:ev4:nt/2012/pwd:NTUnion
any value
time_t
long secondsPastEpoch 1000
int nanoSeconds 0
int nanoseconds 0
int userTag 0
alarm_t alarm
int severity 0
@@ -671,7 +671,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
uri:ev4:nt/2012/pwd:NTUnion
@@ -683,7 +683,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
</pre>
@@ -766,7 +766,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
0x60a2c8
data
@@ -779,7 +779,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
select valueDouble
@@ -792,7 +792,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
value = 1.55
@@ -808,7 +808,7 @@ uri:ev4:nt/2012/pwd:NTUnion
string message
time_t timeStamp
long secondsPastEpoch 0
int nanoSeconds 0
int nanoseconds 0
int userTag 0
0x60a2c8
value = 1.65
@@ -1569,7 +1569,7 @@ StructureConstPtr example = standardField-&gt;scalar(
string message
timeStamp_t timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag</pre>
<p>In addition there are methods that create each of the property structures,
@@ -2797,7 +2797,7 @@ value field has properties alarm, timeStamp, and display.</p>
string message
timeStamp_t
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
display_t
double limitLow 0.0
@@ -2823,7 +2823,7 @@ structure powerSupplySimple
string message
timeStamp_t
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
powerSupplyValue_t voltage
double value
@@ -2943,17 +2943,17 @@ stack. For example the following is permitted:</p>
<p>A timeStamp is represented by the following structure</p>
<pre>structure timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag</pre>
<p>The Epoch is the posix epoch, i.e. Jan 1, 1970 00:00:00 UTC. Both the
seconds and nanoSeconds are signed integers and thus can be negative. Since the
seconds and nanoseconds are signed integers and thus can be negative. Since the
seconds is kept as a 64 bit integer, it allows for a time much greater than the
present age of the universe. Since the nanoSeconds portion is kept as a 32 bit
present age of the universe. Since the nanoseconds portion is kept as a 32 bit
integer it is subject to overflow if a value that corresponds to a value that
is greater than a little more than 2 seconds of less that about -2 seconds. The
support code always adjust seconds so that the nanoSecconds part is normlized,
i. e. it has is 0&lt;=nanoSeconds&lt;nanoSecPerSec..</p>
i. e. it has is 0&lt;=nanoseconds&lt;nanoSecPerSec..</p>
<p>Two header files are provided for manipulating time stamps:</p>
<dl>
@@ -2977,8 +2977,8 @@ extern int64 posixEpochAtEpicsEpoch;
class TimeStamp {
public:
TimeStamp()
:secondsPastEpoch(0), nanoSeconds(0), userTag(0) {}
TimeStamp(int64 secondsPastEpoch,int32 nanoSeconds = 0,int32 userTag = 0);
:secondsPastEpoch(0), nanoseconds(0), userTag(0) {}
TimeStamp(int64 secondsPastEpoch,int32 nanoseconds = 0,int32 userTag = 0);
//default constructors and destructor are OK
//This class should not be extended
void normalize();
@@ -2988,12 +2988,12 @@ public:
int64 getEpicsSecondsPastEpoch() const {
return secondsPastEpoch - posixEpochAtEpicsEpoch;
}
int32 getNanoSeconds() const {return nanoSeconds;}
int32 getNanoseconds() const {return nanoseconds;}
int32 getUserTag() const {return userTag;}
void setUserTag(int userTag) {this-&gt;userTag = userTag;}
void put(int64 secondsPastEpoch,int32 nanoSeconds = 0) {
void put(int64 secondsPastEpoch,int32 nanoseconds = 0) {
this-&gt;secondsPastEpoch = secondsPastEpoch;
this-&gt;nanoSeconds = nanoSeconds;
this-&gt;nanoseconds = nanoseconds;
normalize();
}
void put(int64 milliseconds);
@@ -3017,12 +3017,12 @@ public:
<p>where</p>
<dl>
<dt>TimeStamp()</dt>
<dd>The defauly constuctor. Both seconds and nanoSeconds are set to 0.</dd>
<dt>TimeStamp(int64 secondsPastEpoch,int32 nanoSeconds = 0)</dt>
<dd>The defauly constuctor. Both seconds and nanoseconds are set to 0.</dd>
<dt>TimeStamp(int64 secondsPastEpoch,int32 nanoseconds = 0)</dt>
<dd>A constructor that gives initial values to seconds and nanoseconds.</dd>
<dt>normalize</dt>
<dd>Adjust seconds and nanoSeconds so that
0&lt;=nanoSeconds&lt;nanoSecPerSec.</dd>
<dd>Adjust seconds and nanoseconds so that
0&lt;=nanoseconds&lt;nanoSecPerSec.</dd>
<dt>fromTime_t</dt>
<dd>Set time from standard C time.</dd>
<dt>toTime_t</dt>
@@ -3032,13 +3032,13 @@ public:
<dt>getEpicsSecondsPastEpoch</dt>
<dd>Get the number of EPICS seconds since the epoch. EPICS uses Jan 1, 1990
00:00:00 UTC as the epoch.</dd>
<dt>getNanoSeconds</dt>
<dd>Get the number of nanoSeconds. This is always normalized.</dd>
<dt>getNanoseconds</dt>
<dd>Get the number of nanoseconds. This is always normalized.</dd>
<dt>getUserTag</dt>
<dd>Get the userTag.</dd>
<dt>setUserTag</dt>
<dd>Set the userTag.</dd>
<dt>put(int64 secondsPastEpoch,int32 nanoSeconds = 0)</dt>
<dt>put(int64 secondsPastEpoch,int32 nanoseconds = 0)</dt>
<dd>Set the timeStamp value. If necessary it will be normalized.</dd>
<dt>put(int64 milliseconds)</dt>
<dd>Set the timeStamp with a value the is the number of milliSeconds since

View File

@@ -14,6 +14,7 @@
#include <pv/createRequest.h>
using namespace epics::pvData;
using std::ostringstream;
using std::tr1::static_pointer_cast;
using std::cout;
using std::endl;
@@ -161,7 +162,9 @@ private:
string item = items[j];
size_t equals = item.find('=');
if(equals==string::npos || equals==0) {
message = item + " illegal option " + request;
ostringstream oss;
oss << item + " illegal option " + request;
message = oss.str();
throw std::logic_error("message");
}
top.push_back(Node(item.substr(0,equals)));
@@ -352,21 +355,21 @@ public:
if(chr==']') numBracket--;
}
if(numParan!=0) {
std::ostringstream msg("mismatched () ");
msg << numParan;
message = msg.str();
ostringstream oss;
oss << "mismatched () " << numParan;
message = oss.str();
return PVStructurePtr();
}
if(numBrace!=0) {
std::ostringstream msg("mismatched {} ");
msg << numBrace;
message = msg.str();
ostringstream oss;
oss << "mismatched {} " << numBrace;
message = oss.str();
return PVStructurePtr();
}
if(numBracket!=0) {
std::ostringstream msg("mismatched [] ");
msg << numBracket;
message = msg.str();
ostringstream oss;
oss << "mismatched [] " << numBracket;
message = oss.str();
return PVStructurePtr();
}
vector<Node> top;

View File

@@ -162,7 +162,7 @@ void StandardField::createTimeStamp() {
FieldConstPtrArray fields(num);
StringArray names(num);
names[0] = "secondsPastEpoch";
names[1] = "nanoSeconds";
names[1] = "nanoseconds";
names[2] = "userTag";
fields[0] = fieldCreate->createScalar(pvLong);
fields[1] = fieldCreate->createScalar(pvInt);
@@ -228,7 +228,7 @@ void StandardField::createByteAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvByte);
fields[2] = fieldCreate->createScalar(pvByte);
@@ -255,7 +255,7 @@ void StandardField::createShortAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvShort);
fields[2] = fieldCreate->createScalar(pvShort);
@@ -282,7 +282,7 @@ void StandardField::createIntAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvInt);
fields[2] = fieldCreate->createScalar(pvInt);
@@ -309,7 +309,7 @@ void StandardField::createLongAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvLong);
fields[2] = fieldCreate->createScalar(pvLong);
@@ -336,7 +336,7 @@ void StandardField::createUByteAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvUByte);
fields[2] = fieldCreate->createScalar(pvUByte);
@@ -363,7 +363,7 @@ void StandardField::createUShortAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvUShort);
fields[2] = fieldCreate->createScalar(pvUShort);
@@ -390,7 +390,7 @@ void StandardField::createUIntAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvUInt);
fields[2] = fieldCreate->createScalar(pvUInt);
@@ -417,7 +417,7 @@ void StandardField::createULongAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvULong);
fields[2] = fieldCreate->createScalar(pvULong);
@@ -444,7 +444,7 @@ void StandardField::createFloatAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvFloat);
fields[2] = fieldCreate->createScalar(pvFloat);
@@ -471,7 +471,7 @@ void StandardField::createDoubleAlarm() {
names[6] = "lowWarningSeverity";
names[7] = "highWarningSeverity";
names[8] = "highAlarmSeverity";
names[9] = "hystersis";
names[9] = "hysteresis";
fields[0] = fieldCreate->createScalar(pvBoolean);
fields[1] = fieldCreate->createScalar(pvDouble);
fields[2] = fieldCreate->createScalar(pvDouble);

View File

@@ -33,7 +33,7 @@ bool PVTimeStamp::attach(PVFieldPtr const & pvField)
PVLongPtr pvLong = pvStructure->getLongField("secondsPastEpoch");
if(pvLong.get()!=NULL) {
pvSecs = pvLong;
pvNano = pvStructure->getIntField("nanoSeconds");
pvNano = pvStructure->getIntField("nanoseconds");
pvUserTag = pvStructure->getIntField("userTag");
}
if(pvSecs.get()!=NULL
@@ -76,7 +76,7 @@ bool PVTimeStamp::set(TimeStamp const & timeStamp)
if(pvSecs->isImmutable() || pvNano->isImmutable()) return false;
pvSecs->put(timeStamp.getSecondsPastEpoch());
pvUserTag->put(timeStamp.getUserTag());
pvNano->put(timeStamp.getNanoSeconds());
pvNano->put(timeStamp.getNanoseconds());
return true;
}

View File

@@ -27,21 +27,21 @@ int32 microSecPerSec = milliSecPerSec*milliSecPerSec;
int32 nanoSecPerSec = milliSecPerSec*microSecPerSec;
int64 posixEpochAtEpicsEpoch = POSIX_TIME_AT_EPICS_EPOCH;
TimeStamp::TimeStamp(int64 secondsPastEpoch,int32 nanoSeconds,int32 userTag)
: secondsPastEpoch(secondsPastEpoch),nanoSeconds(nanoSeconds),userTag(userTag)
TimeStamp::TimeStamp(int64 secondsPastEpoch,int32 nanoseconds,int32 userTag)
: secondsPastEpoch(secondsPastEpoch),nanoseconds(nanoseconds),userTag(userTag)
{
normalize();
}
void TimeStamp::normalize()
{
if(nanoSeconds>=0 && nanoSeconds<nanoSecPerSec) return;
while(nanoSeconds>=nanoSecPerSec) {
nanoSeconds -= nanoSecPerSec;
if(nanoseconds>=0 && nanoseconds<nanoSecPerSec) return;
while(nanoseconds>=nanoSecPerSec) {
nanoseconds -= nanoSecPerSec;
secondsPastEpoch++;
}
while(nanoSeconds<0) {
nanoSeconds += nanoSecPerSec;
while(nanoseconds<0) {
nanoseconds += nanoSecPerSec;
secondsPastEpoch--;
}
}
@@ -51,21 +51,21 @@ void TimeStamp::fromTime_t(const time_t & tt)
epicsTimeStamp epicsTime;
epicsTimeFromTime_t(&epicsTime,tt);
secondsPastEpoch = epicsTime.secPastEpoch + posixEpochAtEpicsEpoch;
nanoSeconds = epicsTime.nsec;
nanoseconds = epicsTime.nsec;
}
void TimeStamp::toTime_t(time_t &tt) const
{
epicsTimeStamp epicsTime;
epicsTime.secPastEpoch = static_cast<epicsUInt32>(secondsPastEpoch-posixEpochAtEpicsEpoch);
epicsTime.nsec = nanoSeconds;
epicsTime.nsec = nanoseconds;
epicsTimeToTime_t(&tt,&epicsTime);
}
void TimeStamp::put(int64 milliseconds)
{
secondsPastEpoch = milliseconds/1000;
nanoSeconds = (milliseconds%1000)*1000000;
nanoseconds = (milliseconds%1000)*1000000;
}
void TimeStamp::getCurrent()
@@ -74,13 +74,13 @@ void TimeStamp::getCurrent()
epicsTimeGetCurrent(&epicsTime);
secondsPastEpoch = epicsTime.secPastEpoch;
secondsPastEpoch += posixEpochAtEpicsEpoch;
nanoSeconds = epicsTime.nsec;
nanoseconds = epicsTime.nsec;
}
double TimeStamp::toSeconds() const
{
double value = static_cast<double>(secondsPastEpoch);
double nano = nanoSeconds;
double nano = nanoseconds;
value += nano/1e9;
return value;
}
@@ -88,9 +88,9 @@ double TimeStamp::toSeconds() const
int64 TimeStamp::diffInt(TimeStamp const & left,TimeStamp const&right )
{
int64 sl = left.secondsPastEpoch;
int32 nl = left.nanoSeconds;
int32 nl = left.nanoseconds;
int64 sr = right.secondsPastEpoch;
int32 nr = right.nanoSeconds;
int32 nr = right.nanoseconds;
int64 sdiff = sl - sr;
sdiff *= nanoSecPerSec;
sdiff += nl - nr;
@@ -142,7 +142,7 @@ bool TimeStamp::operator>(TimeStamp const &right) const
double TimeStamp::diff(TimeStamp const & a,TimeStamp const & b)
{
double result = static_cast<double>(a.secondsPastEpoch - b.secondsPastEpoch);
result += (a.nanoSeconds - b.nanoSeconds)/1e9;
result += (a.nanoseconds - b.nanoseconds)/1e9;
return result;
}
@@ -163,12 +163,12 @@ TimeStamp & TimeStamp::operator+=(double seconds)
{
int64 secs = static_cast<int64>(seconds);
int64 nano = static_cast<int64>((seconds - secs)*1e9);
nanoSeconds += static_cast<int32>(nano);
if(nanoSeconds>nanoSecPerSec) {
nanoSeconds -= nanoSecPerSec;
nanoseconds += static_cast<int32>(nano);
if(nanoseconds>nanoSecPerSec) {
nanoseconds -= nanoSecPerSec;
secondsPastEpoch += 1;
} else if(nanoSeconds<-nanoSecPerSec) {
nanoSeconds += -nanoSecPerSec;
} else if(nanoseconds<-nanoSecPerSec) {
nanoseconds += -nanoSecPerSec;
secondsPastEpoch -= 1;
}
secondsPastEpoch += secs;
@@ -182,7 +182,7 @@ TimeStamp & TimeStamp::operator-=(double seconds)
int64 TimeStamp::getMilliseconds()
{
return secondsPastEpoch*1000 + nanoSeconds/1000000;
return secondsPastEpoch*1000 + nanoseconds/1000000;
}
}}

View File

@@ -38,8 +38,8 @@ epicsShareExtern int64 posixEpochAtEpicsEpoch;
class epicsShareClass TimeStamp {
public:
TimeStamp()
:secondsPastEpoch(0), nanoSeconds(0), userTag(0) {}
TimeStamp(int64 secondsPastEpoch,int32 nanoSeconds = 0,int32 userTag = 0);
:secondsPastEpoch(0), nanoseconds(0), userTag(0) {}
TimeStamp(int64 secondsPastEpoch,int32 nanoseconds = 0,int32 userTag = 0);
//default constructors and destructor are OK
//This class should not be extended
void normalize();
@@ -49,12 +49,12 @@ public:
int64 getEpicsSecondsPastEpoch() const {
return secondsPastEpoch - posixEpochAtEpicsEpoch;
}
int32 getNanoSeconds() const {return nanoSeconds;}
int32 getNanoseconds() const {return nanoseconds;}
int32 getUserTag() const {return userTag;}
void setUserTag(int userTag) {this->userTag = userTag;}
void put(int64 secondsPastEpoch,int32 nanoSeconds = 0) {
void put(int64 secondsPastEpoch,int32 nanoseconds = 0) {
this->secondsPastEpoch = secondsPastEpoch;
this->nanoSeconds = nanoSeconds;
this->nanoseconds = nanoseconds;
normalize();
}
void put(int64 milliseconds);
@@ -75,7 +75,7 @@ public:
private:
static int64 diffInt(TimeStamp const &left,TimeStamp const &right );
int64 secondsPastEpoch;
int32 nanoSeconds;
int32 nanoseconds;
int32 userTag;
};

View File

@@ -51,7 +51,7 @@ typedef std::tr1::shared_ptr<StandardField> StandardFieldPtr;
string message
structure timeStamp
long secondsPastEpoch
int nanoSeconds
int nanoseconds
int userTag
* }
* In addition there are methods that create each of the property structures,

View File

@@ -30,16 +30,27 @@ void testCreateRequest() {
string request = "";
if(debug) { cout << "request " << request <<endl;}
PVStructurePtr pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getStructure()->getNumberFields()==0);
testPass("request %s",request.c_str());
request = "record[]field()getField()putField()";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("field").get()!=NULL);
testOk1(pvRequest->getSubField("putField").get()!=NULL);
testOk1(pvRequest->getSubField("getField").get()!=NULL);
testPass("request %s",request.c_str());
request = "record[a=b,x=y]field(a) putField(a),getField(a)";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("record._options.a");
@@ -56,7 +67,7 @@ void testCreateRequest() {
request = "field(a.b[x=y])";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("field.a.b._options.x");
@@ -67,7 +78,7 @@ void testCreateRequest() {
request = "field(a.b{c.d})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("field.a.b.c.d").get()!=NULL);
@@ -76,7 +87,7 @@ void testCreateRequest() {
request = "field(a.b[x=y]{c.d})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("field.a.b._options.x");
@@ -88,7 +99,7 @@ void testCreateRequest() {
request = "field(a.b[x=y]{c.d[x=y]})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("field.a.b._options.x");
@@ -102,7 +113,7 @@ void testCreateRequest() {
request = "record[a=b,c=d] field(a.a[a=b]{a.a[a=b]},b.a[a=b]{a,b})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("field.a.a._options.a");
@@ -122,7 +133,7 @@ void testCreateRequest() {
request = "alarm,timeStamp,power.value";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("field.alarm").get()!=NULL);
@@ -133,7 +144,7 @@ void testCreateRequest() {
request = "record[process=true]field(alarm,timeStamp,power.value)";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("record._options.process");
@@ -147,7 +158,7 @@ void testCreateRequest() {
request = "record[process=true]field(alarm,timeStamp[algorithm=onChange,causeMonitor=false],power{value,alarm})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("record._options.process");
@@ -168,7 +179,7 @@ void testCreateRequest() {
request = "record[int=2,float=3.14159]field(alarm,timeStamp[shareData=true],power.value)";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
pvString = pvRequest->getSubField<PVString>("record._options.int");
@@ -190,7 +201,7 @@ void testCreateRequest() {
+ "current{value,alarm},voltage{value,alarm})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("putField.power.value").get()!=NULL);
@@ -210,7 +221,7 @@ void testCreateRequest() {
+ "})";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("field.alarm").get()!=NULL);
@@ -232,7 +243,7 @@ void testCreateRequest() {
+ ")";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("putField.power.value").get()!=NULL);
@@ -265,7 +276,7 @@ void testCreateRequest() {
request = "a{b{c{d}}}";
if(debug) { cout << "request " << request <<endl;}
pvRequest = createRequest->createRequest(request);
if(pvRequest.get()==NULL) { cout<< createRequest->getMessage() << endl;}
if(pvRequest==NULL) { cout<< createRequest->getMessage() << endl;}
if(debug) { cout << *pvRequest << endl;}
testOk1(pvRequest.get()!=NULL);
testOk1(pvRequest->getSubField("field.a.b.c.d").get()!=NULL);
@@ -279,23 +290,23 @@ void testCreateRequest() {
+ "ps1{alarm,timeStamp,power{value,alarm},current{value,alarm},voltage{value,alarm}"
+ ")";
if(debug) { cout << "request " << request <<endl;}
if(debug) { cout << endl << "Error Expected for next call!!" << endl;}
cout << endl << "Error Expected for next call!!" << endl;
pvRequest = createRequest->createRequest(request);
if(debug) {cout << "reason " << createRequest->getMessage() << endl;}
cout << "reason " << createRequest->getMessage() << endl;
testPass("request %s",request.c_str());
request = "record[process=true,power.value";
if(debug) { cout << "request " << request <<endl;}
if(debug) { cout << endl << "Error Expected for next call!!" << endl;}
cout << endl << "Error Expected for next call!!" << endl;
pvRequest = createRequest->createRequest(request);
if(debug) {cout << "reason " << createRequest->getMessage() << endl;}
cout << "reason " << createRequest->getMessage() << endl;
testOk1(pvRequest.get()==NULL);
testPass("request %s",request.c_str());
}
MAIN(testCreateRequest)
{
testPlan(112);
testPlan(117);
testCreateRequest();
return testDone();
}

View File

@@ -41,11 +41,11 @@ void test()
uint32 messageOffset = (uint32) pvMessage->getFieldOffset();
PVStructurePtr pvTimeStamp = pvStructure->getStructureField("timeStamp");
PVLongPtr pvSeconds = pvTimeStamp->getLongField("secondsPastEpoch");
PVIntPtr pvNanoSeconds = pvTimeStamp->getIntField("nanoSeconds");
PVIntPtr pvNanoseconds = pvTimeStamp->getIntField("nanoseconds");
PVIntPtr pvUserTag = pvTimeStamp->getIntField("userTag");
uint32 timeStampOffset = (uint32) pvTimeStamp->getFieldOffset();
uint32 secondsOffset = (uint32) pvSeconds->getFieldOffset();
uint32 nanoSecondsOffset = (uint32) pvNanoSeconds->getFieldOffset();
uint32 nanosecondsOffset = (uint32) pvNanoseconds->getFieldOffset();
uint32 userTagOffset = (uint32) pvUserTag->getFieldOffset();
uint32 nfields = (uint32) pvStructure->getNumberFields();
BitSetPtr changeBitSet = BitSet::create(nfields);
@@ -55,7 +55,7 @@ void test()
pvSeverity->put(2); changeBitSet->set(severityOffset);
pvMessage->put("error"); changeBitSet->set(messageOffset);
pvSeconds->put(1); changeBitSet->set(secondsOffset);
pvNanoSeconds->put(1000000); changeBitSet->set(nanoSecondsOffset);
pvNanoseconds->put(1000000); changeBitSet->set(nanosecondsOffset);
pvUserTag->put(1); changeBitSet->set(userTagOffset);
userOverrunBitSet->or_and(*changeBitSet.get(),*userChangeBitSet.get());
(*userChangeBitSet)|=(*changeBitSet.get());
@@ -64,7 +64,7 @@ void test()
pvSeverity->put(0); changeBitSet->set(severityOffset);
pvMessage->put(""); changeBitSet->set(messageOffset);
pvSeconds->put(2); changeBitSet->set(secondsOffset);
pvNanoSeconds->put(0); changeBitSet->set(nanoSecondsOffset);
pvNanoseconds->put(0); changeBitSet->set(nanosecondsOffset);
pvUserTag->put(0); changeBitSet->set(userTagOffset);
userOverrunBitSet->or_and(*changeBitSet.get(),*userChangeBitSet.get());
(*userChangeBitSet)|=(*changeBitSet.get());
@@ -73,14 +73,14 @@ void test()
testOk1(userChangeBitSet->get(severityOffset));
testOk1(userChangeBitSet->get(messageOffset));
testOk1(userChangeBitSet->get(secondsOffset));
testOk1(userChangeBitSet->get(nanoSecondsOffset));
testOk1(userChangeBitSet->get(nanosecondsOffset));
testOk1(userChangeBitSet->get(userTagOffset));
testOk1(userOverrunBitSet->cardinality()==6);
testOk1(userOverrunBitSet->get(valueOffset));
testOk1(userOverrunBitSet->get(severityOffset));
testOk1(userOverrunBitSet->get(messageOffset));
testOk1(userOverrunBitSet->get(secondsOffset));
testOk1(userOverrunBitSet->get(nanoSecondsOffset));
testOk1(userOverrunBitSet->get(nanosecondsOffset));
testOk1(userOverrunBitSet->get(userTagOffset));
BitSetUtil::compress(userChangeBitSet,pvStructure);
@@ -101,13 +101,13 @@ void test()
userOverrunBitSet->clear();
pvValue->put(1.0); changeBitSet->set(valueOffset);
pvSeconds->put(3); changeBitSet->set(secondsOffset);
pvNanoSeconds->put(0); changeBitSet->set(nanoSecondsOffset);
pvNanoseconds->put(0); changeBitSet->set(nanosecondsOffset);
userOverrunBitSet->or_and(*changeBitSet.get(),*userChangeBitSet.get());
(*userChangeBitSet)|=(*changeBitSet.get());
testOk1(userChangeBitSet->cardinality()==3);
testOk1(userChangeBitSet->get(valueOffset));
testOk1(userChangeBitSet->get(secondsOffset));
testOk1(userChangeBitSet->get(nanoSecondsOffset));
testOk1(userChangeBitSet->get(nanosecondsOffset));
testOk1(userOverrunBitSet->cardinality()==0);
changeBitSet->clear();
@@ -117,7 +117,7 @@ void test()
testOk1(userChangeBitSet->cardinality()==3);
testOk1(userChangeBitSet->get(valueOffset));
testOk1(userChangeBitSet->get(secondsOffset));
testOk1(userChangeBitSet->get(nanoSecondsOffset));
testOk1(userChangeBitSet->get(nanosecondsOffset));
testOk1(userOverrunBitSet->cardinality()==1);
testOk1(userOverrunBitSet->get(valueOffset));
@@ -126,7 +126,7 @@ void test()
testOk1(userChangeBitSet->cardinality()==3);
testOk1(userChangeBitSet->get(valueOffset));
testOk1(userChangeBitSet->get(secondsOffset));
testOk1(userChangeBitSet->get(nanoSecondsOffset));
testOk1(userChangeBitSet->get(nanosecondsOffset));
testOk1(userOverrunBitSet->cardinality()==1);
testOk1(userOverrunBitSet->get(valueOffset));
}

View File

@@ -386,7 +386,7 @@ void testStructure() {
testDiag("\tSimple structure serialization");
PVStructurePtr pvStructure = factory->createPVStructure(getStandardField()->timeStamp());
pvStructure->getLongField("secondsPastEpoch")->put(123);
pvStructure->getIntField("nanoSeconds")->put(456);
pvStructure->getIntField("nanoseconds")->put(456);
pvStructure->getIntField("userTag")->put(789);
serializationTest(pvStructure);

View File

@@ -35,7 +35,7 @@ void testTimeStamp()
current.getCurrent();
printf("current %lli %i milliSec %lli\n",
(long long)current.getSecondsPastEpoch(),
current.getNanoSeconds(),
current.getNanoseconds(),
(long long)current.getMilliseconds());
time_t tt;
current.toTime_t(tt);
@@ -45,13 +45,13 @@ void testTimeStamp()
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d isDst %s\n",
ctm.tm_year+1900,ctm.tm_mon + 1,ctm.tm_mday,
ctm.tm_hour,ctm.tm_min,ctm.tm_sec,
current.getNanoSeconds(),
current.getNanoseconds(),
(ctm.tm_isdst==0) ? "false" : "true");
tt = time(&tt);
current.fromTime_t(tt);
printf("fromTime_t\ncurrent %lli %i milliSec %lli\n",
(long long)current.getSecondsPastEpoch(),
current.getNanoSeconds(),
current.getNanoseconds(),
(long long)current.getMilliseconds());
current.toTime_t(tt);
memcpy(&ctm,localtime(&tt),sizeof(struct tm));
@@ -59,12 +59,12 @@ void testTimeStamp()
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d isDst %s\n",
ctm.tm_year+1900,ctm.tm_mon + 1,ctm.tm_mday,
ctm.tm_hour,ctm.tm_min,ctm.tm_sec,
current.getNanoSeconds(),
current.getNanoseconds(),
(ctm.tm_isdst==0) ? "false" : "true");
TimeStamp right;
TimeStamp left;
right.put(current.getSecondsPastEpoch(),current.getNanoSeconds());
left.put(current.getSecondsPastEpoch(),current.getNanoSeconds());
right.put(current.getSecondsPastEpoch(),current.getNanoseconds());
left.put(current.getSecondsPastEpoch(),current.getNanoseconds());
double diff;
diff = TimeStamp::diff(left,right);
if(debug) printf("diff %e\n",diff);
@@ -75,7 +75,7 @@ void testTimeStamp()
testOk1(!(left<right));
testOk1((left>=right));
testOk1(!(left>right));
left.put(current.getSecondsPastEpoch()+1,current.getNanoSeconds());
left.put(current.getSecondsPastEpoch()+1,current.getNanoseconds());
diff = TimeStamp::diff(left,right);
if(debug) printf("diff %e\n",diff);
testOk1(diff==1.0);
@@ -85,7 +85,7 @@ void testTimeStamp()
testOk1(!(left<right));
testOk1((left>=right));
testOk1((left>right));
left.put(current.getSecondsPastEpoch()-1,current.getNanoSeconds());
left.put(current.getSecondsPastEpoch()-1,current.getNanoseconds());
diff = TimeStamp::diff(left,right);
if(debug) printf("diff %e\n",diff);
testOk1(diff==-1.0);
@@ -95,7 +95,7 @@ void testTimeStamp()
testOk1((left<right));
testOk1(!(left>=right));
testOk1(!(left>right));
left.put(current.getSecondsPastEpoch(),current.getNanoSeconds()-nanoSecPerSec);
left.put(current.getSecondsPastEpoch(),current.getNanoseconds()-nanoSecPerSec);
diff = TimeStamp::diff(left,right);
if(debug) printf("diff %e\n",diff);
testOk1(diff==-1.0);
@@ -105,7 +105,7 @@ void testTimeStamp()
testOk1((left<right));
testOk1(!(left>=right));
testOk1(!(left>right));
left.put(current.getSecondsPastEpoch(),current.getNanoSeconds()-1);
left.put(current.getSecondsPastEpoch(),current.getNanoseconds()-1);
diff = TimeStamp::diff(left,right);
if(debug) printf("diff %e\n",diff);
testOk1(diff<0.0);
@@ -115,11 +115,11 @@ void testTimeStamp()
testOk1((left<right));
testOk1(!(left>=right));
testOk1(!(left>right));
left.put(current.getSecondsPastEpoch(),current.getNanoSeconds());
left.put(current.getSecondsPastEpoch(),current.getNanoseconds());
left += .1;
diff = TimeStamp::diff(left,right);
if(debug) printf("diff %e\n",diff);
left.put(current.getSecondsPastEpoch(),current.getNanoSeconds());
left.put(current.getSecondsPastEpoch(),current.getNanoseconds());
int64 inc = -1;
left += inc;
diff = TimeStamp::diff(left,right);

View File

@@ -123,7 +123,7 @@ static void testTimeStamp()
testOk1(result);
pvTimeStamp.get(timeStamp);
testOk1(ts.getSecondsPastEpoch()==timeStamp.getSecondsPastEpoch());
testOk1(ts.getNanoSeconds()==timeStamp.getNanoSeconds());
testOk1(ts.getNanoseconds()==timeStamp.getNanoseconds());
testOk1(ts.getUserTag()==timeStamp.getUserTag());
time_t tt;
timeStamp.toTime_t(tt);
@@ -131,10 +131,10 @@ static void testTimeStamp()
memcpy(&ctm,localtime(&tt),sizeof(struct tm));
if(debug) {
printf(
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d nanoSeconds isDst %s userTag %d\n",
"%4.4d.%2.2d.%2.2d %2.2d:%2.2d:%2.2d %d nanoseconds isDst %s userTag %d\n",
ctm.tm_year+1900,ctm.tm_mon + 1,ctm.tm_mday,
ctm.tm_hour,ctm.tm_min,ctm.tm_sec,
timeStamp.getNanoSeconds(),
timeStamp.getNanoseconds(),
(ctm.tm_isdst==0) ? "false" : "true",
timeStamp.getUserTag());
}

View File

@@ -90,7 +90,7 @@ static void test()
int32 offsetTimeStamp = (int32)pvField->getFieldOffset();
pvField = pvs->getSubField("timeStamp.secondsPastEpoch");
int32 offsetSeconds = (int32)pvField->getFieldOffset();
pvField = pvs->getSubField("timeStamp.nanoSeconds");
pvField = pvs->getSubField("timeStamp.nanoseconds");
int32 offsetNano = (int32)pvField->getFieldOffset();
pvField = pvs->getSubField("timeStamp.userTag");
int32 offsetUserTag = (int32)pvField->getFieldOffset();

View File

@@ -199,7 +199,7 @@ static void testPVScalarWithProperties(
string("timeStamp.secondsPastEpoch"));
testOk1(seconds.get()!=0);
seconds->put(123456789);
PVIntPtr nano = pvStructure->getIntField(string("timeStamp.nanoSeconds"));
PVIntPtr nano = pvStructure->getIntField(string("timeStamp.nanoseconds"));
testOk1(nano.get()!=0);
nano->put(1000000);
PVIntPtr severity = pvStructure->getIntField(string("alarm.severity"));