ifw-fcf  3.0.0
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 
43 
44  public:
51  Adc(const std::string& filename,
52  const std::string& name,
54 
58  virtual ~Adc() {};
59 
71  void CreateObjects(std::shared_ptr<fcf::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<fcf::devmgr::common::DeviceLcsIf> GetLcsIf() const override;
154 
160  virtual std::shared_ptr<fcf::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
fcf::devmgr::adc::Adc::Adc
Adc(const std::string &filename, const std::string &name, fcf::devmgr::common::DataContext &data_ctx)
Adc constructor.
Definition: adc.cpp:27
dataContext.hpp
DataContext class header file.
fcf::devmgr::adc::Adc::SetTargetNamedPosition
void SetTargetNamedPosition(const std::string named_position)
Definition: adc.cpp:260
device.hpp
Device class header file.
adcConfig.hpp
AdcConfig class header file.
fcf::devmgr::adc::Adc::UpdateStatus
virtual void UpdateStatus() override
Update the status of the Adc device in the OLDB.
Definition: adc.cpp:273
fcf::devmgr::adc::Adc::Setup
virtual void Setup(const std::any &payload) override
Executes a setup of the adc device.
Definition: adc.cpp:95
fcf::devmgr::adc::AdcControllerData
The adcControllerData struct.
Definition: adcLcsIf.hpp:28
fcf::devmgr::adc::Adc::RegisterComm
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
fcf::devmgr::common::DataContext
Definition: dataContext.hpp:92
fcf
Definition: actionMgr.cpp:29
fcf::devmgr::adc::Adc
The Adc class.
Definition: adc.hpp:42
fcf::devmgr::common::Device
Definition: device.hpp:30
iDeviceConfig.hpp
IDeviceConfig class header file.
fcf::devmgr::adc::Adc::m_target_named_pos
std::string m_target_named_pos
Definition: adc.hpp:165
fcf::devmgr::adc::Adc::~Adc
virtual ~Adc()
Default destructor.
Definition: adc.hpp:58
fcf::devmgr::adc::Adc::Status
virtual void Status(const std::any &payload, std::string &buffer) override
Obtain the status of the device.
Definition: adc.cpp:373
fcf::devmgr::adc::Adc::m_controller_status
AdcControllerData m_controller_status
< object containing the status of the controller
Definition: adc.hpp:164
fcf::devmgr::adc::Adc::IsSetupActive
virtual bool IsSetupActive(const std::any &payload) const override
Check if last setup message is still active.
Definition: adc.cpp:188
adcLcsIf.hpp
adcLcsIf class header file.
fcf::devmgr::adc::Adc::GetLcsIf
virtual std::shared_ptr< fcf::devmgr::common::DeviceLcsIf > GetLcsIf() const override
Definition: adc.cpp:89
fcf::devmgr::adc::Adc::CreateObjects
void CreateObjects(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config=nullptr) override
Create object instances.
Definition: adc.cpp:35
fcf::devmgr::adc::Adc::GetTargetNamedPosition
const std::string GetTargetNamedPosition()
Definition: adc.cpp:267
fcf::devmgr::adc::Adc::m_lcs_if
std::shared_ptr< AdcLcsIf< fcfif::AdcTopicUnion > > m_lcs_if
pointer to device lcs interface object
Definition: adc.hpp:169
fcf::devmgr::adc::Adc::GetConfig
virtual std::shared_ptr< fcf::devmgr::common::IDeviceConfig > GetConfig() const override
Get a pointer of device configuration.
Definition: adc.cpp:473
fcf::devmgr::adc::Adc::m_config
std::shared_ptr< AdcConfig > m_config
pointer to device config object
Definition: adc.hpp:166