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: question about pvAccess monitor
From: Mark Rivers <[email protected]>
To: "Kasemir, Kay" <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Mon, 2 Apr 2018 19:42:49 +0000
The areaDetector pvAccess viewer

https://github.com/areaDetector/ADViewers/blob/master/ImageJ/EPICS_areaDetector/EPICS_NTNDA_Viewer.java

puts a monitor on the PV structure using the generic "field()" request. It then does introspection to find the fields it is interested in.  It is not completely generic since it is expecting an NTNDArray structure, but you can get idea of how to do the introspection.

Mark


Sent from my iPhone

On Apr 2, 2018, at 1:21 PM, Kasemir, Kay <[email protected]<mailto:[email protected]>> wrote:

Hi:

Steve wrote:
Knowing only the name of the variable, the client can request the structure. For example, using the command-line pvget utility . . .
$ pvget BL6:Det:Metadata
BL6:Det:Metadata
structure
 time_t timeStamp 2018-04-02T13:32:08.794 19815342
 epics:nt/NTScalar:1.0 proton_charge
    double value 0
  epics:nt/NTScalarArray:1.0 time_of_flight
      uint[] value []
  epics:nt/NTScalarArray:1.0 pixel
      uint[] value []
. . . tells me that the variable BL6:Det:Metadata has a structure consisting of a timeStamp, a NTScalar value for proton_charge, and NTScalarArrays for time_of_flight and pixel.

pvget dumps the structure and shows the values.
If the structure contains arrays with many elements, it might be a bit much to dump on the console.

With "pvinfo" you get just the structure layout, sans values:

$ pvinfo  BL6:Det:Metadata
CHANNEL  : BL6:Det:Metadata
STATE    : CONNECTED
ADDRESS  : ...
structure
   time_t timeStamp
       long secondsPastEpoch
       int nanoseconds
       int userTag
   epics:nt/NTScalar:1.0 proton_charge
       double value
   epics:nt/NTScalarArray:1.0 time_of_flight
       uint[] value
   epics:nt/NTScalarArray:1.0 pixel
       uint[] value


So pvinfo would allow you to inspect the structure, and then you use pvget to fetch the pieces of interest.
As Steve mentioned, to make sense  of the structure you might need additional info.
For instance, you see that "pixel" is an array of uint. But what does that mean?

-Kay

References:
question about pvAccess monitor renato sanhueza
Re: question about pvAccess monitor Johnson, Andrew N.
Re: question about pvAccess monitor Mark Rivers
Re: question about pvAccess monitor Johnson, Andrew N.
Re: question about pvAccess monitor renato sanhueza
Re: question about pvAccess monitor Marty Kraimer
Re: question about pvAccess monitor renato sanhueza
Re: question about pvAccess monitor Hartman, Steven M.
Re: question about pvAccess monitor Kasemir, Kay

Navigate by Date:
Prev: Re: question about pvAccess monitor Kasemir, Kay
Next: Re: question about pvAccess monitor renato sanhueza
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: question about pvAccess monitor Kasemir, Kay
Next: Re: question about pvAccess monitor renato sanhueza
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, 02 Apr 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·