ifw-fcf  4.0.0
shutterLcsIf.hpp
Go to the documentation of this file.
1 
10 #ifndef FCF_DEVMGR_DEVICE_SHUTTER_IF_HPP
11 #define FCF_DEVMGR_DEVICE_SHUTTER_IF_HPP
12 
13 // System headers
14 #include <unordered_map>
15 
16 // Third party headers
17 #include <yaml-cpp/yaml.h>
18 
19 #include <fcf/devmgr/common/events.rad.hpp>
20 
24 
25 #include <Fcfif.hpp>
26 #include <rad/mal/publisher.hpp>
27 
28 namespace fcf::devmgr::shutter {
29 
38  public:
40  virtual ~ShutterControllerData();
41 
42  inline std::string GetErrorText() const;
43  inline virtual std::string GetSubstateStr() const;
44 
45  void SetData(const ShutterControllerData& data);
46 
47  protected:
48 
49  };
50 
65  {
66 
67  public:
68 
77  ShutterLcsIf(std::shared_ptr<fcf::devmgr::common::IDeviceConfig> config,
79 
80 
84  virtual ~ShutterLcsIf() = default;
85 
90  virtual bool IsReady() const;
91 
96  virtual bool IsOperational() const;
97 
104  void Open();
105 
112  void Close();
113 
118  bool IsOpening() const;
119 
124  bool IsClosing() const;
125 
130  bool IsOpen() const;
131 
136  bool IsClose() const;
137 
143  virtual std::string GetRpcError(const short error) const;
144 
145 
146  private:
147  log4cplus::Logger m_logger;
148 
149  };
150 }
151 
152 #include "shutterLcsIf.ipp"
153 
154 #endif //FCF_DEVMGR_DEVICE_SHUTTER_IF_HPP
dataContext.hpp
DataContext class header file.
fcf::devmgr::shutter::ShutterLcsIf::IsOpen
bool IsOpen() const
Check if shutter is open.
Definition: shutterLcsIf.cpp:143
fcf::devmgr::shutter::ShutterControllerData::GetSubstateStr
virtual std::string GetSubstateStr() const
fcf::devmgr::shutter::ShutterControllerData::GetErrorText
std::string GetErrorText() const
fcf::devmgr::shutter::ShutterLcsIf::IsClosing
bool IsClosing() const
Check if controller is closing the shutter.
Definition: shutterLcsIf.cpp:130
fcf::devmgr::shutter::ShutterLcsIf::IsOpening
bool IsOpening() const
Check if controller is opening the shutter.
Definition: shutterLcsIf.cpp:117
fcf::devmgr::shutter::ShutterControllerData::~ShutterControllerData
virtual ~ShutterControllerData()
Definition: shutterLcsIf.cpp:19
fcf::devmgr::shutter::ShutterControllerData::SetData
void SetData(const ShutterControllerData &data)
deviceLcsIf.hpp
deviceLcsIf class header file.
fcf::devmgr::shutter::ShutterLcsIf::Open
void Open()
Executes the Open RPC.
Definition: shutterLcsIf.cpp:38
fcf::devmgr::shutter::ShutterControllerData
The ShutterControllerData struct.
Definition: shutterLcsIf.hpp:37
fcf::devmgr::shutter::ShutterLcsIf::~ShutterLcsIf
virtual ~ShutterLcsIf()=default
Default destructor.
fcf::devmgr::common::DataContext
Definition: dataContext.hpp:90
fcf::devmgr::common::DeviceLcsIf
Definition: deviceLcsIf.hpp:77
shutterConfig.hpp
ShutterConfig class header file.
fcf::devmgr::shutter::ShutterLcsIf::GetRpcError
virtual std::string GetRpcError(const short error) const
Definition: shutterLcsIf.cpp:168
fcf::devmgr::shutter::ShutterLcsIf::IsClose
bool IsClose() const
Check if shutter is close.
Definition: shutterLcsIf.cpp:155
fcf::devmgr::shutter::ShutterLcsIf::ShutterLcsIf
ShutterLcsIf(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config, fcf::devmgr::common::DataContext &data_ctx)
ShutterLcsIf constructor.
Definition: shutterLcsIf.cpp:22
fcf::devmgr::shutter::ShutterLcsIf::IsOperational
virtual bool IsOperational() const
Check if controller is in Operational.
Definition: shutterLcsIf.cpp:99
fcf::devmgr::shutter::ShutterLcsIf::Close
void Close()
Executes the Close RPC.
Definition: shutterLcsIf.cpp:60
fcf::devmgr::shutter::ShutterControllerData::ShutterControllerData
ShutterControllerData()
Definition: shutterLcsIf.cpp:15
fcf::devmgr::shutter::ShutterLcsIf
Shutter Local Control System (LCS) Interface (IF) class.
Definition: shutterLcsIf.hpp:65
fcf::devmgr::shutter::ShutterLcsIf::IsReady
virtual bool IsReady() const
Check if controller is in Standby/Ready state.
Definition: shutterLcsIf.cpp:82
fcf::devmgr::common::DeviceControllerData
The DeviceControllerData struct.
Definition: deviceLcsIf.hpp:36
fcf::devmgr::shutter
Definition: shutter.hpp:21