An easy to use alternative to ChannelPutGet.
More...
#include "pvaClient.h"
An easy to use alternative to ChannelPutGet.
Overview of PvaClientPutGet
Definition at line 1369 of file pvaClient.h.
epics::pvaClient::PvaClientPutGet::~PvaClientPutGet |
( |
| ) |
|
Destructor.
Definition at line 124 of file pvaClientPutGet.cpp.
127 cout<<
"PvaClientPutGet::~PvaClientPutGet" 128 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::connect |
( |
| ) |
|
Call issueConnect and then waitConnect.
An exception is thrown if connect fails.
- Exceptions
-
Definition at line 290 of file pvaClientPutGet.cpp.
293 cout <<
"PvaClientPutGet::connect" 294 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
299 if(status.
isOK())
return;
300 string message = string(
"channel ")
301 + pvaClientChannel->getChannel()->getChannelName()
302 +
" PvaClientPutGet::connect " 304 throw std::runtime_error(message);
void issueConnect()
Issue the channelPutGet connection to the channel.
const std::string & getMessage() const
epics::pvData::Status waitConnect()
Wait until the channelPutGet connection to the channel is complete.
static bool getDebug()
Is debug set?
Create a PvaClientPutGet.
- Parameters
-
pvaClient | Interface to PvaClient |
pvaClientChannel | Interface to Channel |
pvRequest | The request structure. |
- Returns
- The interface to the PvaClientPutGet.
Definition at line 96 of file pvaClientPutGet.cpp.
101 PvaClientPutGetPtr clientPutGet(
new PvaClientPutGet(pvaClient,pvaClientChannel,pvRequest));
friend class ChannelPutGetRequesterImpl
std::tr1::shared_ptr< PvaClientPutGet > PvaClientPutGetPtr
std::tr1::shared_ptr< ChannelPutGetRequesterImpl > ChannelPutGetRequesterImplPtr
void epics::pvaClient::PvaClientPutGet::getGet |
( |
| ) |
|
Call issueGet and then waitGetGet. An exception is thrown if get fails.
Definition at line 406 of file pvaClientPutGet.cpp.
409 cout <<
"PvaClientPutGet::getGet" 410 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
415 if(status.
isOK())
return;
416 string message = string(
"channel ")
417 + pvaClientChannel->getChannel()->getChannelName()
418 +
" PvaClientPut::getGet " 420 throw std::runtime_error(message);
void issueGetGet()
Issue a getGet and return immediately.
const std::string & getMessage() const
epics::pvData::Status waitGetGet()
Wait until getGet completes.
static bool getDebug()
Is debug set?
Get the get data.
- Returns
- The interface.
Definition at line 512 of file pvaClientPutGet.cpp.
515 cout<<
"PvaClientPutGet::getGetData" 516 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
520 if(putGetState==putGetIdle){
524 return pvaClientGetData;
void getGet()
Call issueGet and then waitGetGet. An exception is thrown if get fails.
void getPut()
Call issuePut and then waitGetPut.
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::getPut |
( |
| ) |
|
Call issuePut and then waitGetPut.
An exception is thrown if getPut fails.
Definition at line 459 of file pvaClientPutGet.cpp.
462 cout <<
"PvaClientPutGet::getGetPut" 463 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
468 if(status.
isOK())
return;
469 string message = string(
"channel ")
470 + pvaClientChannel->getChannel()->getChannelName()
471 +
" PvaClientPut::getPut " 473 throw std::runtime_error(message);
const std::string & getMessage() const
epics::pvData::Status waitGetPut()
Wait until getPut completes.
void issueGetPut()
Issue a getPut and return immediately.
static bool getDebug()
Is debug set?
Get the put data.
- Returns
- The interface.
Definition at line 527 of file pvaClientPutGet.cpp.
530 cout<<
"PvaClientPutGet::getPutData" 531 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
535 if(putGetState==putGetIdle){
539 return pvaClientPutData;
void getGet()
Call issueGet and then waitGetGet. An exception is thrown if get fails.
void getPut()
Call issuePut and then waitGetPut.
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::issueConnect |
( |
| ) |
|
Issue the channelPutGet connection to the channel.
This can only be called once. An exception is thrown if connect fails.
Definition at line 307 of file pvaClientPutGet.cpp.
310 cout <<
"PvaClientPutGet::issueConnect" 311 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
314 if(connectState!=connectIdle) {
315 string message = string(
"channel ")
316 + pvaClientChannel->getChannel()->getChannelName()
317 +
" pvaClientPutGet already connected ";
318 throw std::runtime_error(message);
320 connectState = connectActive;
321 channelPutGetConnectStatus =
Status(Status::STATUSTYPE_ERROR,
"connect active");
322 channelPutGet = pvaClientChannel->getChannel()->createChannelPutGet(channelPutGetRequester,pvRequest);
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::issueGetGet |
( |
| ) |
|
Issue a getGet and return immediately.
Definition at line 423 of file pvaClientPutGet.cpp.
426 cout <<
"PvaClientPutGet::issueGetGet" 427 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
430 if(connectState==connectIdle)
connect();
431 if(putGetState==putGetActive) {
432 string message = string(
"channel ")
433 + pvaClientChannel->getChannel()->getChannelName()
434 +
" PvaClientPutGet::issueGetGet get or put aleady active ";
435 throw std::runtime_error(message);
437 putGetState = putGetActive;
438 channelPutGet->getGet();
void connect()
Call issueConnect and then waitConnect.
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::issueGetPut |
( |
| ) |
|
Issue a getPut and return immediately.
Definition at line 476 of file pvaClientPutGet.cpp.
479 cout <<
"PvaClientPutGet::issueGetPut" 480 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
483 if(connectState==connectIdle)
connect();
484 if(putGetState==putGetActive) {
485 string message = string(
"channel ")
486 + pvaClientChannel->getChannel()->getChannelName()
487 +
" PvaClientPutGet::issueGetPut get or put aleady active ";
488 throw std::runtime_error(message);
490 putGetState = putGetActive;
491 channelPutGet->getPut();
void connect()
Call issueConnect and then waitConnect.
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::issuePutGet |
( |
| ) |
|
Issue a putGet and return immediately.
Definition at line 368 of file pvaClientPutGet.cpp.
371 cout <<
"PvaClientPutGet::issuePutGet" 372 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
375 if(connectState==connectIdle)
connect();
376 if(putGetState==putGetActive) {
377 string message = string(
"channel ")
378 + pvaClientChannel->getChannel()->getChannelName()
379 +
" PvaClientPutGet::issuePutGet get or put aleady active ";
380 throw std::runtime_error(message);
382 putGetState = putGetActive;
383 channelPutGet->putGet(pvaClientPutData->getPVStructure(),pvaClientPutData->getChangedBitSet());
void connect()
Call issueConnect and then waitConnect.
static bool getDebug()
Is debug set?
void epics::pvaClient::PvaClientPutGet::putGet |
( |
| ) |
|
Call issuePutGet and then waitPutGet.
An exception is thrown if putGet fails.
Definition at line 351 of file pvaClientPutGet.cpp.
354 cout <<
"PvaClientPutGet::putGet" 355 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
360 if(status.
isOK())
return;
361 string message = string(
"channel ")
362 + pvaClientChannel->getChannel()->getChannelName()
363 +
" PvaClientPut::putGet " 365 throw std::runtime_error(message);
epics::pvData::Status waitPutGet()
Wait until putGet completes.
const std::string & getMessage() const
void issuePutGet()
Issue a putGet and return immediately.
static bool getDebug()
Is debug set?
Set a user callback.
- Parameters
-
pvaClientPutGetRequester | The requester which must be implemented by the caller. |
Definition at line 542 of file pvaClientPutGet.cpp.
545 cout <<
"PvaClientPutGet::setRequester" 546 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
549 this->pvaClientPutGetRequester = pvaClientPutGetRequester;
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPutGet::waitConnect |
( |
| ) |
|
Wait until the channelPutGet connection to the channel is complete.
- Returns
- status;
Definition at line 325 of file pvaClientPutGet.cpp.
328 cout <<
"PvaClientPutGet::waitConnect" 329 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
334 if(connectState==connected) {
335 if(!channelPutGetConnectStatus.
isOK()) connectState = connectIdle;
336 return channelPutGetConnectStatus;
338 if(connectState!=connectActive) {
339 string message = string(
"channel ")
340 + pvaClientChannel->getChannel()->getChannelName()
341 +
" PvaClientPutGet::waitConnect illegal connect state ";
342 throw std::runtime_error(message);
345 waitForConnect.
wait();
346 if(!channelPutGetConnectStatus.
isOK()) connectState = connectIdle;
347 return channelPutGetConnectStatus;
A lock for multithreading.
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPutGet::waitGetGet |
( |
| ) |
|
Wait until getGet completes.
If failure getStatus can be called to get reason.
- Returns
- status
Definition at line 441 of file pvaClientPutGet.cpp.
444 cout <<
"PvaClientPutGet::waitGetGet" 445 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
448 if(putGetState==putGetComplete)
return channelPutGetStatus;
449 if(putGetState!=putGetActive){
450 string message = string(
"channel ")
451 + pvaClientChannel->getChannel()->getChannelName()
452 +
" PvaClientPutGet::waitGetGet get or put aleady active ";
453 throw std::runtime_error(message);
455 waitForPutGet.
wait();
456 return channelPutGetStatus;
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPutGet::waitGetPut |
( |
| ) |
|
Wait until getPut completes.
- Returns
- status
Definition at line 494 of file pvaClientPutGet.cpp.
497 cout <<
"PvaClientPutGet::waitGetPut" 498 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
501 if(putGetState==putGetComplete)
return channelPutGetStatus;
502 if(putGetState!=putGetActive){
503 string message = string(
"channel ")
504 + pvaClientChannel->getChannel()->getChannelName()
505 +
" PvaClientPutGet::waitGetPut get or put aleady active ";
506 throw std::runtime_error(message);
508 waitForPutGet.
wait();
509 return channelPutGetStatus;
static bool getDebug()
Is debug set?
Status epics::pvaClient::PvaClientPutGet::waitPutGet |
( |
| ) |
|
Wait until putGet completes.
If failure getStatus can be called to get reason.
- Returns
- status
Definition at line 387 of file pvaClientPutGet.cpp.
390 cout <<
"PvaClientPutGet::waitPutGet" 391 <<
" channelName " << pvaClientChannel->getChannel()->getChannelName()
394 if(putGetState==putGetComplete)
return channelPutGetStatus;
395 if(putGetState!=putGetActive){
396 string message = string(
"channel ")
397 + pvaClientChannel->getChannel()->getChannelName()
398 +
" PvaClientPutGet::waitPutGet get or put aleady active ";
399 throw std::runtime_error(message);
401 waitForPutGet.
wait();
402 if(channelPutGetStatus.
isOK()) pvaClientPutData->getChangedBitSet()->clear();
403 return channelPutGetStatus;
static bool getDebug()
Is debug set?
The documentation for this class was generated from the following files: