Core Developer FTF March 2019

2019.03.27

editors:
Marty Kraimer

This product is available via an open source license

Table of Contents

introduction

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.

pvput
The goal is to document the semantics.
pvRequest
qsrv does not honor the clients requested field subset. It does not honor it for any of channelGet, channelPut, or monitor.
miscellaneous issues
Some issues from the September 2018 FTF that were not discussed.

pvput semantics

This section describes what I think are the semantics for pvput.

non JSON semantics

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.

JSON semantics

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:

scalar
All scalar types are supported.
scalarArray
Supported.
structure
Supported as long as each selected subfields has type scalar, scalarArray, or structure.
structureArray
supported
union
Not supported.
Could restricted union be supported?
unionArray
Not supported.

JSON examples

simple examples

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> 

structured data examples

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 and pvRequest

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> 

miscellaneous issues

The following are some items from the Sept 2018 FTF meeting that were not discussed.

monitor event mask

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

alarm acknowledgement

Is this a problem for ca and for qsrv?
Is it handled by a client issuing gets and puts to fields ACKS and ACKT?