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

Subject: Re: Multiple NDPluginPva issues
From: Bruno Martins <[email protected]>
To: "Pearson, Matthew R." <[email protected]>
Cc: "[email protected] list" <[email protected]>
Date: Tue, 8 Nov 2016 14:59:31 -0500
I couldn't find it in the docs either, but it seems likely that that's the case.

One solution is to have startPVAServer as a standalone function to be called after all instantiations of NDPluginPva, maybe using [1].

Another one, that I like more, is to have a static member variable in the NDPluginPva class that records if startPVAServer was already called. That works for multiple NDPluginPva instances but most likely won't work if other code not pertaining to the PVA Plugin also wants to start a server.

[1] https://github.com/epics-base/pvAccessCPP/blob/master/src/ioc/PVAServerRegister.cpp


Bruno

On Tue, Nov 8, 2016 at 12:18 PM, Pearson, Matthew R. <[email protected]> wrote:
Hi,

I’ve just tried and I get the same results.

I suspect it’s because this is being called more than once, for every instance, in the plugin constructor:

m_server = startPVAServer(PVACCESS_ALL_PROVIDERS, 0, true, true);

The V4 developers could confirm this, but I seem to recall this should only be called once per process. Although, I can't find reference to that in the V4 documentation.

Cheers,
Matt


Data Acquisition and Control Engineer
Spallation Neutron Source
Oak Ridge National Lab





> On Nov 8, 2016, at 10:38 AM, Alexander Söderqvist <alexander.soderqvist@cosylab.com> wrote:
>
> Hi all,
>
> I am at ESS running an IOC with 2 pva plugins both connected to the simDetector:
>
> # Create a simDetector driver
> # simDetectorConfig(const char *portName, int maxSizeX, int maxSizeY, int dataType,
> #                   int maxBuffers, int maxMemory, int priority, int stackSize)
> simDetectorConfig("DMSCSIMDET", 500, 500, 1, 0, 0)
> dbLoadRecords("simDetector.template", "P=DMSC:, R=CAM-, PORT=DMSCSIMDET, ADDR=0, TIMEOUT=1")
> #create pva plugin
> NDPvaConfigure(DMSCPVA, 20, 0, "DMSCSIMDET", 0, "DMSC:IMAGE", 0)
> VERSION : pvAccess Server v4.1.2
> PROVIDER_NAMES : local
> BEACON_ADDR_LIST :
> AUTO_BEACON_ADDR_LIST : 1
> BEACON_PERIOD : 15
> BROADCAST_PORT : 5076
> SERVER_PORT : 5075
> RCV_BUFFER_SIZE : 16384
> IGNORE_ADDR_LIST:
> STATE : INITIALIZED
> dbLoadRecords("NDPva.template", "P=DMSC:, R=PVA-, PORT=DMSCPVA, ADDR=0, TIMEOUT=1, NDARRAY_PORT=DMSCSIMDET")
> #create pva plugin
> NDPvaConfigure(DMSCPVA2, 20, 0, "DMSCSIMDET", 0, "DMSC:IMAGE2", 0)
> 2016-11-08T16:33:54.789 Using dynamically assigned TCP port 52363.
> VERSION : pvAccess Server v4.1.2
> PROVIDER_NAMES : local
> BEACON_ADDR_LIST :
> AUTO_BEACON_ADDR_LIST : 1
> BEACON_PERIOD : 15
> BROADCAST_PORT : 5076
> SERVER_PORT : 52363
> RCV_BUFFER_SIZE : 16384
> IGNORE_ADDR_LIST:
> STATE : INITIALIZED
> dbLoadRecords("NDPva.template", "P=DMSC:, R=PVA2-, PORT=DMSCPVA2, ADDR=0, TIMEOUT=1, NDARRAY_PORT=DMSCSIMDET")
>
> As you can see it start 2 pvAccess servers.
>
> Monitoring one array sees multiple instance of the pv:
> pvget -m DMSC:IMAGE2
> [ChannelRequesterImpl] message(More than one channel with name 'DMSC:IMAGE2' detected, connected to: 194.47.240.7:52834, ignored: 194.47.240.7:5075, warning)
> DMSC:IMAGE2
> structure
>     union value
>         (none)
>
> Listing the servers shows the 2 pvAccess servers (Which yo):
> pvlist
> GUID 0x7EE8215800000000799BA728, version 1: tcp@[x.x.x.x:5075]
> GUID 0x7EE82158000000008AD62829, version 1: tcp@[x.x.x.x:52834]
>
> Listing pvs on each server shows that both are publishing the same PVs.
> pvlist 0x7EE8215800000000799BA728
> DMSC:IMAGE
> DMSC:IMAGE2
>
> pvlist 0x7EE82158000000008AD62829
> DMSC:IMAGE
> DMSC:IMAGE2
>
> Has anyone tried running 2 NDPluginPvas in the same IOC before? Are you supposed to start multiple pvAccess servers in the same IOC?
>
> Note that we are using our own build system, and it might be an issue there.
>
> Regards,
> Alexander Söderqvist




References:
Multiple NDPluginPva issues Alexander Söderqvist
Re: Multiple NDPluginPva issues Pearson, Matthew R.

Navigate by Date:
Prev: Re: Error to doing ./st.cmd Andrew Johnson
Next: Re: Multiple NDPluginPva issues Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Multiple NDPluginPva issues Pearson, Matthew R.
Next: Re: Multiple NDPluginPva issues Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 08 Nov 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·