epics-base / pvaClientCPP

pvaClientCPP is an EPICS V4 C++ module
http://epics-pvdata.sourceforge.net/index.html
Other
2 stars 8 forks source link

pvaClientCPP doesn't do RPC #26

Closed dhickin closed 8 years ago

dhickin commented 8 years ago

Use case: We want to be able to create a channel and create both a channel monitor and channel RPC to that channel. This can't be doesn't through pvaClient currently as it doesn't support RPC. Would need to be able to specify pvRequest in the RPC.

Alternatives are 1) using low-level API 2) Use combination of rcpClient and pvaClient (but need to create multiple channels)

Java is the priority language for the feature for us, but having matching C++ API would be a plus.

mrkraimer commented 8 years ago

I think that this is already supported. Make sure you have the latest pvaClientCPP, pvaDatabaseCPP, and exampleCPP. Then do the following

In one window

mrk> pwd /home/epicsv4/master/exampleCPP/pvDatabaseRPC/iocBoot/exampleRPC mrk> ../../bin/linux-x86_64/exampleRPC st.cmd

In another window pvget -m -r "field()" mydevice

In another window mrk> pwd /home/epicsv4/master/exampleCPP/pvDatabaseRPC mrk> bin/linux-x86_64/move 1 2 10 20

You should see the monitors update

dhickin commented 8 years ago

I know I can do this Marty - I wrote the pvDatabaseRPC example.

However the client uses rpcClient not pvaClient (and pvget doesn't use pvaClient).

There is no way, as far as I can tell looking at pvaClient, to create a single pvaClient channel and then use pvaClient to create a channel RPC as well as channel Get/Put/Monitor.

mrkraimer commented 8 years ago

OK now I understand. I will look at how to implement this in pvaClient both for C++ and for Java.

dhickin commented 8 years ago

Thanks, Marty.

mrkraimer commented 8 years ago

Done