MessageType::errorMessage => errorMessage

This commit is contained in:
mrkraimer
2017-07-06 15:33:08 -04:00
parent ae49f8ad99
commit 8f6cc08f85
3 changed files with 95 additions and 33 deletions

View File

@@ -35,9 +35,6 @@
<h1>PvaClient</h1>
<p>
<b>Not Yet Written</b>
</p>
<h2>Overview</h2>
<p>
@@ -45,6 +42,81 @@ pvaClient is a synchronous wrapper for the pvAccess API, which is a callback bas
Thus it is easier to use than pvAccess itself.
In addition pvaClient provides many convenience methods.
</p>
<p>
Class <b>PvaClient</b> is a class that is used by all the other pvaClient classes.
An application that uses pvaClient must call:</p>
<pre>
PvaClientPtr pvaClient = PvaClient::get(providers);
</pre>
<p>
before it uses any other pvaClient classes.
</p>
<p>
This is a singleton method, i. e. only one instance of PvaClient is created.
</p>
<p>
<b>pvaClient</b> must not be deleted until the client no longer wants to use any part
of pvaClient.
</p>
<p>
<b>providers</b> is a blank separated set of provider names.
For example:</p>
<pre>
PvaClientPtr pvaClient = PvaClient::get("ca pva");
</pre>
<p>
The providers <b>ca</b> and <b>pva</b> are special.
For each of these a client context is created when the <b>PvaClient</b>
is constructed and the context destroyed when <b>PvaClient</b> is deleted.
</p>
<h2>Channel Caching</h2>
<p>
<b>PvaClient</b> has a method:
</p>
<pre>
PvaClientChannelPtr channel(
string const &amp; channelName,
string const &amp;providerName = "pva",
double timeOut = 5.0);
</pre>
<p>
This method creates a
<b>PvaClientChannel</b> and then connects to the channel.
</p>
<p>
If a call is successful then multiple calls to the same channelName and providerName
share the same PvaClientChannel, i. e. the PvaClientChannel is cached.
</p>
<p>
<b>pvaClientChannelGet</b> and <b>pvaClientChannelPut</b> also implement caching.
</p>
<p>
For example consider a client that makes multiple calls like:
</p>
<pre>
double value;
value = pva->channel(channelName)->get()->getData()->getDouble();
...
value = pva->channel(channelName)->get()->getData()->getDouble();
</pre>
<p>
Only the first call creates a new PvaClientChannel and a new PvaClientGet.
The second call reuses the cached PvaClientChannel and PvaClientGet.
</p>
<h2>Non Cached Channels</h2>
<p>
<b>PvaClient</b> has a method:
</p>
<pre>
PvaClientChannelPtr createChannel(
string const &amp; channelName,
string const &amp;providerName = "pva");
</pre>
<p>
This method is just creates a new PvaClientChannel and returns it to the caller.
The caller must call the PvaClientChannel connect methods.
</p>
</body>
</html>

View File

@@ -86,7 +86,7 @@ typedef std::tr1::shared_ptr<PvaClientChannelCache> PvaClientChannelCachePtr;
/**
* @brief pvaClient is a synchronous wrapper for the pvAccess API, which is a callback based API.
*
* <a href = "../htmldoxygen/pvaClient.html">pvaClient</a>
* <a href = "../htmldoxygen/pvaClient.html">Overview of PvaClient</a>
*/
class epicsShareClass PvaClient :
public epics::pvData::Requester,
@@ -104,14 +104,6 @@ public:
* @return shared pointer to the single instance.
*/
static PvaClientPtr get(std::string const & providerNames = "pva ca");
/** @brief Create an instance of PvaClient with providerName "pva ca".
* \deprecated This method will go away in future versions. Use get instead.
* @return shared pointer to the single instance
*/
static PvaClientPtr create() EPICS_DEPRECATED
{
return get();
}
/** @brief Get the requester name.
* @return The name.
*/
@@ -127,6 +119,7 @@ public:
std::string const & message,
epics::pvData::MessageType messageType);
/** @brief Get a cached channel or create and connect to a new channel.
*
* @param channelName The channelName.
* @param providerName The providerName.
* @param timeOut The number of seconds to wait for connection. 0.0 means forever.
@@ -138,6 +131,7 @@ public:
std::string const &providerName = "pva",
double timeOut = 5.0);
/** @brief Create an PvaClientChannel with the specified provider.
*
* @param channelName The channelName.
* @param providerName The provider.
* @return The interface.
@@ -162,20 +156,16 @@ public:
/** @brief Get the number of cached channels.
*/
size_t cacheSize();
/** Should debug info be shown?
/** @brief Should debug info be shown?
*
* @param value true or false
*/
static void setDebug(bool value) {debug = value;}
/** @brief Is debug set?
*
* @return true or false
*/
static bool getDebug() {return debug;}
/** @brief Deprecated method
* \deprecated This method will go away in future versions.
*/
void destroy() EPICS_DEPRECATED {}
private:
static bool debug;
PvaClient(std::string const & providerNames);
@@ -197,7 +187,7 @@ typedef std::tr1::shared_ptr<PvaClientPutCache> PvaClientPutCachePtr;
/**
* @brief A callback for change in connection status.
*
* <a href = "../htmldoxygen/pvaClientChannelStateChangeRequester.html">pvaClientChannelStateChangeRequester</a
* <a href = "../htmldoxygen/pvaClientChannelStateChangeRequester.html">Overview of PvaClientChannelStateChangeRequester</a
*
*/
class PvaClientChannelStateChangeRequester
@@ -219,7 +209,7 @@ public:
/**
* @brief An easy to use alternative to directly calling the Channel methods of pvAccess.
*
* <a href = "../htmldoxygen/pvaClientChannel.html">pvaClientChannel</a>
* <a href = "../htmldoxygen/pvaClientChannel.html">Overview of PvaClientChannel</a>
*/
class epicsShareClass PvaClientChannel :
@@ -470,7 +460,7 @@ public:
/**
* @brief A class that holds data returned by PvaClientGet or PvaClientPutGet
*
* <a href = "../htmldoxygen/pvaClientGetData.html">pvaClientGetData</a>
* <a href = "../htmldoxygen/pvaClientGetData.html">Overview of PvaClientGetData</a>
*/
class epicsShareClass PvaClientGetData
{
@@ -609,7 +599,7 @@ class PvaClientPostHandlerPvt; // private to PvaClientPutData
/**
* @brief A class that holds data given to by PvaClientPut or PvaClientPutGet
*
* <a href = "../htmldoxygen/pvaClientPutData.html">pvaClientPutData</a>
* <a href = "../htmldoxygen/pvaClientPutData.html">Overview of PvaClientPutData</a>
*/
class epicsShareClass PvaClientPutData
{
@@ -748,7 +738,7 @@ private:
/**
* @brief A class that holds data returned by PvaClientMonitor
*
* <a href = "../htmldoxygen/pvaClientMonitorData.html">pvaClientMonitorData</a>
* <a href = "../htmldoxygen/pvaClientMonitorData.html">Overview of PvaClientMonitorData</a>
*/
class epicsShareClass PvaClientMonitorData
{
@@ -906,7 +896,7 @@ typedef std::tr1::shared_ptr<ChannelProcessRequesterImpl> ChannelProcessRequeste
/**
* @brief An easy to use alternative to ChannelProcess.
*
* <a href = "../htmldoxygen/pvaClientChannelProcess.html">pvaClientChannelProcess</a>
* <a href = "../htmldoxygen/pvaClientChannelProcess.html">Overview of PvaClientChannelProcess</a>
*/
class epicsShareClass PvaClientProcess
{
@@ -1000,7 +990,7 @@ typedef std::tr1::shared_ptr<ChannelGetRequesterImpl> ChannelGetRequesterImplPtr
/**
* @brief An easy to use alternative to ChannelGet.
*
* <a href = "../htmldoxygen/pvaClientChannelGet.html">pvaClientChannelGet</a>
* <a href = "../htmldoxygen/pvaClientChannelGet.html">Overview of PvaClientChannelGet</a>
*/
class epicsShareClass PvaClientGet
{
@@ -1107,7 +1097,7 @@ typedef std::tr1::shared_ptr<ChannelPutRequesterImpl> ChannelPutRequesterImplPtr
/**
* @brief An easy to use alternative to ChannelPut.
*
* <a href = "../htmldoxygen/pvaClientChannelPut.html">pvaClientChannelPut</a>
* <a href = "../htmldoxygen/pvaClientChannelPut.html">Overview of PvaClientChannelPut</a>
*/
class epicsShareClass PvaClientPut
{
@@ -1226,7 +1216,7 @@ typedef std::tr1::shared_ptr<ChannelPutGetRequesterImpl> ChannelPutGetRequesterI
/**
* @brief An easy to use alternative to ChannelPutGet.
*
* <a href = "../htmldoxygen/pvaClientChannelPutGet.html">pvaClientChannelPutGet</a>
* <a href = "../htmldoxygen/pvaClientChannelPutGet.html">Overview of PvaClientChannelPutGet</a>
*/
class epicsShareClass PvaClientPutGet
{
@@ -1369,7 +1359,7 @@ private :
/**
* @brief Optional client callback.
*
* <a href = "../htmldoxygen/pvaClientMonitorRequester.html">pvaClientMonitorRequester</a>
* <a href = "../htmldoxygen/pvaClientMonitorRequester.html">Overview of PvaClientMonitorRequester</a>
*/
class PvaClientMonitorRequester
{
@@ -1400,7 +1390,7 @@ typedef std::tr1::shared_ptr<MonitorRequesterImpl> MonitorRequesterImplPtr;
/**
* @brief An easy to use alternative to Monitor.
*
* <a href = "../htmldoxygen/pvaClientMonitor.html">pvaClientMonitor</a>
* <a href = "../htmldoxygen/pvaClientMonitor.html">Overview of PvaClientMonitor</a>
*/
class epicsShareClass PvaClientMonitor :
public PvaClientChannelStateChangeRequester,
@@ -1552,7 +1542,7 @@ public:
/**
* @brief Optional client callback.
*
* <a href = "../htmldoxygen/pvaClientRPCRequester.html">pvaClientRPCRequester</a>
* <a href = "../htmldoxygen/pvaClientRPCRequester.html">Overview of PvaClientRPCRequester</a>
*/
class PvaClientRPCRequester
{
@@ -1578,7 +1568,7 @@ typedef std::tr1::shared_ptr<RPCRequesterImpl> RPCRequesterImplPtr;
/**
* @brief An easy to use alternative to RPC.
*
* <a href = "../htmldoxygen/pvaClientRPC.html">pvaClientRPC</a>
* <a href = "../htmldoxygen/pvaClientRPC.html">Overview of PvaClientRPC</a>
*/
class epicsShareClass PvaClientRPC :
public std::tr1::enable_shared_from_this<PvaClientRPC>

View File

@@ -384,7 +384,7 @@ void PvaClientMonitor::start(string const & request)
if(!pvaClientChannel->getChannel()->isConnected()) {
client->message(
"PvaClientMonitor::start(request) but not connected",
MessageType::errorMessage);
errorMessage);
return;
}
CreateRequest::shared_pointer createRequest(CreateRequest::create());