This product is available via an open source license
The EPICS core developers will have a Face To Face meeting at SLAC. This document presents some technical topics that I hope can be discussed.
This section describes what I think are the semantics for pvput.
This works only on a top level field named value that is either a scalar or scalar array. For a pvput to a scalar array the number of elements must appear before the elements.
Some examples are:
mrk> pvput -r "value" PVRdouble 10 Old : 0 New : 10 mrk> pvput -r "value" PVRboolean true Old : false New : true mrk> pvput -r "value" PVRbooleanArray true false true //NOTE that nelements did not appear Old : [] New : [false,true] mrk> pvput -r "value" PVRbooleanArray 3 true false true Old : [false,true] New : [true,false,true] mrk>
But the following pvput failed
mrk> pvget -r "voltage" PVRdumbPowerSupply
PVRdumbPowerSupply structure
structure voltage
double value 0
alarm_t alarm
int severity 0
int status 0
string message
mrk> pvput -r "voltage.value" PVRdumbPowerSupply 10
Old : structure
structure voltage
double value 0
Error: Structure has no .value
New : structure
structure voltage
double value 0
mrk>
Below is the same request, using JSON syntax, that does work.
The json syntax starts with:
name='...'
For example:
mrk> pvput -r "value" PVRdouble value='5'
The name must be the name of a top level field in the servers PVStructure.
JSON syntax supports the following field types:
The top level field is named value and the field type is scalar or scalar array:
mrk> pvput -r "value" PVRdouble value='5' Old : 10 New : 5 mrk> pvput -r "value" PVRdouble value='10' Old : 5 New : 10 mrk> pvput -r "value" PVRboolean value='false' Old : true New : false mrk> pvput -r "value" PVRbooleanArray value='[true,false,true]' Old : [true,false,true] New : [true,false,true] mrk>
mrk> pvput -r "voltage" PVRdumbPowerSupply voltage='{"value":"5"}'
Old : structure
structure voltage
double value 0
alarm_t alarm
int severity 0
int status 0
string message
New : structure
structure voltage
double value 5
alarm_t alarm
mrk> pvput -r "voltage,power" PVRdumbPowerSupply power='{"value":1.2}' voltage='{"value":1.2}'
Old : structure
structure voltage
double value 5
alarm_t alarm
int severity 0
int status 0
string message
structure power
double value 0
alarm_t alarm
int severity 0
int status 0
string message
New : structure
structure voltage
double value 1.2
alarm_t alarm
int severity 0
int status 0
string message
structure power
double value 1.2
alarm_t alarm
int severity 0
int status 0
string message
mrk> pvget -r positionRB scanServerPutGet
scanServerPutGet structure
Point positionRB
point_t value
double x 0
double y 0
time_t timeStamp <undefined>
long secondsPastEpoch 0
int nanoseconds 0
int userTag 0
mrk> pvput -r positionRB scanServerPutGet positionRB='{"value":{"x":"1.0","y":"2.0"}}'
Old : structure
Point positionRB
point_t value
double x 0
double y 0
time_t timeStamp <undefined>
long secondsPastEpoch 0
int nanoseconds 0
int userTag 0
New : structure
Point positionRB
point_t value
double x 1
double y 2
time_t timeStamp <undefined>
long secondsPastEpoch 0
int nanoseconds 0
int userTag 0
mrk> pvput -r positionRB scanServerPutGet positionRB='{"value":{"x":"1.0","y":"2.0"},"timeStamp":{"userTag":"10"}}'
Old : structure
Point positionRB
point_t value
double x 1
double y 2
time_t timeStamp <undefined>
long secondsPastEpoch 0
int nanoseconds 0
int userTag 0
New : structure
Point positionRB
point_t value
double x 1
double y 2
time_t timeStamp <undefined> 10
long secondsPastEpoch 0
int nanoseconds 0
int userTag 10
mrk> pvput PVRstructureArray '{"value":[{"name":"marty","value":"vvvv"},{"name":"blow","value":"yyy"}]}'
Old : structure
structure[] value
structure
string name marty
string value vvvv
New : structure
structure[] value
structure
string name marty
string value vvvv
structure
string name blow
string value yyy
mrk>
qsrv, i. e. the channel server for DBRecords does not honor the field subset specified in the pvRequest structure.
An example is:
mrk> pvget -p ca -r "timeStamp" -v DBRdoubleArray
DBRdoubleArray structure
time_t timeStamp 2019-03-25 14:29:02.998
long secondsPastEpoch 1553538542
int nanoseconds 998091332
int userTag 0
mrk> pvget -p pva -r "timeStamp" -v DBRdoubleArray
DBRdoubleArray epics:nt/NTScalarArray:1.0
double[] value [1,2,3,4,5]
alarm_t alarm
int severity 0
int status 0
string message NO_ALARM
time_t timeStamp 2019-03-25 14:29:02.998
long secondsPastEpoch 1553538542
int nanoseconds 998091332
int userTag 0
structure display
double limitLow 0
double limitHigh 10
string description
string units Counts
int precision 0
enum_t form (0) Default
int index 0
string[] choices ["Default", "String", "Binary", "Decimal", "Hex", "Exponential", "Engineering"]
control_t control
double limitLow 0
double limitHigh 10
double minStep 0
valueAlarm_t valueAlarm
boolean active false
double lowAlarmLimit nan
double lowWarningLimit nan
double highWarningLimit nan
double highAlarmLimit nan
int lowAlarmSeverity 0
int lowWarningSeverity 0
int highWarningSeverity 0
int highAlarmSeverity 0
byte hysteresis 0
mrk>
The following are some items from the Sept 2018 FTF meeting that were not discussed.
Currently neither ca or qsrv has support for DBE_ARCHIVE.
What to do?
Perhaps allow the following field option:
field(value[DBE=value])value can be any combination of DBE_VALUE|DBE_ALARM|DBE_ARCHIVE|DBE_PROPERTY
Is this a problem for ca and for qsrv?
Is it handled by a client issuing gets and puts to fields ACKS and ACKT?