![]() |
This is Unofficial EPICS BASE Doxygen Site
|
An easy to use alternative to directly calling the Channel methods of pvAccess. More...
#include "pvaClient.h"
Inheritance diagram for epics::pvaClient::PvaClientChannel:
Collaboration diagram for epics::pvaClient::PvaClientChannel:Public Member Functions | |
| POINTER_DEFINITIONS (PvaClientChannel) | |
| ~PvaClientChannel () | |
| Destructor. More... | |
| void | setStateChangeRequester (PvaClientChannelStateChangeRequesterPtr const &stateChangeRequester) |
| Set a client stateChangeRequester. More... | |
| std::string | getChannelName () |
| Get the name of the channel to which PvaClientChannel is connected. More... | |
| epics::pvAccess::Channel::shared_pointer | getChannel () |
| Get the the channel to which PvaClientChannel is connected. More... | |
| void | connect (double timeout=5.0) |
| Connect to the channel. More... | |
| void | issueConnect () |
| Issue a connect request and return immediately. More... | |
| epics::pvData::Status | waitConnect (double timeout=5.0) |
| Wait until the connection completes or for timeout. More... | |
| PvaClientFieldPtr | createField (std::string const &subField="") |
| Create a PvaClientField for the specified subField. More... | |
| PvaClientProcessPtr | createProcess (std::string const &request="") |
| First call createRequest as implemented by pvDataCPP and then call the next method. More... | |
| PvaClientProcessPtr | createProcess (epics::pvData::PVStructurePtr const &pvRequest) |
| PvaClientGetPtr | get (std::string const &request="field(value,alarm,timeStamp)") |
| create a PvaChannelGet More... | |
| PvaClientGetPtr | createGet (std::string const &request="field(value,alarm,timeStamp)") |
| create a PvaClientGet. More... | |
| PvaClientGetPtr | createGet (epics::pvData::PVStructurePtr const &pvRequest) |
| Creates an PvaClientGet. More... | |
| double | getDouble (std::string const &request="field(value)") |
| Get the value as a double. More... | |
| 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. More... | |
| epics::pvData::shared_vector< const std::string > | getStringArray (std::string const &request="field(value)") |
| Get the value as a string array. More... | |
| PvaClientPutPtr | put (std::string const &request="field(value)") |
| create a PvaClientPut. More... | |
| PvaClientPutPtr | createPut (std::string const &request="field(value)") |
| create a PvaClientPut. More... | |
| PvaClientPutPtr | createPut (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientPut. More... | |
| void | putDouble (double value, std::string const &request="field(value)") |
| Put the value as a double. More... | |
| void | putString (std::string const &value, std::string const &request="field(value)") |
| Put the value as a string. More... | |
| void | putDoubleArray (epics::pvData::shared_vector< const double > const &value, std::string const &request="field(value)") |
| Copy the array to the value field. More... | |
| void | putStringArray (epics::pvData::shared_vector< const std::string > const &value, std::string const &request="field(value)") |
| Copy array to the value field. More... | |
| void | putStringArray (std::vector< std::string > const &value, std::string const &request="field(value)") |
| Copy array to the value field. More... | |
| PvaClientPutGetPtr | createPutGet (std::string const &request="putField(argument)getField(result)") |
| create a PvaClientPutGet. More... | |
| PvaClientPutGetPtr | createPutGet (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientPutGet. More... | |
| PvaClientArrayPtr | createArray (std::string const &request="field(value)") |
| Create a PvaClientArray. More... | |
| PvaClientArrayPtr | createArray (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientArray. More... | |
| PvaClientMonitorPtr | monitor (std::string const &request="field(value,alarm,timeStamp)") |
| Create a PvaClientMonitor. More... | |
| PvaClientMonitorPtr | monitor (PvaClientMonitorRequesterPtr const &pvaClientMonitorRequester) |
| Call the next method with request = "field(value,alarm,timeStamp)". More... | |
| PvaClientMonitorPtr | monitor (std::string const &request, PvaClientMonitorRequesterPtr const &pvaClientMonitorRequester) |
| Create and connect to a new PvaClientMonitor. More... | |
| PvaClientMonitorPtr | createMonitor (std::string const &request="field(value,alarm,timeStamp)") |
| First call createRequest as implemented by pvDataJava and then call the next method. More... | |
| 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. More... | |
| epics::pvData::PVStructurePtr | rpc (epics::pvData::PVStructurePtr const &pvArgument) |
| Issue a channelRPC request. More... | |
| PvaClientRPCPtr | createRPC () |
| Create a PvaClientRPC. More... | |
| PvaClientRPCPtr | createRPC (epics::pvData::PVStructurePtr const &pvRequest) |
| Create a PvaClientRPC. More... | |
| void | showCache () |
| Show the list of cached gets and puts. More... | |
| size_t | cacheSize () |
| Get the number of cached gets and puts. More... | |
| 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) |
Public Member Functions inherited from epics::pvAccess::ChannelRequester | |
| POINTER_DEFINITIONS (ChannelRequester) | |
| ChannelRequester () | |
| virtual | ~ChannelRequester () |
| virtual void | channelCreated (const epics::pvData::Status &status, Channel::shared_pointer const &channel)=0 |
| virtual void | channelStateChange (Channel::shared_pointer const &channel, Channel::ConnectionState connectionState)=0 |
| virtual std::tr1::shared_ptr< const PeerInfo > | getPeerInfo () |
| Return information on connected peer if applicable. More... | |
Public Member Functions inherited from epics::pvAccess::Requester | |
| POINTER_DEFINITIONS (Requester) | |
| virtual | ~Requester () |
| virtual void | message (std::string const &message, MessageType messageType=errorMessage) |
Friends | |
| class | PvaClient |
Additional Inherited Members | |
Public Types inherited from epics::pvAccess::ChannelRequester | |
| typedef Channel | operation_type |
Static Public Attributes inherited from epics::pvAccess::ChannelRequester | |
| static size_t | num_instances |
An easy to use alternative to directly calling the Channel methods of pvAccess.
Definition at line 237 of file pvaClient.h.
| epics::pvaClient::PvaClientChannel::~PvaClientChannel | ( | ) |
Destructor.
Definition at line 151 of file pvaClientChannel.cpp.
| size_t epics::pvaClient::PvaClientChannel::cacheSize | ( | ) |
Get the number of cached gets and puts.
Definition at line 608 of file pvaClientChannel.cpp.
|
virtual |
Definition at line 161 of file pvaClientChannel.cpp.
|
virtual |
Definition at line 191 of file pvaClientChannel.cpp.
| 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 260 of file pvaClientChannel.cpp.
| PvaClientArrayPtr epics::pvaClient::PvaClientChannel::createArray | ( | std::string const & | request = "field(value)" | ) |
Create a PvaClientArray.
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. |
| PvaClientArrayPtr epics::pvaClient::PvaClientChannel::createArray | ( | epics::pvData::PVStructurePtr const & | pvRequest | ) |
Create a PvaClientArray.
| pvRequest | The syntax of pvRequest is defined by the copy facility of pvData. |
| runtime_error | if failure. |
Definition at line 510 of file pvaClientChannel.cpp.
| PvaClientFieldPtr epics::pvaClient::PvaClientChannel::createField | ( | std::string const & | subField = "" | ) |
Create a PvaClientField for the specified subField.
| subField | The desired subField, i. e. "field.field...." An empty string, i. e. "", asks for the entire top level struture as defined by the server. |
Definition at line 323 of file pvaClientChannel.cpp.
| 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. |
| 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. |
Definition at line 375 of file pvaClientChannel.cpp.
| 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. |
| 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. |
Definition at line 552 of file pvaClientChannel.cpp.
| 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. |
| 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. |
Definition at line 341 of file pvaClientChannel.cpp.
| 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. |
| 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. |
Definition at line 430 of file pvaClientChannel.cpp.
| 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. |
| 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. |
Definition at line 488 of file pvaClientChannel.cpp.
| PvaClientRPCPtr epics::pvaClient::PvaClientChannel::createRPC | ( | ) |
Create a PvaClientRPC.
| runtime_error | if failure. |
Definition at line 576 of file pvaClientChannel.cpp.
| 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. |
Definition at line 584 of file pvaClientChannel.cpp.
| 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 350 of file pvaClientChannel.cpp.
| Channel::shared_pointer epics::pvaClient::PvaClientChannel::getChannel | ( | ) |
Get the the channel to which PvaClientChannel is connected.
Definition at line 246 of file pvaClientChannel.cpp.
| string epics::pvaClient::PvaClientChannel::getChannelName | ( | ) |
Get the name of the channel to which PvaClientChannel is connected.
Definition at line 241 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 383 of file pvaClientChannel.cpp.
| 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 393 of file pvaClientChannel.cpp.
|
virtual |
The requester must have a name.
Implements epics::pvAccess::Requester.
Definition at line 225 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 388 of file pvaClientChannel.cpp.
| 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 398 of file pvaClientChannel.cpp.
| void epics::pvaClient::PvaClientChannel::issueConnect | ( | ) |
Issue a connect request and return immediately.
Definition at line 275 of file pvaClientChannel.cpp.
|
virtual |
Definition at line 232 of file pvaClientChannel.cpp.
| 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. |
| 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 525 of file pvaClientChannel.cpp.
| 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. |
| 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 404 of file pvaClientChannel.cpp.
| 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 438 of file pvaClientChannel.cpp.
| 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 452 of file pvaClientChannel.cpp.
| 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 445 of file pvaClientChannel.cpp.
| 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. |
| 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. |
Definition at line 560 of file pvaClientChannel.cpp.
| PVStructurePtr epics::pvaClient::PvaClientChannel::rpc | ( | epics::pvData::PVStructurePtr const & | pvArgument | ) |
Issue a channelRPC request.
| pvArgument | The argument for the request. |
| runtime_error | if failure. |
Definition at line 569 of file pvaClientChannel.cpp.
| void epics::pvaClient::PvaClientChannel::setStateChangeRequester | ( | PvaClientChannelStateChangeRequesterPtr const & | stateChangeRequester | ) |
Set a client stateChangeRequester.
| stateChangeRequester | The client stateChangeRequester implementation. |
Definition at line 251 of file pvaClientChannel.cpp.
| void epics::pvaClient::PvaClientChannel::showCache | ( | ) |
| 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 301 of file pvaClientChannel.cpp.
|
friend |
Definition at line 561 of file pvaClient.h.