Go to the documentation of this file.
10 #ifndef FCF_DEVMGR_DEVICE_SENSOR_LCSIF_HPP
11 #define FCF_DEVMGR_DEVICE_SENSOR_LCSIF_HPP
14 #include <unordered_map>
17 #include <yaml-cpp/yaml.h>
24 #include <rad/mal/publisher.hpp>
43 void SetValue(
const fcf::common::Variant value);
70 fcf::common::Variant value);
79 std::unordered_map<std::string, ChannelData>
m_values;
118 SensorLcsIf(std::shared_ptr<fcf::devmgr::common::IDeviceConfig> config,
188 void Listener(fcf::common::VectorVariant& params);
195 virtual std::string
GetRpcError(
const short error_code)
const;
207 void PublishState(
const fcf::common::Variant& value);
216 void PublishSubstate(
const fcf::common::Variant& value);
218 void PublishError(
const fcf::common::Variant& value);
220 void PublishChannel(
const std::string channel,
221 const fcf::common::Variant& value);
233 log4cplus::Logger m_logger;
240 #include "sensorLcsIf.ipp"
242 #endif //FCF_DEVMGR_DEVICE_SENSOR_LCSIF_HPP
virtual bool IsOperational() const
Check if controller is in Operational.
Definition: sensorLcsIf.cpp:126
DataContext class header file.
void GetValue(int &value) const
void GetValue(bool &value) const
std::unordered_map< std::string, ChannelData > m_values
Definition: sensorLcsIf.hpp:79
virtual ~SensorLcsIf()
Default destructor.
Definition: sensorLcsIf.hpp:124
The sensorControllerData struct.
Definition: sensorLcsIf.hpp:60
void SetData(const SensorControllerData &data)
Definition: sensorLcsIf.cpp:36
friend std::ostream & operator<<(std::ostream &dest, const ChannelData &obj)
Definition: sensorLcsIf.cpp:24
void ClearChannelValues()
Sensor Local Control System (LCS) Interface (IF) class.
Definition: sensorLcsIf.hpp:97
std::string GetErrorText() const
ChannelData()
Definition: sensorLcsIf.cpp:18
virtual ~SensorControllerData()
Definition: sensorLcsIf.cpp:33
deviceLcsIf class header file.
bool IsHwFailure() const
Check if Sensor is in hardware error.
Definition: sensorLcsIf.cpp:147
void Listener(fcf::common::VectorVariant ¶ms)
Callback to manage changes on the monitored items.
Definition: sensorLcsIf.cpp:215
fcf::common::Variant GetRawValue() const
std::unordered_map< std::string, std::string > m_channels_map
Definition: sensorLcsIf.hpp:228
void GetChannelValue(const std::string &channel, ChannelData &data) const
Definition: sensor.hpp:21
Definition: dataContext.hpp:90
void SetValue(const fcf::common::Variant value)
virtual std::string GetSubstateStr() const
Definition: deviceLcsIf.hpp:77
void SetChannelValue(const std::string &channel, fcf::common::Variant value)
void GetValue(double &value) const
virtual std::string GetRpcError(const short error_code) const
Definition: sensorLcsIf.cpp:277
The ChannelData struct.
Definition: sensorLcsIf.hpp:33
std::unordered_map< std::string, ChannelData > m_channel_values
Definition: sensorLcsIf.hpp:229
SensorConfig class header file.
void StartMonitoring()
Start monitoring of controller attributes.
Definition: sensorLcsIf.cpp:174
SensorControllerData()
Definition: sensorLcsIf.cpp:29
virtual bool IsReady() const
Check if controller is in Standby/Ready state.
Definition: sensorLcsIf.cpp:106
virtual ~ChannelData()
Definition: sensorLcsIf.cpp:21
The DeviceControllerData struct.
Definition: deviceLcsIf.hpp:36
void StopMonitoring()
Stop monitoring of controller attributes.
Definition: sensorLcsIf.cpp:194
virtual void ReadStatus(SensorControllerData &status)
Read status from the controller.
Definition: sensorLcsIf.cpp:162
virtual bool IsNotReady() const
Check if controller is in Standby/NotReady state.
Definition: sensorLcsIf.cpp:93
fcf::common::Variant m_value
Definition: sensorLcsIf.hpp:48
SensorLcsIf(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config, fcf::devmgr::common::DataContext &data_ctx)
sensorLcsIf constructor.
Definition: sensorLcsIf.cpp:41