TwiceAsNice  2019-02-18
Static Public Member Functions | Static Protected Attributes | List of all members
Basda::Basdard Class Reference

#include <Basdard.h>

Inheritance diagram for Basda::Basdard:
Inheritance graph
Collaboration diagram for Basda::Basdard:
Collaboration graph

Static Public Member Functions

static void destroy ()
 remove the stack of the workers and devices. Since the maps are cleared, the workers and devices are destructed (in the C++ sense) More...
 
static void loadAllDevices (const Nice::JointPtr &_config)
 Add all configured devices to the list of devices. More...
 
static void addDevice (const std::string &_name, const DevicePtr &_device)
 Add a single device to the list of devices. More...
 
static DeviceMapdevices ()
 
static Devicerawdevice (const std::string &_n)
 search a device by name More...
 
template<typename DeviceType >
static IceUtil::Handle< DeviceType > device (const std::string &_n)
 search a device by name More...
 
static void loadAllServices (const Nice::JointPtr &_config)
 load services recognizing NAME and STATE in the configuration. More...
 
static void addWorker (const std::string &_name, const ServiceWorkerPtr &_worker)
 Add a worker to the list of known workers. More...
 
static void startAllWorker ()
 start sequentially all workers known in the list. More...
 
static WorkerListworker ()
 
static WorkerMapworkers ()
 
static ServiceWorkerrawworker (const char *_n)
 search a worker by name More...
 
template<typename WorkerType >
static IceUtil::Handle< WorkerType > worker (const std::string &_n)
 search a worker by name More...
 
template<typename WorkerTypeIf >
static IceUtil::Handle< WorkerTypeIf > service (const std::string &_n)
 create a worker by name More...
 
static void destroy ()
 
static void loadAllDevices (const Nice::JointPtr &_config)
 
static void addDevice (const std::string &_name, const DevicePtr &_device)
 
static DeviceMapdevices ()
 
static Devicerawdevice (const std::string &_n)
 search a device by name More...
 
template<typename DeviceType >
static IceUtil::Handle< DeviceType > device (const std::string &_n)
 search a device by name More...
 
static void loadAllServices (const Nice::JointPtr &_config)
 
static void addWorker (const std::string &_name, const ServiceWorkerPtr &_worker)
 
static void startAllWorker ()
 
static WorkerListworker ()
 
static WorkerMapworkers ()
 
static ServiceWorkerrawworker (const char *_n)
 search a worker by name More...
 
template<typename WorkerType >
static IceUtil::Handle< WorkerType > worker (const std::string &_n)
 search a worker by name More...
 
template<typename WorkerTypeIf >
static IceUtil::Handle< WorkerTypeIf > service (const std::string &_n)
 create a worker by name More...
 

Static Protected Attributes

static WorkerMap s_workers
 The map that associates names with workers. More...
 
static WorkerList s_worker
 The vector of workers. More...
 
static DeviceMap s_devices
 The loaded devices mapped by name. More...
 

Member Function Documentation

◆ addDevice() [1/2]

void Basda::Basdard::addDevice ( const std::string &  _name,
const DevicePtr _device 
)
static

Add a single device to the list of devices.


Parameters
_nameThe name of the device
_deviceThe device handler to be added.
Exceptions
Anexception is thrown if a device with that name already exists in the list.

◆ addDevice() [2/2]

static void Basda::Basdard::addDevice ( const std::string &  _name,
const DevicePtr _device 
)
static

◆ addWorker() [1/2]

void Basda::Basdard::addWorker ( const std::string &  _name,
const ServiceWorkerPtr _worker 
)
static

Add a worker to the list of known workers.


Parameters
_nameThe associated worker name
_workerThe worker itself.

◆ addWorker() [2/2]

static void Basda::Basdard::addWorker ( const std::string &  _name,
const ServiceWorkerPtr _worker 
)
static

◆ destroy() [1/2]

void Basda::Basdard::destroy ( )
static

remove the stack of the workers and devices. Since the maps are cleared, the workers and devices are destructed (in the C++ sense)


◆ destroy() [2/2]

static void Basda::Basdard::destroy ( )
static

◆ device() [1/2]

template<typename DeviceType >
static IceUtil::Handle<DeviceType> Basda::Basdard::device ( const std::string &  _n)
inlinestatic

search a device by name


Parameters
_nThe name of the device
Returns
the device. 0 if the device is not listed.

◆ device() [2/2]

template<typename DeviceType >
static IceUtil::Handle<DeviceType> Basda::Basdard::device ( const std::string &  _n)
inlinestatic

search a device by name


Parameters
_nThe name of the device
Returns
the device. 0 if the device is not listed.

◆ devices() [1/2]

Basda::DeviceMap & Basda::Basdard::devices ( )
static

the list of names mapped to devices

◆ devices() [2/2]

static DeviceMap& Basda::Basdard::devices ( )
static

◆ loadAllDevices() [1/2]

static void Basda::Basdard::loadAllDevices ( const Nice::JointPtr _config)
static

◆ loadAllDevices() [2/2]

void Basda::Basdard::loadAllDevices ( const Nice::JointPtr _config)
static

Add all configured devices to the list of devices.


Parameters
_configThe property tree with the DEV nodes that must contain the devices. Nodes are recognized if the first three letters are capitalized DEV.

◆ loadAllServices() [1/2]

static void Basda::Basdard::loadAllServices ( const Nice::JointPtr _config)
static

◆ loadAllServices() [2/2]

void Basda::Basdard::loadAllServices ( const Nice::JointPtr _config)
static

load services recognizing NAME and STATE in the configuration.


Parameters
_configthe node in the property tree

◆ rawdevice() [1/2]

static Device* Basda::Basdard::rawdevice ( const std::string &  _n)
inlinestatic

search a device by name


Parameters
_nThe name of the device
Returns
the device. 0 if the device is not listed.

◆ rawdevice() [2/2]

static Device* Basda::Basdard::rawdevice ( const std::string &  _n)
inlinestatic

search a device by name


Parameters
_nThe name of the device
Returns
the device. 0 if the device is not listed.

◆ rawworker() [1/2]

static ServiceWorker* Basda::Basdard::rawworker ( const char *  _n)
inlinestatic

search a worker by name


Parameters
_nThe name of the worker.
Returns
the worker. 0 if the worker is not listed.

◆ rawworker() [2/2]

static ServiceWorker* Basda::Basdard::rawworker ( const char *  _n)
inlinestatic

search a worker by name


Parameters
_nThe name of the worker.
Returns
the worker. 0 if the worker is not listed.

◆ service() [1/2]

template<typename WorkerTypeIf >
static IceUtil::Handle<WorkerTypeIf> Basda::Basdard::service ( const std::string &  _n)
inlinestatic

create a worker by name


Parameters
_nThe name of the worker.
Returns
The ICE handle.

◆ service() [2/2]

template<typename WorkerTypeIf >
static IceUtil::Handle<WorkerTypeIf> Basda::Basdard::service ( const std::string &  _n)
inlinestatic

create a worker by name


Parameters
_nThe name of the worker.
Returns
The ICE handle.

◆ startAllWorker() [1/2]

void Basda::Basdard::startAllWorker ( )
static

start sequentially all workers known in the list.


◆ startAllWorker() [2/2]

static void Basda::Basdard::startAllWorker ( )
static

◆ worker() [1/4]

Basda::WorkerList & Basda::Basdard::worker ( )
static

the list of workers.

◆ worker() [2/4]

static WorkerList& Basda::Basdard::worker ( )
static

◆ worker() [3/4]

template<typename WorkerType >
static IceUtil::Handle<WorkerType> Basda::Basdard::worker ( const std::string &  _n)
inlinestatic

search a worker by name


Parameters
_nThe name of the worker.
Returns
the worker. 0 if the worker is not listed.

◆ worker() [4/4]

template<typename WorkerType >
static IceUtil::Handle<WorkerType> Basda::Basdard::worker ( const std::string &  _n)
inlinestatic

search a worker by name


Parameters
_nThe name of the worker.
Returns
the worker. 0 if the worker is not listed.

◆ workers() [1/2]

static WorkerMap& Basda::Basdard::workers ( )
static

◆ workers() [2/2]

Basda::WorkerMap & Basda::Basdard::workers ( )
static

the list of names mapped to workers.

Member Data Documentation

◆ s_devices

static DeviceMap Basda::Basdard::s_devices
staticprotected

The loaded devices mapped by name.

◆ s_worker

static WorkerList Basda::Basdard::s_worker
staticprotected

The vector of workers.

◆ s_workers

static WorkerMap Basda::Basdard::s_workers
staticprotected

The map that associates names with workers.


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