FREEDM DGI
|
Physical adapter device interface. More...
#include <IAdapter.hpp>
Public Types | |
typedef boost::shared_ptr< IAdapter > | Pointer |
Pointer to a physical adapter. More... | |
Public Member Functions | |
virtual | ~IAdapter () |
Virtual destructor for derived classes. More... | |
std::set< std::string > | GetDevices () const |
Get the list of registered device names. More... | |
virtual SignalValue | GetState (const std::string device, const std::string signal) const =0 |
Retrieves a value from a device. More... | |
void | RegisterDevice (const std::string devid) |
Register a device name with the adapter. More... | |
virtual void | SetCommand (const std::string device, const std::string signal, const SignalValue value)=0 |
Sets a value on a device. More... | |
virtual void | Start ()=0 |
Starts the adapter. More... | |
virtual void | Stop ()=0 |
Stops the adapter. Guaranteed to be thread-safe. More... | |
Protected Member Functions | |
IAdapter () | |
Constructor. More... | |
void | RevealDevices () |
Reveals devices in the device manager. More... | |
Private Attributes | |
std::set< std::string > | m_devices |
Set of registered device names. More... | |
Defines the interface each device uses to perform its operations. The concrete adapter is responsible for implementation of both Get and Set functions.
The adapter class is intended to be private to the device subsystem. If you want to access it from outside devices, you are doing something wrong.
typedef boost::shared_ptr<IAdapter> freedm::broker::device::IAdapter::Pointer |
|
virtual |
Virtual destructor for derived classes.
|
protected |
std::set< std::string > freedm::broker::device::IAdapter::GetDevices | ( | ) | const |
Accessor function for the registered device set.
|
pure virtual |
void freedm::broker::device::IAdapter::RegisterDevice | ( | const std::string | devid | ) |
Adds a device name to the registered device set.
devid | The name of the device to register. |
|
protected |
Reveals the associated devices in the device manager.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
private |