10 #ifndef FCF_DEVMGR_DEVICE_SENSOR_HPP
11 #define FCF_DEVMGR_DEVICE_SENSOR_HPP
13 #include <fcf/common/dispatcher.hpp>
21 namespace fcf::devmgr::sensor {
50 Sensor(
const std::string& filename,
51 const std::string& name,
70 void CreateObjects(std::shared_ptr<fcf::devmgr::common::IDeviceConfig> config =
nullptr)
override;
87 void RegisterComm(std::shared_ptr<fcf::common::IComm> comm_if,
88 fcf::common::Dispatcher<>& failure,
89 fcf::common::Dispatcher<>& normal)
override;
103 virtual void Enable()
override;
110 virtual void Disable()
override;
117 virtual void Stop()
override;
126 virtual void HwReset(rad::AnyEvent
const& last_event)
override;
135 virtual void HwInit(rad::AnyEvent
const& last_event)
override;
144 virtual void HwEnable(rad::AnyEvent
const& last_event)
override;
153 virtual void HwDisable(rad::AnyEvent
const& last_event)
override;
162 virtual void Setup(
const std::any& payload)
override;
176 virtual bool IsSetupActive(
const std::any& payload)
const override;
183 virtual void Status(
const std::any& payload, std::string& buffer)
override;
195 virtual void Status(
bool end_acq,
196 const dit::did::Did& dictionary,
197 std::shared_ptr<CCfits::FITS>& fits_handle)
override;
210 virtual std::shared_ptr<fcf::devmgr::common::DeviceLcsIf>
GetLcsIf()
const override;
217 virtual std::shared_ptr<fcf::devmgr::common::IDeviceConfig>
GetConfig()
const override;
227 std::shared_ptr<SensorLcsIf<fcfif::SensorTopicUnion>>
m_lcs_if;
232 #endif //FCF_DEVMGR_DEVICE_SENSOR_HPP
Device class header file.
SensorConfig class header file.
sensorLcsIf class header file.
virtual void HwInit(rad::AnyEvent const &last_event) override
Executes a hardware init command.
Definition: sensor.cpp:173
virtual void Disable() override
Executes a Disable command.
Definition: sensor.cpp:133
SensorControllerData m_controller_status
< object containing the status of the controller
Definition: sensor.hpp:221
std::shared_ptr< SensorLcsIf< fcfif::SensorTopicUnion > > m_lcs_if
Definition: sensor.hpp:227
virtual void Enable() override
Executes a Enable command.
Definition: sensor.cpp:120
virtual void HwReset(rad::AnyEvent const &last_event) override
Executes a hardware reset command.
Definition: sensor.cpp:159
std::shared_ptr< SensorConfig > m_config
Definition: sensor.hpp:224
fcf::common::VectorVariant m_sensor_list
pointer to device config object
Definition: sensor.hpp:222
The sensorControllerData struct.
Definition: sensorLcsIf.hpp:60
virtual void HwDisable(rad::AnyEvent const &last_event) override
Executes a hardware disable command.
Definition: sensor.cpp:201
void CreateObjects(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config=nullptr) override
Create object instances.
Definition: sensor.cpp:34
virtual std::shared_ptr< fcf::devmgr::common::DeviceLcsIf > GetLcsIf() const override
Definition: sensor.cpp:108
Definition: device.hpp:30
IDeviceConfig class header file.
virtual bool IsDisabling() const override
Check if sensor is disablig.
Definition: sensor.cpp:215
virtual void Setup(const std::any &payload) override
Executes a setup of the sensor device.
Definition: sensor.cpp:222
DataContext class header file.
virtual void UpdateStatus() override
Update the status of the Sensor device in the OLDB.
Definition: sensor.cpp:239
Definition: dataContext.hpp:81
virtual ~Sensor()
Default destructor.
Definition: sensor.hpp:57
virtual bool IsSetupActive(const std::any &payload) const override
Check if last setup message is still active.
Definition: sensor.cpp:229
void RegisterComm(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal) override
Register a communication interface object.
Definition: sensor.cpp:98
Sensor(const std::string &filename, const std::string &name, fcf::devmgr::common::DataContext &data_ctx)
Sensor constructor.
Definition: sensor.cpp:27
virtual std::shared_ptr< fcf::devmgr::common::IDeviceConfig > GetConfig() const override
Get a pointer of device configuration.
Definition: sensor.cpp:114
The Sensor class.
Definition: sensor.hpp:41
virtual void Status(const std::any &payload, std::string &buffer) override
Obtain the status of the device.
Definition: sensor.cpp:295
virtual void Stop() override
Executes a Stop command.
Definition: sensor.cpp:146
virtual void HwEnable(rad::AnyEvent const &last_event) override
Executes a hardware enable command.
Definition: sensor.cpp:187