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

#include "pvAccess.h"

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

Public Types

typedef Channel operation_type
 

Public Member Functions

 POINTER_DEFINITIONS (ChannelRequester)
 
 ChannelRequester ()
 
virtual ~ChannelRequester ()
 
virtual void channelCreated (const epics::pvData::Status &status, Channel::shared_pointer const &channel)=0
 
virtual void channelStateChange (Channel::shared_pointer const &channel, Channel::ConnectionState connectionState)=0
 
virtual std::tr1::shared_ptr< const PeerInfogetPeerInfo ()
 Return information on connected peer if applicable. More...
 
- Public Member Functions inherited from epics::pvAccess::Requester
 POINTER_DEFINITIONS (Requester)
 
virtual ~Requester ()
 
virtual std::string getRequesterName ()=0
 
virtual void message (std::string const &message, MessageType messageType=errorMessage)
 

Static Public Attributes

static size_t num_instances
 

Detailed Description

Event notifications associated with Channel life-cycle.

See ChannelProvider::createChannel()

Definition at line 1141 of file pvAccess.h.

Member Typedef Documentation

Constructor & Destructor Documentation

epics::pvAccess::ChannelRequester::ChannelRequester ( )

Definition at line 415 of file pvAccess.cpp.

416 {
417  REFTRACE_INCREMENT(num_instances);
418 }
epics::pvAccess::ChannelRequester::~ChannelRequester ( )
virtual

Definition at line 420 of file pvAccess.cpp.

421 {
422  REFTRACE_DECREMENT(num_instances);
423 }

Member Function Documentation

virtual void epics::pvAccess::ChannelRequester::channelCreated ( const epics::pvData::Status status,
Channel::shared_pointer const &  channel 
)
pure virtual

The request made with ChannelProvider::createChannel() is satisfied.

Will be called at most once for each call to createChannel().

The Channel passed here must be the same as was returned by createChannel(), if it has returned. Note that this method may be called before createChanel() returns.

Status::isOk() indicates that the Channel is valid. Calls to Channel methods can be made from this method, and later until Channel::destroy() is called.

!Status::isOk() indicates that the Channel is not available. No calls to the Channel are permitted. channelStateChange() will never be called.

Caller must hold no locks.

Parameters
statusCompletion status.
channelThe channel.

Implemented in epics::pvAccess::DefaultChannelRequester, and epics::pvAccess::ServerChannelRequesterImpl.

virtual void epics::pvAccess::ChannelRequester::channelStateChange ( Channel::shared_pointer const &  channel,
Channel::ConnectionState  connectionState 
)
pure virtual

Called occasionally after channelCreated() with Status::isOk() to give notification of connection state changes.

Caller must hold no locks.

Parameters
cThe channel.
connectionStateThe new connection state.

Implemented in epics::pvAccess::DefaultChannelRequester, and epics::pvAccess::ServerChannelRequesterImpl.

PeerInfo::const_shared_pointer epics::pvAccess::ChannelRequester::getPeerInfo ( )
virtual

Return information on connected peer if applicable.

A server-type ChannelProvider will use this method to discover if a remote client has provided credentials which may be used in access control decisions.

Default implementation returns NULL.

isConnected()==true and getPeerInfo()==NULL when the ChannelProvider does not provide information about the peer. This should be treated as an unauthenticated, anonymous, peer.

The returned instance must not change, and a different instance should be returned if/when peer information changes (eg. after reconnect).

May return !NULL when !isConnected(). getPeerInfo() must be called before testing isConnected() in situations where connection state is being polled.

Reimplemented in epics::pvAccess::ServerChannelRequesterImpl.

Definition at line 425 of file pvAccess.cpp.

426 {
427  return PeerInfo::const_shared_pointer();
428 }
epics::pvAccess::ChannelRequester::POINTER_DEFINITIONS ( ChannelRequester  )

Member Data Documentation

size_t epics::pvAccess::ChannelRequester::num_instances
static

Definition at line 1149 of file pvAccess.h.


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