This is Unofficial EPICS BASE Doxygen Site
epics::pvAccess::ChannelProvider Class Referenceabstract

#include "pvAccess.h"

+ Inheritance diagram for epics::pvAccess::ChannelProvider:
+ Collaboration diagram for epics::pvAccess::ChannelProvider:

Public Member Functions

 POINTER_DEFINITIONS (ChannelProvider)
 
 ChannelProvider ()
 
virtual ~ChannelProvider ()
 
virtual std::string getProviderName ()=0
 
virtual ChannelFind::shared_pointer channelFind (std::string const &name, ChannelFindRequester::shared_pointer const &requester)=0
 
virtual ChannelFind::shared_pointer channelList (ChannelListRequester::shared_pointer const &requester)
 
virtual Channel::shared_pointer createChannel (std::string const &name, ChannelRequester::shared_pointer const &requester=DefaultChannelRequester::build(), short priority=PRIORITY_DEFAULT)
 
virtual Channel::shared_pointer createChannel (std::string const &name, ChannelRequester::shared_pointer const &requester, short priority, std::string const &address)=0
 
- Public Member Functions inherited from epics::pvAccess::Destroyable
 POINTER_DEFINITIONS (Destroyable)
 
virtual void destroy ()=0
 

Static Public Attributes

static const short PRIORITY_MIN = 0
 
static const short PRIORITY_MAX = 99
 
static const short PRIORITY_DEFAULT = PRIORITY_MIN
 
static const short PRIORITY_LINKS_DB = PRIORITY_MAX
 
static const short PRIORITY_ARCHIVE = (PRIORITY_MAX + PRIORITY_MIN) / 2
 
static const short PRIORITY_OPI = PRIORITY_MIN
 
static size_t num_instances
 

Additional Inherited Members

- Protected Member Functions inherited from epics::pvAccess::Destroyable
virtual ~Destroyable ()
 

Detailed Description

An instance of a Client or Server.

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

Definition at line 1230 of file pvAccess.h.

Constructor & Destructor Documentation

epics::pvAccess::ChannelProvider::ChannelProvider ( )

Definition at line 377 of file pvAccess.cpp.

378 {
379  REFTRACE_INCREMENT(num_instances);
380 }
epics::pvAccess::ChannelProvider::~ChannelProvider ( )
virtual

Definition at line 382 of file pvAccess.cpp.

383 {
384  REFTRACE_DECREMENT(num_instances);
385 }

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

Implemented in epics::pvAccess::PipelineChannelProvider, epics::pvAccess::RPCChannelProvider, and epics::pvAccess::ca::CAChannelProvider.

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

Reimplemented in epics::pvAccess::PipelineChannelProvider, epics::pvAccess::RPCChannelProvider, and epics::pvAccess::ca::CAChannelProvider.

Definition at line 250 of file ChannelAccessFactory.cpp.

251 {
252  ChannelFind::shared_pointer ret;
253  requester->channelListResult(Status::error("not implemented"),
254  ret,
256  false);
257  return ret;
258 }
static Status error(const std::string &m)
Definition: status.h:50
const ChannelProcessRequester::weak_pointer requester
Definition: pvAccess.cpp:68
Channel::shared_pointer epics::pvAccess::ChannelProvider::createChannel ( std::string const &  name,
ChannelRequester::shared_pointer const &  requester = DefaultChannelRequester::build(),
short  priority = PRIORITY_DEFAULT 
)
virtual

See longer form

Reimplemented in epics::pvAccess::PipelineChannelProvider, epics::pvAccess::RPCChannelProvider, and epics::pvAccess::ca::CAChannelProvider.

Definition at line 261 of file ChannelAccessFactory.cpp.

264 {
265  return createChannel(name, requester, priority, "");
266 }
const ChannelProcessRequester::weak_pointer requester
Definition: pvAccess.cpp:68
virtual Channel::shared_pointer createChannel(std::string const &name, ChannelRequester::shared_pointer const &requester=DefaultChannelRequester::build(), short priority=PRIORITY_DEFAULT)
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 providers_ownership_unique
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

Implemented in epics::pvAccess::PipelineChannelProvider, epics::pvAccess::RPCChannelProvider, and epics::pvAccess::ca::CAChannelProvider.

epics::pvAccess::ChannelProvider::POINTER_DEFINITIONS ( ChannelProvider  )

Member Data Documentation

size_t epics::pvAccess::ChannelProvider::num_instances
static

Definition at line 1249 of file pvAccess.h.

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 files: