24 #ifndef I_BUFFER_ADAPTER_HPP 25 #define I_BUFFER_ADAPTER_HPP 33 #include <boost/shared_ptr.hpp> 34 #include <boost/thread/shared_mutex.hpp> 52 typedef boost::shared_ptr<IBufferAdapter>
Pointer;
55 void SetCommand(
const std::string device,
const std::string signal,
63 const std::size_t index);
67 const std::size_t index);
104 #endif // I_BUFFER_ADAPTER_HPP Physical adapter device interface.
Definition: IAdapter.hpp:67
void RegisterCommandInfo(const std::string device, const std::string signal, const std::size_t index)
Registers a new device signal with the physical adapter.
Definition: IBufferAdapter.cpp:269
void SetCommand(const std::string device, const std::string signal, const SignalValue value)
Set data in txBuffer.
Definition: IBufferAdapter.cpp:148
std::map< const DeviceSignal, const std::size_t > m_stateInfo
Translates a device signal into its rxBuffer (state) index.
Definition: IBufferAdapter.hpp:79
std::vector< SignalValue > m_rxBuffer
The "state table" buffer received from the external host.
Definition: IBufferAdapter.hpp:85
bool m_buffer_initialized
Flag that indicates whether the buffer is NaN.
Definition: IBufferAdapter.hpp:97
virtual ~IBufferAdapter()
Virtual destructor for derived classes.
Definition: IBufferAdapter.cpp:314
Buffer adapter device interface.
Definition: IBufferAdapter.hpp:47
std::map< const DeviceSignal, const std::size_t > m_commandInfo
Translates a device signal into its txBuffer (command) index.
Definition: IBufferAdapter.hpp:82
SignalValue GetState(const std::string device, const std::string signal) const
Retrieve data from rxBuffer.
Definition: IBufferAdapter.cpp:181
void Start()
Starts the adapter.
Definition: IBufferAdapter.cpp:70
float SignalValue
Type of the value for device signals.
Definition: IAdapter.hpp:42
void RegisterStateInfo(const std::string device, const std::string signal, const std::size_t index)
Registers a new device signal with the physical adapter.
Definition: IBufferAdapter.cpp:217
std::vector< SignalValue > m_txBuffer
The "command table" buffer sent to the external host.
Definition: IBufferAdapter.hpp:88
boost::shared_mutex m_txMutex
Provides synchronization for m_txBuffer.
Definition: IBufferAdapter.hpp:94
General FREEDM Namespace.
Definition: CBroker.cpp:53
boost::shared_ptr< IBufferAdapter > Pointer
Pointer to a physical adapter.
Definition: IBufferAdapter.hpp:52
boost::shared_mutex m_rxMutex
Provides synchronization for m_rxBuffer.
Definition: IBufferAdapter.hpp:91
IBufferAdapter()
Constructor.
Definition: IBufferAdapter.cpp:54