pvaClientCPP  4.8.1-dev
Public Member Functions | Static Public Member Functions | List of all members
epics::pvaClient::PvaClient Class Reference

pvaClient is a synchronous wrapper for the pvAccess API, which is a callback based API. More...

#include <pv/pvaClient.h>

Inheritance diagram for epics::pvaClient::PvaClient:

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...
 

Detailed Description

pvaClient is a synchronous wrapper for the pvAccess API, which is a callback based API.

Definition at line 101 of file pvaClient.h.

Constructor & Destructor Documentation

◆ ~PvaClient()

epics::pvaClient::PvaClient::~PvaClient ( )

Destructor.

Definition at line 148 of file pvaClient.cpp.

Member Function Documentation

◆ cacheSize()

size_t epics::pvaClient::PvaClient::cacheSize ( )

Get the number of cached channels.

Definition at line 228 of file pvaClient.cpp.

◆ channel()

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.

Parameters
channelNameThe channelName.
providerNameThe providerName.
timeOutThe number of seconds to wait for connection. 0.0 means forever.
Returns
The interface.
Exceptions
runtime_errorif connection fails.

Definition at line 189 of file pvaClient.cpp.

◆ clearRequester()

void epics::pvaClient::PvaClient::clearRequester ( )

Clear the requester. PvaClient will handle messages.

Definition at line 213 of file pvaClient.cpp.

◆ create()

PvaClientPtr epics::pvaClient::PvaClient::create ( )
static

Create an instance of PvaClient with providerName "pva ca".

Returns
shared pointer to the single instance
Deprecated:
This method will go away in future versions. Use get instead.

Definition at line 113 of file pvaClient.cpp.

◆ createChannel()

PvaClientChannelPtr epics::pvaClient::PvaClient::createChannel ( std::string const &  channelName,
std::string const &  providerName = "pva" 
)

Create an PvaClientChannel with the specified provider.

Parameters
channelNameThe channelName.
providerNameThe provider.
Returns
The interface.

Definition at line 203 of file pvaClient.cpp.

◆ get()

PvaClientPtr epics::pvaClient::PvaClient::get ( std::string const &  providerNames = "pva ca")
static

Get the single instance of PvaClient.

Parameters
providerNamesSpace separated list of provider names.
Returns
shared pointer to the single instance.

Definition at line 102 of file pvaClient.cpp.

◆ getDebug()

bool epics::pvaClient::PvaClient::getDebug ( )
static

◆ getRequesterName()

string epics::pvaClient::PvaClient::getRequesterName ( )

Get the requester name.

If client calls setRequester then the client supplies the name. Otherwise the name is pvaClient.

Returns
The name.

Definition at line 167 of file pvaClient.cpp.

◆ message()

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.

Parameters
messageThe message.
messageTypeThe type.

Definition at line 177 of file pvaClient.cpp.

◆ POINTER_DEFINITIONS()

epics::pvaClient::PvaClient::POINTER_DEFINITIONS ( PvaClient  )

◆ setDebug()

void epics::pvaClient::PvaClient::setDebug ( bool  value)
static

Should debug info be shown?

Parameters
valuetrue or false

Definition at line 92 of file pvaClient.cpp.

◆ setRequester()

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.

Parameters
requesterThe requester.

Definition at line 208 of file pvaClient.cpp.

◆ showCache()

void epics::pvaClient::PvaClient::showCache ( )

Show the list of cached channels.

Definition at line 218 of file pvaClient.cpp.


The documentation for this class was generated from the following files: