ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
shutter.hpp
Go to the documentation of this file.
1 
10 #ifndef FCF_DEVMGR_DEVICE_SHUTTER_HPP
11 #define FCF_DEVMGR_DEVICE_SHUTTER_HPP
12 
13 #include <fcf/common/dispatcher.hpp>
14 
19 
20 
21 namespace fcf::devmgr::shutter {
22 
23 
41  {
42 
43  public:
44 
51  Shutter(const std::string filename,
52  const std::string name,
54 
55 
59  virtual ~Shutter() {};
60 
72  void CreateObjects(std::shared_ptr<fcf::devmgr::common::IDeviceConfig> config = nullptr);
73 
89  void RegisterComm(std::shared_ptr<fcf::common::IComm> comm_if,
90  fcf::common::Dispatcher<>& failure,
91  fcf::common::Dispatcher<>& normal);
92 
99  virtual void UpdateStatus();
100 
108  virtual void Setup(const std::any& payload);
109 
122  virtual bool IsSetupActive(const std::any& payload) const;
123 
129  virtual void Status(const std::any& payload, std::string& buffer);
130 
141  virtual void Status(bool end_acq,
142  const dit::did::Did& dictionary,
143  std::shared_ptr<CCfits::FITS>& fits_handle);
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 
159  protected:
163  std::shared_ptr<ShutterConfig> m_config;
165  std::shared_ptr<ShutterLcsIf<fcfif::ShutterTopicUnion>> m_lcs_if;
166  };
167 }
168 
169 
170 #endif //FCF_DEVMGR_DEVICE_SHUTTER_HPP
void CreateObjects(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config=nullptr)
Create object instances.
Definition: shutter.cpp:37
Shutter(const std::string filename, const std::string name, fcf::devmgr::common::DataContext &data_ctx)
Shutter constructor.
Definition: shutter.cpp:28
virtual std::shared_ptr< fcf::devmgr::common::IDeviceConfig > GetConfig() const
Get a pointer of device configuration.
Definition: shutter.cpp:99
Device class header file.
The Shutter class.
Definition: shutter.hpp:40
ShutterConfig class header file.
std::shared_ptr< ShutterConfig > m_config
Local Control System Interface.
Definition: shutter.hpp:163
virtual void Setup(const std::any &payload)
Executes a setup of the shutter device.
Definition: shutter.cpp:115
std::shared_ptr< ShutterLcsIf< fcfif::ShutterTopicUnion > > m_lcs_if
Definition: shutter.hpp:165
virtual ~Shutter()
Default destructor.
Definition: shutter.hpp:59
virtual std::shared_ptr< fcf::devmgr::common::DeviceLcsIf > GetLcsIf() const
Definition: shutter.cpp:92
virtual bool IsSetupActive(const std::any &payload) const
Check if last setup message is still active.
Definition: shutter.cpp:157
void RegisterComm(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal)
Register a communication interface object.
Definition: shutter.cpp:105
Definition: device.hpp:30
The ShutterControllerData struct.
Definition: shutterLcsIf.hpp:37
ShutterControllerData m_controller_status
&lt; object containing the status of the controller
Definition: shutter.hpp:161
ShutterLcsIf class header file.
virtual void UpdateStatus()
Update the status of the shutter device in the OLDB.
Definition: shutter.cpp:229
DataContext class header file.
Definition: dataContext.hpp:81
virtual void Status(const std::any &payload, std::string &buffer)
Obtain the status of the device.
Definition: shutter.cpp:286