pvAccessCPP 7.1.9
Loading...
Searching...
No Matches
pvac::MonitorSync Struct Reference

Subscription usable w/o callbacks. More...

#include <client/pva/client.h>

Inheritance diagram for pvac::MonitorSync:
Collaboration diagram for pvac::MonitorSync:

Public Member Functions

 MonitorSync (const Monitor &, const std::tr1::shared_ptr< SImpl > &)
bool wait ()
bool wait (double timeout)
bool test ()
void wake ()
std::string name () const
 Channel name.
void cancel ()
 Immediate cancellation.
bool poll ()
 updates root, changed, overrun
bool complete () const
bool valid () const
 operator bool_type () const
void reset ()

Public Attributes

MonitorEvent event
epics::pvData::PVStructure::const_shared_pointer root
 Monitor update data.
epics::pvData::BitSet changed
epics::pvData::BitSet overrun

Detailed Description

Subscription usable w/o callbacks.

Basic usage is to call wait() or test(). If true is returned, then the 'event', 'root', 'changed', and 'overrun' members have been updated with a new event. Test 'event.event' first to find out which kind of event has occured.

Note that wait()/test() methods are distinct from base class poll(). wait()/test() check for the arrival of MonitorEvent while poll() checks for the availability of data (eg. following a Data event).

Definition at line 206 of file client.h.

Constructor & Destructor Documentation

◆ MonitorSync()

pvac::MonitorSync::MonitorSync ( )
inline

Definition at line 209 of file client.h.

Member Function Documentation

◆ cancel()

void pvac::Monitor::cancel ( )
inherited

Immediate cancellation.

Does not wait for remote confirmation.

Since
Up to 7.0.0 also cleared root, changed, and overrun. After 7.0.0, these data members are left unchanged.

◆ complete()

bool pvac::Monitor::complete ( ) const
inherited

true if all events received. Check after poll()==false

◆ operator bool_type()

pvac::Monitor::operator bool_type ( ) const
inlineinherited

Definition at line 172 of file client.h.

◆ poll()

bool pvac::Monitor::poll ( )
inherited

updates root, changed, overrun

Returns
true if a new update was extracted from the queue.
Note
This method does not block.
MonitorEvent::Data will not be repeated until poll()==false.
Postcondition
root!=NULL (after version 6.0.0)
root!=NULL iff poll()==true (In version 6.0.0)

◆ reset()

void pvac::Monitor::reset ( )
inlineinherited

Definition at line 175 of file client.h.

◆ test()

bool pvac::MonitorSync::test ( )

check if new event is immediately available. Does not block.

◆ valid()

bool pvac::Monitor::valid ( ) const
inlineinherited

Definition at line 164 of file client.h.

◆ wait() [1/2]

bool pvac::MonitorSync::wait ( )

wait for new event

Returns
true when a new event was received. false if wake() was called.

◆ wait() [2/2]

bool pvac::MonitorSync::wait ( double timeout)

wait for new event

Returns
false on timeout

◆ wake()

void pvac::MonitorSync::wake ( )

Abort one call to wait(), either concurrent or future. Calls are queued. wait() will return with MonitorEvent::Fail.

Member Data Documentation

◆ changed

epics::pvData::BitSet pvac::Monitor::changed
inherited

Definition at line 161 of file client.h.

◆ event

MonitorEvent pvac::MonitorSync::event

most recent event updated only during wait() or poll()

Definition at line 231 of file client.h.

◆ overrun

epics::pvData::BitSet pvac::Monitor::overrun
inherited

Definition at line 162 of file client.h.

◆ root

epics::pvData::PVStructure::const_shared_pointer pvac::Monitor::root
inherited

Monitor update data.

After version 6.0.0

Initially NULL, becomes !NULL the first time poll()==true. The PVStructure pointed to be root will presist until Monitor reconnect w/ type change. This can be detected by comparing root.get(). references to root may be cached subject to this test.

In version 6.0.0

NULL except after poll()==true. poll()==false sets root=NULL. references to root should not be stored between calls to poll().

Definition at line 160 of file client.h.


The documentation for this struct was generated from the following file: