ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lamp.hpp
Go to the documentation of this file.
1 
10 #ifndef FCF_DEVMGR_DEVICE_LAMP_HPP
11 #define FCF_DEVMGR_DEVICE_LAMP_HPP
12 
13 #include <fcf/common/dispatcher.hpp>
14 
20 
21 
22 namespace fcf::devmgr::lamp {
23 
43 
44  public:
51  Lamp(const std::string& filename,
52  const std::string& name,
54 
58  virtual ~Lamp() {};
59 
71  void CreateObjects(std::shared_ptr<fcf::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  //CCfits::FITS* fits_handle = nullptr);
137 
144  virtual void UpdateStatus();
145 
150  virtual std::shared_ptr<fcf::devmgr::common::DeviceLcsIf> GetLcsIf() const;
151 
157  virtual std::shared_ptr<fcf::devmgr::common::IDeviceConfig> GetConfig() const;
158 
159  protected:
160 
164  std::shared_ptr<LampConfig> m_config;
165 
166  // Local Control System Interface
167  std::shared_ptr<LampLcsIf<fcfif::LampTopicUnion>> m_lcs_if;
168  };
169 
170 } // fcf::devmgr::lamp
171 
172 
173 #endif //FCF_DEVMGR_DEVICE_LAMP_HPP
Device class header file.
LampConfig class header file.
virtual void Setup(const std::any &payload)
Executes a setup of the lamp device.
Definition: lamp.cpp:111
virtual ~Lamp()
Default destructor.
Definition: lamp.hpp:58
LampLcsIf class header file.
std::shared_ptr< LampConfig > m_config
Definition: lamp.hpp:164
void CreateObjects(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config=nullptr)
Create object instances.
Definition: lamp.cpp:35
The Lamp class.
Definition: lamp.hpp:42
virtual void UpdateStatus()
Update the status of the lamp device in the OLDB.
Definition: lamp.cpp:228
Definition: device.hpp:30
IDeviceConfig class header file.
virtual std::shared_ptr< fcf::devmgr::common::IDeviceConfig > GetConfig() const
Get a pointer of device configuration.
Definition: lamp.cpp:105
virtual bool IsSetupActive(const std::any &payload) const
Check if last setup message is still active.
Definition: lamp.cpp:153
void RegisterComm(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal)
Register a communication interface object.
Definition: lamp.cpp:89
std::shared_ptr< LampLcsIf< fcfif::LampTopicUnion > > m_lcs_if
Definition: lamp.hpp:167
DataContext class header file.
LampControllerData m_controller_status
&lt; object containing the status of the controller
Definition: lamp.hpp:162
virtual void Status(const std::any &payload, std::string &buffer)
Obtain the status of the device.
Definition: lamp.cpp:289
Definition: dataContext.hpp:81
virtual std::shared_ptr< fcf::devmgr::common::DeviceLcsIf > GetLcsIf() const
Definition: lamp.cpp:99
Lamp(const std::string &filename, const std::string &name, fcf::devmgr::common::DataContext &data_ctx)
Lamp constructor.
Definition: lamp.cpp:27
The LampControllerData struct.
Definition: lampLcsIf.hpp:36