TwirreLink
 All Classes Functions Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
twirre::DeviceProvider Class Reference

A DeviceProvider is a collection of Actuators and Sensors which can be connected to a TwirreLink instance. More...

#include <DeviceProvider.h>

Inheritance diagram for twirre::DeviceProvider:
Inheritance graph
[legend]

Public Member Functions

 DeviceProvider ()
 Default empty constructor.
 
virtual void addActuator (Actuator *a)
 Add an Actuator to this provider. More...
 
virtual void addSensor (Sensor *s)
 Add a Sensor to this provider. More...
 
virtual const std::map
< std::string, Actuator * > & 
getActuators ()
 Get all available actuators. More...
 
virtual const std::map
< std::string, Sensor * > & 
getSensors ()
 Get all available sensors. More...
 

Protected Member Functions

void doNotifyChange ()
 Notifies all connected instances of TwirreLink that they should update, because a change (added/removed device) has occurred in this provider.
 
void addLogger (TwirreLogger *log)
 
void removeLogger (TwirreLogger *log)
 

Protected Attributes

std::map< std::string, Sensor * > _sensors
 
std::map< std::string, Actuator * > _actuators
 

Friends

class TwirreLink
 

Detailed Description

A DeviceProvider is a collection of Actuators and Sensors which can be connected to a TwirreLink instance.

Member Function Documentation

void twirre::DeviceProvider::addActuator ( Actuator a)
virtual

Add an Actuator to this provider.

Parameters
aa pointer to the Actuator to be added
void twirre::DeviceProvider::addSensor ( Sensor s)
virtual

Add a Sensor to this provider.

Parameters
sa pointer to the Sensor to be added
const std::map< std::string, Actuator * > & twirre::DeviceProvider::getActuators ( )
virtual

Get all available actuators.

Returns
A const reference to the internal map is returned. This map maps an actuator name to a pointer to the actual Actuator object.
const std::map< std::string, Sensor * > & twirre::DeviceProvider::getSensors ( )
virtual

Get all available sensors.

Returns
A const reference to the internal map is returned. This map maps an sensor name to a pointer to the actual Sensor object.

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