pvAccessCPP  7.1.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
epics::pvAccess::ChannelProvider Class Referenceabstract

An instance of a Client or Server. More...

#include <client/pv/pvAccess.h>

Inheritance diagram for epics::pvAccess::ChannelProvider:
Inheritance graph
[legend]
Collaboration diagram for epics::pvAccess::ChannelProvider:
Collaboration graph
[legend]

Public Types

typedef std::tr1::shared_ptr
< ChannelProvider
shared_pointer
 
typedef std::tr1::shared_ptr
< const ChannelProvider
const_shared_pointer
 
typedef std::tr1::weak_ptr
< ChannelProvider
weak_pointer
 
typedef std::tr1::weak_ptr
< const ChannelProvider
const_weak_pointer
 

Public Member Functions

virtual std::string getProviderName ()=0
 Get the provider name. More...
 
virtual ChannelFind::shared_pointer channelFind (std::string const &name, ChannelFindRequester::shared_pointer const &requester)=0
 Test to see if this provider has the named channel. More...
 
virtual ChannelFind::shared_pointer channelList (ChannelListRequester::shared_pointer const &requester)
 Request a list of all valid channel names for this provider. More...
 
virtual Channel::shared_pointer createChannel (std::string const &name, ChannelRequester::shared_pointer const &requester=DefaultChannelRequester::build(), short priority=PRIORITY_DEFAULT)
 See longer form.
 
virtual Channel::shared_pointer createChannel (std::string const &name, ChannelRequester::shared_pointer const &requester, short priority, std::string const &address)=0
 Request a Channel. More...
 
virtual void destroy ()
 Destroy this instance.
 

Static Public Attributes

static const short PRIORITY_MIN = 0
 Minimal priority. More...
 
static const short PRIORITY_MAX = 99
 Maximal priority. More...
 
static const short PRIORITY_DEFAULT = PRIORITY_MIN
 Default priority. More...
 
static const short PRIORITY_LINKS_DB = PRIORITY_MAX
 DB links priority. More...
 
static const short PRIORITY_ARCHIVE = (PRIORITY_MAX + PRIORITY_MIN) / 2
 Archive priority. More...
 
static const short PRIORITY_OPI = PRIORITY_MIN
 OPI priority. More...
 
static size_t num_instances
 

Detailed Description

An instance of a Client or Server.

Uniquely configurable (via ChannelProviderFactory::newInstance(Configuration*)

Definition at line 1230 of file pvAccess.h.

Member Function Documentation

virtual ChannelFind::shared_pointer epics::pvAccess::ChannelProvider::channelFind ( std::string const &  name,
ChannelFindRequester::shared_pointer const &  requester 
)
pure virtual

Test to see if this provider has the named channel.

May call ChannelFindRequester::channelFindResult() before returning, or at some time later. If an exception is thrown, then channelFindResult() will never be called.

Parameters
nameThe channel name.
requesterThe Requester.
Returns
An unique()==true handle for the pending response. May only return NULL if channelFindResult() called with an Error
virtual ChannelFind::shared_pointer epics::pvAccess::ChannelProvider::channelList ( ChannelListRequester::shared_pointer const &  requester)
virtual

Request a list of all valid channel names for this provider.

May call ChannelListRequester::channelListResult() before returning, or at some time later. If an exception is thrown, then channelListResult() will never be called.

Parameters
requesterThe Requester.
Returns
An unique()==true handle for the pending response. May only return NULL if channelFindResult() called with an Error
virtual Channel::shared_pointer epics::pvAccess::ChannelProvider::createChannel ( std::string const &  name,
ChannelRequester::shared_pointer const &  requester,
short  priority,
std::string const &  address 
)
pure virtual

Request a Channel.

Channel creation is immediate. ChannelRequester::channelCreated() will be called before returning. The shared_ptr which is passed to channelCreated() will also be returned.

Failures during channel creation are delivered to ChannelRequester::channelCreated() with Status::isSuccess()==false.

Postcondition
The returned Channel will hold a strong reference to the provided ChannelRequester and to the ChannelProvider through which it is created.
The shared_ptr passed to ChannelRequester::channelCreated() is unique. See Uniqueness
The new Channel will not hold a strong reference to this ChannelProvider. This provider must be kept alive in order to keep the Channel from being destoryed.
Parameters
nameThe name of the channel.
requesterWill receive notifications about channel state changes
prioritychannel priority, must be PRIORITY_MIN <= priority <= PRIORITY_MAX.
addressImplementation dependent condition. eg. A network address to bypass the search phase. Pass an empty() string for default behavour.
Returns
A non-NULL Channel unless channelCreated() called with an Error
virtual std::string epics::pvAccess::ChannelProvider::getProviderName ( )
pure virtual

Get the provider name.

Returns
The name.

Member Data Documentation

const short epics::pvAccess::ChannelProvider::PRIORITY_ARCHIVE = (PRIORITY_MAX + PRIORITY_MIN) / 2
static

Archive priority.

Definition at line 1245 of file pvAccess.h.

const short epics::pvAccess::ChannelProvider::PRIORITY_DEFAULT = PRIORITY_MIN
static

Default priority.

Definition at line 1241 of file pvAccess.h.

const short epics::pvAccess::ChannelProvider::PRIORITY_LINKS_DB = PRIORITY_MAX
static

DB links priority.

Definition at line 1243 of file pvAccess.h.

const short epics::pvAccess::ChannelProvider::PRIORITY_MAX = 99
static

Maximal priority.

Definition at line 1239 of file pvAccess.h.

const short epics::pvAccess::ChannelProvider::PRIORITY_MIN = 0
static

Minimal priority.

Definition at line 1237 of file pvAccess.h.

const short epics::pvAccess::ChannelProvider::PRIORITY_OPI = PRIORITY_MIN
static

OPI priority.

Definition at line 1247 of file pvAccess.h.


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