diff --git a/pvDataApp/factory/Compare.cpp b/pvDataApp/factory/Compare.cpp index d6adb44..f668d83 100644 --- a/pvDataApp/factory/Compare.cpp +++ b/pvDataApp/factory/Compare.cpp @@ -85,7 +85,7 @@ bool operator==(const Structure& a, const Structure& b) bool operator==(const StructureArray& a, const StructureArray& b) { - return a.getStructure().get()==b.getStructure().get(); + return a.getStructure()==b.getStructure(); } namespace nconvert { diff --git a/pvDataApp/factory/PVStructureArray.cpp b/pvDataApp/factory/PVStructureArray.cpp index 456d702..8d6ea9e 100644 --- a/pvDataApp/factory/PVStructureArray.cpp +++ b/pvDataApp/factory/PVStructureArray.cpp @@ -42,9 +42,14 @@ size_t PVStructureArray::append(size_t number) bool PVStructureArray::remove(size_t offset,size_t number) { - size_t length = getCapacity(); + size_t length = getLength(); if(offset+number>length) return false; - value->erase(value->begin()+ offset,value->begin()+number-1); + PVStructurePtrArray vec = *value.get(); + for(size_t i = offset; i+number < length; i++) { + vec[i] = vec[i + number]; + } + size_t newLength = length - number; + setCapacityLength(newLength,newLength); return true; } @@ -73,7 +78,7 @@ void PVStructureArray::compress() { } break; } - setCapacity(newLength); + setCapacityLength(newLength,newLength); } void PVStructureArray::setCapacity(size_t capacity) { diff --git a/pvDataApp/factory/StandardField.cpp b/pvDataApp/factory/StandardField.cpp index ac7959f..86f1f26 100644 --- a/pvDataApp/factory/StandardField.cpp +++ b/pvDataApp/factory/StandardField.cpp @@ -32,6 +32,10 @@ static StructureConstPtr byteAlarmField; static StructureConstPtr shortAlarmField; static StructureConstPtr intAlarmField; static StructureConstPtr longAlarmField; +static StructureConstPtr ubyteAlarmField; +static StructureConstPtr ushortAlarmField; +static StructureConstPtr uintAlarmField; +static StructureConstPtr ulongAlarmField; static StructureConstPtr floatAlarmField; static StructureConstPtr doubleAlarmField; static StructureConstPtr enumeratedAlarmField; @@ -94,13 +98,17 @@ static void createControl() { } static void createBooleanAlarm() { - size_t num = 4; - FieldConstPtrArray fields(num); - StringArray names(num); + size_t numFields = 4; + FieldConstPtrArray fields(numFields); + StringArray names(numFields); names[0] = "active"; names[1] = "falseSeverity"; names[2] = "trueSeverity"; names[3] = "changeStateSeverity"; + fields[0] = fieldCreate->createScalar(pvBoolean); + fields[1] = fieldCreate->createScalar(pvInt); + fields[2] = fieldCreate->createScalar(pvInt); + fields[3] = fieldCreate->createScalar(pvInt); booleanAlarmField = fieldCreate->createStructure(names,fields); } @@ -119,9 +127,15 @@ static void createByteAlarm() { names[8] = "highAlarmSeverity"; names[9] = "hystersis"; fields[0] = fieldCreate->createScalar(pvBoolean); - for(size_t i=0; icreateScalar(pvByte); - } + fields[1] = fieldCreate->createScalar(pvByte); + fields[2] = fieldCreate->createScalar(pvByte); + fields[3] = fieldCreate->createScalar(pvByte); + fields[4] = fieldCreate->createScalar(pvByte); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvByte); byteAlarmField = fieldCreate->createStructure(names,fields); } @@ -140,9 +154,15 @@ static void createShortAlarm() { names[8] = "highAlarmSeverity"; names[9] = "hystersis"; fields[0] = fieldCreate->createScalar(pvBoolean); - for(size_t i=0; icreateScalar(pvShort); - } + fields[1] = fieldCreate->createScalar(pvShort); + fields[2] = fieldCreate->createScalar(pvShort); + fields[3] = fieldCreate->createScalar(pvShort); + fields[4] = fieldCreate->createScalar(pvShort); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvShort); shortAlarmField = fieldCreate->createStructure(names,fields); } @@ -161,9 +181,15 @@ static void createIntAlarm() { names[8] = "highAlarmSeverity"; names[9] = "hystersis"; fields[0] = fieldCreate->createScalar(pvBoolean); - for(size_t i=0; icreateScalar(pvInt); - } + fields[1] = fieldCreate->createScalar(pvInt); + fields[2] = fieldCreate->createScalar(pvInt); + fields[3] = fieldCreate->createScalar(pvInt); + fields[4] = fieldCreate->createScalar(pvInt); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvInt); intAlarmField = fieldCreate->createStructure(names,fields); } @@ -182,12 +208,126 @@ static void createLongAlarm() { names[8] = "highAlarmSeverity"; names[9] = "hystersis"; fields[0] = fieldCreate->createScalar(pvBoolean); - for(size_t i=0; icreateScalar(pvLong); - } + fields[1] = fieldCreate->createScalar(pvLong); + fields[2] = fieldCreate->createScalar(pvLong); + fields[3] = fieldCreate->createScalar(pvLong); + fields[4] = fieldCreate->createScalar(pvLong); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvLong); longAlarmField = fieldCreate->createStructure(names,fields); } +static void createUByteAlarm() { + size_t numFields = 10; + FieldConstPtrArray fields(numFields); + StringArray names(numFields); + names[0] = "active"; + names[1] = "lowAlarmLimit"; + names[2] = "lowWarningLimit"; + names[3] = "highWarningLimit"; + names[4] = "highAlarmLimit"; + names[5] = "lowAlarmSeverity"; + names[6] = "lowWarningSeverity"; + names[7] = "highWarningSeverity"; + names[8] = "highAlarmSeverity"; + names[9] = "hystersis"; + fields[0] = fieldCreate->createScalar(pvBoolean); + fields[1] = fieldCreate->createScalar(pvUByte); + fields[2] = fieldCreate->createScalar(pvUByte); + fields[3] = fieldCreate->createScalar(pvUByte); + fields[4] = fieldCreate->createScalar(pvUByte); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvUByte); + ubyteAlarmField = fieldCreate->createStructure(names,fields); +} + +static void createUShortAlarm() { + size_t numFields = 10; + FieldConstPtrArray fields(numFields); + StringArray names(numFields); + names[0] = "active"; + names[1] = "lowAlarmLimit"; + names[2] = "lowWarningLimit"; + names[3] = "highWarningLimit"; + names[4] = "highAlarmLimit"; + names[5] = "lowAlarmSeverity"; + names[6] = "lowWarningSeverity"; + names[7] = "highWarningSeverity"; + names[8] = "highAlarmSeverity"; + names[9] = "hystersis"; + fields[0] = fieldCreate->createScalar(pvBoolean); + fields[1] = fieldCreate->createScalar(pvUShort); + fields[2] = fieldCreate->createScalar(pvUShort); + fields[3] = fieldCreate->createScalar(pvUShort); + fields[4] = fieldCreate->createScalar(pvUShort); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvUShort); + ushortAlarmField = fieldCreate->createStructure(names,fields); +} + +static void createUIntAlarm() { + size_t numFields = 10; + FieldConstPtrArray fields(numFields); + StringArray names(numFields); + names[0] = "active"; + names[1] = "lowAlarmLimit"; + names[2] = "lowWarningLimit"; + names[3] = "highWarningLimit"; + names[4] = "highAlarmLimit"; + names[5] = "lowAlarmSeverity"; + names[6] = "lowWarningSeverity"; + names[7] = "highWarningSeverity"; + names[8] = "highAlarmSeverity"; + names[9] = "hystersis"; + fields[0] = fieldCreate->createScalar(pvBoolean); + fields[1] = fieldCreate->createScalar(pvUInt); + fields[2] = fieldCreate->createScalar(pvUInt); + fields[3] = fieldCreate->createScalar(pvUInt); + fields[4] = fieldCreate->createScalar(pvUInt); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvUInt); + uintAlarmField = fieldCreate->createStructure(names,fields); +} + +static void createULongAlarm() { + size_t numFields = 10; + FieldConstPtrArray fields(numFields); + StringArray names(numFields); + names[0] = "active"; + names[1] = "lowAlarmLimit"; + names[2] = "lowWarningLimit"; + names[3] = "highWarningLimit"; + names[4] = "highAlarmLimit"; + names[5] = "lowAlarmSeverity"; + names[6] = "lowWarningSeverity"; + names[7] = "highWarningSeverity"; + names[8] = "highAlarmSeverity"; + names[9] = "hystersis"; + fields[0] = fieldCreate->createScalar(pvBoolean); + fields[1] = fieldCreate->createScalar(pvULong); + fields[2] = fieldCreate->createScalar(pvULong); + fields[3] = fieldCreate->createScalar(pvULong); + fields[4] = fieldCreate->createScalar(pvULong); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvULong); + ulongAlarmField = fieldCreate->createStructure(names,fields); +} + static void createFloatAlarm() { size_t numFields = 10; FieldConstPtrArray fields(numFields); @@ -203,9 +343,15 @@ static void createFloatAlarm() { names[8] = "highAlarmSeverity"; names[9] = "hystersis"; fields[0] = fieldCreate->createScalar(pvBoolean); - for(size_t i=0; icreateScalar(pvFloat); - } + fields[1] = fieldCreate->createScalar(pvFloat); + fields[2] = fieldCreate->createScalar(pvFloat); + fields[3] = fieldCreate->createScalar(pvFloat); + fields[4] = fieldCreate->createScalar(pvFloat); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvFloat); floatAlarmField = fieldCreate->createStructure(names,fields); } @@ -223,10 +369,16 @@ static void createDoubleAlarm() { names[7] = "highWarningSeverity"; names[8] = "highAlarmSeverity"; names[9] = "hystersis"; - fields[0] = fieldCreate->createScalar(pvDouble); - for(size_t i=0; icreateScalar(pvByte); - } + fields[0] = fieldCreate->createScalar(pvBoolean); + fields[1] = fieldCreate->createScalar(pvDouble); + fields[2] = fieldCreate->createScalar(pvDouble); + fields[3] = fieldCreate->createScalar(pvDouble); + fields[4] = fieldCreate->createScalar(pvDouble); + fields[5] = fieldCreate->createScalar(pvInt); + fields[6] = fieldCreate->createScalar(pvInt); + fields[7] = fieldCreate->createScalar(pvInt); + fields[8] = fieldCreate->createScalar(pvInt); + fields[9] = fieldCreate->createScalar(pvDouble); doubleAlarmField = fieldCreate->createStructure(names,fields); } @@ -268,10 +420,14 @@ static StructureConstPtr createProperties(FieldConstPtr field,String properties) case pvShort: valueAlarm = shortAlarmField; break; case pvInt: valueAlarm = intAlarmField; break; case pvLong: valueAlarm = longAlarmField; break; + case pvUByte: valueAlarm = ubyteAlarmField; break; + case pvUShort: valueAlarm = ushortAlarmField; break; + case pvUInt: valueAlarm = uintAlarmField; break; + case pvULong: valueAlarm = ulongAlarmField; break; case pvFloat: valueAlarm = floatAlarmField; break; case pvDouble: valueAlarm = doubleAlarmField; break; - default: - throw std::logic_error(String("valueAlarm property for illegal type")); + case pvString: + throw std::logic_error(String("valueAlarm property not supported for pvString")); } break; } @@ -452,6 +608,10 @@ StandardFieldPtr StandardField::getStandardField() createShortAlarm(); createIntAlarm(); createLongAlarm(); + createUByteAlarm(); + createUShortAlarm(); + createUIntAlarm(); + createULongAlarm(); createFloatAlarm(); createDoubleAlarm(); createEnumeratedAlarm(); diff --git a/test/testBaseException b/test/testBaseException index 4c7f039..ab762bc 100644 --- a/test/testBaseException +++ b/test/testBaseException @@ -3,10 +3,10 @@ There is a logic_error On line 68 of ../testBaseException.cpp -../bin/linux-x86_64/testBaseException[0x401cdb] -../bin/linux-x86_64/testBaseException[0x4016d4] +../bin/linux-x86_64/testBaseException[0x401abb] +../bin/linux-x86_64/testBaseException[0x4014b4] /lib64/libc.so.6(__libc_start_main+0xed)[0x366dc2169d] -../bin/linux-x86_64/testBaseException[0x40172d] +../bin/linux-x86_64/testBaseException[0x40150d] To translate run 'addr2line -e execname 0xXXXXXXX ...' Note: Must be compiled with debug symbols @@ -14,19 +14,19 @@ To translate run 'addr2line -e execname 0xXXXXXXX ...' There is another logic_error On line 75 of ../testBaseException.cpp -../bin/linux-x86_64/testBaseException() [0x401e99] -../bin/linux-x86_64/testBaseException() [0x4016d4] +../bin/linux-x86_64/testBaseException() [0x401c79] +../bin/linux-x86_64/testBaseException() [0x4014b4] /lib64/libc.so.6(__libc_start_main+0xed) [0x366dc2169d] -../bin/linux-x86_64/testBaseException() [0x40172d] +../bin/linux-x86_64/testBaseException() [0x40150d] testBaseException... all is OK On line 48 of ../testBaseException.cpp -../bin/linux-x86_64/testBaseException() [0x401a79] -../bin/linux-x86_64/testBaseException() [0x4016dc] +../bin/linux-x86_64/testBaseException() [0x401859] +../bin/linux-x86_64/testBaseException() [0x4014bc] /lib64/libc.so.6(__libc_start_main+0xed) [0x366dc2169d] -../bin/linux-x86_64/testBaseException() [0x40172d] +../bin/linux-x86_64/testBaseException() [0x40150d] @@ -34,11 +34,11 @@ On line 48 of ../testBaseException.cpp exception 2 On line 57 of ../testBaseException.cpp -../bin/linux-x86_64/testBaseException() [0x40184c] -../bin/linux-x86_64/testBaseException() [0x401c30] -../bin/linux-x86_64/testBaseException() [0x4016dc] +../bin/linux-x86_64/testBaseException() [0x40162c] +../bin/linux-x86_64/testBaseException() [0x401a10] +../bin/linux-x86_64/testBaseException() [0x4014bc] /lib64/libc.so.6(__libc_start_main+0xed) [0x366dc2169d] -../bin/linux-x86_64/testBaseException() [0x40172d] +../bin/linux-x86_64/testBaseException() [0x40150d] diff --git a/test/testBaseExceptionDiff b/test/testBaseExceptionDiff index 34a6502..11e95e6 100644 --- a/test/testBaseExceptionDiff +++ b/test/testBaseExceptionDiff @@ -1,15 +1,15 @@ --- testBaseExceptionGold 2012-01-21 13:09:44.864000461 -0500 -+++ testBaseException 2012-04-03 13:59:48.689551975 -0400 ++++ testBaseException 2012-05-17 09:13:19.055289804 -0400 @@ -1,37 +1,45 @@ + + +There is a logic_error + +On line 68 of ../testBaseException.cpp -+../bin/linux-x86_64/testBaseException[0x401cdb] -+../bin/linux-x86_64/testBaseException[0x4016d4] ++../bin/linux-x86_64/testBaseException[0x401abb] ++../bin/linux-x86_64/testBaseException[0x4014b4] +/lib64/libc.so.6(__libc_start_main+0xed)[0x366dc2169d] -+../bin/linux-x86_64/testBaseException[0x40172d] ++../bin/linux-x86_64/testBaseException[0x40150d] +To translate run 'addr2line -e execname 0xXXXXXXX ...' + Note: Must be compiled with debug symbols + @@ -17,10 +17,10 @@ +There is another logic_error + +On line 75 of ../testBaseException.cpp -+../bin/linux-x86_64/testBaseException() [0x401e99] -+../bin/linux-x86_64/testBaseException() [0x4016d4] ++../bin/linux-x86_64/testBaseException() [0x401c79] ++../bin/linux-x86_64/testBaseException() [0x4014b4] +/lib64/libc.so.6(__libc_start_main+0xed) [0x366dc2169d] -+../bin/linux-x86_64/testBaseException() [0x40172d] ++../bin/linux-x86_64/testBaseException() [0x40150d] + testBaseException... @@ -31,10 +31,10 @@ - /lib/libc.so.6: __libc_start_main()+0xe6 - ../bin/linux-x86/testBaseException +On line 48 of ../testBaseException.cpp -+../bin/linux-x86_64/testBaseException() [0x401a79] -+../bin/linux-x86_64/testBaseException() [0x4016dc] ++../bin/linux-x86_64/testBaseException() [0x401859] ++../bin/linux-x86_64/testBaseException() [0x4014bc] +/lib64/libc.so.6(__libc_start_main+0xed) [0x366dc2169d] -+../bin/linux-x86_64/testBaseException() [0x40172d] ++../bin/linux-x86_64/testBaseException() [0x40150d] + @@ -63,11 +63,11 @@ - /lib/libc.so.6: __libc_start_main()+0xe6 - ../bin/linux-x86/testBaseException +On line 57 of ../testBaseException.cpp -+../bin/linux-x86_64/testBaseException() [0x40184c] -+../bin/linux-x86_64/testBaseException() [0x401c30] -+../bin/linux-x86_64/testBaseException() [0x4016dc] ++../bin/linux-x86_64/testBaseException() [0x40162c] ++../bin/linux-x86_64/testBaseException() [0x401a10] ++../bin/linux-x86_64/testBaseException() [0x4014bc] +/lib64/libc.so.6(__libc_start_main+0xed) [0x366dc2169d] -+../bin/linux-x86_64/testBaseException() [0x40172d] ++../bin/linux-x86_64/testBaseException() [0x40150d] + diff --git a/test/testIntrospect b/test/testIntrospect index bcd8d12..42b0ad2 100644 --- a/test/testIntrospect +++ b/test/testIntrospect @@ -1,26 +1,26 @@ testScalar -boolean boolean -byte byte -short short -int int -long long -float float -double double -string string +boolean +byte +short +int +long +float +double +string testScalarArray -boolean[] boolean -byte[] byte -short[] short -int[] int -long[] long -float[] float -double[] double -string[] string +boolean[] +byte[] +short[] +int[] +long[] +float[] +double[] +string[] testSimpleStructure -structure value +structure double value structure alarm int severity @@ -31,16 +31,14 @@ structure value int nanoSeconds int userTag structure display + double limitLow + double limitHigh string description string format string units - structure limit - double low - double high structure control - structure limit - double low - double high + double limitLow + double limitHigh double minStep structure valueAlarm boolean active @@ -55,9 +53,9 @@ structure value double hystersis testStructureArray -structure value +structure structure[] value - structure powerSupply + structure structure voltage double value structure alarm @@ -84,5 +82,3 @@ structure value long secondsPastEpoch int nanoSeconds int userTag -pvField: totalConstruct 49 totalDestruct 49 -field: totalConstruct 122 totalDestruct 122 diff --git a/test/testIntrospectDiff b/test/testIntrospectDiff index e69de29..680c0f7 100644 --- a/test/testIntrospectDiff +++ b/test/testIntrospectDiff @@ -0,0 +1,85 @@ +--- testIntrospectGold 2012-01-21 13:09:45.325003244 -0500 ++++ testIntrospect 2012-05-17 09:13:21.483308181 -0400 +@@ -1,26 +1,26 @@ + + testScalar +-boolean boolean +-byte byte +-short short +-int int +-long long +-float float +-double double +-string string ++boolean ++byte ++short ++int ++long ++float ++double ++string + + testScalarArray +-boolean[] boolean +-byte[] byte +-short[] short +-int[] int +-long[] long +-float[] float +-double[] double +-string[] string ++boolean[] ++byte[] ++short[] ++int[] ++long[] ++float[] ++double[] ++string[] + + testSimpleStructure +-structure value ++structure + double value + structure alarm + int severity +@@ -31,16 +31,14 @@ + int nanoSeconds + int userTag + structure display ++ double limitLow ++ double limitHigh + string description + string format + string units +- structure limit +- double low +- double high + structure control +- structure limit +- double low +- double high ++ double limitLow ++ double limitHigh + double minStep + structure valueAlarm + boolean active +@@ -55,9 +53,9 @@ + double hystersis + + testStructureArray +-structure value ++structure + structure[] value +- structure powerSupply ++ structure + structure voltage + double value + structure alarm +@@ -84,5 +82,3 @@ + long secondsPastEpoch + int nanoSeconds + int userTag +-pvField: totalConstruct 49 totalDestruct 49 +-field: totalConstruct 122 totalDestruct 122 diff --git a/test/testMessageQueue b/test/testMessageQueue index ff56a18..622297d 100644 --- a/test/testMessageQueue +++ b/test/testMessageQueue @@ -1,5 +1,2 @@ message 1 messageType info message 4 messageType info -queue: totalConstruct 1 totalDestruct 1 -queueElement: totalConstruct 3 totalDestruct 3 -messageQueue: totalConstruct 1 totalDestruct 1 diff --git a/test/testMessageQueueDiff b/test/testMessageQueueDiff index e69de29..50f83d9 100644 --- a/test/testMessageQueueDiff +++ b/test/testMessageQueueDiff @@ -0,0 +1,8 @@ +--- testMessageQueueGold 2012-01-21 13:09:45.486004216 -0500 ++++ testMessageQueue 2012-05-17 09:13:22.389315038 -0400 +@@ -1,5 +1,2 @@ + message 1 messageType info + message 4 messageType info +-queue: totalConstruct 1 totalDestruct 1 +-queueElement: totalConstruct 3 totalDestruct 3 +-messageQueue: totalConstruct 1 totalDestruct 1 diff --git a/test/testPVAppend b/test/testPVAppend index 26ef748..e53cd78 100644 --- a/test/testPVAppend +++ b/test/testPVAppend @@ -1,32 +1,28 @@ -structure request - string fieldList value,timeStamp -structure request - string fieldList value,timeStamp +structure + string fieldlist value,timeStamp string extra junk -structure parent +structure structure child1 string value bla structure child2 - string value bla -structure parent + string value blabla +structure structure child1 string Joe Good Guy string Mary Good Girl structure child2 string Bill Bad Guy string Jane Bad Girl -structure parent +structure structure child1 string Joe Good Guy string Mary Good Girl structure child2 string Joe Bad Guy string Jane Bad Girl -structure parent +structure structure child1 string Joe Good Guy string Mary Good Girl structure child2 string Jane Bad Girl -pvField: totalConstruct 15 totalDestruct 15 -field: totalConstruct 110 totalDestruct 110 diff --git a/test/testPVAppendDiff b/test/testPVAppendDiff index e69de29..b821501 100644 --- a/test/testPVAppendDiff +++ b/test/testPVAppendDiff @@ -0,0 +1,42 @@ +--- testPVAppendGold 2012-01-21 13:09:44.859000430 -0500 ++++ testPVAppend 2012-05-17 09:13:21.533308559 -0400 +@@ -1,32 +1,28 @@ +-structure request +- string fieldList value,timeStamp +-structure request +- string fieldList value,timeStamp ++structure ++ string fieldlist value,timeStamp + string extra junk +-structure parent ++structure + structure child1 + string value bla + structure child2 +- string value bla +-structure parent ++ string value blabla ++structure + structure child1 + string Joe Good Guy + string Mary Good Girl + structure child2 + string Bill Bad Guy + string Jane Bad Girl +-structure parent ++structure + structure child1 + string Joe Good Guy + string Mary Good Girl + structure child2 + string Joe Bad Guy + string Jane Bad Girl +-structure parent ++structure + structure child1 + string Joe Good Guy + string Mary Good Girl + structure child2 + string Jane Bad Girl +-pvField: totalConstruct 15 totalDestruct 15 +-field: totalConstruct 110 totalDestruct 110 diff --git a/test/testPVAuxInfo b/test/testPVAuxInfo index 59a41da..1dd8074 100644 --- a/test/testPVAuxInfo +++ b/test/testPVAuxInfo @@ -1,31 +1,29 @@ testPVAuxInfo -structure value +structure double value 0 - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 0 string description string format string units - structure limit - double low 0 - double high 0 - auxInfo - string factory factoryName - double junk 3 - control control - structure limit - double low 0 - double high 0 + auxInfo + string factoryName + double 3 + structure control + double limitLow 0 + double limitHigh 0 double minStep 0 -value offset 0 next 22 number 22 + offset 0 next 20 number 20 value offset 1 next 2 number 1 alarm offset 2 next 6 number 4 severity offset 3 next 4 number 1 @@ -35,18 +33,13 @@ timeStamp offset 6 next 10 number 4 secondsPastEpoch offset 7 next 8 number 1 nanoSeconds offset 8 next 9 number 1 userTag offset 9 next 10 number 1 -display offset 10 next 17 number 7 -description offset 11 next 12 number 1 -format offset 12 next 13 number 1 -units offset 13 next 14 number 1 -limit offset 14 next 17 number 3 -low offset 15 next 16 number 1 -high offset 16 next 17 number 1 -control offset 17 next 22 number 5 -limit offset 18 next 21 number 3 -low offset 19 next 20 number 1 -high offset 20 next 21 number 1 -minStep offset 21 next 22 number 1 -pvAuxInfo: totalConstruct 1 totalDestruct 1 -pvField: totalConstruct 24 totalDestruct 24 -field: totalConstruct 99 totalDestruct 99 +display offset 10 next 16 number 6 +limitLow offset 11 next 12 number 1 +limitHigh offset 12 next 13 number 1 +description offset 13 next 14 number 1 +format offset 14 next 15 number 1 +units offset 15 next 16 number 1 +control offset 16 next 20 number 4 +limitLow offset 17 next 18 number 1 +limitHigh offset 18 next 19 number 1 +minStep offset 19 next 20 number 1 diff --git a/test/testPVAuxInfoDiff b/test/testPVAuxInfoDiff index e69de29..9b0a12d 100644 --- a/test/testPVAuxInfoDiff +++ b/test/testPVAuxInfoDiff @@ -0,0 +1,76 @@ +--- testPVAuxInfoGold 2012-01-21 13:09:44.897000654 -0500 ++++ testPVAuxInfo 2012-05-17 09:13:21.545308649 -0400 +@@ -1,31 +1,29 @@ + + testPVAuxInfo +-structure value ++structure + double value 0 +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 0 + string description + string format + string units +- structure limit +- double low 0 +- double high 0 +- auxInfo +- string factory factoryName +- double junk 3 +- control control +- structure limit +- double low 0 +- double high 0 ++ auxInfo ++ string factoryName ++ double 3 ++ structure control ++ double limitLow 0 ++ double limitHigh 0 + double minStep 0 +-value offset 0 next 22 number 22 ++ offset 0 next 20 number 20 + value offset 1 next 2 number 1 + alarm offset 2 next 6 number 4 + severity offset 3 next 4 number 1 +@@ -35,18 +33,13 @@ + secondsPastEpoch offset 7 next 8 number 1 + nanoSeconds offset 8 next 9 number 1 + userTag offset 9 next 10 number 1 +-display offset 10 next 17 number 7 +-description offset 11 next 12 number 1 +-format offset 12 next 13 number 1 +-units offset 13 next 14 number 1 +-limit offset 14 next 17 number 3 +-low offset 15 next 16 number 1 +-high offset 16 next 17 number 1 +-control offset 17 next 22 number 5 +-limit offset 18 next 21 number 3 +-low offset 19 next 20 number 1 +-high offset 20 next 21 number 1 +-minStep offset 21 next 22 number 1 +-pvAuxInfo: totalConstruct 1 totalDestruct 1 +-pvField: totalConstruct 24 totalDestruct 24 +-field: totalConstruct 99 totalDestruct 99 ++display offset 10 next 16 number 6 ++limitLow offset 11 next 12 number 1 ++limitHigh offset 12 next 13 number 1 ++description offset 13 next 14 number 1 ++format offset 14 next 15 number 1 ++units offset 15 next 16 number 1 ++control offset 16 next 20 number 4 ++limitLow offset 17 next 18 number 1 ++limitHigh offset 18 next 19 number 1 ++minStep offset 19 next 20 number 1 diff --git a/test/testPVData b/test/testPVData index 9ec4cd6..8067e7b 100644 --- a/test/testPVData +++ b/test/testPVData @@ -1,13 +1,13 @@ -structure request - string fieldList value,timeStamp -structure top +structure + string request value,timeStamp +structure structure value double value 0 - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 @@ -25,21 +25,25 @@ structure top string extra testScalar -boolean boolean true -byte byte 10 -short short 10 -int int 10 -long long 10 -float float 10 -double double 10 -string string 10 -structure boolean +boolean true +byte 10 +short 10 +int 10 +long 10 +ubyte 10 +ushort 10 +uint 10 +ulong 10 +float 10 +double 10 +string 10 +structure boolean value true - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 @@ -48,27 +52,25 @@ structure boolean int falseSeverity 0 int trueSeverity 0 int changeStateSeverity 0 -structure byte +structure byte value 127 - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 10 string description this is a description string format f10.2 string units SomeUnits - structure limit - double low 0 - double high 10 - control control - structure limit - double low 1 - double high 9 + structure control + double limitLow 1 + double limitHigh 9 double minStep 0 structure valueAlarm boolean active true @@ -81,27 +83,25 @@ structure byte int highWarningSeverity 0 int highAlarmSeverity 2 byte hystersis 0 -structure short +structure short value 32767 - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 10 string description this is a description string format f10.2 string units SomeUnits - structure limit - double low 0 - double high 10 - control control - structure limit - double low 1 - double high 9 + structure control + double limitLow 1 + double limitHigh 9 double minStep 0 structure valueAlarm boolean active true @@ -114,27 +114,25 @@ structure short int highWarningSeverity 0 int highAlarmSeverity 2 short hystersis 0 -structure int +structure int value -2147483648 - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 10 string description this is a description string format f10.2 string units SomeUnits - structure limit - double low 0 - double high 10 - control control - structure limit - double low 1 - double high 9 + structure control + double limitLow 1 + double limitHigh 9 double minStep 0 structure valueAlarm boolean active true @@ -147,27 +145,25 @@ structure int int highWarningSeverity 0 int highAlarmSeverity 2 int hystersis 0 -structure long +structure long value -9223372032559808513 - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 10 string description this is a description string format f10.2 string units SomeUnits - structure limit - double low 0 - double high 10 - control control - structure limit - double low 1 - double high 9 + structure control + double limitLow 1 + double limitHigh 9 double minStep 0 structure valueAlarm boolean active true @@ -180,27 +176,149 @@ structure long int highWarningSeverity 0 int highAlarmSeverity 2 long hystersis 0 -structure float - float value 1.123e+08 - alarm alarm +structure + ubyte value 255 + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 10 string description this is a description string format f10.2 string units SomeUnits - structure limit - double low 0 - double high 10 - control control - structure limit - double low 1 - double high 9 + structure control + double limitLow 1 + double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true + ubyte lowAlarmLimit 1 + ubyte lowWarningLimit 0 + ubyte highWarningLimit 0 + ubyte highAlarmLimit 9 + int lowAlarmSeverity 2 + int lowWarningSeverity 0 + int highWarningSeverity 0 + int highAlarmSeverity 2 + ubyte hystersis 0 +structure + ushort value 65535 + structure alarm + int severity 2 + int status 0 + string message messageForAlarm + structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 + structure display + double limitLow 0 + double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits + structure control + double limitLow 1 + double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true + ushort lowAlarmLimit 1 + ushort lowWarningLimit 0 + ushort highWarningLimit 0 + ushort highAlarmLimit 9 + int lowAlarmSeverity 2 + int lowWarningSeverity 0 + int highWarningSeverity 0 + int highAlarmSeverity 2 + ushort hystersis 0 +structure + uint value 2147483648 + structure alarm + int severity 2 + int status 0 + string message messageForAlarm + structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 + structure display + double limitLow 0 + double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits + structure control + double limitLow 1 + double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true + uint lowAlarmLimit 1 + uint lowWarningLimit 0 + uint highWarningLimit 0 + uint highAlarmLimit 9 + int lowAlarmSeverity 2 + int lowWarningSeverity 0 + int highWarningSeverity 0 + int highAlarmSeverity 2 + uint hystersis 0 +structure + ulong value 9223372041149743103 + structure alarm + int severity 2 + int status 0 + string message messageForAlarm + structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 + structure display + double limitLow 0 + double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits + structure control + double limitLow 1 + double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true + ulong lowAlarmLimit 1 + ulong lowWarningLimit 0 + ulong highWarningLimit 0 + ulong highAlarmLimit 9 + int lowAlarmSeverity 2 + int lowWarningSeverity 0 + int highWarningSeverity 0 + int highAlarmSeverity 2 + ulong hystersis 0 +structure + float value 1.123e+08 + structure alarm + int severity 2 + int status 0 + string message messageForAlarm + structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 + structure display + double limitLow 0 + double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits + structure control + double limitLow 1 + double limitHigh 9 double minStep 0 structure valueAlarm boolean active true @@ -213,27 +331,25 @@ structure float int highWarningSeverity 0 int highAlarmSeverity 2 float hystersis 0 -structure double +structure double value 1.123e+35 - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 10 string description this is a description string format f10.2 string units SomeUnits - structure limit - double low 0 - double high 10 - control control - structure limit - double low 1 - double high 9 + structure control + double limitLow 1 + double limitHigh 9 double minStep 0 structure valueAlarm boolean active true @@ -246,97 +362,95 @@ structure double int highWarningSeverity 0 int highAlarmSeverity 2 double hystersis 0 -structure string +structure string value this is a string - alarm alarm + structure alarm int severity 2 int status 0 string message messageForAlarm - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 123456789 int nanoSeconds 1000000 int userTag 0 testScalarArray -structure boolean +structure boolean[] value [true,false,true] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure byte +structure byte[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure short +structure short[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure int +structure int[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure long +structure long[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure float +structure float[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure double +structure double[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -structure string +structure string[] value [0,1,2] - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -pvField: totalConstruct 336 totalDestruct 336 -field: totalConstruct 141 totalDestruct 141 diff --git a/test/testPVDataDiff b/test/testPVDataDiff index e69de29..3fdefc4 100644 --- a/test/testPVDataDiff +++ b/test/testPVDataDiff @@ -0,0 +1,529 @@ +--- testPVDataGold 2012-01-21 13:09:44.840000316 -0500 ++++ testPVData 2012-05-17 09:13:21.497308287 -0400 +@@ -1,13 +1,13 @@ +-structure request +- string fieldList value,timeStamp +-structure top ++structure ++ string request value,timeStamp ++structure + structure value + double value 0 +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +@@ -25,21 +25,25 @@ + string extra + + testScalar +-boolean boolean true +-byte byte 10 +-short short 10 +-int int 10 +-long long 10 +-float float 10 +-double double 10 +-string string 10 +-structure boolean ++boolean true ++byte 10 ++short 10 ++int 10 ++long 10 ++ubyte 10 ++ushort 10 ++uint 10 ++ulong 10 ++float 10 ++double 10 ++string 10 ++structure + boolean value true +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +@@ -48,27 +52,25 @@ + int falseSeverity 0 + int trueSeverity 0 + int changeStateSeverity 0 +-structure byte ++structure + byte value 127 +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits +- structure limit +- double low 0 +- double high 10 +- control control +- structure limit +- double low 1 +- double high 9 ++ structure control ++ double limitLow 1 ++ double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true +@@ -81,27 +83,25 @@ + int highWarningSeverity 0 + int highAlarmSeverity 2 + byte hystersis 0 +-structure short ++structure + short value 32767 +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits +- structure limit +- double low 0 +- double high 10 +- control control +- structure limit +- double low 1 +- double high 9 ++ structure control ++ double limitLow 1 ++ double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true +@@ -114,27 +114,25 @@ + int highWarningSeverity 0 + int highAlarmSeverity 2 + short hystersis 0 +-structure int ++structure + int value -2147483648 +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits +- structure limit +- double low 0 +- double high 10 +- control control +- structure limit +- double low 1 +- double high 9 ++ structure control ++ double limitLow 1 ++ double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true +@@ -147,27 +145,25 @@ + int highWarningSeverity 0 + int highAlarmSeverity 2 + int hystersis 0 +-structure long ++structure + long value -9223372032559808513 +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits +- structure limit +- double low 0 +- double high 10 +- control control +- structure limit +- double low 1 +- double high 9 ++ structure control ++ double limitLow 1 ++ double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true +@@ -180,27 +176,149 @@ + int highWarningSeverity 0 + int highAlarmSeverity 2 + long hystersis 0 +-structure float ++structure ++ ubyte value 255 ++ structure alarm ++ int severity 2 ++ int status 0 ++ string message messageForAlarm ++ structure timeStamp ++ long secondsPastEpoch 123456789 ++ int nanoSeconds 1000000 ++ int userTag 0 ++ structure display ++ double limitLow 0 ++ double limitHigh 10 ++ string description this is a description ++ string format f10.2 ++ string units SomeUnits ++ structure control ++ double limitLow 1 ++ double limitHigh 9 ++ double minStep 0 ++ structure valueAlarm ++ boolean active true ++ ubyte lowAlarmLimit 1 ++ ubyte lowWarningLimit 0 ++ ubyte highWarningLimit 0 ++ ubyte highAlarmLimit 9 ++ int lowAlarmSeverity 2 ++ int lowWarningSeverity 0 ++ int highWarningSeverity 0 ++ int highAlarmSeverity 2 ++ ubyte hystersis 0 ++structure ++ ushort value 65535 ++ structure alarm ++ int severity 2 ++ int status 0 ++ string message messageForAlarm ++ structure timeStamp ++ long secondsPastEpoch 123456789 ++ int nanoSeconds 1000000 ++ int userTag 0 ++ structure display ++ double limitLow 0 ++ double limitHigh 10 ++ string description this is a description ++ string format f10.2 ++ string units SomeUnits ++ structure control ++ double limitLow 1 ++ double limitHigh 9 ++ double minStep 0 ++ structure valueAlarm ++ boolean active true ++ ushort lowAlarmLimit 1 ++ ushort lowWarningLimit 0 ++ ushort highWarningLimit 0 ++ ushort highAlarmLimit 9 ++ int lowAlarmSeverity 2 ++ int lowWarningSeverity 0 ++ int highWarningSeverity 0 ++ int highAlarmSeverity 2 ++ ushort hystersis 0 ++structure ++ uint value 2147483648 ++ structure alarm ++ int severity 2 ++ int status 0 ++ string message messageForAlarm ++ structure timeStamp ++ long secondsPastEpoch 123456789 ++ int nanoSeconds 1000000 ++ int userTag 0 ++ structure display ++ double limitLow 0 ++ double limitHigh 10 ++ string description this is a description ++ string format f10.2 ++ string units SomeUnits ++ structure control ++ double limitLow 1 ++ double limitHigh 9 ++ double minStep 0 ++ structure valueAlarm ++ boolean active true ++ uint lowAlarmLimit 1 ++ uint lowWarningLimit 0 ++ uint highWarningLimit 0 ++ uint highAlarmLimit 9 ++ int lowAlarmSeverity 2 ++ int lowWarningSeverity 0 ++ int highWarningSeverity 0 ++ int highAlarmSeverity 2 ++ uint hystersis 0 ++structure ++ ulong value 9223372041149743103 ++ structure alarm ++ int severity 2 ++ int status 0 ++ string message messageForAlarm ++ structure timeStamp ++ long secondsPastEpoch 123456789 ++ int nanoSeconds 1000000 ++ int userTag 0 ++ structure display ++ double limitLow 0 ++ double limitHigh 10 ++ string description this is a description ++ string format f10.2 ++ string units SomeUnits ++ structure control ++ double limitLow 1 ++ double limitHigh 9 ++ double minStep 0 ++ structure valueAlarm ++ boolean active true ++ ulong lowAlarmLimit 1 ++ ulong lowWarningLimit 0 ++ ulong highWarningLimit 0 ++ ulong highAlarmLimit 9 ++ int lowAlarmSeverity 2 ++ int lowWarningSeverity 0 ++ int highWarningSeverity 0 ++ int highAlarmSeverity 2 ++ ulong hystersis 0 ++structure + float value 1.123e+08 +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits +- structure limit +- double low 0 +- double high 10 +- control control +- structure limit +- double low 1 +- double high 9 ++ structure control ++ double limitLow 1 ++ double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true +@@ -213,27 +331,25 @@ + int highWarningSeverity 0 + int highAlarmSeverity 2 + float hystersis 0 +-structure double ++structure + double value 1.123e+35 +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 10 + string description this is a description + string format f10.2 + string units SomeUnits +- structure limit +- double low 0 +- double high 10 +- control control +- structure limit +- double low 1 +- double high 9 ++ structure control ++ double limitLow 1 ++ double limitHigh 9 + double minStep 0 + structure valueAlarm + boolean active true +@@ -246,97 +362,95 @@ + int highWarningSeverity 0 + int highAlarmSeverity 2 + double hystersis 0 +-structure string ++structure + string value this is a string +- alarm alarm ++ structure alarm + int severity 2 + int status 0 + string message messageForAlarm +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 123456789 + int nanoSeconds 1000000 + int userTag 0 + + testScalarArray +-structure boolean ++structure + boolean[] value [true,false,true] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure byte ++structure + byte[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure short ++structure + short[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure int ++structure + int[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure long ++structure + long[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure float ++structure + float[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure double ++structure + double[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-structure string ++structure + string[] value [0,1,2] +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-pvField: totalConstruct 336 totalDestruct 336 +-field: totalConstruct 141 totalDestruct 141 diff --git a/test/testPVStructureArray b/test/testPVStructureArray index d4e0734..5d533c5 100644 --- a/test/testPVStructureArray +++ b/test/testPVStructureArray @@ -1,207 +1,52 @@ after append 5 -structure powerSupply - structure[] value - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - alarm alarm - int severity 0 - int status 0 - string message - timeStamp timeStamp - long secondsPastEpoch 0 - int nanoSeconds 0 - int userTag 0 -after remove 0,1,3structure powerSupply +structure structure[] value null null - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message null - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - alarm alarm + null + null + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -after compressstructure powerSupply +after remove(0,2) +structure structure[] value - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure powerSupply - structure voltage - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure power - double value 0 - structure alarm - int severity 0 - int status 0 - string message - structure current - double value 0 - structure alarm - int severity 0 - int status 0 - string message - alarm alarm + null + null + null + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +after remove 0,1,3structure + structure[] value + null + null + structure alarm + int severity 0 + int status 0 + string message + structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +after compressstructure + structure[] value + structure alarm + int severity 0 + int status 0 + string message + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -pvField: totalConstruct 105 totalDestruct 105 -field: totalConstruct 104 totalDestruct 104 diff --git a/test/testPVStructureArrayDiff b/test/testPVStructureArrayDiff index e69de29..4742014 100644 --- a/test/testPVStructureArrayDiff +++ b/test/testPVStructureArrayDiff @@ -0,0 +1,238 @@ +--- testPVStructureArrayGold 2012-01-21 13:09:45.250002792 -0500 ++++ testPVStructureArray 2012-05-17 09:13:21.512308401 -0400 +@@ -1,207 +1,52 @@ + after append 5 +-structure powerSupply ++structure + structure[] value +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- alarm alarm ++ null ++ null ++ null ++ null ++ null ++ structure alarm ++ int severity 0 ++ int status 0 ++ string message ++ structure timeStamp ++ long secondsPastEpoch 0 ++ int nanoSeconds 0 ++ int userTag 0 ++after remove(0,2) ++structure ++ structure[] value ++ null ++ null ++ null ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-after remove 0,1,3structure powerSupply ++after remove 0,1,3structure + structure[] value + null + null +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- null +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-after compressstructure powerSupply ++after compressstructure + structure[] value +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure powerSupply +- structure voltage +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure power +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- structure current +- double value 0 +- structure alarm +- int severity 0 +- int status 0 +- string message +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-pvField: totalConstruct 105 totalDestruct 105 +-field: totalConstruct 104 totalDestruct 104 diff --git a/test/testProperty b/test/testProperty index 986ff7d..7f61741 100644 --- a/test/testProperty +++ b/test/testProperty @@ -1,34 +1,32 @@ -structure value +structure double value 0 - alarm alarm + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 - display display + structure display + double limitLow 0 + double limitHigh 0 string description string format string units - structure limit - double low 0 - double high 0 - control control - structure limit - double low 0 - double high 0 + structure control + double limitLow 0 + double limitHigh 0 double minStep 0 -structure value +structure structure value int index 0 - string[] choices [0,1,2,3] - alarm alarm + string[] choices [1,2,3,4] + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 @@ -40,43 +38,39 @@ testControl testDisplay low -10.000000 high -1.000000 testEnumerated -index 0 choice 0 choices 0 1 2 3 -index 2 choice 2 +index 0 choice 1 choices 1 2 3 4 +index 2 choice 3 doubleRecord -structure value +structure double value 0 - alarm alarm + structure alarm int severity 2 int status 7 string message testMessage - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 32 - display display + structure display + double limitLow -10 + double limitHigh -1 string description testDescription string format %f10.0 string units volts - structure limit - double low -10 - double high -1 - control control - structure limit - double low 1 - double high 10 + structure control + double limitLow 1 + double limitHigh 10 double minStep 0 enumeratedRecord -structure value +structure structure value int index 2 - string[] choices [0,1,2,3] - alarm alarm + string[] choices [1,2,3,4] + structure alarm int severity 0 int status 0 string message - timeStamp timeStamp + structure timeStamp long secondsPastEpoch 0 int nanoSeconds 0 int userTag 0 -pvField: totalConstruct 34 totalDestruct 34 -field: totalConstruct 101 totalDestruct 101 diff --git a/test/testPropertyAux b/test/testPropertyAux index ce29c0e..7301906 100644 --- a/test/testPropertyAux +++ b/test/testPropertyAux @@ -1 +1 @@ -2012.04.03 13:59:53 794513188 nanoSeconds isDst true userTag 32 +2012.05.17 09:13:22 407248552 nanoSeconds isDst true userTag 32 diff --git a/test/testPropertyDiff b/test/testPropertyDiff index e69de29..8b1232e 100644 --- a/test/testPropertyDiff +++ b/test/testPropertyDiff @@ -0,0 +1,109 @@ +--- testPropertyGold 2012-01-21 13:09:45.080001766 -0500 ++++ testProperty 2012-05-17 09:13:22.406315168 -0400 +@@ -1,34 +1,32 @@ +-structure value ++structure + double value 0 +- alarm alarm ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +- display display ++ structure display ++ double limitLow 0 ++ double limitHigh 0 + string description + string format + string units +- structure limit +- double low 0 +- double high 0 +- control control +- structure limit +- double low 0 +- double high 0 ++ structure control ++ double limitLow 0 ++ double limitHigh 0 + double minStep 0 +-structure value ++structure + structure value + int index 0 +- string[] choices [0,1,2,3] +- alarm alarm ++ string[] choices [1,2,3,4] ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +@@ -40,43 +38,39 @@ + testDisplay + low -10.000000 high -1.000000 + testEnumerated +-index 0 choice 0 choices 0 1 2 3 +-index 2 choice 2 ++index 0 choice 1 choices 1 2 3 4 ++index 2 choice 3 + doubleRecord +-structure value ++structure + double value 0 +- alarm alarm ++ structure alarm + int severity 2 + int status 7 + string message testMessage +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 32 +- display display ++ structure display ++ double limitLow -10 ++ double limitHigh -1 + string description testDescription + string format %f10.0 + string units volts +- structure limit +- double low -10 +- double high -1 +- control control +- structure limit +- double low 1 +- double high 10 ++ structure control ++ double limitLow 1 ++ double limitHigh 10 + double minStep 0 + enumeratedRecord +-structure value ++structure + structure value + int index 2 +- string[] choices [0,1,2,3] +- alarm alarm ++ string[] choices [1,2,3,4] ++ structure alarm + int severity 0 + int status 0 + string message +- timeStamp timeStamp ++ structure timeStamp + long secondsPastEpoch 0 + int nanoSeconds 0 + int userTag 0 +-pvField: totalConstruct 34 totalDestruct 34 +-field: totalConstruct 101 totalDestruct 101 diff --git a/test/testQueue b/test/testQueue index 64cff31..e69de29 100644 --- a/test/testQueue +++ b/test/testQueue @@ -1,3 +0,0 @@ -event: totalConstruct 4 totalDestruct 4 -queue: totalConstruct 1 totalDestruct 1 -queueElement: totalConstruct 5 totalDestruct 5 diff --git a/test/testQueueDiff b/test/testQueueDiff index e69de29..310e70f 100644 --- a/test/testQueueDiff +++ b/test/testQueueDiff @@ -0,0 +1,6 @@ +--- testQueueGold 2012-01-21 13:09:45.310003152 -0500 ++++ testQueue 2012-05-17 09:13:22.377314948 -0400 +@@ -1,3 +0,0 @@ +-event: totalConstruct 4 totalDestruct 4 +-queue: totalConstruct 1 totalDestruct 1 +-queueElement: totalConstruct 5 totalDestruct 5 diff --git a/test/testThreadAux b/test/testThreadAux index c7d3772..ca6d3af 100644 --- a/test/testThreadAux +++ b/test/testThreadAux @@ -1 +1 @@ -time per call 8.641072 microseconds +time per call 8.704012 microseconds diff --git a/test/testTimeStampAux b/test/testTimeStampAux index 235d3c3..d8ad94c 100644 --- a/test/testTimeStampAux +++ b/test/testTimeStampAux @@ -1,5 +1,5 @@ -current 1333475992 901534689 milliSec 1333475992901 -2012.04.03 13:59:52 901534689 nanoSeconds isDst true +current 1337260401 557245202 milliSec 1337260401557 +2012.05.17 09:13:21 557245202 nanoSeconds isDst true fromTime_t -current 1333475992 0 milliSec 1333475992000 -2012.04.03 13:59:52 0 nanoSeconds isDst true +current 1337260401 0 milliSec 1337260401000 +2012.05.17 09:13:21 0 nanoSeconds isDst true diff --git a/test/testTimerAux b/test/testTimerAux index 296b335..9c03135 100644 --- a/test/testTimerAux +++ b/test/testTimerAux @@ -1,6 +1,6 @@ -one requested 0.400000 diff 0.400133 seconds -two requested 0.200000 diff 0.200132 seconds -one requested 0.200000 diff 0.200114 seconds -two requested 0.400000 diff 0.400123 seconds -one requested 0.000000 diff 0.000059 seconds -two requested 0.000000 diff 0.000066 seconds +one requested 0.400000 diff 0.400134 seconds +two requested 0.200000 diff 0.200133 seconds +one requested 0.200000 diff 0.200128 seconds +two requested 0.400000 diff 0.400131 seconds +one requested 0.000000 diff 0.000036 seconds +two requested 0.000000 diff 0.000043 seconds diff --git a/testApp/misc/testTimeStamp.cpp b/testApp/misc/testTimeStamp.cpp index edb0b27..caa2411 100644 --- a/testApp/misc/testTimeStamp.cpp +++ b/testApp/misc/testTimeStamp.cpp @@ -30,7 +30,7 @@ void testTimeStamp(FILE *fd,FILE *auxfd) assert(nanoSecPerSec==1000000000); TimeStamp current; current.getCurrent(); - fprintf(auxfd,"current %lli %i milliSec %lli\n", + fprintf(auxfd,"current %lli %i milliSec %li\n", current.getSecondsPastEpoch(), current.getNanoSeconds(), current.getMilliseconds()); @@ -46,7 +46,7 @@ void testTimeStamp(FILE *fd,FILE *auxfd) (ctm.tm_isdst==0) ? "false" : "true"); tt = time(&tt); current.fromTime_t(tt); - fprintf(auxfd,"fromTime_t\ncurrent %lli %i milliSec %lli\n", + fprintf(auxfd,"fromTime_t\ncurrent %lli %i milliSec %li\n", current.getSecondsPastEpoch(), current.getNanoSeconds(), current.getMilliseconds()); diff --git a/testApp/pv/testPVAuxInfo.cpp b/testApp/pv/testPVAuxInfo.cpp index 2c4fda5..ec8a42f 100644 --- a/testApp/pv/testPVAuxInfo.cpp +++ b/testApp/pv/testPVAuxInfo.cpp @@ -48,7 +48,7 @@ static void printOffsets(PVStructurePtr pvStructure,FILE *fd) printOffsets(xxx,fd); continue; } - fprintf(fd,"%s offset %d next %d number %d\n", + fprintf(fd,"%s offset %lli next %lli number %lli\n", pvField->getFieldName().c_str(), pvField->getFieldOffset(), pvField->getNextFieldOffset(), diff --git a/testApp/pv/testPVData.cpp b/testApp/pv/testPVData.cpp index 7be9181..d254572 100644 --- a/testApp/pv/testPVData.cpp +++ b/testApp/pv/testPVData.cpp @@ -123,7 +123,7 @@ static void testPVScalarWithProperties( hasValueAlarm = true; hasDisplayControl = true; PVIntPtr pvField = pvStructure->getIntField("value"); - pvField->put((int)0x80000000); + pvField->put((int32)0x80000000); break; } case pvLong: { @@ -138,6 +138,45 @@ static void testPVScalarWithProperties( pvField->put(value); break; } + case pvUByte: { + pvStructure = standardPVField->scalar( + stype,allProperties); + hasValueAlarm = true; + hasDisplayControl = true; + PVUBytePtr pvField = pvStructure->getUByteField("value"); + pvField->put(255); + break; + } + case pvUShort: { + pvStructure = standardPVField->scalar( + stype,allProperties); + hasValueAlarm = true; + hasDisplayControl = true; + PVUShortPtr pvField = pvStructure->getUShortField("value"); + pvField->put(65535); + break; + } + case pvUInt: { + pvStructure = standardPVField->scalar( + stype,allProperties); + hasValueAlarm = true; + hasDisplayControl = true; + PVUIntPtr pvField = pvStructure->getUIntField("value"); + pvField->put((uint32)0x80000000); + break; + } + case pvULong: { + pvStructure = standardPVField->scalar( + stype,allProperties); + hasValueAlarm = true; + hasDisplayControl = true; + PVULongPtr pvField = pvStructure->getULongField("value"); + int64 value = 0x80000000; + value <<= 32; + value |= 0xffffffff; + pvField->put(value); + break; + } case pvFloat: { pvStructure = standardPVField->scalar( stype,allProperties); @@ -158,7 +197,7 @@ static void testPVScalarWithProperties( } case pvString: { pvStructure = standardPVField->scalar( - stype,allProperties); + stype,alarmTimeStamp); PVStringPtr pvField = pvStructure->getStringField("value"); pvField->put(String("this is a string")); break; @@ -241,6 +280,10 @@ static void testPVScalar(FILE * fd) { testPVScalarCommon(fd,String("short"),pvShort); testPVScalarCommon(fd,String("int"),pvInt); testPVScalarCommon(fd,String("long"),pvLong); + testPVScalarCommon(fd,String("ubyte"),pvUByte); + testPVScalarCommon(fd,String("ushort"),pvUShort); + testPVScalarCommon(fd,String("uint"),pvUInt); + testPVScalarCommon(fd,String("ulong"),pvULong); testPVScalarCommon(fd,String("float"),pvFloat); testPVScalarCommon(fd,String("double"),pvDouble); testPVScalarCommon(fd,String("string"),pvString); @@ -250,6 +293,10 @@ static void testPVScalar(FILE * fd) { testPVScalarWithProperties(fd,String("short"),pvShort); testPVScalarWithProperties(fd,String("int"),pvInt); testPVScalarWithProperties(fd,String("long"),pvLong); + testPVScalarWithProperties(fd,String("ubyte"),pvUByte); + testPVScalarWithProperties(fd,String("ushort"),pvUShort); + testPVScalarWithProperties(fd,String("uint"),pvUInt); + testPVScalarWithProperties(fd,String("ulong"),pvULong); testPVScalarWithProperties(fd,String("float"),pvFloat); testPVScalarWithProperties(fd,String("double"),pvDouble); testPVScalarWithProperties(fd,String("string"),pvString); diff --git a/testApp/pv/testPVStructureArray.cpp b/testApp/pv/testPVStructureArray.cpp index cb38421..727c733 100644 --- a/testApp/pv/testPVStructureArray.cpp +++ b/testApp/pv/testPVStructureArray.cpp @@ -58,7 +58,10 @@ void testPowerSupplyArray(FILE * fd) { powerSupplyArrayStruct->toString(&buffer); fprintf(fd,"after append 5\n%s\n",buffer.c_str()); powerSupplyArray->remove(0,2); - powerSupplyArray->remove(3,1); + buffer.clear(); + powerSupplyArrayStruct->toString(&buffer); + fprintf(fd,"after remove(0,2)\n%s\n",buffer.c_str()); + powerSupplyArray->remove(2,1); buffer.clear(); powerSupplyArrayStruct->toString(&buffer); fprintf(fd,"after remove 0,1,3%s\n",buffer.c_str()); diff --git a/testApp/pv/testPVType.cpp b/testApp/pv/testPVType.cpp index cb73267..4d72139 100644 --- a/testApp/pv/testPVType.cpp +++ b/testApp/pv/testPVType.cpp @@ -62,10 +62,10 @@ int main(int argc,char *argv[]) int64 longInt = 0x7fffffff; longInt <<= 32; longInt |= 0xffffffff; - fprintf(fd,"int8 max %lld",longInt); + fprintf(fd,"int8 max %lli",longInt); longInt = intValue = 0x80000000;; longInt <<= 32; - fprintf(fd," min %lld\n",longInt); + fprintf(fd," min %lli\n",longInt); return(0); }