ifw-fcf
2.0.0
|
#include <iDevice.hpp>
Public Member Functions | |
virtual void | CreateObjects (std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config=nullptr)=0 |
Create basic objects needed by the device class. More... | |
virtual void | RegisterComm (std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal)=0 |
Register a communication interface object. More... | |
virtual bool | IsNotReady () const =0 |
Check if device is Standby/NotReady. More... | |
virtual bool | IsReady () const =0 |
Check if device is Standby/Ready. More... | |
virtual bool | IsOperational () const =0 |
Check if device is Operational. More... | |
virtual void | CheckHwFailure () const =0 |
Check if device is in failure state. More... | |
virtual bool | IsDisabling () const =0 |
Check if device is disablig. More... | |
virtual void | Init ()=0 |
Executes a Init command. More... | |
virtual void | Enable ()=0 |
Executes a Enable command. More... | |
virtual void | Disable ()=0 |
Executes a Disable command. More... | |
virtual void | Stop ()=0 |
Executes a Stop command. More... | |
virtual void | Reset ()=0 |
Executes a Reset command. More... | |
virtual void | UpdateStatus ()=0 |
Update internal status by connecting to the LCS. More... | |
virtual void | Setup (const std::any &payload)=0 |
Executes a setup. More... | |
virtual bool | IsSetupActive (const std::any &payload) const =0 |
Check if setup is still active. More... | |
virtual void | Status (const std::any &payload, std::string &buffer)=0 |
Obtain the status of the device. More... | |
virtual void | Status (bool end_acq, const dit::did::Did &dictionary, std::shared_ptr< CCfits::FITS > &fits_handle)=0 |
Obtain the status of the device. More... | |
virtual void | Simulate (rad::AnyEvent const &last_event)=0 |
Executes a Simulat. More... | |
virtual void | StopSim (rad::AnyEvent const &last_event)=0 |
Executes a StopSim. More... | |
virtual void | Ignore (rad::AnyEvent const &last_event)=0 |
Executes a Ignore. More... | |
virtual void | StopIgn (rad::AnyEvent const &last_event)=0 |
Executes a StopIgn. More... | |
virtual void | HwReset (rad::AnyEvent const &last_event)=0 |
Executes a hardware reset command. More... | |
virtual void | HwInit (rad::AnyEvent const &last_event)=0 |
Executes a hardware init command. More... | |
virtual void | HwEnable (rad::AnyEvent const &last_event)=0 |
Executes a hardware enable command. More... | |
virtual void | HwDisable (rad::AnyEvent const &last_event)=0 |
Executes a hardware disable command. More... | |
virtual std::shared_ptr < DeviceLcsIf > | GetLcsIf () const =0 |
Get a pointer of device LCS interface. More... | |
virtual std::shared_ptr < IDeviceConfig > | GetConfig () const =0 |
Get a pointer of device configuration. More... | |
virtual void | StartMonitoring ()=0 |
Start device monitoring via OPCUA subscriptions. More... | |
virtual void | StopMonitoring ()=0 |
Stop device monitoring. More... | |
virtual std::string | GetName () const =0 |
Get device name. More... | |
Device abstract class. This class represents the basic implementation of a device class. Most of the device share common properties and behavioural aspects. This class is implementing the common behaviour and defining the basic properties, as well as declaring the abstracts methods that need to be implemented by derived classes.
|
pure virtual |
Check if device is in failure state.
an | exception if an error ocurrs. |
Implemented in TestMyDevice, and fcf::devmgr::common::Device.
|
pure virtual |
Create basic objects needed by the device class.
config | Shared pointer to configuration object |
|
pure virtual |
Executes a Disable command.
an | exception if an error ocurrs. |
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, and fcf::devmgr::common::Device.
|
pure virtual |
Executes a Enable command.
an | exception if an error ocurrs. |
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, and fcf::devmgr::common::Device.
|
pure virtual |
Get a pointer of device configuration.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::drot::Drot, fcf::devmgr::adc::Adc, fcf::devmgr::lamp::Lamp, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::shutter::Shutter, and TestShutter.
|
pure virtual |
Get a pointer of device LCS interface.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::drot::Drot, fcf::devmgr::adc::Adc, fcf::devmgr::lamp::Lamp, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::shutter::Shutter, and TestShutter.
|
pure virtual |
Get device name.
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Executes a hardware disable command.
[in] | last_event | payload of the hw disable message |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device, and fcf::devmgr::sensor::Sensor.
|
pure virtual |
Executes a hardware enable command.
[in] | last_event | payload of the hw enable message |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device, and fcf::devmgr::sensor::Sensor.
|
pure virtual |
Executes a hardware init command.
[in] | last_event | payload of the hw init message |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device, and fcf::devmgr::sensor::Sensor.
|
pure virtual |
Executes a hardware reset command.
[in] | last_event | payload of the hw reset message |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device, and fcf::devmgr::sensor::Sensor.
|
pure virtual |
Executes a Ignore.
[in] | last_event | contains the payload of the Ignore message. |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Executes a Init command.
an | exception if an error ocurrs. |
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and fcf::devmgr::common::Device.
|
pure virtual |
Check if device is disablig.
Implemented in testDeviceFacade::TestMyDevice, TestMyDevice, fcf::devmgr::sensor::Sensor, and fcf::devmgr::common::Device.
|
pure virtual |
Check if device is Standby/NotReady.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, and fcf::devmgr::common::Device.
|
pure virtual |
Check if device is Operational.
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Check if device is Standby/Ready.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, and fcf::devmgr::common::Device.
|
pure virtual |
Check if setup is still active.
[in] | payload | Setup message object |
This method validate if condition requested by the setup message has been achieved.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::shutter::Shutter, fcf::devmgr::drot::Drot, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::adc::Adc, fcf::devmgr::lamp::Lamp, TestShutter, and MockIDevice.
|
pure virtual |
Register a communication interface object.
[in] | comm_if | shared pointer to the communication interface object |
[in] | failure | dispatcher object for failure events |
[in] | normal | dispatcher object for recovery of failure events. |
This method register a particular communication interface to the device. Most of the devices will use OPCUA but there might be several implementations so with this method one can register an interface that has been created previously and registered in the communication factory.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::drot::Drot, fcf::devmgr::piezo::Piezo, fcf::devmgr::shutter::Shutter, fcf::devmgr::actuator::Actuator, fcf::devmgr::adc::Adc, fcf::devmgr::lamp::Lamp, fcf::devmgr::sensor::Sensor, and TestShutter.
|
pure virtual |
Executes a Reset command.
an | exception if an error ocurrs. |
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, fcf::devmgr::common::Device, and TestShutter.
|
pure virtual |
Executes a setup.
[in] | payload | contains the payload of the setup message. |
an | exception if an error ocurrs. |
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::shutter::Shutter, fcf::devmgr::drot::Drot, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::adc::Adc, fcf::devmgr::lamp::Lamp, TestShutter, and MockIDevice.
|
pure virtual |
Executes a Simulat.
[in] | last_event | contains the payload of the Simulat message. |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Start device monitoring via OPCUA subscriptions.
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Obtain the status of the device.
payload | Status message object |
buffer | Buffer where the status will be written |
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::shutter::Shutter, fcf::devmgr::drot::Drot, fcf::devmgr::adc::Adc, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::lamp::Lamp, TestShutter, and MockIDevice.
|
pure virtual |
Obtain the status of the device.
end_acq | Flag to indicate is the end of the acquisition |
dictionary | Reference to the dictionary object |
fits_handle | Pointer to the CCFITS object |
This method will obtain the data from each device and add the corresponding meta-data to the CCfits object. If the end_acq is not true it will just register the start of the acquisition.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, TestMyDevice, fcf::devmgr::motor::Motor, fcf::devmgr::shutter::Shutter, fcf::devmgr::drot::Drot, fcf::devmgr::adc::Adc, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::lamp::Lamp, and TestShutter.
|
pure virtual |
Executes a Stop command.
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::sensor::Sensor, and fcf::devmgr::common::Device.
|
pure virtual |
Executes a StopIgn.
[in] | last_event | contains the payload of the StopIgn message. |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Stop device monitoring.
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Executes a StopSim.
[in] | last_event | contains the payload of the StopSim message. |
an | exception if an error ocurrs. |
Implemented in fcf::devmgr::common::Device.
|
pure virtual |
Update internal status by connecting to the LCS.
Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, fcf::devmgr::sensor::Sensor, fcf::devmgr::motor::Motor, TestMyDevice, fcf::devmgr::drot::Drot, fcf::devmgr::adc::Adc, fcf::devmgr::lamp::Lamp, fcf::devmgr::piezo::Piezo, fcf::devmgr::actuator::Actuator, fcf::devmgr::shutter::Shutter, and TestShutter.