This is Unofficial EPICS BASE Doxygen Site
PDBSingleChannel Struct Reference

#include "pdbsingle.h"

+ Inheritance diagram for PDBSingleChannel:
+ Collaboration diagram for PDBSingleChannel:

Public Member Functions

 POINTER_DEFINITIONS (PDBSingleChannel)
 
 PDBSingleChannel (const PDBSinglePV::shared_pointer &pv, const epics::pvAccess::ChannelRequester::shared_pointer &req)
 
virtual ~PDBSingleChannel ()
 
virtual epics::pvAccess::ChannelPut::shared_pointer createChannelPut (epics::pvAccess::ChannelPutRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest) OVERRIDE FINAL
 
virtual epics::pvData::Monitor::shared_pointer createMonitor (epics::pvData::MonitorRequester::shared_pointer const &requester, epics::pvData::PVStructure::shared_pointer const &pvRequest) OVERRIDE FINAL
 
virtual void printInfo (std::ostream &out) OVERRIDE FINAL
 
- Public Member Functions inherited from 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)
 
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
 
- 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

PDBSinglePV::shared_pointer pv
 
ASCred cred
 
ASCLIENT aspvt
 
- Public Attributes inherited from BaseChannel
epicsMutex lock
 
const std::string pvname
 
const epics::pvAccess::ChannelProvider::weak_pointer provider
 
const requester_type::weak_pointer requester
 
const epics::pvData::StructureConstPtr fielddesc
 

Static Public Attributes

static size_t num_instances
 
- Static Public Attributes inherited from epics::pvAccess::Channel
static size_t num_instances
 
static const char * ConnectionStateNames [] = { "NEVER_CONNECTED", "CONNECTED", "DISCONNECTED", "DESTROYED" }
 

Additional Inherited Members

- Public Types inherited from BaseChannel
typedef epicsGuard< epicsMutex > guard_t
 
- Public Types inherited from epics::pvAccess::Channel
enum  ConnectionState { NEVER_CONNECTED, CONNECTED, DISCONNECTED, DESTROYED }
 
typedef ChannelRequester requester_type
 
- Protected Member Functions inherited from epics::pvAccess::Destroyable
virtual ~Destroyable ()
 

Detailed Description

Definition at line 76 of file pdbsingle.h.

Constructor & Destructor Documentation

PDBSingleChannel::PDBSingleChannel ( const PDBSinglePV::shared_pointer &  pv,
const epics::pvAccess::ChannelRequester::shared_pointer &  req 
)

Definition at line 193 of file pdbsingle.cpp.

195  :BaseChannel(dbChannelName(pv->chan), pv->provider, req, pv->fielddesc)
196  ,pv(pv)
197 {
198  assert(!!this->pv);
199  epics::atomic::increment(num_instances);
200 }
#define assert(exp)
Declare that a condition should be true.
Definition: epicsAssert.h:70
Definition: tool_lib.h:67
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)
Definition: pvahelper.h:21
PDBSinglePV::shared_pointer pv
Definition: pdbsingle.h:81
static size_t num_instances
Definition: pdbsingle.h:86
PDBSingleChannel::~PDBSingleChannel ( )
virtual

Definition at line 202 of file pdbsingle.cpp.

203 {
204  epics::atomic::decrement(num_instances);
205 }
static size_t num_instances
Definition: pdbsingle.h:86

Member Function Documentation

pva::ChannelPut::shared_pointer PDBSingleChannel::createChannelPut ( epics::pvAccess::ChannelPutRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Definition at line 221 of file pdbsingle.cpp.

224 {
225  PDBSinglePut::shared_pointer ret(new PDBSinglePut(shared_from_this(), requester, pvRequest));
226  requester->channelPutConnect(pvd::Status(), ret, fielddesc);
227  return ret;
228 }
const requester_type::weak_pointer requester
Definition: pvahelper.h:35
const epics::pvData::StructureConstPtr fielddesc
Definition: pvahelper.h:36
pva::Monitor::shared_pointer PDBSingleChannel::createMonitor ( epics::pvData::MonitorRequester::shared_pointer const &  requester,
epics::pvData::PVStructure::shared_pointer const &  pvRequest 
)
virtual

Definition at line 232 of file pdbsingle.cpp.

235 {
236  PDBSingleMonitor::shared_pointer ret(new PDBSingleMonitor(pv->shared_from_this(), requester, pvRequest));
237  ret->weakself = ret;
238  assert(!!pv->complete);
239  guard_t G(pv->lock);
240  ret->connect(G, pv->complete);
241  return ret;
242 }
#define assert(exp)
Declare that a condition should be true.
Definition: epicsAssert.h:70
Definition: tool_lib.h:67
const requester_type::weak_pointer requester
Definition: pvahelper.h:35
epicsGuard< epicsMutex > guard_t
Definition: pvahelper.h:31
PDBSingleChannel::POINTER_DEFINITIONS ( PDBSingleChannel  )
void PDBSingleChannel::printInfo ( std::ostream &  out)
virtual

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

Parameters
outthe output stream.

Reimplemented from BaseChannel.

Definition at line 207 of file pdbsingle.cpp.

208 {
209  if(aspvt.canWrite())
210  out << "RW ";
211  else
212  out << "RO ";
213  out<<(&cred.user[0])<<'@'<<(&cred.host[0]);
214  for(size_t i=0, N=cred.groups.size(); i<N; i++) {
215  out<<", "<<(&cred.groups[i][0]);
216  }
217  out<<"\n";
218 }
bool canWrite()
Definition: pvif.cpp:153
int i
Definition: scan.c:967
std::vector< char > host
Definition: pvif.h:93
ASCLIENT aspvt
Definition: pdbsingle.h:84
std::vector< std::vector< char > > groups
Definition: pvif.h:94
std::vector< char > user
Definition: pvif.h:93

Member Data Documentation

ASCLIENT PDBSingleChannel::aspvt

Definition at line 84 of file pdbsingle.h.

ASCred PDBSingleChannel::cred

Definition at line 83 of file pdbsingle.h.

size_t PDBSingleChannel::num_instances
static

Definition at line 86 of file pdbsingle.h.

PDBSinglePV::shared_pointer PDBSingleChannel::pv

Definition at line 81 of file pdbsingle.h.


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