pvAccessCPP
7.1.7
|
A Shared State Process Variable (PV) More...
#include <server/pva/sharedstate.h>
Classes | |
struct | Handler |
Callbacks associated with a SharedPV. More... | |
Public Types | |
typedef std::tr1::shared_ptr < SharedPV > | shared_pointer |
typedef std::tr1::shared_ptr < const SharedPV > | const_shared_pointer |
typedef std::tr1::weak_ptr < SharedPV > | weak_pointer |
typedef std::tr1::weak_ptr < const SharedPV > | const_weak_pointer |
Public Member Functions | |
void | setHandler (const std::tr1::shared_ptr< Handler > &handler) |
Replace Handler given with ctor. | |
Handler::shared_pointer | getHandler () const |
bool | isOpen () const |
test open-ness. cf. open() and close() | |
void | open (const epics::pvData::PVStructure &value) |
Shorthand for. More... | |
void | open (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &valid) |
Begin allowing clients to connect. More... | |
void | open (const epics::pvData::StructureConstPtr &type) |
Shorthand for. More... | |
void | close (bool destroy=false) |
Force any clients to disconnect, and prevent re-connection. More... | |
std::tr1::shared_ptr < epics::pvData::PVStructure > | build () |
Create a new container which may be used to prepare to call post(). More... | |
void | post (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &changed) |
Update the cached PVStructure in this SharedPV. More... | |
void | fetch (epics::pvData::PVStructure &value, epics::pvData::BitSet &valid) |
Update arguments with current value, which is the initial value from open() with accumulated post() calls. | |
virtual std::tr1::shared_ptr < epics::pvAccess::Channel > | connect (const std::tr1::shared_ptr< epics::pvAccess::ChannelProvider > &provider, const std::string &channelName, const std::tr1::shared_ptr< epics::pvAccess::ChannelRequester > &requester) |
may call Handler::onFirstConnect() More... | |
virtual void | disconnect (bool destroy, const epics::pvAccess::ChannelProvider *provider) |
Disconnect all Channels created through the given ChannelProvider. More... | |
void | setDebug (int lvl) |
int | isDebug () const |
Static Public Member Functions | |
static shared_pointer | build (const std::tr1::shared_ptr< Handler > &handler, Config *conf=0) |
Allocate a new PV in the closed state. More... | |
static shared_pointer | buildReadOnly (Config *conf=0) |
A SharedPV which fails all Put and RPC operations. In closed state. | |
static shared_pointer | buildMailbox (Config *conf=0) |
A SharedPV which accepts all Put operations, and fails all RPC operations. In closed state. | |
Friends | |
struct | detail::SharedChannel |
struct | detail::SharedMonitorFIFO |
struct | detail::SharedPut |
struct | detail::SharedRPC |
void | epics::pvAccess::providerRegInit (void *) |
A Shared State Process Variable (PV)
"Shared" in the sense that all clients/subscribers interact with the same PVStructure (excluding the RPC operation).
This class contains a cached PVStructure, which is updated by post(), also a list of subscribing clients and in-progress network Operations.
On construction a SharedPV is in a "disconnected" state. It has no associated PVStructure (or Structure). No type. A type is associated via the open() method. After it has been open()'d. Calls to post() may be made. Calling close() will close all currently opened client channels.
Client channels, and operations on them, may be initiated at any time (via connect()). However, operations other than RPC will not proceed until open() is called.
Definition at line 76 of file sharedstate.h.