9 #ifndef FCF_DEVMGR_COMMON_IDEVICE_HPP
10 #define FCF_DEVMGR_COMMON_IDEVICE_HPP
14 #include <rad/getPayload.hpp>
15 #include <dit/fits/fits.hpp>
16 #include <fcf/common/dispatcher.hpp>
24 #define REGISTER_DEVICE(T) static fcf::devmgr::common::DeviceMaker<T> maker(#T)
48 virtual void CreateObjects(std::shared_ptr<fcf::devmgr::common::IDeviceConfig> config =
nullptr)=0;
64 virtual void RegisterComm(std::shared_ptr<fcf::common::IComm> comm_if,
65 fcf::common::Dispatcher<>& failure,
66 fcf::common::Dispatcher<>& normal) = 0;
80 virtual bool IsReady()
const = 0;
108 virtual void Init() = 0;
115 virtual void Enable() = 0;
129 virtual void Stop() = 0;
136 virtual void Reset() = 0;
151 virtual void Setup(
const std::any& payload) = 0;
162 virtual bool IsSetupActive(
const std::any& payload)
const = 0;
169 virtual void Status(
const std::any& payload, std::string& buffer) = 0;
182 virtual void Status(
bool end_acq,
183 const dit::did::Did& dictionary,
184 std::shared_ptr<CCfits::FITS>& fits_handle) = 0;
193 virtual void Simulate(rad::AnyEvent
const& last_event) = 0;
202 virtual void StopSim(rad::AnyEvent
const& last_event) = 0;
211 virtual void Ignore(rad::AnyEvent
const& last_event) = 0;
220 virtual void StopIgn(rad::AnyEvent
const& last_event) = 0;
229 virtual void HwReset(rad::AnyEvent
const& last_event) = 0;
238 virtual void HwInit(rad::AnyEvent
const& last_event) = 0;
247 virtual void HwEnable(rad::AnyEvent
const& last_event) = 0;
256 virtual void HwDisable(rad::AnyEvent
const& last_event) = 0;
263 virtual std::shared_ptr<DeviceLcsIf>
GetLcsIf()
const = 0;
270 virtual std::shared_ptr<IDeviceConfig>
GetConfig()
const = 0;
287 virtual std::string
GetName()
const = 0;
295 #endif //FCF_DEVMGR_COMMON_IDEVICE_HPP
virtual void HwEnable(rad::AnyEvent const &last_event)=0
Executes a hardware enable command.
Definition: iDevice.hpp:39
virtual void StopSim(rad::AnyEvent const &last_event)=0
Executes a StopSim.
virtual void Disable()=0
Executes a Disable command.
virtual void Setup(const std::any &payload)=0
Executes a setup.
virtual void HwInit(rad::AnyEvent const &last_event)=0
Executes a hardware init command.
virtual std::shared_ptr< IDeviceConfig > GetConfig() const =0
Get a pointer of device configuration.
virtual void CheckHwFailure() const =0
Check if device is in failure state.
virtual bool IsReady() const =0
Check if device is Standby/Ready.
virtual std::shared_ptr< DeviceLcsIf > GetLcsIf() const =0
Get a pointer of device LCS interface.
virtual void Simulate(rad::AnyEvent const &last_event)=0
Executes a Simulat.
virtual void CreateObjects(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config=nullptr)=0
Create basic objects needed by the device class.
virtual void Stop()=0
Executes a Stop command.
virtual void Reset()=0
Executes a Reset command.
virtual bool IsOperational() const =0
Check if device is Operational.
virtual void UpdateStatus()=0
Update internal status by connecting to the LCS.
virtual bool IsDisabling() const =0
Check if device is disablig.
virtual void StartMonitoring()=0
Start device monitoring via OPCUA subscriptions.
virtual void Status(const std::any &payload, std::string &buffer)=0
Obtain the status of the device.
virtual void Init()=0
Executes a Init command.
virtual void StopMonitoring()=0
Stop device monitoring.
virtual void HwDisable(rad::AnyEvent const &last_event)=0
Executes a hardware disable command.
deviceMaker class header file.
virtual void HwReset(rad::AnyEvent const &last_event)=0
Executes a hardware reset command.
virtual void Enable()=0
Executes a Enable command.
virtual void StopIgn(rad::AnyEvent const &last_event)=0
Executes a StopIgn.
virtual void Ignore(rad::AnyEvent const &last_event)=0
Executes a Ignore.
virtual void RegisterComm(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal)=0
Register a communication interface object.
virtual bool IsSetupActive(const std::any &payload) const =0
Check if setup is still active.
virtual std::string GetName() const =0
Get device name.
virtual bool IsNotReady() const =0
Check if device is Standby/NotReady.