change uri:ev4:nt/2012 to uri:ev4:nt/2014
This commit is contained in:
@@ -254,7 +254,7 @@ structure
|
||||
int userTag
|
||||
|
||||
easy way
|
||||
uri:ev4:nt/2012/pwd:NTScalarArray
|
||||
uri:ev4:nt/2014/pwd:NTScalarArray
|
||||
string[] value
|
||||
alarm_t alarm
|
||||
int severity
|
||||
@@ -274,7 +274,7 @@ via standardField:</p>
|
||||
</pre>
|
||||
It produces :
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTScalarArray
|
||||
uri:ev4:nt/2014/pwd:NTScalarArray
|
||||
string[] value
|
||||
alarm_t alarm
|
||||
int severity
|
||||
@@ -302,7 +302,7 @@ A hard way to create an structure with an enumerated value field and a time stam
|
||||
|
||||
StructureConstPtr ntEnumHard =
|
||||
fieldCreate->createFieldBuilder()->
|
||||
setId("uri:ev4:nt/2012/pwd/NTEnum")->
|
||||
setId("uri:ev4:nt/2014/pwd/NTEnum")->
|
||||
add("value", enum_t)->
|
||||
addNestedStructure("timeStamp")->
|
||||
setId("time_t")->
|
||||
@@ -315,7 +315,7 @@ A hard way to create an structure with an enumerated value field and a time stam
|
||||
</pre>
|
||||
It produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd/NTEnum
|
||||
uri:ev4:nt/2014/pwd/NTEnum
|
||||
enum_t value
|
||||
int index
|
||||
string[] choices
|
||||
@@ -332,7 +332,7 @@ fields: alarm and timeStamp:</p>
|
||||
</pre>
|
||||
It produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTEnum
|
||||
uri:ev4:nt/2014/pwd:NTEnum
|
||||
enum_t value
|
||||
int index
|
||||
string[] choices
|
||||
@@ -372,7 +372,7 @@ union
|
||||
int userTag
|
||||
|
||||
structure with value field being a union
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
double doubleValue
|
||||
int intValue
|
||||
@@ -470,7 +470,7 @@ structure
|
||||
</pre>
|
||||
This produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTScalar
|
||||
uri:ev4:nt/2014/pwd:NTScalar
|
||||
double value 100000
|
||||
alarm_t alarm
|
||||
int severity 0
|
||||
@@ -503,7 +503,7 @@ from get 100000
|
||||
</pre>
|
||||
This produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTScalarArray
|
||||
uri:ev4:nt/2014/pwd:NTScalarArray
|
||||
double[] value [0,1,2,3,4,5,6,7,8,9]
|
||||
alarm_t alarm
|
||||
int severity 0
|
||||
@@ -524,7 +524,7 @@ via getData 0 1 2 3 4 5 6 7 8 9
|
||||
</pre>
|
||||
This produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTEnum
|
||||
uri:ev4:nt/2014/pwd:NTEnum
|
||||
enum_t value
|
||||
int index 0
|
||||
string[] choices []
|
||||
@@ -610,7 +610,7 @@ structure
|
||||
</pre>
|
||||
This produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
time_t
|
||||
long secondsPastEpoch 1000
|
||||
@@ -625,7 +625,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
int nanoseconds 0
|
||||
int userTag 0
|
||||
0x60a2c8
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
double 100000
|
||||
alarm_t alarm
|
||||
@@ -657,7 +657,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
</pre>
|
||||
This produces:
|
||||
<pre>
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
any value
|
||||
time_t
|
||||
long secondsPastEpoch 1000
|
||||
@@ -672,7 +672,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
int nanoseconds 0
|
||||
int userTag 0
|
||||
0x60a2c8
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
any value
|
||||
double 100000
|
||||
alarm_t alarm
|
||||
@@ -732,7 +732,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
This produces:
|
||||
<pre>
|
||||
introspection
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
double doubleValue
|
||||
double[] doubleArrayValue
|
||||
@@ -768,7 +768,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
int userTag
|
||||
0x60a2c8
|
||||
data
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
(none)
|
||||
alarm_t alarm
|
||||
@@ -781,7 +781,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
int userTag 0
|
||||
0x60a2c8
|
||||
select valueDouble
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
double 1.55
|
||||
alarm_t alarm
|
||||
@@ -795,7 +795,7 @@ uri:ev4:nt/2012/pwd:NTUnion
|
||||
0x60a2c8
|
||||
value = 1.55
|
||||
select structValue
|
||||
uri:ev4:nt/2012/pwd:NTUnion
|
||||
uri:ev4:nt/2014/pwd:NTUnion
|
||||
union value
|
||||
structure
|
||||
double doubleValue 1.65
|
||||
|
||||
@@ -503,28 +503,28 @@ StructureConstPtr StandardField::scalar(
|
||||
ScalarType type,string const &properties)
|
||||
{
|
||||
ScalarConstPtr field = fieldCreate->createScalar(type); // scalar_t
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTScalar",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTScalar",field,properties);
|
||||
}
|
||||
|
||||
StructureConstPtr StandardField::regUnion(
|
||||
UnionConstPtr const &field,
|
||||
string const & properties)
|
||||
{
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTUnion",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTUnion",field,properties);
|
||||
}
|
||||
|
||||
StructureConstPtr StandardField::variantUnion(
|
||||
string const & properties)
|
||||
{
|
||||
UnionConstPtr field = fieldCreate->createVariantUnion();
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTUnion",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTUnion",field,properties);
|
||||
}
|
||||
|
||||
StructureConstPtr StandardField::scalarArray(
|
||||
ScalarType elementType, string const &properties)
|
||||
{
|
||||
ScalarArrayConstPtr field = fieldCreate->createScalarArray(elementType); // scalar_t[]
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTScalarArray",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTScalarArray",field,properties);
|
||||
}
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ StructureConstPtr StandardField::structureArray(
|
||||
{
|
||||
StructureArrayConstPtr field = fieldCreate->createStructureArray(
|
||||
structure);
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTStructureArray",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTStructureArray",field,properties);
|
||||
}
|
||||
|
||||
StructureConstPtr StandardField::unionArray(
|
||||
@@ -541,7 +541,7 @@ StructureConstPtr StandardField::unionArray(
|
||||
{
|
||||
UnionArrayConstPtr field = fieldCreate->createUnionArray(
|
||||
punion);
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTUnionArray",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTUnionArray",field,properties);
|
||||
}
|
||||
|
||||
StructureConstPtr StandardField::enumerated()
|
||||
@@ -560,7 +560,7 @@ StructureConstPtr StandardField::enumerated()
|
||||
StructureConstPtr StandardField::enumerated(string const &properties)
|
||||
{
|
||||
StructureConstPtr field = enumerated(); // enum_t
|
||||
return createProperties("uri:ev4:nt/2012/pwd:NTEnum",field,properties);
|
||||
return createProperties("uri:ev4:nt/2014/pwd:NTEnum",field,properties);
|
||||
}
|
||||
|
||||
StructureConstPtr StandardField::alarm()
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
*/
|
||||
StructureConstPtr enumerated();
|
||||
/** Create a structure that has an enumerated structure value field
|
||||
* The id for the structure is "uri:ev4:nt/2012/pwd:NTEnum".
|
||||
* The id for the structure is "uri:ev4:nt/2014/pwd:NTEnum".
|
||||
* @param properties A comma separated list of properties.
|
||||
* This is some combination of "alarm,timeStamp,display,control,valueAlarm".
|
||||
* @return The const shared pointer to the structure.
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
PVStructurePtr enumerated(StringArray const &choices);
|
||||
/**
|
||||
* Create a structure that has an enumerated structure value field.
|
||||
* The id for the structure is "uri:ev4:nt/2012/pwd:NTEnum".
|
||||
* The id for the structure is "uri:ev4:nt/2014/pwd:NTEnum".
|
||||
* @param choices This is a StringArray of choices.
|
||||
* @param properties A comma separated list of properties.
|
||||
* @return The const shared pointer to the structure.
|
||||
|
||||
@@ -48,11 +48,15 @@ static string allProperties("alarm,timeStamp,display,control");
|
||||
static PVStructurePtr doubleRecord;
|
||||
static PVStructurePtr enumeratedRecord;
|
||||
|
||||
static void printRecords()
|
||||
{
|
||||
std::cout << "doubleRecord" << std::endl << *doubleRecord << std::endl;
|
||||
std::cout << "enumeratedRecord" << std::endl << *enumeratedRecord << std::endl;
|
||||
}
|
||||
|
||||
static void createRecords()
|
||||
{
|
||||
doubleRecord = standardPVField->scalar(pvDouble,allProperties);
|
||||
if(debug)
|
||||
std::cout << "doubleRecord" << std::endl << *doubleRecord << std::endl;
|
||||
StringArray choices;
|
||||
choices.reserve(4);
|
||||
choices.push_back("1");
|
||||
@@ -60,14 +64,7 @@ static void createRecords()
|
||||
choices.push_back("3");
|
||||
choices.push_back("4");
|
||||
enumeratedRecord = standardPVField->enumerated(choices,alarmTimeStamp);
|
||||
if(debug)
|
||||
std::cout << "enumeratedRecord" << std::endl << *doubleRecord << std::endl;
|
||||
}
|
||||
|
||||
static void printRecords()
|
||||
{
|
||||
std::cout << "doubleRecord" << std::endl << *doubleRecord << std::endl;
|
||||
std::cout << "enumeratedRecord" << std::endl << *doubleRecord << std::endl;
|
||||
if(debug) printRecords();
|
||||
}
|
||||
|
||||
static void testAlarm()
|
||||
|
||||
Reference in New Issue
Block a user