|
pvaClientCPP 4.8.1
|
An easy to use alternative to directly calling the Channel methods of pvAccess. More...
#include <pv/pvaClient.h>
Public Member Functions | |
| POINTER_DEFINITIONS (PvaClientChannel) | |
| ~PvaClientChannel () | |
| Destructor. | |
| void | setStateChangeRequester (PvaClientChannelStateChangeRequesterPtr const &stateChangeRequester) |
| Set a client stateChangeRequester. | |
| std::string | getChannelName () |
| Get the name of the channel to which PvaClientChannel is connected. | |
| epics::pvAccess::Channel::shared_pointer | getChannel () |
| Get the the channel to which PvaClientChannel is connected. | |
| void | connect (double timeout=5.0) |
| Connect to the channel. | |
| void | issueConnect () |
| Issue a connect request and return immediately. | |
| epics::pvData::Status | waitConnect (double timeout=5.0) |
| Wait until the connection completes or for timeout. | |
| PvaClientProcessPtr | createProcess (std::string const &request="") |
| First call createRequest as implemented by pvDataCPP and then call the next method. | |
| PvaClientProcessPtr | createProcess (epics::pvData::PVStructurePtr const &pvRequest) |
| PvaClientGetPtr | get (std::string const &request="field(value,alarm,timeStamp)") |
| create a PvaChannelGet | |
| PvaClientGetPtr | createGet (std::string const &request="field(value,alarm,timeStamp)") |
| create a PvaClientGet. | |
| PvaClientGetPtr | createGet (epics::pvData::PVStructurePtr const &pvRequest) |
| Creates an PvaClientGet. | |
| double | getDouble (std::string const &request="field(value)") |
| Get the value as a double. | |
| std::string | getString (std::string const &request="field(value)") |
| epics::pvData::shared_vector< const double > | getDoubleArray (std::string const &request="field(value)") |
| Get the value as a double array. | |
| epics::pvData::shared_vector< const std::string > | getStringArray (std::string const &request="field(value)") |
| Get the value as a string array. | |
| PvaClientPutPtr | put (std::string const &request="field(value)") |
| create a PvaClientPut. | |
| PvaClientPutPtr | createPut (std::string const &request="field(value)") |
| create a PvaClientPut. | |
| PvaClientPutPtr | createPut (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientPut. | |
| void | putDouble (double value, std::string const &request="field(value)") |
| Put the value as a double. | |
| void | putString (std::string const &value, std::string const &request="field(value)") |
| Put the value as a string. | |
| void | putDoubleArray (epics::pvData::shared_vector< const double > const &value, std::string const &request="field(value)") |
| Copy the array to the value field. | |
| void | putStringArray (epics::pvData::shared_vector< const std::string > const &value, std::string const &request="field(value)") |
| Copy array to the value field. | |
| void | putStringArray (std::vector< std::string > const &value, std::string const &request="field(value)") |
| Copy array to the value field. | |
| PvaClientPutGetPtr | createPutGet (std::string const &request="putField(argument)getField(result)") |
| create a PvaClientPutGet. | |
| PvaClientPutGetPtr | createPutGet (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientPutGet. | |
| PvaClientMonitorPtr | monitor (std::string const &request="field(value,alarm,timeStamp)") |
| Create a PvaClientMonitor. | |
| PvaClientMonitorPtr | monitor (PvaClientMonitorRequesterPtr const &pvaClientMonitorRequester) |
| Call the next method with request = "field(value,alarm,timeStamp)". | |
| PvaClientMonitorPtr | monitor (std::string const &request, PvaClientMonitorRequesterPtr const &pvaClientMonitorRequester) |
| Create and connect to a new PvaClientMonitor. | |
| PvaClientMonitorPtr | createMonitor (std::string const &request="field(value,alarm,timeStamp)") |
| First call createRequest as implemented by pvDataJava and then call the next method. | |
| PvaClientMonitorPtr | createMonitor (epics::pvData::PVStructurePtr const &pvRequest) |
| epics::pvData::PVStructurePtr | rpc (epics::pvData::PVStructurePtr const &pvRequest, epics::pvData::PVStructurePtr const &pvArgument) |
| Issue a channelRPC request. | |
| epics::pvData::PVStructurePtr | rpc (epics::pvData::PVStructurePtr const &pvArgument) |
| Issue a channelRPC request. | |
| PvaClientRPCPtr | createRPC () |
| Create a PvaClientRPC. | |
| PvaClientRPCPtr | createRPC (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientRPC. | |
| void | showCache () |
| Show the list of cached gets and puts. | |
| size_t | cacheSize () |
| Get the number of cached gets and puts. | |
| virtual std::string | getRequesterName () |
| virtual void | message (std::string const &message, epics::pvData::MessageType messageType) |
| virtual void | channelCreated (const epics::pvData::Status &status, epics::pvAccess::Channel::shared_pointer const &channel) |
| virtual void | channelStateChange (epics::pvAccess::Channel::shared_pointer const &channel, epics::pvAccess::Channel::ConnectionState connectionState) |
Friends | |
| class | PvaClient |
An easy to use alternative to directly calling the Channel methods of pvAccess.
Definition at line 231 of file pvaClient.h.
| epics::pvaClient::PvaClientChannel::~PvaClientChannel | ( | ) |
Destructor.
Definition at line 151 of file pvaClientChannel.cpp.
References epics::pvaClient::PvaClient::getDebug(), and showCache().
| size_t epics::pvaClient::PvaClientChannel::cacheSize | ( | ) |
Get the number of cached gets and puts.
Definition at line 574 of file pvaClientChannel.cpp.
|
virtual |
Definition at line 161 of file pvaClientChannel.cpp.
References epics::pvaClient::PvaClient::getDebug(), and message().
|
virtual |
Definition at line 188 of file pvaClientChannel.cpp.
References epics::pvaClient::PvaClient::getDebug().
| void epics::pvaClient::PvaClientChannel::connect | ( | double | timeout = 5.0 | ) |
Connect to the channel.
This calls issueConnect and waitConnect.
| timeout | The time to wait for connecting to the channel. The defaut is 5 seconds. |
| runtime_error | if connection fails. |
Definition at line 254 of file pvaClientChannel.cpp.
References epics::pvaClient::PvaClient::getDebug(), issueConnect(), message(), and waitConnect().
Referenced by createRPC().
| PvaClientGetPtr epics::pvaClient::PvaClientChannel::createGet | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Creates an PvaClientGet.
| pvRequest | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
| PvaClientGetPtr epics::pvaClient::PvaClientChannel::createGet | ( | std::string const & | request = "field(value,alarm,timeStamp)" | ) |
create a PvaClientGet.
First call createRequest as implemented by pvData and then call the next method.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 350 of file pvaClientChannel.cpp.
References createGet(), and message().
Referenced by createGet(), and get().
| PvaClientMonitorPtr epics::pvaClient::PvaClientChannel::createMonitor | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Create an PvaClientMonitor.
| pvRequest | The syntax of pvRequest is defined by the copy facility of pvData. |
| runtime_error | if failure. |
| PvaClientMonitorPtr epics::pvaClient::PvaClientChannel::createMonitor | ( | std::string const & | request = "field(value,alarm,timeStamp)" | ) |
First call createRequest as implemented by pvDataJava and then call the next method.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 506 of file pvaClientChannel.cpp.
References createMonitor(), and message().
Referenced by createMonitor(), monitor(), and monitor().
| PvaClientProcessPtr epics::pvaClient::PvaClientChannel::createProcess | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Creates a PvaClientProcess.
| pvRequest | The syntax of pvRequest is defined by the copy facility of pvData. |
| runtime_error | if failure. |
| PvaClientProcessPtr epics::pvaClient::PvaClientChannel::createProcess | ( | std::string const & | request = "" | ) |
First call createRequest as implemented by pvDataCPP and then call the next method.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 316 of file pvaClientChannel.cpp.
References createProcess(), and message().
Referenced by createProcess().
| PvaClientPutPtr epics::pvaClient::PvaClientChannel::createPut | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Create a PvaClientPut.
| pvRequest | The syntax of pvRequest is defined by the copy facility of pvData. |
| PvaClientPutPtr epics::pvaClient::PvaClientChannel::createPut | ( | std::string const & | request = "field(value)" | ) |
create a PvaClientPut.
First call createRequest as implemented by pvDataJava and then call the next method.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 405 of file pvaClientChannel.cpp.
References createPut(), and message().
Referenced by createPut(), and put().
| PvaClientPutGetPtr epics::pvaClient::PvaClientChannel::createPutGet | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Create a PvaClientPutGet.
| pvRequest | The syntax of pvRequest is defined by the copy facility of pvData. |
| PvaClientPutGetPtr epics::pvaClient::PvaClientChannel::createPutGet | ( | std::string const & | request = "putField(argument)getField(result)" | ) |
create a PvaClientPutGet.
First call createRequest as implemented by pvDataJava and then calls the next method.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 463 of file pvaClientChannel.cpp.
References createPutGet(), and message().
Referenced by createPutGet().
| PvaClientRPCPtr epics::pvaClient::PvaClientChannel::createRPC | ( | ) |
Create a PvaClientRPC.
| runtime_error | if failure. |
Definition at line 542 of file pvaClientChannel.cpp.
References connect(), and epics::pvaClient::PvaClientRPC::create().
| PvaClientRPCPtr epics::pvaClient::PvaClientChannel::createRPC | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Create a PvaClientRPC.
| pvRequest | The pvRequest that must have the same interface as a pvArgument that is passed to an rpc request. |
| runtime_error | if failure. |
| PvaClientGetPtr epics::pvaClient::PvaClientChannel::get | ( | std::string const & | request = "field(value,alarm,timeStamp)" | ) |
create a PvaChannelGet
Get a cached PvaClientGet or create and connect to a new PvaClientGet.
| runtime_error | if failure. |
Definition at line 337 of file pvaClientChannel.cpp.
References createGet().
Referenced by getDouble(), getDoubleArray(), getString(), and getStringArray().
| Channel::shared_pointer epics::pvaClient::PvaClientChannel::getChannel | ( | ) |
Get the the channel to which PvaClientChannel is connected.
Definition at line 240 of file pvaClientChannel.cpp.
| string epics::pvaClient::PvaClientChannel::getChannelName | ( | ) |
Get the name of the channel to which PvaClientChannel is connected.
Definition at line 235 of file pvaClientChannel.cpp.
| double epics::pvaClient::PvaClientChannel::getDouble | ( | std::string const & | request = "field(value)" | ) |
Get the value as a double.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 370 of file pvaClientChannel.cpp.
References get().
| shared_vector< const double > epics::pvaClient::PvaClientChannel::getDoubleArray | ( | std::string const & | request = "field(value)" | ) |
Get the value as a double array.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 380 of file pvaClientChannel.cpp.
References get().
|
virtual |
Definition at line 219 of file pvaClientChannel.cpp.
| string epics::pvaClient::PvaClientChannel::getString | ( | std::string const & | request = "field(value)" | ) |
Get the value as a string.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 375 of file pvaClientChannel.cpp.
References get().
| shared_vector< const std::string > epics::pvaClient::PvaClientChannel::getStringArray | ( | std::string const & | request = "field(value)" | ) |
Get the value as a string array.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 385 of file pvaClientChannel.cpp.
References get().
| void epics::pvaClient::PvaClientChannel::issueConnect | ( | ) |
Issue a connect request and return immediately.
Definition at line 269 of file pvaClientChannel.cpp.
References epics::pvaClient::PvaClient::getDebug().
Referenced by connect().
|
virtual |
Definition at line 226 of file pvaClientChannel.cpp.
References message().
Referenced by channelCreated(), connect(), createGet(), createMonitor(), createProcess(), createPut(), createPutGet(), and message().
| PvaClientMonitorPtr epics::pvaClient::PvaClientChannel::monitor | ( | PvaClientMonitorRequesterPtr const & | pvaClientMonitorRequester | ) |
Call the next method with request = "field(value,alarm,timeStamp)".
| pvaClientMonitorRequester | The client callback. |
| runtime_error | if failure. |
Definition at line 491 of file pvaClientChannel.cpp.
References monitor().
| PvaClientMonitorPtr epics::pvaClient::PvaClientChannel::monitor | ( | std::string const & | request, |
| PvaClientMonitorRequesterPtr const & | pvaClientMonitorRequester ) |
Create and connect to a new PvaClientMonitor.
Then call it's start method. If connection can not be made an exception is thrown.
| request | The syntax of request is defined by the copy facility of pvData. |
| pvaClientMonitorRequester | The client callback. |
| runtime_error | if failure. |
Definition at line 496 of file pvaClientChannel.cpp.
References createMonitor().
| PvaClientMonitorPtr epics::pvaClient::PvaClientChannel::monitor | ( | std::string const & | request = "field(value,alarm,timeStamp)" | ) |
Create a PvaClientMonitor.
Create and connect to a new PvaClientMonitor. Then call it's start method. If connection can not be made an exception is thrown.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 483 of file pvaClientChannel.cpp.
References createMonitor().
Referenced by monitor().
| epics::pvaClient::PvaClientChannel::POINTER_DEFINITIONS | ( | PvaClientChannel | ) |
| PvaClientPutPtr epics::pvaClient::PvaClientChannel::put | ( | std::string const & | request = "field(value)" | ) |
create a PvaClientPut.
Get a cached PvaClientPut or create and connect to a new PvaClientPut. Then call it's get method.
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if connection fails |
Definition at line 391 of file pvaClientChannel.cpp.
References createPut().
Referenced by putDouble(), putDoubleArray(), and putString().
| void epics::pvaClient::PvaClientChannel::putDouble | ( | double | value, |
| std::string const & | request = "field(value)" ) |
Put the value as a double.
| value | The new value. |
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 425 of file pvaClientChannel.cpp.
References put().
| void epics::pvaClient::PvaClientChannel::putDoubleArray | ( | epics::pvData::shared_vector< const double > const & | value, |
| std::string const & | request = "field(value)" ) |
Copy the array to the value field.
| value | The new value. |
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 439 of file pvaClientChannel.cpp.
References put().
| void epics::pvaClient::PvaClientChannel::putString | ( | std::string const & | value, |
| std::string const & | request = "field(value)" ) |
Put the value as a string.
| value | The new value. |
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 432 of file pvaClientChannel.cpp.
References put().
| void epics::pvaClient::PvaClientChannel::putStringArray | ( | epics::pvData::shared_vector< const std::string > const & | value, |
| std::string const & | request = "field(value)" ) |
Copy array to the value field.
| value | The new value. |
| request | The syntax of request is defined by the copy facility of pvData. |
| runtime_error | if failure. |
| void epics::pvaClient::PvaClientChannel::putStringArray | ( | std::vector< std::string > const & | value, |
| std::string const & | request = "field(value)" ) |
Copy array to the value field.
| value | The data used to update the channel value. |
| request | The request as a string to pass to createRequest. |
| runtime_error | if failure. |
| epics::pvData::PVStructurePtr epics::pvaClient::PvaClientChannel::rpc | ( | epics::pvData::PVStructurePtr const & | pvArgument | ) |
Issue a channelRPC request.
| pvArgument | The argument for the request. |
| runtime_error | if failure. |
| epics::pvData::PVStructurePtr epics::pvaClient::PvaClientChannel::rpc | ( | epics::pvData::PVStructurePtr const & | pvRequest, |
| epics::pvData::PVStructurePtr const & | pvArgument ) |
Issue a channelRPC request.
| pvRequest | The pvRequest that is passed to createRPC. |
| pvArgument | The argument for a request. |
| runtime_error | if failure. |
| void epics::pvaClient::PvaClientChannel::setStateChangeRequester | ( | PvaClientChannelStateChangeRequesterPtr const & | stateChangeRequester | ) |
Set a client stateChangeRequester.
| stateChangeRequester | The client stateChangeRequester implementation. |
Definition at line 245 of file pvaClientChannel.cpp.
| void epics::pvaClient::PvaClientChannel::showCache | ( | ) |
Show the list of cached gets and puts.
Definition at line 558 of file pvaClientChannel.cpp.
Referenced by ~PvaClientChannel().
| Status epics::pvaClient::PvaClientChannel::waitConnect | ( | double | timeout = 5.0 | ) |
Wait until the connection completes or for timeout.
| timeout | The time in seconds to wait. A value of 0 means forever. |
Definition at line 295 of file pvaClientChannel.cpp.
References epics::pvaClient::PvaClient::getDebug().
Referenced by connect().
|
friend |
Definition at line 534 of file pvaClient.h.