23 #ifndef C_FAKE_ADAPTER_HPP
24 #define C_FAKE_ADAPTER_HPP
31 #include <boost/thread.hpp>
32 #include <boost/property_tree/ptree_fwd.hpp>
52 typedef boost::shared_ptr<CFakeAdapter>
Pointer;
67 void SetCommand(
const std::string device,
const std::string key,
75 typedef std::map<std::string, SignalValue>
KeyMap;
Physical adapter device interface.
Definition: IAdapter.hpp:67
void Start()
Start the fake adapter.
Definition: CFakeAdapter.cpp:63
void Stop()
Stop the fake adapter.
Definition: CFakeAdapter.cpp:75
CFakeAdapter()
Constructor.
Definition: CFakeAdapter.cpp:42
std::map< std::string, KeyMap > DeviceMap
Map of devices of KeyMaps.
Definition: CFakeAdapter.hpp:78
std::map< std::string, SignalValue > KeyMap
Map of device setting keys to values.
Definition: CFakeAdapter.hpp:75
void SetCommand(const std::string device, const std::string key, const SignalValue value)
Sets a value on a device.
Definition: CFakeAdapter.cpp:127
bool m_stopped
Is the adapter stopped?
Definition: CFakeAdapter.hpp:84
static Pointer Create()
Creates a new fake adapter.
Definition: CFakeAdapter.cpp:50
SignalValue GetState(const std::string device, const std::string key) const
Retrieves a value from a device.
Definition: CFakeAdapter.cpp:94
Physical adapter device interface that stores settings in itself.
Definition: CFakeAdapter.hpp:47
boost::mutex m_stopMutex
Protects m_stopped.
Definition: CFakeAdapter.hpp:87
float SignalValue
Type of the value for device signals.
Definition: IAdapter.hpp:42
boost::shared_ptr< CFakeAdapter > Pointer
Type of a fake adapter pointer.
Definition: CFakeAdapter.hpp:52
DeviceMap m_registry
Registry of device keys and values.
Definition: CFakeAdapter.hpp:81