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: Marty Kraimer <[email protected]>
To: [email protected]
Date: Mon, 2 Apr 2018 06:29:35 -0400
On 04/01/2018 03:28 PM, renato sanhueza wrote:
Thanks for the answers! I was checking more details about the pvRequest field in http://epics-pvdata.sourceforge.net/informative/pvRequest.html and I have two more questions about monitors:

1. Does EPICS support some kind of metadata for building a generic monitor? For example, I want to create a client that is able to monitor any component of the system. The only information that this generic client has are the channel names of the components while the pvRequest object is left null so the entire top level structure of the PVRecord is sent back to the client. Finally the generic client, using metadata or another mechanism like reflection, might be able to understand the message and act accordingly (e.g. if the monitored component was a thermometer then the client can update a certain item in the GUI).

For most PVRecords a field named value provides the most important data.

pvData (both pvDataCPP and pvDataJava) define the following special fields:
enum, alarm, timeStamp, display, control, and alarmLimit.

enum is just a special type of value field.

The other special fields can be considered metadata, i.e. they provide additional information about the value field.
A particular PVRecord can optionally support an arbitrary subset for the special fields.
Most will support timeStamp and alarm.

If you create a request like:
PVStructure pvRequest(CreateRequest::createRequest("value,alarm,timeStamp,display,control,valueAlarm"));

Then you are asking for  the value data and all supported "metadata".

Note that normative types support the special fields.

I encourage You to read
http://epics-pvdata.sourceforge.net/informative/developerGuide/developerGuide.html
Especially
http://epics-pvdata.sourceforge.net/informative/developerGuide/developerGuide.html#special_fields



 
2. What are the advantages and disadvantages of using smart records (pvDatabase) instead of pvAcccess servers? How should I choose between them?

From
http://epics-pvdata.sourceforge.net/informative/developerGuide/developerGuide.html#overview:_pvdatabase
It says:
A framework for implementing a network accessible database of smart memory resident records. Network access is via pvAccess. The data in each record is a top level PVStructure as defined by pvData. A complete implementation of ChannelProvider is provided for accessing the records. The framework can be extended in order to create record instances that implement services. The minimum that an extension must provide is a top level PVStructure, a record name, and a process method.

The important words are that it provides a compete implementation of ChannelProvider.
This is not easy to do correctly.

Mark Rivers referenced components of areaDetector that use both PVRecord and also client code.

I also encourage You to download and look at
https://github.com/epics-base/exampleCPP

It has many examples of both client and server code.
Look first at exampleCPP/database for server code that implements PVRecords.
Look first at exampleCPP/exampleClient for client code examples.

The other examples provide both client and server examples.

Hope this helps.

Marty Kramer




I greatly appreciate your help
Best regards,
Renato

On Sun, Apr 1, 2018 at 1:41 PM, Johnson, Andrew N. <[email protected]> wrote:
I should have also added that almost anything you can do in C++ you should also be able to do using pvaPy, which is implemented as a layer on top of the C++ code. If there are features missing from the Python API that you need it should be relatively straightforward to add them. Python does make it easy to create servers and client applications including ones using pyQt.

- Andrew

--
Sent from my iPad

> On Apr 1, 2018, at 3:20 PM, Mark Rivers <[email protected]> wrote:
>
> The EPICS areaDetector project has examples of:
>
> pvAccess server,  NDPluginPva, written in C++. It is in the ADCore repository.
>
> pvAccess client, pvaDriver, written in C++. It is in the pvaDriver repository.
>
> pvAccess client, NTNDArray_Viewer, written in Java. It is in the ADViewers repository.
>
> EPICS_NTNDA_Viewer and pvaDriver both work fine with NDPluginPva.
>
> https://github.com/areaDetector.
>
> Mark
>
>
> Sent from my iPhone
>
>> On Apr 1, 2018, at 5:44 AM, Johnson, Andrew N. <[email protected]> wrote:
>>
>> Hi Renato,
>>
>> Monitors for pvAccess were based on the ideas originally developed for Channel Access, although there has been a little parallel evolution that has yet to be recombined.
>>
>> 1. A pvAccess channel name is the name of a top-level object, meaning that its value is usually going to be a structure with at least some and possibly many sub-fields. One function of the pvRequest object is to provide information about which subset of that top-level object you want to monitor. There are other uses for it, and if you are writing your own server code you can use it to pass additional information from the client at connection time. IIRC there is some documentation about it associated with the pvget command-line program.
>>
>> 2. The two language implementations (C++ and Java) are supposed to be able to interoperate perfectly, so if you come across parts that don’t we want to know about them. There could be some features of individual servers that are only available on one side though, for example there is no Java equivalent of the IOC database.
>>
>> HTH,
>>
>> - Andrew
>>
>> --
>> Sent from my iPad
>>
>>> On Apr 1, 2018, at 5:51 AM, renato sanhueza <[email protected].cl> wrote:
>>>
>>> Hi EPICS community, I am trying to understand how the monitors of pvAccess work. I have a few quick questions, hopefully someone can help me :)
>>>
>>> 1) What information does the monitor need about the monitored component to create the connection between them? I noticed in an example provided in Github that the monitor use a channelName (I assume that it is for the UDP broadcast name resolution mechanism) and a pvRequest string (which I don't understand)
>>>
>>> 2) Can a C++/Java/Python component monitor another one regardless its implementation language?
>>>
>>>
>>> Best regards,
>>> Renato
>>> --
>>> Renato Sanhueza Ulsen
>>> Ing Civil Informática.



--
Renato Sanhueza Ulsen
Ing Civil Informática.



Replies:
Re: question about pvAccess monitor renato sanhueza
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

Navigate by Date:
Prev: Re: question about pvAccess monitor renato sanhueza
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 renato sanhueza
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 ·