pvaClientCPP
4.8.1-dev
|
pvaClient is a synchronous wrapper for the pvAccess API, which is a callback based API. More...
#include <pv/pvaClient.h>
Public Member Functions | |
POINTER_DEFINITIONS (PvaClient) | |
~PvaClient () | |
Destructor. More... | |
void | message (std::string const &message, epics::pvData::MessageType messageType) |
A new message. More... | |
PvaClientChannelPtr | channel (std::string const &channelName, std::string const &providerName="pva", double timeOut=5.0) |
Get a cached channel or create and connect to a new channel. More... | |
PvaClientChannelPtr | createChannel (std::string const &channelName, std::string const &providerName="pva") |
Create an PvaClientChannel with the specified provider. More... | |
void | setRequester (epics::pvData::RequesterPtr const &requester) |
Set a requester. More... | |
std::string | getRequesterName () |
Get the requester name. More... | |
void | clearRequester () |
Clear the requester. PvaClient will handle messages. More... | |
void | showCache () |
Show the list of cached channels. More... | |
size_t | cacheSize () |
Get the number of cached channels. More... | |
Static Public Member Functions | |
static PvaClientPtr | get (std::string const &providerNames="pva ca") |
Get the single instance of PvaClient. More... | |
static PvaClientPtr | create () EPICS_DEPRECATED |
Create an instance of PvaClient with providerName "pva ca". More... | |
static void | setDebug (bool value) |
Should debug info be shown? More... | |
static bool | getDebug () |
Is debug set? More... | |
pvaClient is a synchronous wrapper for the pvAccess API, which is a callback based API.
Definition at line 101 of file pvaClient.h.
epics::pvaClient::PvaClient::~PvaClient | ( | ) |
Destructor.
Definition at line 148 of file pvaClient.cpp.
size_t epics::pvaClient::PvaClient::cacheSize | ( | ) |
Get the number of cached channels.
Definition at line 228 of file pvaClient.cpp.
PvaClientChannelPtr epics::pvaClient::PvaClient::channel | ( | std::string const & | channelName, |
std::string const & | providerName = "pva" , |
||
double | timeOut = 5.0 |
||
) |
Get a cached channel or create and connect to a new channel.
channelName | The channelName. |
providerName | The providerName. |
timeOut | The number of seconds to wait for connection. 0.0 means forever. |
runtime_error | if connection fails. |
Definition at line 189 of file pvaClient.cpp.
void epics::pvaClient::PvaClient::clearRequester | ( | ) |
Clear the requester. PvaClient will handle messages.
Definition at line 213 of file pvaClient.cpp.
|
static |
Create an instance of PvaClient with providerName "pva ca".
Definition at line 113 of file pvaClient.cpp.
PvaClientChannelPtr epics::pvaClient::PvaClient::createChannel | ( | std::string const & | channelName, |
std::string const & | providerName = "pva" |
||
) |
Create an PvaClientChannel with the specified provider.
channelName | The channelName. |
providerName | The provider. |
Definition at line 203 of file pvaClient.cpp.
|
static |
Get the single instance of PvaClient.
providerNames | Space separated list of provider names. |
Definition at line 102 of file pvaClient.cpp.
|
static |
Is debug set?
Definition at line 97 of file pvaClient.cpp.
Referenced by epics::pvaClient::PvaClientData::checkValue(), epics::pvaClient::PvaClientData::getAlarm(), epics::pvaClient::PvaClientData::getArrayValue(), epics::pvaClient::PvaClientData::getDouble(), epics::pvaClient::PvaClientData::getDoubleArray(), epics::pvaClient::PvaClientData::getScalarArrayValue(), epics::pvaClient::PvaClientData::getScalarValue(), epics::pvaClient::PvaClientData::getSinglePVField(), epics::pvaClient::PvaClientData::getString(), epics::pvaClient::PvaClientData::getStringArray(), epics::pvaClient::PvaClientData::getTimeStamp(), epics::pvaClient::PvaClientData::getValue(), epics::pvaClient::PvaClientData::hasValue(), epics::pvaClient::PvaClientData::isValueScalar(), epics::pvaClient::PvaClientData::isValueScalarArray(), and epics::pvaClient::PvaClientData::setData().
string epics::pvaClient::PvaClient::getRequesterName | ( | ) |
Get the requester name.
If client calls setRequester then the client supplies the name. Otherwise the name is pvaClient.
Definition at line 167 of file pvaClient.cpp.
void epics::pvaClient::PvaClient::message | ( | std::string const & | message, |
epics::pvData::MessageType | messageType | ||
) |
A new message.
If a requester is set then it is called otherwise message is displayed on standard out.
message | The message. |
messageType | The type. |
Definition at line 177 of file pvaClient.cpp.
epics::pvaClient::PvaClient::POINTER_DEFINITIONS | ( | PvaClient | ) |
|
static |
Should debug info be shown?
value | true or false |
Definition at line 92 of file pvaClient.cpp.
void epics::pvaClient::PvaClient::setRequester | ( | epics::pvData::RequesterPtr const & | requester | ) |
Set a requester.
The default is for PvaClient to handle messages by printing to System.out.
requester | The requester. |
Definition at line 208 of file pvaClient.cpp.
void epics::pvaClient::PvaClient::showCache | ( | ) |
Show the list of cached channels.
Definition at line 218 of file pvaClient.cpp.