This is Unofficial EPICS BASE Doxygen Site
BaseChannel Struct Reference

#include "pvahelper.h"

+ Inheritance diagram for BaseChannel:
+ Collaboration diagram for BaseChannel:

Public Types

typedef epicsGuard< epicsMutex > guard_t
 
- Public Types inherited from epics::pvAccess::Channel
enum  ConnectionState { NEVER_CONNECTED, CONNECTED, DISCONNECTED, DESTROYED }
 
typedef ChannelRequester requester_type
 

Public Member Functions

 BaseChannel (const std::string &name, const std::tr1::weak_ptr< epics::pvAccess::ChannelProvider > &prov, const epics::pvAccess::ChannelRequester::shared_pointer &req, const epics::pvData::StructureConstPtr &dtype)
 
virtual ~BaseChannel ()
 
virtual std::string getRequesterName () OVERRIDE
 
virtual void destroy () OVERRIDE FINAL
 
virtual std::tr1::shared_ptr< epics::pvAccess::ChannelProvidergetProvider () OVERRIDE FINAL
 
virtual std::string getRemoteAddress () OVERRIDE
 
virtual std::string getChannelName () OVERRIDE FINAL
 
virtual std::tr1::shared_ptr< epics::pvAccess::ChannelRequestergetChannelRequester () OVERRIDE FINAL
 
virtual void getField (epics::pvAccess::GetFieldRequester::shared_pointer const &requester, std::string const &subField) OVERRIDE
 
virtual void printInfo (std::ostream &out) OVERRIDE
 
- Public Member Functions inherited from epics::pvAccess::Channel
 POINTER_DEFINITIONS (Channel)
 
 Channel ()
 
virtual ~Channel ()
 
virtual void message (std::string const &message, epics::pvData::MessageType messageType)
 
virtual ConnectionState getConnectionState ()
 
virtual bool isConnected ()
 
virtual void getField (GetFieldRequester::shared_pointer const &requester, std::string const &subField)
 
virtual AccessRights getAccessRights (epics::pvData::PVField::shared_pointer const &pvField)
 
virtual ChannelProcess::shared_pointer createChannelProcess (ChannelProcessRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual ChannelGet::shared_pointer createChannelGet (ChannelGetRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual ChannelPut::shared_pointer createChannelPut (ChannelPutRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual ChannelPutGet::shared_pointer createChannelPutGet (ChannelPutGetRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual ChannelRPC::shared_pointer createChannelRPC (ChannelRPCRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual Monitor::shared_pointer createMonitor (MonitorRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual ChannelArray::shared_pointer createChannelArray (ChannelArrayRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 
virtual void printInfo ()
 
- Public Member Functions inherited from epics::pvAccess::Requester
 POINTER_DEFINITIONS (Requester)
 
virtual ~Requester ()
 
virtual void message (std::string const &message, MessageType messageType=errorMessage)
 
- Public Member Functions inherited from epics::pvAccess::Destroyable
 POINTER_DEFINITIONS (Destroyable)
 

Public Attributes

epicsMutex lock
 
const std::string pvname
 
const epics::pvAccess::ChannelProvider::weak_pointer provider
 
const requester_type::weak_pointer requester
 
const epics::pvData::StructureConstPtr fielddesc
 

Additional Inherited Members

- Static Public Attributes inherited from epics::pvAccess::Channel
static size_t num_instances
 
static const char * ConnectionStateNames [] = { "NEVER_CONNECTED", "CONNECTED", "DISCONNECTED", "DESTROYED" }
 
- Protected Member Functions inherited from epics::pvAccess::Destroyable
virtual ~Destroyable ()
 

Detailed Description

Definition at line 19 of file pvahelper.h.

Member Typedef Documentation

typedef epicsGuard<epicsMutex> BaseChannel::guard_t

Definition at line 31 of file pvahelper.h.

Constructor & Destructor Documentation

BaseChannel::BaseChannel ( const std::string &  name,
const std::tr1::weak_ptr< epics::pvAccess::ChannelProvider > &  prov,
const epics::pvAccess::ChannelRequester::shared_pointer &  req,
const epics::pvData::StructureConstPtr dtype 
)
inline

Definition at line 21 of file pvahelper.h.

26  :pvname(name), provider(prov), requester(req), fielddesc(dtype)
27  {}
const std::string pvname
Definition: pvahelper.h:33
const epics::pvAccess::ChannelProvider::weak_pointer provider
Definition: pvahelper.h:34
const requester_type::weak_pointer requester
Definition: pvahelper.h:35
const epics::pvData::StructureConstPtr fielddesc
Definition: pvahelper.h:36
virtual BaseChannel::~BaseChannel ( )
inlinevirtual

Definition at line 28 of file pvahelper.h.

28 {}

Member Function Documentation

virtual void BaseChannel::destroy ( )
inlinevirtual

Destroy this instance.

Implements epics::pvAccess::Destroyable.

Definition at line 42 of file pvahelper.h.

42 {}
virtual std::string BaseChannel::getChannelName ( )
inlinevirtual

The name passed to ChannelProvider::createChannel()

Implements epics::pvAccess::Channel.

Definition at line 49 of file pvahelper.h.

49 { return pvname; }
const std::string pvname
Definition: pvahelper.h:33
virtual std::tr1::shared_ptr<epics::pvAccess::ChannelRequester> BaseChannel::getChannelRequester ( )
inlinevirtual

The ChannelRequester passed to ChannelProvider::createChannel()

Exceptions
std::tr1::bad_weak_ptr

Implements epics::pvAccess::Channel.

Definition at line 50 of file pvahelper.h.

51  { return requester_type::shared_pointer(requester); }
const requester_type::weak_pointer requester
Definition: pvahelper.h:35
virtual void BaseChannel::getField ( epics::pvAccess::GetFieldRequester::shared_pointer const &  requester,
std::string const &  subField 
)
inlinevirtual

Reimplemented in TestPVChannel.

Definition at line 53 of file pvahelper.h.

54  { requester->getDone(epics::pvData::Status(), fielddesc); }
const requester_type::weak_pointer requester
Definition: pvahelper.h:35
const epics::pvData::StructureConstPtr fielddesc
Definition: pvahelper.h:36
virtual std::tr1::shared_ptr<epics::pvAccess::ChannelProvider> BaseChannel::getProvider ( )
inlinevirtual

The ChannelProvider from which this Channel was requested. May never be NULL.

Implements epics::pvAccess::Channel.

Definition at line 44 of file pvahelper.h.

45  { return epics::pvAccess::ChannelProvider::shared_pointer(provider); }
const epics::pvAccess::ChannelProvider::weak_pointer provider
Definition: pvahelper.h:34
virtual std::string BaseChannel::getRemoteAddress ( )
inlinevirtual

Returns the channel's remote address, signal name, etc... For example:

  • client side channel would return server's address, e.g. "/192.168.1.101:5064"
  • server side channel would return underlying bus address, e.g. "#C0 S1".

The value returned here will changed depending on the connection status. A disconnected channel should return an empty() string.

Implements epics::pvAccess::Channel.

Reimplemented in TestPVChannel.

Definition at line 46 of file pvahelper.h.

47  { return getRequesterName(); }
virtual std::string getRequesterName() OVERRIDE
Definition: pvahelper.h:39
virtual std::string BaseChannel::getRequesterName ( )
inlinevirtual

The requester must have a name.

Returns
The requester's name.

Reimplemented from epics::pvAccess::Channel.

Definition at line 39 of file pvahelper.h.

40  { return getChannelRequester()->getRequesterName(); }
virtual std::tr1::shared_ptr< epics::pvAccess::ChannelRequester > getChannelRequester() OVERRIDE FINAL
Definition: pvahelper.h:50
virtual void BaseChannel::printInfo ( std::ostream &  out)
inlinevirtual

Prints detailed information about the context to the specified output stream.

Parameters
outthe output stream.

Reimplemented from epics::pvAccess::Channel.

Reimplemented in PDBGroupChannel, and PDBSingleChannel.

Definition at line 56 of file pvahelper.h.

56  {
57  out<<"Channel '"<<pvname<<"' "<<getRemoteAddress()<<"\n";
58  }
const std::string pvname
Definition: pvahelper.h:33
virtual std::string getRemoteAddress() OVERRIDE
Definition: pvahelper.h:46

Member Data Documentation

const epics::pvData::StructureConstPtr BaseChannel::fielddesc

Definition at line 36 of file pvahelper.h.

epicsMutex BaseChannel::lock
mutable

Definition at line 30 of file pvahelper.h.

const epics::pvAccess::ChannelProvider::weak_pointer BaseChannel::provider

Definition at line 34 of file pvahelper.h.

const std::string BaseChannel::pvname

Definition at line 33 of file pvahelper.h.

const requester_type::weak_pointer BaseChannel::requester

Definition at line 35 of file pvahelper.h.


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