This is Unofficial EPICS BASE Doxygen Site
pvas::SharedPV Class Reference

#include "sharedstate.h"

+ Inheritance diagram for pvas::SharedPV:
+ Collaboration diagram for pvas::SharedPV:

Classes

struct  Config
 
struct  Handler
 

Public Member Functions

 POINTER_DEFINITIONS (SharedPV)
 
virtual ~SharedPV ()
 
void setHandler (const std::tr1::shared_ptr< Handler > &handler)
 Replace Handler given with ctor. More...
 
Handler::shared_pointer getHandler () const
 
bool isOpen () const
 test open-ness. cf. open() and close() More...
 
void open (const epics::pvData::PVStructure &value)
 Shorthand for. More...
 
void open (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &valid)
 
void open (const epics::pvData::StructureConstPtr &type)
 Shorthand for. More...
 
void close (bool destroy=false)
 
std::tr1::shared_ptr< epics::pvData::PVStructurebuild ()
 
void post (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &changed)
 
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. More...
 
virtual std::tr1::shared_ptr< epics::pvAccess::Channelconnect (const std::tr1::shared_ptr< epics::pvAccess::ChannelProvider > &provider, const std::string &channelName, const std::tr1::shared_ptr< epics::pvAccess::ChannelRequester > &requester) OVERRIDE FINAL
 
virtual void disconnect (bool destroy, const epics::pvAccess::ChannelProvider *provider) OVERRIDE FINAL
 
void setDebug (int lvl)
 
int isDebug () const
 
- Public Member Functions inherited from pvas::StaticProvider::ChannelBuilder
 POINTER_DEFINITIONS (ChannelBuilder)
 
virtual ~ChannelBuilder ()
 

Static Public Member Functions

static shared_pointer build (const std::tr1::shared_ptr< Handler > &handler, Config *conf=0)
 
static shared_pointer buildReadOnly (Config *conf=0)
 A SharedPV which fails all Put and RPC operations. In closed state. More...
 
static shared_pointer buildMailbox (Config *conf=0)
 A SharedPV which accepts all Put operations, and fails all RPC operations. In closed state. More...
 

Friends

struct detail::SharedChannel
 
struct detail::SharedMonitorFIFO
 
struct detail::SharedPut
 
struct detail::SharedRPC
 
void epics::pvAccess::providerRegInit (void *)
 

Detailed Description

A Shared State Process Variable (PV)

"Shared" in the sense that all clients/subscribers interact with the same PVStructure (excluding the RPC operation).

Warning
For the purposes of locking, this class is an Operation. eg. no locks may be held when calling post(), open(), close(), or connect(). provider_roles_requester_locking

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.

Note
A SharedPV does not have a name. Name(s) are associated with a SharedPV By a Provider (StaticProvider, DynamicProvider, or any epics::pvAccess::ChannelProvider). These channel names may be seen via connect()
See also
Server API shared_ptr Ownership

Definition at line 76 of file sharedstate.h.


The documentation for this class was generated from the following files: