10 #ifndef FCF_DEVMGR_DEVICE_SENSOR_CONFIG_HPP
11 #define FCF_DEVMGR_DEVICE_SENSOR_CONFIG_HPP
17 #include <yaml-cpp/yaml.h>
19 #include <fcf/common/iComm.hpp>
26 namespace fcf::devmgr::sensor {
97 inline std::string
GetType()
const;
100 inline std::string
GetUnit()
const;
101 inline std::string
GetMap()
const;
102 inline std::string
GetCat()
const;
106 inline void SetAlias(std::string alias);
107 inline void SetType(std::string type);
110 inline void SetUnit(std::string unit);
111 inline void SetMap(std::string map);
137 template<
typename TOPIC_TYPE>
155 const std::string name);
179 virtual void GetConfig(fcf::common::VectorVariant& params);
190 virtual void GetConfigList(std::vector<std::string>& cfg_list,
200 virtual void GetChannelList(std::vector<std::string>& channel_list);
207 std::map<std::string, Channel> m_channel_map;
212 #include "sensorConfig.ipp"
213 #endif //FCF_DEVMGR_DEVICE_SENSOR_CONFIG_H
const std::unordered_map< short, std::string > SubstateMap
Definition: sensorConfig.hpp:48
SensorConfig(const std::string filename, const std::string name)
DeviceConfig constructor.
Definition: sensorConfig.cpp:40
constexpr auto CI_MAP
Definition: sensorConfig.hpp:38
constexpr auto RPC_INIT
Definition: deviceConfig.hpp:43
void SetFitsPrefix(std::string prefix)
std::string m_prefix
Definition: sensorConfig.hpp:122
Sensor Local Control System (LCS) Interface (IF) class.
Definition: sensorLcsIf.hpp:97
constexpr auto SUBSTATE_NOTREADY_STR
Definition: deviceConfig.hpp:87
void SetAlias(std::string alias)
Definition: sensorConfig.hpp:90
const std::vector< std::string > rpcMapping
Definition: sensorConfig.hpp:82
virtual void GetConfigList(std::vector< std::string > &cfg_list, std::string prefix)
Get configuration list.
Definition: sensorConfig.cpp:166
const std::vector< std::string > statMapping
Definition: sensorConfig.hpp:77
const std::vector< std::string > cfgMapping
Definition: sensorConfig.hpp:74
constexpr auto AI_CAT_STR
Definition: sensorConfig.hpp:62
std::string GetType() const
constexpr auto SI_TYPE_STR
Definition: sensorConfig.hpp:59
constexpr auto CI_HEADER
Definition: sensorConfig.hpp:35
constexpr auto CI_STAT_SUBSTATE
Definition: deviceConfig.hpp:50
constexpr auto RPC_DISABLE
Definition: deviceConfig.hpp:45
constexpr auto CI_ALIAS
Definition: sensorConfig.hpp:33
std::string GetAlias() const
bool m_log
Definition: sensorConfig.hpp:119
Channel()
Definition: sensorConfig.cpp:26
std::string GetFitsPrefix() const
constexpr auto AI_TYPE_STR
Definition: sensorConfig.hpp:57
void SetHeaderFlag(bool flag)
bool IsReadOnly()
Definition: sensorConfig.cpp:224
constexpr auto DI_TYPE_STR
Definition: sensorConfig.hpp:56
constexpr auto II_CAT_STR
Definition: sensorConfig.hpp:63
void SetMap(std::string map)
bool GetHeaderFlag() const
void SetUnit(std::string unit)
std::string m_type
Definition: sensorConfig.hpp:117
virtual ~Channel()
Definition: sensorConfig.cpp:36
configSet class header file.
constexpr auto CI_READONLY
Definition: sensorConfig.hpp:28
SensorHwErrors header file.
constexpr auto RPC_STOP
Definition: deviceConfig.hpp:46
std::string GetMap() const
SensorRpcErrors header file.
std::string m_map
Definition: sensorConfig.hpp:121
constexpr auto CI_STAT_STATE
Definition: deviceConfig.hpp:51
std::string m_unit
Definition: sensorConfig.hpp:120
constexpr int SUBSTATE_NOTREADY
Definition: deviceConfig.hpp:82
constexpr auto SUBSTATE_OP_MONITORING_STR
Definition: sensorConfig.hpp:46
bool m_header
Definition: sensorConfig.hpp:118
std::string GetCat() const
constexpr auto SI_CAT_STR
Definition: sensorConfig.hpp:64
DataContext class header file.
constexpr auto II_TYPE_STR
Definition: sensorConfig.hpp:58
constexpr auto SUBSTATE_OP_ERROR_STR
Definition: deviceConfig.hpp:96
std::string m_alias
Definition: sensorConfig.hpp:116
constexpr auto CI_UNIT
Definition: sensorConfig.hpp:37
constexpr auto SUBSTATE_READY_STR
Definition: deviceConfig.hpp:89
sensor Configuration class
Definition: sensorConfig.hpp:133
constexpr int SUBSTATE_OP_ERROR
Definition: deviceConfig.hpp:93
std::string GetDescription() const
std::string m_description
Definition: sensorConfig.hpp:115
const std::unordered_map< std::string, std::string > ChannelTypeMap
Definition: sensorConfig.hpp:67
constexpr auto RPC_RESET
Definition: deviceConfig.hpp:47
constexpr auto CI_LOG
Definition: sensorConfig.hpp:36
Device Configuration class.
Definition: deviceConfig.hpp:125
virtual void GetChannelList(std::vector< std::string > &channel_list)
Get channel list.
Definition: sensorConfig.cpp:215
void SetDescription(std::string description)
constexpr auto CI_DESCRIPTION
Definition: sensorConfig.hpp:32
constexpr auto DI_CAT_STR
Definition: sensorConfig.hpp:61
The Sensor class.
Definition: sensor.hpp:41
constexpr auto CI_TYPE
Definition: sensorConfig.hpp:34
constexpr int SUBSTATE_ERROR
Definition: deviceConfig.hpp:85
constexpr auto CI_CHANNELS
Definition: sensorConfig.hpp:31
virtual ~SensorConfig()
DeviceConfig destructor.
Definition: sensorConfig.cpp:50
void SetLogFlag(bool flag)
virtual void ReadConfig()
Read the configuration.
Definition: sensorConfig.cpp:56
constexpr auto RPC_ENABLE
Definition: deviceConfig.hpp:44
void SetType(std::string type)
DeviceConfig class header file.
constexpr auto SUBSTATE_ERROR_STR
Definition: deviceConfig.hpp:90
constexpr int SUBSTATE_OP_MONITORING
Definition: sensorConfig.hpp:45
constexpr int SUBSTATE_READY
Definition: deviceConfig.hpp:83
std::string GetUnit() const
virtual void GetConfig(fcf::common::VectorVariant ¶ms)
Obtain the list of configuration parameters.
Definition: sensorConfig.cpp:159