This is Unofficial EPICS BASE Doxygen Site
pvas::DynamicProvider::Impl Struct Reference
+ Inheritance diagram for pvas::DynamicProvider::Impl:
+ Collaboration diagram for pvas::DynamicProvider::Impl:

Public Member Functions

 POINTER_DEFINITIONS (Impl)
 
 Impl (const std::string &name, const std::tr1::shared_ptr< Handler > &handler)
 
virtual ~Impl ()
 
virtual void destroy () OVERRIDE FINAL
 
virtual std::string getProviderName () OVERRIDE FINAL
 
virtual pva::ChannelFind::shared_pointer channelFind (std::string const &name, pva::ChannelFindRequester::shared_pointer const &requester) OVERRIDE FINAL
 
virtual pva::ChannelFind::shared_pointer channelList (pva::ChannelListRequester::shared_pointer const &requester) OVERRIDE FINAL
 
virtual pva::Channel::shared_pointer createChannel (std::string const &name, pva::ChannelRequester::shared_pointer const &requester, short priority, std::string const &address) OVERRIDE FINAL
 
- Public Member Functions inherited from epics::pvAccess::ChannelProvider
 POINTER_DEFINITIONS (ChannelProvider)
 
 ChannelProvider ()
 
virtual ~ChannelProvider ()
 
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)
 

Public Attributes

const std::string name
 
const std::tr1::shared_ptr< Handlerhandler
 
pva::ChannelFind::shared_pointer finder
 
std::tr1::weak_ptr< Implinternal_self
 
std::tr1::weak_ptr< Implexternal_self
 
epicsMutex mutex
 

Static Public Attributes

static size_t num_instances
 
- Static Public Attributes inherited from epics::pvAccess::ChannelProvider
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

Definition at line 186 of file server.cpp.

Constructor & Destructor Documentation

pvas::DynamicProvider::Impl::Impl ( const std::string &  name,
const std::tr1::shared_ptr< Handler > &  handler 
)
inline

Definition at line 199 of file server.cpp.

201  :name(name)
202  ,handler(handler)
203  {
204  REFTRACE_INCREMENT(num_instances);
205  }
static size_t num_instances
Definition: server.cpp:190
const std::string name
Definition: server.cpp:192
const std::tr1::shared_ptr< Handler > handler
Definition: server.cpp:193
virtual pvas::DynamicProvider::Impl::~Impl ( )
inlinevirtual

Definition at line 206 of file server.cpp.

206  {
207  REFTRACE_DECREMENT(num_instances);
208  }
static size_t num_instances
Definition: server.cpp:190

Member Function Documentation

virtual pva::ChannelFind::shared_pointer pvas::DynamicProvider::Impl::channelFind ( std::string const &  name,
pva::ChannelFindRequester::shared_pointer const &  requester 
)
inlinevirtual

Definition at line 215 of file server.cpp.

217  {
218  bool found = false;
219  {
220  pva::PeerInfo::const_shared_pointer info(requester->getPeerInfo());
221  search_type search;
222  search.push_back(DynamicProvider::Search(name, info ? info.get() : 0));
223 
224  handler->hasChannels(search);
225 
226  found = !search.empty() && search[0].name()==name && search[0].claimed();
227  }
228  requester->channelFindResult(pvd::Status(), finder, found);
229  return finder;
230  }
std::vector< Search > search_type
Definition: server.h:191
pva::ChannelFind::shared_pointer finder
Definition: server.cpp:194
const std::string name
Definition: server.cpp:192
const std::tr1::shared_ptr< Handler > handler
Definition: server.cpp:193
const ChannelProcessRequester::weak_pointer requester
Definition: pvAccess.cpp:68
virtual pva::ChannelFind::shared_pointer pvas::DynamicProvider::Impl::channelList ( pva::ChannelListRequester::shared_pointer const &  requester)
inlinevirtual

Definition at line 231 of file server.cpp.

232  {
234  bool dynamic = true;
235  handler->listChannels(names, dynamic);
236  requester->channelListResult(pvd::Status(), finder, pvd::freeze(names), dynamic);
237  return finder;
238  }
A holder for a contiguous piece of memory.
Definition: sharedVector.h:27
pva::ChannelFind::shared_pointer finder
Definition: server.cpp:194
const std::tr1::shared_ptr< Handler > handler
Definition: server.cpp:193
const ChannelProcessRequester::weak_pointer requester
Definition: pvAccess.cpp:68
virtual pva::Channel::shared_pointer pvas::DynamicProvider::Impl::createChannel ( std::string const &  name,
pva::ChannelRequester::shared_pointer const &  requester,
short  priority,
std::string const &  address 
)
inlinevirtual

Definition at line 239 of file server.cpp.

242  {
243  pva::Channel::shared_pointer ret;
244  pvd::Status sts;
245 
246  ret = handler->createChannel(ChannelProvider::shared_pointer(internal_self), name, requester);
247  if(!ret)
248  sts = pvd::Status::error("Channel no longer available"); // because we only get here if channelFind() succeeds
249 
250  requester->channelCreated(sts, ret);
251  return ret;
252  }
static Status error(const std::string &m)
Definition: status.h:50
const std::string name
Definition: server.cpp:192
const std::tr1::shared_ptr< Handler > handler
Definition: server.cpp:193
const ChannelProcessRequester::weak_pointer requester
Definition: pvAccess.cpp:68
std::tr1::weak_ptr< Impl > internal_self
Definition: server.cpp:195
virtual void pvas::DynamicProvider::Impl::destroy ( )
inlinevirtual

Destroy this instance.

Implements epics::pvAccess::Destroyable.

Definition at line 210 of file server.cpp.

210  {
211  handler->destroy();
212  }
const std::tr1::shared_ptr< Handler > handler
Definition: server.cpp:193
virtual std::string pvas::DynamicProvider::Impl::getProviderName ( )
inlinevirtual

Get the provider name.

Returns
The name.

Implements epics::pvAccess::ChannelProvider.

Definition at line 214 of file server.cpp.

214 { return name; }
const std::string name
Definition: server.cpp:192
pvas::DynamicProvider::Impl::POINTER_DEFINITIONS ( Impl  )

Member Data Documentation

std::tr1::weak_ptr<Impl> pvas::DynamicProvider::Impl::external_self

Definition at line 195 of file server.cpp.

pva::ChannelFind::shared_pointer pvas::DynamicProvider::Impl::finder

Definition at line 194 of file server.cpp.

const std::tr1::shared_ptr<Handler> pvas::DynamicProvider::Impl::handler

Definition at line 193 of file server.cpp.

std::tr1::weak_ptr<Impl> pvas::DynamicProvider::Impl::internal_self

Definition at line 195 of file server.cpp.

epicsMutex pvas::DynamicProvider::Impl::mutex
mutable

Definition at line 197 of file server.cpp.

const std::string pvas::DynamicProvider::Impl::name

Definition at line 192 of file server.cpp.

size_t pvas::DynamicProvider::Impl::num_instances
static

Definition at line 190 of file server.cpp.


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