Experimental Physics and Industrial Control System
Hi,
TL;DR: When DBE_PROPERTY event is posted in a PCAS application for an Enum typed PV, the client will be noticed but with the stale state strings.
As the title said, I have create an enum typed PV “MTEST:ENUM", initially with two states [ZERO, ONE], in a PCAS(py) application.
Then this is how I expand it to 3 states and send the DBE_PROPERTY event.
// pseudo code, only to show the sequence
dd = app_table.getDD(gddAppType_dbr_ctrl_enum)
dd[gddAppTypeIndex_dbr_ctrl_enum_value].put(0)
dd[gddAppTypeIndex_dbr_ctrl_enum_enums].put([‘ZERO’,’ONE’,’TWO'])
myPV.postEvent(DBE_PROPERTY, dd)
One the client, I put a monitor with type DBR_GR_ENUM and mask DBE_PROPERTY, and print the states string in the callback.
# a.py
def valueCB(epicsArgs, userArgs):
print(epicsArgs['pv_statestrings’])
chan1 = CaChannel('MTEST:ENUM')
chan1.searchw()
chan1.add_masked_array_event(ca.DBR_GR_ENUM, None, ca.DBE_PROPERTY, valueCB)
chan1.flush_io()
while True:
time.sleep(2)
The result is that the callback is called for the property change event, but the state string remains the same.
$ python a.py
('ZERO', 'ONE')
('ZERO', 'ONE’)
If I then run “caget -d DBR_GR_ENUM MTEST:ENUM”, it does print the changed state strings.
However if I load such a mbbo record into IOC,
record(mbbo, "MTEST:ENUM")
{
field (ZRST, "ZERO")
field (ONST, "ONE")
}
and change the state string with "dbpf MTEST:ENUM.TWST TWO”, the client will receive the event with the changed state strings.
$ python a.py
('ZERO', 'ONE')
('ZERO', 'ONE', 'TWO’)
I have doubted the PCASpy implementation. So I tested the above mbbo record through the ca-gateway(2.1.0), the result is consistent with the PCASpy application. It receives the event but with the stale state strings.
The test is with Base 3.14.12.5.
Best
Xiaoqiang
- Replies:
- Re: DBE_PROPERTY event of Enum type in PCAS Ralph Lange
- Navigate by Date:
- Prev:
EPICS Archiver Appliance [email protected]
- Next:
Building EPICS for RTEMS TMS570LS3137 HDK Florian Feldbauer
- 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
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS Archiver Appliance Konrad, Martin
- Next:
Re: DBE_PROPERTY event of Enum type in PCAS Ralph Lange
- 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
2018
2019
2020
2021
2022
2023
2024