9 #ifndef FCF_DEVMGR_COMMON_DEVICE_HPP
10 #define FCF_DEVMGR_COMMON_DEVICE_HPP
12 #include <fcf/common/dispatcher.hpp>
39 Device(
const std::string filename,
40 const std::string name,
59 virtual bool IsReady()
const override;
87 virtual void Init()
override;
94 virtual void Enable()
override;
101 virtual void Disable()
override;
108 virtual void Stop()
override;
115 virtual void Reset()
override;
131 virtual void Status(
const std::string prefix,
132 const dit::did::Did& dictionary,
133 std::shared_ptr<CCfits::FITS>& fits_handle);
143 virtual void Simulate(rad::AnyEvent
const& last_event)
override;
152 virtual void StopSim(rad::AnyEvent
const& last_event)
override;
161 virtual void Ignore(rad::AnyEvent
const& last_event)
override;
170 virtual void StopIgn(rad::AnyEvent
const& last_event)
override;
179 virtual void HwReset(rad::AnyEvent
const& last_event)
override;
188 virtual void HwInit(rad::AnyEvent
const& last_event)
override;
197 virtual void HwEnable(rad::AnyEvent
const& last_event)
override;
206 virtual void HwDisable(rad::AnyEvent
const& last_event)
override;
222 virtual std::string
GetName()
const override;
240 void UpdateDb(std::vector<std::string> attr_vector);
259 void GetPrefix(
const std::vector<std::string> prefix_list, std::string& prefix);
294 #endif //FCF_DEVMGR_COMMON_DEVICE_HPP
void GetPrefix(const std::vector< std::string > prefix_list, std::string &prefix)
Get prefix for writing attributes to the DB.
Definition: device.cpp:686
virtual void HwInit(rad::AnyEvent const &last_event) override
Executes a hardware init command.
Definition: device.cpp:459
void SetIgnore(bool flag)
SetIgnore.
Definition: device.cpp:646
virtual void Reset() override
Executes a Reset command.
Definition: device.cpp:116
Device(const std::string filename, const std::string name, DataContext &data_ctx)
Device abstract class constructor.
Definition: device.cpp:31
The DeviceControllerData struct.
Definition: deviceLcsIf.hpp:31
virtual bool IsReady() const override
Check if device is Standby/Ready.
Definition: device.cpp:547
virtual void Init() override
Executes a Init command.
Definition: device.cpp:44
Definition: iDevice.hpp:39
void Status(DeviceControllerData *data, std::string &buffer)
Definition: device.cpp:150
virtual void Ignore(rad::AnyEvent const &last_event) override
Executes a Ignore.
Definition: device.cpp:345
virtual std::string GetName() const override
Get device id.
Definition: device.cpp:699
virtual void StopIgn(rad::AnyEvent const &last_event) override
Executes a StopIgn.
Definition: device.cpp:386
Device class header file.
virtual void Enable() override
Executes a Enable command.
Definition: device.cpp:67
virtual bool IsDisabling() const override
Check if device is disablig.
Definition: device.cpp:606
std::shared_ptr< DeviceLcsIf > m_lcs_if
Local Control System Interface.
Definition: device.hpp:285
fcf::common::Dispatcher m_normal
Dispatcher for managing positive events.
Definition: device.hpp:279
virtual void HwEnable(rad::AnyEvent const &last_event) override
Executes a hardware enable command.
Definition: device.cpp:482
virtual ~Device()
Default destructor.
Definition: device.cpp:39
virtual void HwDisable(rad::AnyEvent const &last_event) override
Executes a hardware disable command.
Definition: device.cpp:505
virtual bool IsOperational() const override
Check if device is Operational.
Definition: device.cpp:566
virtual void CheckHwFailure() const override
Check if device is in failure state.
Definition: device.cpp:584
Definition: device.hpp:30
void SetSimulation(bool flag)
SetSimulation.
Definition: device.cpp:666
std::string m_name
device ID.
Definition: device.hpp:273
DataContext & m_data_ctx
reference to the data context object.
Definition: device.hpp:274
virtual void Disable() override
Executes a Disable command.
Definition: device.cpp:85
virtual void HwReset(rad::AnyEvent const &last_event) override
Executes a hardware reset command.
Definition: device.cpp:436
bool CheckNameParam(const std::any &payload)
Determine whether paramater is included (device name).
Definition: device.cpp:730
virtual void StopMonitoring() override
Stop device monitoring.
Definition: device.cpp:717
DataContext class header file.
std::shared_ptr< DeviceConfig > m_config
Pointer to configuration object.
Definition: device.hpp:282
virtual void StopSim(rad::AnyEvent const &last_event) override
Executes a StopSim.
Definition: device.cpp:242
Definition: dataContext.hpp:81
fcf::common::Dispatcher m_failure
Dispatcher for managing failures.
Definition: device.hpp:277
deviceLcsIf class header file.
virtual bool IsNotReady() const override
Check if device is Standby/NotReady.
Definition: device.cpp:528
std::string m_filename
device configuration filename.
Definition: device.hpp:272
bool IsMsgForMe(const std::string &id) const
Check if received message id is addressed to me.
Definition: device.cpp:624
virtual void Stop() override
Executes a Stop command.
Definition: device.cpp:101
void UpdateDb(std::vector< std::string > attr_vector)
Update device database.
Definition: device.cpp:636
virtual void Simulate(rad::AnyEvent const &last_event) override
Executes a Simulat.
Definition: device.cpp:185
DeviceConfig class header file.
virtual void StartMonitoring() override
Start device monitoring via OPCUA subscriptions.
Definition: device.cpp:704