ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
adc.hpp
Go to the documentation of this file.
1 
9 #ifndef FCF_DEVMGR_DEVICE_ADC_HPP
10 #define FCF_DEVMGR_DEVICE_ADC_HPP
11 
12 #include "fcf/common/dispatcher.hpp"
13 
19 
20 namespace fcf {
21  namespace devmgr {
22  namespace adc {
23 
42  class Adc : public devmgr::common::Device {
43 
44  public:
51  Adc(const std::string& filename,
52  const std::string& name,
53  devmgr::common::DataContext& data_ctx);
54 
58  virtual ~Adc() {};
59 
71  void CreateObjects(std::shared_ptr<devmgr::common::IDeviceConfig> config = nullptr) override;
72 
88  void RegisterComm(std::shared_ptr<fcf::common::IComm> comm_if,
89  fcf::common::Dispatcher<>& failure,
90  fcf::common::Dispatcher<>& normal) override;
91 
99  virtual void Setup(const std::any& payload) override;
100 
113  virtual bool IsSetupActive(const std::any& payload) const override;
114 
115 
116  void SetTargetNamedPosition(const std::string named_position);
117  const std::string GetTargetNamedPosition();
118 
124  virtual void Status(const std::any& payload, std::string& buffer) override;
125 
136  virtual void Status(bool end_acq,
137  const dit::did::Did& dictionary,
138  std::shared_ptr<CCfits::FITS>& fits_handle);
139  //CCfits::FITS* fits_handle = nullptr);
140 
147  virtual void UpdateStatus() override;
148 
153  virtual std::shared_ptr<devmgr::common::DeviceLcsIf> GetLcsIf() const override;
154 
160  virtual std::shared_ptr<devmgr::common::IDeviceConfig> GetConfig() const override;
161 
162  protected:
165  std::string m_target_named_pos;
166  std::shared_ptr<AdcConfig> m_config;
167 
168  // Local Control System Interface
169  std::shared_ptr<AdcLcsIf<fcfif::AdcTopicUnion>> m_lcs_if;
170  };
171  }
172  }
173 }
174 
175 
176 #endif //FCF_DEVMGR_DEVICE_ADC_HPP
virtual void Setup(const std::any &payload) override
Executes a setup of the adc device.
Definition: adc.cpp:95
virtual std::shared_ptr< devmgr::common::DeviceLcsIf > GetLcsIf() const override
Definition: adc.cpp:89
Device class header file.
std::shared_ptr< AdcLcsIf< fcfif::AdcTopicUnion > > m_lcs_if
pointer to device lcs interface object
Definition: adc.hpp:169
std::shared_ptr< AdcConfig > m_config
pointer to device config object
Definition: adc.hpp:166
std::string m_target_named_pos
Definition: adc.hpp:165
const std::string GetTargetNamedPosition()
Definition: adc.cpp:264
AdcConfig class header file.
AdcControllerData m_controller_status
&lt; object containing the status of the controller
Definition: adc.hpp:164
Adc(const std::string &filename, const std::string &name, devmgr::common::DataContext &data_ctx)
Adc constructor.
Definition: adc.cpp:27
adcLcsIf class header file.
virtual std::shared_ptr< devmgr::common::IDeviceConfig > GetConfig() const override
Get a pointer of device configuration.
Definition: adc.cpp:467
Definition: device.hpp:30
virtual void UpdateStatus() override
Update the status of the Adc device in the OLDB.
Definition: adc.cpp:270
IDeviceConfig class header file.
virtual bool IsSetupActive(const std::any &payload) const override
Check if last setup message is still active.
Definition: adc.cpp:186
The Adc class.
Definition: adc.hpp:42
void SetTargetNamedPosition(const std::string named_position)
Definition: adc.cpp:257
DataContext class header file.
Definition: dataContext.hpp:81
void RegisterComm(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal) override
Register a communication interface object.
Definition: adc.cpp:79
virtual ~Adc()
Default destructor.
Definition: adc.hpp:58
virtual void Status(const std::any &payload, std::string &buffer) override
Obtain the status of the device.
Definition: adc.cpp:370
void CreateObjects(std::shared_ptr< devmgr::common::IDeviceConfig > config=nullptr) override
Create object instances.
Definition: adc.cpp:35
The adcControllerData struct.
Definition: adcLcsIf.hpp:28