EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: bitSets and PVStructure
From: Marty Kraimer <[email protected]>
To: [email protected]
Date: Tue, 14 Aug 2018 14:16:17 -0400
On 08/14/2018 12:12 PM, Heinz Junkes wrote:
I have a question about bitSets.

I use the example program from exampleCPP get.cpp
with the code fragment

         PvaClientGetDataPtr data = pvaClientGet->getData();
         BitSetPtr bitSet =  data->getChangedBitSet();

Cardinality is "1" although obviously nothing changes.
Bit #0 is set “structure”.

Now to my question. Is bitSet set by the server?

And then I don't understand that either (from the documentation).

"Only fields that change are transmitted.
Only the data for fields that change value between requests are sent.”

That was true for pvaSrv and is still true if you use provider ca (except for bug shown below).
qsrv changed the semantics.

I am using the latest from the master branch from github for everything.
In one window I start

mrk> pwd
/home/epicsv4/masterCPP/exampleCPP/database/iocBoot/exampleDatabase
mrk> ../../bin/linux-x86_64/exampleDatabase st.cmd

In another window I start:

pwd
/home/epicsv4/masterCPP/exampleCPP/exampleClient
mrk> bin/linux-x86_64/get -p pva -r "value" DBRdouble
provider pva channelName PVRdouble request value debug false
_____get starting__
Type exit to stop:
channelGetConnect DBRdouble status Status [type=OK]

channelGetDone DBRdouble status Status [type=OK]
changed DBRdouble
 = epics:nt/NTScalar:1.0
    double value 0
    alarm_t alarm
        int severity 3
        int status 2
        string message UDF
    time_t timeStamp
        long secondsPastEpoch 631152000
        int nanoseconds 0
        int userTag 0
    display_t display
        double limitLow -10
        double limitHigh 10
        string description
        string format
        string units volts
    control_t control
        double limitLow -9
        double limitHigh 9
        double minStep 0
    valueAlarm_t valueAlarm
        boolean active false
        double lowAlarmLimit -8
        double lowWarningLimit -6
        double highWarningLimit 6
        double highAlarmLimit 8
        int lowAlarmSeverity 0
        int lowWarningSeverity 0
        int highWarningSeverity 0
        int highAlarmSeverity 0
        double hysteresis 0

bitSet {0}
Type exit to stop:

channelGetDone DBRdouble status Status [type=OK]
changed DBRdouble
 = epics:nt/NTScalar:1.0
    double value 0
    alarm_t alarm
        int severity 3
        int status 2
        string message UDF
    time_t timeStamp
        long secondsPastEpoch 631152000
        int nanoseconds 0
        int userTag 0
    display_t display
        double limitLow -10
        double limitHigh 10
        string description
        string format
        string units volts
    control_t control
        double limitLow -9
        double limitHigh 9
        double minStep 0
    valueAlarm_t valueAlarm
        boolean active false
        double lowAlarmLimit -8
        double lowWarningLimit -6
        double highWarningLimit 6
        double highAlarmLimit 8
        int lowAlarmSeverity 0
        int lowWarningSeverity 0
        int highWarningSeverity 0
        int highAlarmSeverity 0
        double hysteresis 0

bitSet {0}
Type exit to stop:


But if I use ca I get

mrk> bin/linux-x86_64/get -p ca -r "value" DBRdouble
provider ca channelName PVRdouble request value debug false
_____get starting__
Type exit to stop:
channelGetConnect DBRdouble status Status [type=OK]
CA.Client.Exception...............................................
    Warning: "Identical process variable names on multiple servers"
    Context: "Channel: "DBRdouble", Connecting to: 10.0.0.127:5064, Ignored: localhost.localdomain:5064"
    Source File: ../cac.cpp line 1320
    Current Time: Tue Aug 14 2018 13:50:08.091716384
..................................................................

channelGetDone DBRdouble status Status [type=OK]
changed DBRdouble
 = structure
    double value 0

bitSet {0}
Type exit to stop:

channelGetDone DBRdouble status Status [type=OK]   FOLLOWING IS WRONG:  BUG IN LATEST ca provider
changed DBRdouble
value = 0
bitSet {1}
Type exit to stop:



If I use database from release4_6, which uses pvaSrv
mrk> pwd
/home/epicsv4/release4_6/exampleCPP/database/iocBoot/exampleDatabase
mrk> ../../bin/linux-x86_64/exampleDatabase st.cmd

Then I get:

mrk> pwd
/home/epicsv4/masterCPP/exampleCPP/exampleClient
mrk> bin/linux-x86_64/get -p pva -r "value" DBRdouble00
provider pva channelName PVRdouble request value debug false
_____get starting__
Type exit to stop:
channelGetConnect DBRdouble00 status Status [type=OK]

channelGetDone DBRdouble00 status Status [type=OK]
changed DBRdouble00
 = epics:nt/NTScalar:1.0
    double value 0

bitSet {0}
Type exit to stop:

channelGetDone DBRdouble00 status Status [type=OK]
Type exit to stop:
exit
mrk>

qsrv changed  the rules.
I maintain that qsrv should follow the old rules.

Marty Kraimer


in the pvaGet I only request “value”.

The PV I am looking at is a classic V3 PV (ca) and on my server runs pvAccess-Server (qsrv).

ioc:

dbpr CRYAFM:AWG0:DDSA:SetDDSFreq,4

ACKS: NO_ALARM      ACKT: YES           ADEL: 0             ALST: 123456
AOFF: 0             ASG:                ASLO: 0             ASP: 0x0
BKLNK: 00 00 00 00 00 00 00 00 00 00 00 00                  BKPT: 00
DESC: Frequency DDS DDSA:               DISA: 0             DISP: 0
DISS: NO_ALARM      DISV: 1             DOL:CONSTANT        DPVT: 0x19df880
DRVH: 0             DRVL: 0             DSET: 0x4fb724      DTYP: asynFloat64
EGU: Hz             EGUF: 0             EGUL: 0             EOFF: 0
ESLO: 1             EVNT:               FLNK:CONSTANT 0     HHSV: NO_ALARM
HIGH: 0             HIHI: 0             HOPR: 0             HSV: NO_ALARM
HYST: 0             INIT: 0             IVOA: Continue normally
IVOV: 0             LALM: 123456        LBRK: 0             LCNT: 0
LINR: NO CONVERSION LLSV: NO_ALARM      LOLO: 0             LOPR: 0
LOW: 0              LSET: 0x1942808     LSV: NO_ALARM       MDEL: 0
MLIS: 00 00 00 00 00 00 00 00 00 00 00 00                   MLOK: 01 94 e7 40
MLST: 123456        NAME: CRYAFM:AWG0:DDSA:SetDDSFreq       NSEV: NO_ALARM
NSTA: NO_ALARM      OIF: Full           OLDSIMM: NO         OMOD: 0
OMSL: supervisory   ORAW: 123456        ORBV: 0             OROC: 0
OUT:INST_IO @asyn(awg0, 0)DDS Frequency OVAL: 123456        PACT: 0
PBRK: 0x0           PHAS: 0             PINI: NO            PPN: 0x0
PPNR: 0x0           PREC: 3             PRIO: LOW           PROC: 0
PUTF: 0             PVAL: 123456        RBV: 0              RDES: 0xcdc5d0
ROFF: 0             RPRO: 0             RSET: 0x4fbac8      RVAL: 123456
SCAN: Passive       SDIS:CONSTANT       SDLY: -1            SEVR: NO_ALARM
SIML:CONSTANT       SIMM: NO            SIMPVT: 0x0         SIMS: NO_ALARM
SIOL:CONSTANT       SPVT: 0x0           SSCN: <nil>         STAT: NO_ALARM
TIME: 2018-08-14 08:51:37.697697041     TPRO: 0             TSE: 0
TSEL:CONSTANT       UDF: 0              UDFS: INVALID       VAL: 123456

humma-kavula:examples junkes$ cainfo CRYAFM:AWG0:DDSA:SetDDSFreq
CRYAFM:AWG0:DDSA:SetDDSFreq
     State:            connected
     Host:             cry-test.rz-berlin.mpg.de:5064
     Access:           read, write
     Native data type: DBF_DOUBLE
     Request type:     DBR_DOUBLE
     Element count:    1


humma-kavula:examples junkes$ pvinfo CRYAFM:AWG0:DDSA:SetDDSFreq
CHANNEL  : CRYAFM:AWG0:DDSA:SetDDSFreq
STATE    : CONNECTED
ADDRESS  : 141.14.128.53:5075
epics:nt/NTScalar:1.0
     double value
     alarm_t alarm
         int severity
         int status
         string message
     time_t timeStamp
         long secondsPastEpoch
         int nanoseconds
         int userTag
     display_t display
         double limitLow
         double limitHigh
         string description
         string format
         string units
     control_t control
         double limitLow
         double limitHigh
         double minStep
     valueAlarm_t valueAlarm
         boolean active
         double lowAlarmLimit
         double lowWarningLimit
         double highWarningLimit
         double highAlarmLimit
         int lowAlarmSeverity
         int lowWarningSeverity
         int highWarningSeverity
         int highAlarmSeverity
         double hysteresis


get, nothing is changing ???

code fragment:

    void get()
     {

         if(!channelConnected) {
             cout << channelName << " channel not connected\n";
             return;
         }
         if(!getConnected) {
             cout << channelName << " channelGet not connected\n";
             return;
         }
         pvaClientGet->get();
         PvaClientGetDataPtr data = pvaClientGet->getData();
         BitSetPtr bitSet =  data->getChangedBitSet();
cout << "bitset Cardinality : " << bitSet->cardinality() << endl;
         if(bitSet->cardinality()>0) {
              cout << "changed " << channelName << endl;
              data->showChanged(cout);
              cout << "bitSet " << *bitSet << endl;
         }
     }


output:

channelGetConnect CRYAFM:AWG0:DDSA:SetDDSFreq status Status [type=OK]
channelGetDone CRYAFM:AWG0:DDSA:SetDDSFreq status Status [type=OK]
bitset Cardinality : 1
changed CRYAFM:AWG0:DDSA:SetDDSFreq
  = epics:nt/NTScalar:1.0
     double value 123456
     alarm_t alarm
         int severity 0
         int status 0
         string message NO_ALARM
     time_t timeStamp
         long secondsPastEpoch 1534254697
         int nanoseconds 697697041
         int userTag 0
     display_t display
         double limitLow 0
         double limitHigh 0
         string description Frequency DDS DDSA:
         string format
         string units Hz
     control_t control
         double limitLow 0
         double limitHigh 0
         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
         double hysteresis 0

bitSet {0}


channelGetDone CRYAFM:AWG0:DDSA:SetDDSFreq status Status [type=OK]
bitset Cardinality : 1
changed CRYAFM:AWG0:DDSA:SetDDSFreq
  = epics:nt/NTScalar:1.0
     double value 123456
     alarm_t alarm
         int severity 0
         int status 0
         string message NO_ALARM
     time_t timeStamp
         long secondsPastEpoch 1534254697
         int nanoseconds 697697041
         int userTag 0
     display_t display
         double limitLow 0
         double limitHigh 0
         string description Frequency DDS DDSA:
         string format
         string units Hz
     control_t control
         double limitLow 0
         double limitHigh 0
         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
         double hysteresis 0

bitSet {0}




----------------------------------------------------------------------
Das FHI verarbeitet, speichert und loescht Daten im Rahmen seiner
Geschaeftstaetigkeit gemaess der Datenschutz-Grundverordnung (DSGVO)
[General Data Protection Regulation (GDPR)] der Europaeischen Union.



References:
bitSets and PVStructure Heinz Junkes

Navigate by Date:
Prev: Re: bitSets and PVStructure Michael Davidsaver
Next: Re: EDM X/Y Plot segfaults Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: bitSets and PVStructure Michael Davidsaver
Next: CS-Studio Archive engine data base connection error Vishnu Patel
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 16 Aug 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·