An easy to use alternative to ChannelPut.
More...
#include "pvaClient.h"
An easy to use alternative to ChannelPut.
Overview of PvaClientPut
Definition at line 1191 of file pvaClient.h.
epics::pvaClient::PvaClientPut::~PvaClientPut |
( |
| ) |
|
Destructor.
Definition at line 111 of file pvaClientPut.cpp.
114 cout<<
"PvaClientPut::~PvaClientPut" 115 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPut::connect |
( |
| ) |
|
Call issueConnect and then waitConnect.
An exception is thrown if connect fails.
- Exceptions
-
Definition at line 242 of file pvaClientPut.cpp.
245 cout <<
"PvaClientPut::connect" 246 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
251 if(status.
isOK())
return;
252 string message = string(
"channel ")
253 + pvaClientChannel->getChannel()->getChannelName()
254 +
" PvaClientPut::connect " 256 throw std::runtime_error(message);
const std::string & getMessage() const
void issueConnect()
Issue the channelPut connection to the channel.
epics::pvData::Status waitConnect()
Wait until the channelPut connection to the channel is complete.
static bool getDebug()
Is debug set?
Create a PvaClientPut.
- Parameters
-
pvaClient | Interface to PvaClient |
pvaClientChannel | Interface to Channel |
pvRequest | The request structure. |
- Returns
- The interface to the PvaClientPut.
Definition at line 82 of file pvaClientPut.cpp.
87 PvaClientPutPtr clientPut(
new PvaClientPut(pvaClient,pvaClientChannel,pvRequest));
friend class ChannelPutRequesterImpl
std::tr1::shared_ptr< PvaClientPut > PvaClientPutPtr
std::tr1::shared_ptr< ChannelPutRequesterImpl > ChannelPutRequesterImplPtr
void epics::pvaClient::PvaClientPut::get |
( |
| ) |
|
Call issueGet and then waitGet.
An exception is thrown if get fails.
- Exceptions
-
Definition at line 301 of file pvaClientPut.cpp.
304 cout <<
"PvaClientPut::get" 305 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
310 if(status.
isOK())
return;
311 string message = string(
"channel ")
312 + pvaClientChannel->getChannel()->getChannelName()
313 +
" PvaClientPut::get " 315 throw std::runtime_error(message);
epics::pvData::Status waitGet()
Wait until get completes.
const std::string & getMessage() const
void issueGet()
Issue a get and return immediately.
static bool getDebug()
Is debug set?
Get the data/.
- Returns
- The interface.
Definition at line 416 of file pvaClientPut.cpp.
419 cout<<
"PvaClientPut::getData" 420 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
424 if(putState==putIdle)
get();
425 return pvaClientData;
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPut::issueConnect |
( |
| ) |
|
Issue the channelPut connection to the channel.
This can only be called once.
Definition at line 259 of file pvaClientPut.cpp.
262 cout <<
"PvaClientPut::issueConnect" 263 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
266 if(connectState!=connectIdle) {
267 string message = string(
"channel ") + pvaClientChannel->getChannel()->getChannelName()
268 +
" pvaClientPut already connected ";
269 throw std::runtime_error(message);
271 connectState = connectActive;
272 channelPutConnectStatus =
Status(Status::STATUSTYPE_ERROR,
"connect active");
273 channelPut = pvaClientChannel->getChannel()->createChannelPut(channelPutRequester,pvRequest);
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPut::issueGet |
( |
| ) |
|
Issue a get and return immediately.
Definition at line 318 of file pvaClientPut.cpp.
321 cout <<
"PvaClientPut::issueGet" 322 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
325 if(connectState==connectIdle)
connect();
326 if(putState==getActive || putState==putActive) {
327 string message = string(
"channel ")
328 + pvaClientChannel->getChannel()->getChannelName()
329 +
"PvaClientPut::issueGet get or put aleady active ";
330 throw std::runtime_error(message);
332 putState = getActive;
void connect()
Call issueConnect and then waitConnect.
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPut::issuePut |
( |
| ) |
|
Issue a put and return immediately.
Definition at line 374 of file pvaClientPut.cpp.
377 cout <<
"PvaClientPut::issuePut" 378 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
379 <<
" pvStructure\n" << pvaClientData->getPVStructure()
380 <<
" bitSet " << *pvaClientData->getChangedBitSet() << endl
383 if(connectState==connectIdle)
connect();
384 if(putState==getActive || putState==putActive) {
385 string message = string(
"channel ")
386 + pvaClientChannel->getChannel()->getChannelName()
387 +
"PvaClientPut::issuePut get or put aleady active ";
388 throw std::runtime_error(message);
390 putState = putActive;
391 channelPut->put(pvaClientData->getPVStructure(),pvaClientData->getChangedBitSet());
void connect()
Call issueConnect and then waitConnect.
static bool getDebug()
Is debug set?
epics::pvaClient::PvaClientPut::POINTER_DEFINITIONS |
( |
PvaClientPut |
| ) |
|
void epics::pvaClient::PvaClientPut::put |
( |
| ) |
|
Call issuePut and then waitPut. An exception is thrown if get fails.
Definition at line 357 of file pvaClientPut.cpp.
360 cout <<
"PvaClientPut::put" 361 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
366 if(status.
isOK())
return;
367 string message = string(
"channel ")
368 + pvaClientChannel->getChannel()->getChannelName()
369 +
" PvaClientPut::put " 371 throw std::runtime_error(message);
const std::string & getMessage() const
void issuePut()
Issue a put and return immediately.
epics::pvData::Status waitPut()
Wait until put completes.
static bool getDebug()
Is debug set?
Set a user callback.
- Parameters
-
pvaClientPutRequester | The requester which must be implemented by the caller. |
Definition at line 428 of file pvaClientPut.cpp.
431 cout <<
"PvaClientPut::setRequester" 432 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
435 this->pvaClientPutRequester = pvaClientPutRequester;
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPut::waitConnect |
( |
| ) |
|
Wait until the channelPut connection to the channel is complete.
- Returns
- status;
Definition at line 277 of file pvaClientPut.cpp.
280 cout <<
"PvaClientPut::waitConnect" 281 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
286 if(connectState==connected) {
287 if(!channelPutConnectStatus.
isOK()) connectState = connectIdle;
288 return channelPutConnectStatus;
290 if(connectState!=connectActive) {
291 string message = string(
"channel ") + pvaClientChannel->getChannel()->getChannelName()
292 +
" PvaClientPut::waitConnect illegal connect state ";
293 throw std::runtime_error(message);
296 waitForConnect.
wait();
297 if(!channelPutConnectStatus.
isOK()) connectState = connectIdle;
298 return channelPutConnectStatus;
A lock for multithreading.
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPut::waitGet |
( |
| ) |
|
Wait until get completes.
- Returns
- status
Definition at line 336 of file pvaClientPut.cpp.
339 cout <<
"PvaClientPut::waitGet" 340 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
345 if(putState==putComplete)
return channelGetPutStatus;
346 if(putState!=getActive){
347 string message = string(
"channel ")
348 + pvaClientChannel->getChannel()->getChannelName()
349 +
" PvaClientPut::waitGet illegal put state";
350 throw std::runtime_error(message);
353 waitForGetPut.
wait();
354 return channelGetPutStatus;
A lock for multithreading.
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPut::waitPut |
( |
| ) |
|
Wait until put completes.
- Returns
- status
Definition at line 394 of file pvaClientPut.cpp.
397 cout <<
"PvaClientPut::waitPut" 398 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
403 if(putState==putComplete)
return channelGetPutStatus;
404 if(putState!=putActive){
405 string message = string(
"channel ")
406 + pvaClientChannel->getChannel()->getChannelName()
407 +
" PvaClientPut::waitPut illegal put state";
408 throw std::runtime_error(message);
411 waitForGetPut.
wait();
412 if(channelGetPutStatus.
isOK()) pvaClientData->getChangedBitSet()->clear();
413 return channelGetPutStatus;
A lock for multithreading.
static bool getDebug()
Is debug set?
The documentation for this class was generated from the following files: