#24 EasyPVA does not appear to work for CA provider

No Milestone
closed
Marty Kraimer
None
2
2014-08-31
2014-02-24
Greg White
No

Use of the Channel Access Provider through easyPVA appears to be broken. That makes then
using easyPVA as a single API for both CA and PVA impossible until it's fixed, which
heavily impacts attractiveness of EPICS V4 for end user physicists and non-programmers.

To demonstrate via Matlab. Note that eget is used in the same process to successfully get a CA channel, to demonstrate the EPICS_CA setup seems to be right:

[greg@lcls-dev2 ~]$ export EPICS_CA_ADDR_LIST="<obfuscated>:5068 mcc-dmz <obfuscated>:5070"
[greg@lcls-dev2 ~]$ matlab -no desktop

                                                  < M A T L A B (R) >
                                        Copyright 1984-2012 The MathWorks, Inc.
                                          R2012a (7.14.0.739) 32-bit (glnx86)
                                                    February 9, 2012

To get started, type one of these: helpwin, helpdesk, or demo.
For product information, visit www.mathworks.com.

!eget ca:///LI18:QUAD:201:BDES
51.2918 <- demo channel exists and can be acquired by eget from the same process

now try to do it with easyPVA:

q201chan=easy.createChannel('LI18:QUAD:201:BDES','CA');
q201getter=q201chan.createGet();
Error using org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl/createGet
Java exception occurred:
java.lang.NullPointerException
at org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl.issueConnect(EasyPVAFactory.java:283)
at org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl.connect(EasyPVAFactory.java:268)
at org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl.checkConnected(EasyPVAFactory.java:196)
at org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl.createGet(EasyPVAFactory.java:353)
at org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl.createGet(EasyPVAFactory.java:348)
at org.epics.pvaccess.easyPVA.EasyPVAFactory$EasyChannelImpl.createGet(EasyPVAFactory.java:341)

You get the same negative result using "ca" as the name of the provider.

Also, shouldn't the provider ids be coded constants - not strings - so we don't get into the confusion and inefficiency of comparing strings?

Cheers
Greg

Discussion

  • "ca" provider is not installed by easyPVA by default (it never was).

    To install pvAccess provider (already done) the following line is needed:

    org.epics.pvaccess.ClientFactory.start();

    To instal CA provider:

    org.epics.caV3.ClientFactory.start();

    I can "install" CA provier by default too. Note that this will be done on the HEAD. To use it with the release version simply call the line above before using easyPVA.

    IDs are available using the following constants:

    org.epics.pvaccess.ClientFactory.PROVIDER_NAME
    org.epics.caV3.ClientFactory.PROVIDER_NAME

     
    Last edit: Matej Sekoranja 2014-02-24
  • Greg White
    Greg White
    2014-03-22

    Solution is to start the CA provider. Per Matej's note above, execute the line
    org.epics.caV3.ClientFactory.start()
    during initialization, and the use "org.epics.caV3.ClientFactory.PROVIDER_NAME" as the provider in createChannel operations. Eg in Matlab:

    import org.epics.pvaccess.easyPVA.*;
    easy = EasyPVAFactory.get();
    org.epics.caV3.ClientFactory.start();

    % Get the CA PV value by channel, getter, get method:
    q201bdes_c=easy.createChannel('LI18:QUAD:201:BDES',...
    org.epics.caV3.ClientFactory.PROVIDER_NAME);
    q201bdes_g=q201bdes_c.createGet();
    q201bdes_g.getDouble()

    ans =

    52.1775

     
  • Greg White
    Greg White
    2014-03-22

    • status: open --> closed
     
  • Greg White
    Greg White
    2014-03-22

    Closing. Solution in comments