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::Channel Class Referenceabstract

The interface through which Operations (get, put, monitor, ...) are initiated. More...

#include <client/pv/pvAccess.h>

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

Public Types

enum  ConnectionState { NEVER_CONNECTED, CONNECTED, DISCONNECTED, DESTROYED }
 Channel connection status.
 
typedef std::tr1::shared_ptr
< Channel
shared_pointer
 
typedef std::tr1::shared_ptr
< const Channel
const_shared_pointer
 
typedef std::tr1::weak_ptr
< Channel
weak_pointer
 
typedef std::tr1::weak_ptr
< const Channel
const_weak_pointer
 
typedef ChannelRequester requester_type
 

Public Member Functions

virtual std::string getRequesterName ()
 The requester must have a name. More...
 
virtual void message (std::string const &message, epics::pvData::MessageType messageType)
 
virtual std::tr1::shared_ptr
< ChannelProvider
getProvider ()=0
 The ChannelProvider from which this Channel was requested. More...
 
virtual std::string getRemoteAddress ()=0
 Returns the channel's remote address, signal name, etc... More...
 
virtual ConnectionState getConnectionState ()
 Poll the connection state in more detail.
 
virtual std::string getChannelName ()=0
 The name passed to ChannelProvider::createChannel()
 
virtual std::tr1::shared_ptr
< ChannelRequester
getChannelRequester ()=0
 The ChannelRequester passed to ChannelProvider::createChannel() More...
 
virtual bool isConnected ()
 Poll connection state.
 
virtual void getField (GetFieldRequester::shared_pointer const &requester, std::string const &subField)
 Initiate a request to retrieve a description of the structure of this Channel. More...
 
virtual AccessRights getAccessRights (epics::pvData::PVField::shared_pointer const &pvField)
 Not useful... More...
 
virtual
ChannelProcess::shared_pointer 
createChannelProcess (ChannelProcessRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a Process action. More...
 
virtual ChannelGet::shared_pointer createChannelGet (ChannelGetRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a Get action. More...
 
virtual ChannelPut::shared_pointer createChannelPut (ChannelPutRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a Put action. More...
 
virtual
ChannelPutGet::shared_pointer 
createChannelPutGet (ChannelPutGetRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a PutGet action. More...
 
virtual ChannelRPC::shared_pointer createChannelRPC (ChannelRPCRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a RPC action. More...
 
virtual Monitor::shared_pointer createMonitor (MonitorRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a Monitor action. More...
 
virtual
ChannelArray::shared_pointer 
createChannelArray (ChannelArrayRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest)
 Initiate a request for a Array (get) action. More...
 
virtual void printInfo ()
 Prints detailed information about the context to the standard output stream.
 
virtual void printInfo (std::ostream &out)
 Prints detailed information about the context to the specified output stream. More...
 
virtual void message (std::string const &message, MessageType messageType=errorMessage)
 Push notification.
 
virtual void destroy ()
 Destroy this instance.
 

Static Public Attributes

static size_t num_instances
 
static const char * ConnectionStateNames []
 

Detailed Description

The interface through which Operations (get, put, monitor, ...) are initiated.

Handle for a Channel returned by ChannelProvider::createChannel()

At any given moment a Channel may be CONNECTED or DISCONNECTED. (NEVER_CONNECTED and DESTORYED are special cases of DISCONNECTED)

A Channel is required to honor calls to Channel::create*() methods while in the disconnected state.

A Channel is required to maintain a strong reference (shared_ptr<>) to the ChannelProvider through which it was created.

Definition at line 886 of file pvAccess.h.

Member Function Documentation

virtual ChannelArray::shared_pointer epics::pvAccess::Channel::createChannelArray ( ChannelArrayRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a Array (get) action.

ChannelArrayRequester::channelArrayConnect() may be called before createChannelArray() returns, or at some time afterwards.

Failure is indicated by a call to channelArrayConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned ChannelArray will hold a strong reference to the provided MonitorRequester.
Returned shared_ptr<ChannelArray> will have unique()==true.
Returns
A non-NULL ChannelArray unless channelArrayConnect() called with an Error

Create a ChannelArray.

Parameters
channelArrayRequesterThe ChannelArrayRequester
pvRequestAdditional options (e.g. triggering).
Returns
ChannelArray instance.
Note
The default implementation yields a not implemented error
virtual ChannelGet::shared_pointer epics::pvAccess::Channel::createChannelGet ( ChannelGetRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a Get action.

ChannelGetRequester::channelGetConnect() may be called before createChannelGet() returns, or at some time afterwards.

Failure is indicated by a call to channelProcessConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned ChannelGet will hold a strong reference to the provided ChannelGetRequester.
Returned shared_ptr<ChannelGet> will have unique()==true.
Returns
A non-NULL ChannelGet unless channelGetConnect() called with an Error
Note
The default implementation proxies to createChannelPut()
virtual ChannelProcess::shared_pointer epics::pvAccess::Channel::createChannelProcess ( ChannelProcessRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a Process action.

ChannelProcessRequester::channelProcessConnect() may be called before createChannelProcess() returns, or at some time afterwards.

Failure is indicated by a call to channelProcessConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned ChannelProcess will hold a strong reference to the provided ChannelProcessRequester.
Returned shared_ptr<ChannelProcess> will have unique()==true.
Returns
A non-NULL ChannelProcess unless channelProcessConnect() called with an Error
Note
The default implementation proxies using createChannelPut() and ChannelPut::put() with no data (empty bit set)
virtual ChannelPut::shared_pointer epics::pvAccess::Channel::createChannelPut ( ChannelPutRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a Put action.

ChannelPutRequester::channelPutConnect() may be called before createChannelPut() returns, or at some time afterwards.

Failure is indicated by a call to channelProcessConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned ChannelPut will hold a strong reference to the provided ChannelPutRequester.
Returned shared_ptr<ChannelPut> will have unique()==true.
Returns
A non-NULL ChannelPut unless channelPutConnect() called with an Error
Note
The default implementation yields a not implemented error
virtual ChannelPutGet::shared_pointer epics::pvAccess::Channel::createChannelPutGet ( ChannelPutGetRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a PutGet action.

ChannelPutGetRequester::channelPutGetConnect() may be called before createChannelPutGet() returns, or at some time afterwards.

Failure is indicated by a call to channelProcessConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned ChannelPutGet will hold a strong reference to the provided ChannelPutGetRequester.
Returned shared_ptr<ChannelPutGet> will have unique()==true.
Returns
A non-NULL ChannelPutGet unless channelPutGetConnect() called with an Error
Note
The default implementation yields a not implemented error
virtual ChannelRPC::shared_pointer epics::pvAccess::Channel::createChannelRPC ( ChannelRPCRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a RPC action.

ChannelRPCRequester::channelRPCConnect() may be called before createChannelRPC() returns, or at some time afterwards.

Failure is indicated by a call to channelProcessConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned ChannelRPC will hold a strong reference to the provided ChannelRPCRequester.
Returned shared_ptr<ChannelRPC> will have unique()==true.
Returns
A non-NULL ChannelRPC unless channelRPCConnect() called with an Error
Note
The default implementation yields a not implemented error
virtual Monitor::shared_pointer epics::pvAccess::Channel::createMonitor ( MonitorRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Initiate a request for a Monitor action.

MonitorRequester::channelMonitorConnect() may be called before createMonitor() returns, or at some time afterwards.

Failure is indicated by a call to monitorConnect with !Error::isOk()

Precondition
The Channel need not be CONNECTED
Postcondition
The returned Monitor will hold a strong reference to the provided MonitorRequester.
Returned shared_ptr<Monitor> will have unique()==true.
Returns
A non-NULL Monitor unless monitorConnect() called with an Error
Note
The default implementation yields a not implemented error
virtual AccessRights epics::pvAccess::Channel::getAccessRights ( epics::pvData::PVField::shared_pointer const &  pvField)
virtual

Not useful...

Parameters
pvFieldThe field for which access rights is desired.
Returns
The access rights.
virtual std::tr1::shared_ptr<ChannelRequester> epics::pvAccess::Channel::getChannelRequester ( )
pure virtual

The ChannelRequester passed to ChannelProvider::createChannel()

Exceptions
std::tr1::bad_weak_ptr
virtual void epics::pvAccess::Channel::getField ( GetFieldRequester::shared_pointer const &  requester,
std::string const &  subField 
)
virtual

Initiate a request to retrieve a description of the structure of this Channel.

While the type described by calls to getField() should match what is provided for all operations except RPC.

GetFieldRequester::getDone() will be called before getField() returns, or at some time afterwards.

Parameters
RequesterThe Requester.
subFieldEmpty string, or the field name of a sub-structure.
virtual std::tr1::shared_ptr<ChannelProvider> epics::pvAccess::Channel::getProvider ( )
pure virtual

The ChannelProvider from which this Channel was requested.

May never be NULL.

virtual std::string epics::pvAccess::Channel::getRemoteAddress ( )
pure virtual

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.

virtual std::string epics::pvAccess::Channel::getRequesterName ( )
virtual

The requester must have a name.

Returns
The requester's name.

Implements epics::pvAccess::Requester.

virtual void epics::pvAccess::Channel::printInfo ( std::ostream out)
inlinevirtual

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

Parameters
outthe output stream.

Definition at line 1132 of file pvAccess.h.


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