ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
actuator.hpp
Go to the documentation of this file.
1 
10 #ifndef FCF_DEVMGR_DEVICE_ACTUATOR_HPP
11 #define FCF_DEVMGR_DEVICE_ACTUATOR_HPP
12 
13 #include "fcf/common/dispatcher.hpp"
14 
19 
20 
21 namespace fcf {
22 namespace devmgr {
23  namespace actuator {
24 
44 
45  public:
52  Actuator(const std::string& filename,
53  const std::string& name,
54  devmgr::common::DataContext& data_ctx);
55 
59  virtual ~Actuator() {};
71  void CreateObjects(std::shared_ptr<devmgr::common::IDeviceConfig> config = nullptr);
72 
88  void RegisterComm(std::shared_ptr<fcf::common::IComm> comm_if,
89  fcf::common::Dispatcher<>& failure,
90  fcf::common::Dispatcher<>& normal);
91 
99  virtual void Setup(const std::any& payload);
100 
113  virtual bool IsSetupActive(const std::any& payload) const;
114 
115 
121  virtual void Status(const std::any& payload, std::string& buffer);
122 
133  virtual void Status(bool end_acq,
134  const dit::did::Did& dictionary,
135  std::shared_ptr<CCfits::FITS>& fits_handle);
136 
143  virtual void UpdateStatus();
144 
149  virtual std::shared_ptr<fcf::devmgr::common::DeviceLcsIf> GetLcsIf() const;
150 
156  virtual std::shared_ptr<fcf::devmgr::common::IDeviceConfig> GetConfig() const;
157 
158  protected:
161  std::shared_ptr<ActuatorConfig> m_config;
162 
163  // Local Control System Interface
164  std::shared_ptr<ActuatorLcsIf<fcfif::ActuatorTopicUnion>> m_lcs_if;
165  };
166  }
167 }
168 }
169 
170 
171 #endif //FCF_DEVMGR_DEVICE_ACTUATOR_HPP
virtual std::shared_ptr< fcf::devmgr::common::IDeviceConfig > GetConfig() const
Get a pointer of device configuration.
Definition: actuator.cpp:109
The actuator class.
Definition: actuator.hpp:43
Device class header file.
Actuator(const std::string &filename, const std::string &name, devmgr::common::DataContext &data_ctx)
actuator constructor
Definition: actuator.cpp:30
ActuatorControllerData m_controller_status
&lt; object containing the status of the controller
Definition: actuator.hpp:160
virtual std::shared_ptr< fcf::devmgr::common::DeviceLcsIf > GetLcsIf() const
Definition: actuator.cpp:102
Definition: device.hpp:30
std::shared_ptr< ActuatorConfig > m_config
pointer to device config object
Definition: actuator.hpp:161
virtual bool IsSetupActive(const std::any &payload) const
Check if last setup message is still active.
Definition: actuator.cpp:155
void CreateObjects(std::shared_ptr< devmgr::common::IDeviceConfig > config=nullptr)
Create object instances.
Definition: actuator.cpp:38
DataContext class header file.
The actuatorControllerData struct.
Definition: actuatorLcsIf.hpp:33
virtual ~Actuator()
Default destructor.
Definition: actuator.hpp:59
Definition: dataContext.hpp:81
actuatorLcsIf class header file.
virtual void Status(const std::any &payload, std::string &buffer)
Obtain the status of the device.
Definition: actuator.cpp:274
virtual void Setup(const std::any &payload)
Executes a setup of the actuator device.
Definition: actuator.cpp:115
virtual void UpdateStatus()
Update the status of the actuator device in the OLDB.
Definition: actuator.cpp:229
std::shared_ptr< ActuatorLcsIf< fcfif::ActuatorTopicUnion > > m_lcs_if
pointer to device lcs interface object
Definition: actuator.hpp:164
void RegisterComm(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal)
Register a communication interface object.
Definition: actuator.cpp:91
actuatorConfig class header file.