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  2018  2019  2020  2021  <20222023  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  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: [EXTERNAL] PVXS and Phoebus
From: Florian Feldbauer via Tech-talk <tech-talk at aps.anl.gov>
To: "Kasemir, Kay" <kasemirk at ornl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 11 Oct 2022 09:29:31 +0200

Hey Kay,


thanks for the reply.

Actually I was aware, that bi/bo records serve a enum with ZNAM and ONAM as choices.
But seeing that PVXS also offers boolean datatypes it somehow felt more appropriate for my program.


I just wanted to make sure if I did some mistake in my code or if boolean is not (yet) supported in Phoebus ;-)


Cheers,
Florian




On 10/10/22 16:57, Kasemir, Kay wrote:
"Boolean" PVs like those created by bi, bo records don't serve "boolean" data as one might expect.
They instead serve enumerated data like this:

epics:nt/NTEnum:1.0
    enum_t value (0) OK
        int index 0
        string[] choices [OK, Error]

Phoebus as a generic operator interface/client decodes the types provided by the IOC.
It's not prepared to handle any arbitrary data that custom clients might generate.

Having said that, I think it's a good idea to be more lenient and also support "boolean" data, even if no IOC at this time will generate it, so  I've added that to the list: https://github.com/ControlSystemStudio/phoebus/issues/2410

-Kay



From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Florian Feldbauer via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, October 5, 2022 10:40 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] PVXS and Phoebus
 
Hey all,

I have written a small program using the PVXS library. Trying to access
the PVs with Phoebus release 4.7.0 I encountered an issues:

I'm using a boolean button widget in Phoebus to access a NTScalar with
boolean type and get the message "Cannot decode ..."

In the shell I get the message:

2022-10-05 16:24:10 WARNING [org.phoebus.pv] Cannot decode
'PND:LMD:RUNCTRL:SHUTDOWN' [CID 2, SID 117768961 CONNECTED] =
epics:nt/NTScalar:1.0
     boolean value false
     alarm_t alarm [NO_ALARM]
         int severity 0
         int status 0
         string message
     time_t timeStamp [2022-10-05 16:23:26.000318114]
         long secondsPastEpoch 1664979806
         int nanoseconds 318114
         int userTag 0
java.lang.Exception: Expected struct with scalar 'value', got
epics:nt/NTScalar:1.0
     boolean value false
     alarm_t alarm [NO_ALARM]
         int severity 0
         int status 0
         string message
     time_t timeStamp [2022-10-05 16:23:26.000318114]
         long secondsPastEpoch 1664979806
         int nanoseconds 318114
         int userTag 0
     at
org.phoebus.pv.pva.PVAStructureHelper.decodeScalar(PVAStructureHelper.java:148)
     at
org.phoebus.pv.pva.PVAStructureHelper.getVType(PVAStructureHelper.java:99)
     at org.phoebus.pv.pva.PVA_PV.handleMonitor(PVA_PV.java:88)
     at
org.epics.pva.client.MonitorRequest.decodeValueUpdate(MonitorRequest.java:236)
     at
org.epics.pva.client.MonitorRequest.handleResponse(MonitorRequest.java:198)
     at
org.epics.pva.client.MonitorHandler.handleCommand(MonitorHandler.java:40)
     at
org.epics.pva.client.MonitorHandler.handleCommand(MonitorHandler.java:21)
     at
org.epics.pva.common.CommandHandlers.handleCommand(CommandHandlers.java:66)
     at
org.epics.pva.client.ClientTCPHandler.handleApplicationMessage(ClientTCPHandler.java:331)
     at org.epics.pva.common.TCPHandler.handleMessage(TCPHandler.java:394)
     at org.epics.pva.common.TCPHandler.receiver(TCPHandler.java:294)
     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
     at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
     at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
     at java.base/java.lang.Thread.run(Thread.java:833)

Is the boolean type not implemented in Phoebus? In that case I would
switch to an int value.


Cheers,
Florian


--
Ruhr-Universität Bochum
AG der Experimentalphysik I
Dr. Florian Feldbauer
NB 2/131 / Fach 125
Universitätsstr. 150
D-44801 Bochum

Office: NB 2/134
Phone:  (+49)234 / 32-23563
Fax:    (+49)234 / 32-14170
https://paluma.ruhr-uni-bochum.de

-- 
Ruhr-Universität Bochum
AG der Experimentalphysik I
Dr. Florian Feldbauer
NB 2/131 / Fach 125
Universitätsstr. 150
D-44801 Bochum

Office: NB 2/134
Phone:  (+49)234 / 32-23563
Fax:    (+49)234 / 32-14170
https://paluma.ruhr-uni-bochum.de

References:
PVXS and Phoebus Florian Feldbauer via Tech-talk
Re: [EXTERNAL] PVXS and Phoebus Kasemir, Kay via Tech-talk

Navigate by Date:
Prev: Re: modbus-tcp Simon Rose via Tech-talk
Next: build EPICS IOC on CRIO Remi Faure via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: Re: [EXTERNAL] PVXS and Phoebus Kasemir, Kay via Tech-talk
Next: EPICS 7 side-by-side with EPICS 3/4 Gregory, Ray via Tech-talk
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  <20222023  2024 
ANJ, 11 Oct 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·