![]() |
This is Unofficial EPICS BASE Doxygen Site
|
Classes | |
class | pvas::StaticProvider |
A Provider based on a list of SharedPV instance. More... | |
class | pvas::DynamicProvider |
A Provider which has no pre-configured list of names. More... | |
struct | pvas::SharedPV::Config |
struct | pvas::SharedPV::Handler |
class | pvas::SharedPV |
struct | pvas::Operation |
Functions | |
pvas::SharedPV::POINTER_DEFINITIONS (SharedPV) | |
pvas::SharedPV::Config::Config () | |
pvas::SharedPV::Handler::POINTER_DEFINITIONS (Handler) | |
virtual | pvas::SharedPV::Handler::~Handler () |
virtual void | pvas::SharedPV::Handler::onFirstConnect (const SharedPV::shared_pointer &pv) |
virtual void | pvas::SharedPV::Handler::onLastDisconnect (const SharedPV::shared_pointer &pv) |
Called when the last client disconnects. May close() More... | |
virtual void | pvas::SharedPV::Handler::onPut (const SharedPV::shared_pointer &pv, Operation &op) |
Client requests Put. More... | |
virtual void | pvas::SharedPV::Handler::onRPC (const SharedPV::shared_pointer &pv, Operation &op) |
Client requests RPC. More... | |
static shared_pointer | pvas::SharedPV::build (const std::tr1::shared_ptr< Handler > &handler, Config *conf=0) |
static shared_pointer | pvas::SharedPV::buildReadOnly (Config *conf=0) |
A SharedPV which fails all Put and RPC operations. In closed state. More... | |
static shared_pointer | pvas::SharedPV::buildMailbox (Config *conf=0) |
A SharedPV which accepts all Put operations, and fails all RPC operations. In closed state. More... | |
virtual | pvas::SharedPV::~SharedPV () |
void | pvas::SharedPV::setHandler (const std::tr1::shared_ptr< Handler > &handler) |
Replace Handler given with ctor. More... | |
Handler::shared_pointer | pvas::SharedPV::getHandler () const |
bool | pvas::SharedPV::isOpen () const |
test open-ness. cf. open() and close() More... | |
void | pvas::SharedPV::open (const epics::pvData::PVStructure &value) |
Shorthand for. More... | |
void | pvas::SharedPV::open (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &valid) |
void | pvas::SharedPV::open (const epics::pvData::StructureConstPtr &type) |
Shorthand for. More... | |
void | pvas::SharedPV::close (bool destroy=false) |
std::tr1::shared_ptr< epics::pvData::PVStructure > | pvas::SharedPV::build () |
void | pvas::SharedPV::post (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &changed) |
void | pvas::SharedPV::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::Channel > | pvas::SharedPV::connect (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 | pvas::SharedPV::disconnect (bool destroy, const epics::pvAccess::ChannelProvider *provider) OVERRIDE FINAL |
void | pvas::SharedPV::setDebug (int lvl) |
int | pvas::SharedPV::isDebug () const |
pvas::Operation::POINTER_DEFINITIONS (Operation) | |
pvas::Operation::Operation () | |
create empty op for later assignment More... | |
const epics::pvData::PVStructure & | pvas::Operation::pvRequest () const |
pvRequest blob, may be used to modify handling. More... | |
const epics::pvData::PVStructure & | pvas::Operation::value () const |
const epics::pvData::BitSet & | pvas::Operation::changed () const |
Applies to value(). Which fields of input data are actual valid. Others should not be used. More... | |
std::string | pvas::Operation::channelName () const |
The name of the channel through which this request was made (eg. for logging purposes). More... | |
const epics::pvAccess::PeerInfo * | pvas::Operation::peer () const |
void | pvas::Operation::complete () |
void | pvas::Operation::complete (const epics::pvData::Status &sts) |
Complete with success or error w/o data. More... | |
void | pvas::Operation::complete (const epics::pvData::PVStructure &value, const epics::pvData::BitSet &changed) |
Sucessful completion with data (RPC only) More... | |
void | pvas::Operation::info (const std::string &) |
Send info message to client. Does not complete(). More... | |
void | pvas::Operation::warn (const std::string &) |
Send warning message to client. Does not complete(). More... | |
int | pvas::Operation::isDebug () const |
std::tr1::shared_ptr< epics::pvAccess::Channel > | pvas::Operation::getChannel () |
std::tr1::shared_ptr< epics::pvAccess::ChannelBaseRequester > | pvas::Operation::getRequester () |
bool | pvas::Operation::valid () const |
pvas::Operation::operator bool_type () const | |
Variables | |
bool | pvas::SharedPV::Config::dropEmptyUpdates |
default true. Drop updates which don't include an field values. More... | |
epics::pvData::PVRequestMapper::mode_t | pvas::SharedPV::Config::mapperMode |
default Mask. More... | |
Friends | |
struct | pvas::SharedPV::detail::SharedChannel |
struct | pvas::SharedPV::detail::SharedMonitorFIFO |
struct | pvas::SharedPV::detail::SharedPut |
struct | pvas::SharedPV::detail::SharedRPC |
struct | pvas::Operation::detail::SharedPut |
struct | pvas::Operation::detail::SharedRPC |
void | pvas::SharedPV::epics::pvAccess::providerRegInit (void *) |
PVA Server Providers, for use with a PVA epics::pvAccess::ServerContext
These are implementations of epics::pvAccess::ChannelProvider which manage "PVs", which are sources of epics::pvAccess::Channel instances. Typically SharedPV .
Two containers are provided StaticProvider, and for some special cases DynamicProvider. It is recommended to use StaticProvider where possible, with DynamicProvider for exception cases.
A StaticProvider maintains an internal lookup table of StaticProvider::ChannelBuilder (aka. SharedPV). This table is manipulated by StaticProvider::add() and StaticProvider::remove(), which can be called at any time.
A DynamicProvider does not maintain an internal lookup table. Instead it provides the DynamicProvider::Handler interface, through which remote search and connection requests are delivered.
See examples_mailbox for a working example.
shared_ptr<> relationships internal to server API classes. Solid red lines are shared_ptr<>. Dashed red lines are shared_ptr<> which may exist safely in user code. Rectangles are public API classes. Circles are internal classes. "ChannelProvider" is an arbitrary ChannelProvider, possibly StaticProvider or DynamicProvider.
|
static |
Allocate a new PV in the closed state.
handler | Our callbacks. May be NULL. Stored internally as a shared_ptr<> |
conf | Optional. Extra configuration. If !NULL, will be modified to reflect configuration actually used. |
Definition at line 62 of file sharedstate_pv.cpp.
pvd::PVStructure::shared_pointer pvas::SharedPV::build | ( | ) |
Create a new container which may be used to prepare to call post(). This container will be owned exclusively by the caller.
Definition at line 318 of file sharedstate_pv.cpp.
|
static |
A SharedPV which accepts all Put operations, and fails all RPC operations. In closed state.
Definition at line 77 of file sharedstate_pv.cpp.
|
static |
A SharedPV which fails all Put and RPC operations. In closed state.
Definition at line 70 of file sharedstate_pv.cpp.
const epics::pvData::BitSet & pvas::Operation::changed | ( | ) | const |
Applies to value(). Which fields of input data are actual valid. Others should not be used.
Definition at line 288 of file sharedstate_channel.cpp.
std::string pvas::Operation::channelName | ( | ) | const |
The name of the channel through which this request was made (eg. for logging purposes).
Definition at line 293 of file sharedstate_channel.cpp.
|
inline |
Force any clients to disconnect, and prevent re-connection
destroy | Indicate whether this close() is permanent for clients. If destroy=false, the internal client list is retained, and these clients will see a subsequent open(). If destory=true, the internal client list is cleared. |
close() is not final, even with destroy=true new clients may begin connecting, and open() may be called again. A final close() should be performed after the removal from StaticProvider/DynamicProvider which will prevent new clients.
Definition at line 153 of file sharedstate.h.
void pvas::Operation::complete | ( | ) |
shorthand for successful completion w/o data (Put or RPC with void return)
Definition at line 308 of file sharedstate_channel.cpp.
void pvas::Operation::complete | ( | const epics::pvData::Status & | sts | ) |
Complete with success or error w/o data.
Definition at line 313 of file sharedstate_channel.cpp.
void pvas::Operation::complete | ( | const epics::pvData::PVStructure & | value, |
const epics::pvData::BitSet & | changed | ||
) |
pvas::SharedPV::Config::Config | ( | ) |
Definition at line 55 of file sharedstate_pv.cpp.
|
virtual |
may call Handler::onFirstConnect()
Implements pvas::StaticProvider::ChannelBuilder.
Definition at line 370 of file sharedstate_pv.cpp.
|
virtual |
Disconnect all Channels created through the given ChannelProvider. destroy==true if the ChannelProvider is shutting down.
Implements pvas::StaticProvider::ChannelBuilder.
Definition at line 380 of file sharedstate_pv.cpp.
void pvas::SharedPV::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.
Definition at line 356 of file sharedstate_pv.cpp.
std::tr1::shared_ptr< epics::pvAccess::Channel > pvas::Operation::getChannel | ( | ) |
Definition at line 344 of file sharedstate_channel.cpp.
SharedPV::Handler::shared_pointer pvas::SharedPV::getHandler | ( | ) | const |
Definition at line 105 of file sharedstate_pv.cpp.
std::tr1::shared_ptr< pva::ChannelBaseRequester > pvas::Operation::getRequester | ( | ) |
Definition at line 349 of file sharedstate_channel.cpp.
void pvas::Operation::info | ( | const std::string & | msg | ) |
Send info message to client. Does not complete().
Definition at line 324 of file sharedstate_channel.cpp.
int pvas::SharedPV::isDebug | ( | ) | const |
Definition at line 391 of file sharedstate_pv.cpp.
int pvas::Operation::isDebug | ( | ) | const |
Definition at line 338 of file sharedstate_channel.cpp.
bool pvas::SharedPV::isOpen | ( | ) | const |
test open-ness. cf. open() and close()
Definition at line 112 of file sharedstate_pv.cpp.
|
inlinevirtual |
Definition at line 98 of file sharedstate.h.
|
inlinevirtual |
Called when the last client disconnects. May close()
Definition at line 100 of file sharedstate.h.
|
virtual |
|
virtual |
void pvas::SharedPV::open | ( | const epics::pvData::PVStructure & | value | ) |
Shorthand for.
Definition at line 222 of file sharedstate_pv.cpp.
void pvas::SharedPV::open | ( | const epics::pvData::PVStructure & | value, |
const epics::pvData::BitSet & | valid | ||
) |
Begin allowing clients to connect.
value | The initial value of this PV. (any pending Get/Monitor operation will complete with this) |
valid | Only these marked fields are considered to have non-default values. |
std::logic_error | if not in the closed state. |
Definition at line 135 of file sharedstate_pv.cpp.
void pvas::SharedPV::open | ( | const epics::pvData::StructureConstPtr & | type | ) |
Shorthand for.
Definition at line 228 of file sharedstate_pv.cpp.
|
inline |
create empty op for later assignment
Definition at line 239 of file sharedstate.h.
|
inline |
Definition at line 280 of file sharedstate.h.
const pva::PeerInfo * pvas::Operation::peer | ( | ) | const |
Information about peer transport and authentication.
Definition at line 303 of file sharedstate_channel.cpp.
pvas::SharedPV::POINTER_DEFINITIONS | ( | SharedPV | ) |
pvas::SharedPV::Handler::POINTER_DEFINITIONS | ( | Handler | ) |
pvas::Operation::POINTER_DEFINITIONS | ( | Operation | ) |
void pvas::SharedPV::post | ( | const epics::pvData::PVStructure & | value, |
const epics::pvData::BitSet & | changed | ||
) |
Update the cached PVStructure in this SharedPV. Only those fields marked as changed will be copied in. Makes a light-weight copy.
std::logic_error | if !isOpen() |
Definition at line 326 of file sharedstate_pv.cpp.
const epics::pvData::PVStructure & pvas::Operation::pvRequest | ( | ) | const |
pvRequest blob, may be used to modify handling.
Definition at line 278 of file sharedstate_channel.cpp.
void pvas::SharedPV::setDebug | ( | int | lvl | ) |
Definition at line 385 of file sharedstate_pv.cpp.
void pvas::SharedPV::setHandler | ( | const std::tr1::shared_ptr< Handler > & | handler | ) |
Replace Handler given with ctor.
Definition at line 99 of file sharedstate_pv.cpp.
bool pvas::Operation::valid | ( | void | ) | const |
Definition at line 354 of file sharedstate_channel.cpp.
const epics::pvData::PVStructure & pvas::Operation::value | ( | ) | const |
Input data
Definition at line 283 of file sharedstate_channel.cpp.
void pvas::Operation::warn | ( | const std::string & | msg | ) |
Send warning message to client. Does not complete().
Definition at line 331 of file sharedstate_channel.cpp.
|
virtual |
Definition at line 43 of file sharedstate_pv.cpp.
|
virtual |
Definition at line 94 of file sharedstate_pv.cpp.
bool pvas::SharedPV::Config::dropEmptyUpdates |
default true. Drop updates which don't include an field values.
Definition at line 86 of file sharedstate.h.
epics::pvData::PVRequestMapper::mode_t pvas::SharedPV::Config::mapperMode |
default Mask.
Definition at line 87 of file sharedstate.h.
|
friend |
Definition at line 79 of file sharedstate.h.
|
friend |
Definition at line 80 of file sharedstate.h.
|
friend |
Definition at line 81 of file sharedstate.h.
|
friend |
Definition at line 235 of file sharedstate.h.
|
friend |
Definition at line 82 of file sharedstate.h.
|
friend |
Definition at line 236 of file sharedstate.h.
|
friend |