add more calbacks; documentation changes

This commit is contained in:
mrkraimer
2017-08-08 06:23:35 -04:00
parent e1d50000d4
commit 97d9dc2034
5 changed files with 85 additions and 13 deletions

View File

@@ -35,8 +35,23 @@
<h1>PvaClientGetRequester</h1>
<p>This is a virtual class that can be implemented by a client that uses <b>PvaClientGet</b>.
It has the methods:</p>
<pre>
virtual void channelGetConnect(
const Status&amp; status,
PvaClientGetPtr const &amp; clientGet) {}
virtual void getDone(
const Status&amp; status,
PvaClientGetPtr const &amp; clientGet) = 0;
</pre>
<p>The client must call</p>
<pre>
pvaClientGet->setRequester(shared_from_this());
</pre>
<p>
<b>Not Yet Written</b>
after creating an instance of PvaClientGet.
</p>
</body>

View File

@@ -35,10 +35,31 @@
<h1>PvaClientMonitorRequester</h1>
<p>This is a virtual class that can be implemented by a client that uses <b>PvaClientMonitor</b>.
It has the methods:</p>
<pre>
virtual void monitorConnect(
const Status&amp; status,
PvaClientMonitorPtr const &amp; clientMonitor,
StructureConstPtr const &amp; structure) {}
virtual void event(
PvaClientMonitor const &amp; clientGet) = 0;
virtual void unlisten()
{
std::cerr &lt;&lt; "PvaClientMonitorRequester::unlisten called"
&lt;&lt; " but no PvaClientMonitorRequester::unlisten\n";
}
</pre>
<p>The client must call</p>
<pre>
pvaClientMonitor->setRequester(shared_from_this());
</pre>
<p>
<b>Not Yet Written</b>
after creating an instance of PvaClientMonitor.
</p>
</body>
</html>

View File

@@ -35,10 +35,29 @@
<h1>PvaClientPutRequester</h1>
<p>This is a virtual class that can be implemented by a client that uses <b>PvaClientPut</b>.
It has the methods:</p>
<pre>
virtual void channelPutConnect(
const Status&amp; status,
PvaClientPutPtr const &amp; clientPut) {}
virtual void getDone(
const Status&amp; status,
PvaClientPutPtr const &amp; clientPut) {}
virtual void putDone(
const Status&amp; status,
PvaClientPutPtr const &amp; clientPut) = 0;
</pre>
<p>The client must call</p>
<pre>
pvaClientPut->setRequester(shared_from_this());
</pre>
<p>
<b>Not Yet Written</b>
after creating an instance of PvaClientPut.
</p>
</body>
</html>

View File

@@ -196,7 +196,7 @@ typedef std::tr1::shared_ptr<PvaClientPutCache> PvaClientPutCachePtr;
* <a href = "../htmldoxygen/pvaClientChannelStateChangeRequester.html">Overview of PvaClientChannelStateChangeRequester</a>
*
*/
class PvaClientChannelStateChangeRequester
class epicsShareClass PvaClientChannelStateChangeRequester
{
public:
POINTER_DEFINITIONS(PvaClientChannelStateChangeRequester);
@@ -1023,7 +1023,7 @@ typedef std::tr1::shared_ptr<ChannelGetRequesterImpl> ChannelGetRequesterImplPtr
*
* <a href = "../htmldoxygen/pvaClientGetRequester.html">Overview of PvaClientGetRequester</a>
*/
class PvaClientGetRequester
class epicsShareClass PvaClientGetRequester
{
public:
POINTER_DEFINITIONS(PvaClientGetRequester);
@@ -1035,7 +1035,9 @@ public:
*/
virtual void channelGetConnect(
const epics::pvData::Status& status,
PvaClientGetPtr const & clientGet);
PvaClientGetPtr const & clientGet)
{
}
/** @brief A get request is complete.
*
* @param status The status returned by the server.
@@ -1043,7 +1045,7 @@ public:
*/
virtual void getDone(
const epics::pvData::Status& status,
PvaClientGetPtr const & clientGet);
PvaClientGetPtr const & clientGet) = 0;
};
/**
* @brief An easy to use alternative to ChannelGet.
@@ -1188,7 +1190,7 @@ typedef std::tr1::shared_ptr<ChannelPutRequesterImpl> ChannelPutRequesterImplPtr
*
* <a href = "../htmldoxygen/pvaClientPutRequester.html">Overview of PvaClientPutRequester</a>
*/
class PvaClientPutRequester
class epicsShareClass PvaClientPutRequester
{
public:
POINTER_DEFINITIONS(PvaClientPutRequester);
@@ -1200,7 +1202,9 @@ public:
*/
virtual void channelPutConnect(
const epics::pvData::Status& status,
PvaClientPutPtr const & clientPut);
PvaClientPutPtr const & clientPut)
{
}
/** @brief A get request is complete.
*
* @param status The status returned by the server.
@@ -1208,7 +1212,9 @@ public:
*/
virtual void getDone(
const epics::pvData::Status& status,
PvaClientPutPtr const & clientPut);
PvaClientPutPtr const & clientPut)
{
}
/** @brief A put request is complete.
*
* @param status The status returned by the server.
@@ -1216,7 +1222,7 @@ public:
*/
virtual void putDone(
const epics::pvData::Status& status,
PvaClientPutPtr const & clientPut);
PvaClientPutPtr const & clientPut) = 0;
};
/**
@@ -1511,10 +1517,20 @@ private :
*
* <a href = "../htmldoxygen/pvaClientMonitorRequester.html">Overview of PvaClientMonitorRequester</a>
*/
class PvaClientMonitorRequester
class epicsShareClass PvaClientMonitorRequester
{
public:
POINTER_DEFINITIONS(PvaClientMonitorRequester);
/** @brief The server has returned a message that the monitor is connected.
*
* @param status Completion status.
* @param monitor The monitor
* @param structure The structure defining the data.
*/
virtual void monitorConnect(epics::pvData::Status const & status,
PvaClientMonitorPtr const & monitor, epics::pvData::StructureConstPtr const & structure)
{
}
virtual ~PvaClientMonitorRequester() {}
/** @brief A monitor event has occurred.
* @param monitor The PvaClientMonitor that received the event.

View File

@@ -263,7 +263,8 @@ void PvaClientMonitor::monitorConnect(
}
start();
}
PvaClientMonitorRequesterPtr req(pvaClientMonitorRequester.lock());
if(req) req->monitorConnect(status,shared_from_this(),structure);
}
void PvaClientMonitor::monitorEvent(MonitorPtr const & monitor)