ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
devmgr::common::Device Class Referenceabstract

#include <device.hpp>

Inheritance diagram for devmgr::common::Device:
devmgr::common::IDevice devmgr::common::IDevice devmgr::common::IDevice devmgr::lamp::Lamp devmgr::lamp::Lamp devmgr::lamp::Lamp devmgr::motor::Motor devmgr::motor::Motor devmgr::motor::Motor devmgr::sensor::Sensor devmgr::sensor::Sensor devmgr::sensor::Sensor devmgr::shutter::Shutter devmgr::shutter::Shutter devmgr::shutter::Shutter testDeviceFacade::TestFailureDevice testDeviceFacade::TestMyDevice TestMyDevice TestShutter

Public Member Functions

 Device (const std::string filename, const std::string name, DataContext &data_ctx)
 Device abstract class constructor. More...
 
virtual ~Device ()
 Default destructor. 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
 Check if device is Standby/NotReady. More...
 
virtual bool IsReady () const
 Check if device is Standby/Ready. More...
 
virtual bool IsOperational () const
 Check if device is Operational. More...
 
virtual void CheckHwFailure () const
 Check if device is in failure state. More...
 
virtual bool IsDisabling () const
 Check if device is disablig. More...
 
virtual void Init ()
 Executes a Init command. More...
 
virtual void Enable ()
 Executes a Enable command. More...
 
virtual void Disable ()
 Executes a Disable command. More...
 
virtual void Stop ()
 Executes a Stop command. More...
 
virtual void Reset ()
 Executes a Reset command. More...
 
virtual void HwReset (modif::ReqHwReset &hwResetMsg)
 Executes a hardware reset command. More...
 
virtual void HwInit (modif::ReqHwInit &hwInitMsg)
 Executes a hardware init command. More...
 
virtual void HwEnable (modif::ReqHwEnable &hwEnableMsg)
 Executes a hardware enable command. More...
 
virtual void HwDisable (modif::ReqHwDisable &hwDisableMsg)
 Executes a hardware disable command. More...
 
virtual void UpdateStatus ()=0
 UpdateStatus. More...
 
virtual void Setup (const modif::ReqSetup &setupMsg)=0
 Executes a setup. More...
 
virtual bool IsSetupActive (const modif::ReqSetup &setupMsg) const =0
 Check if setup is still active. More...
 
virtual void Status (const modif::ReqStatus &statusMsg, std::string &buffer)=0
 Obtain the status of the device. More...
 
virtual void Status (bool end_acq, const dit::did::Did &dictionary, CCfits::FITS *fits_handle=nullptr)=0
 Obtain the status of the device. More...
 
virtual void Simulate (const modif::ReqSimulate &msg)
 Executes a Simulat. More...
 
virtual void StopSim (const modif::ReqStopSim &msg)
 Executes a StopSim. More...
 
virtual void Ignore (const modif::ReqIgnore &msg)
 Executes a Ignore. More...
 
virtual void StopIgn (const modif::ReqStopIgn &msg)
 Executes a StopIgn. 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 ()
 Start device monitoring via OPCUA subscriptions. More...
 
virtual void StopMonitoring ()
 Stop device monitoring. More...
 
virtual std::string GetName () const
 Get device id. More...
 
 Device (const std::string filename, const std::string name, DataContext &data_ctx)
 Device abstract class constructor. More...
 
virtual ~Device ()
 Default destructor. 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
 Check if device is Standby/NotReady. More...
 
virtual bool IsReady () const
 Check if device is Standby/Ready. More...
 
virtual bool IsOperational () const
 Check if device is Operational. More...
 
virtual void CheckHwFailure () const
 Check if device is in failure state. More...
 
virtual bool IsDisabling () const
 Check if device is disablig. More...
 
virtual void Init ()
 Executes a Init command. More...
 
virtual void Enable ()
 Executes a Enable command. More...
 
virtual void Disable ()
 Executes a Disable command. More...
 
virtual void Stop ()
 Executes a Stop command. More...
 
virtual void Reset ()
 Executes a Reset command. More...
 
virtual void HwReset (modif::ReqHwReset &hwResetMsg)
 Executes a hardware reset command. More...
 
virtual void HwInit (modif::ReqHwInit &hwInitMsg)
 Executes a hardware init command. More...
 
virtual void HwEnable (modif::ReqHwEnable &hwEnableMsg)
 Executes a hardware enable command. More...
 
virtual void HwDisable (modif::ReqHwDisable &hwDisableMsg)
 Executes a hardware disable command. More...
 
virtual void UpdateStatus ()=0
 UpdateStatus. More...
 
virtual void Setup (const modif::ReqSetup &setupMsg)=0
 Executes a setup. More...
 
virtual bool IsSetupActive (const modif::ReqSetup &setupMsg) const =0
 Check if setup is still active. More...
 
virtual void Status (const modif::ReqStatus &statusMsg, std::string &buffer)=0
 Obtain the status of the device. More...
 
virtual void Status (bool end_acq, const dit::did::Did &dictionary, CCfits::FITS *fits_handle=nullptr)=0
 Obtain the status of the device. More...
 
virtual void Simulate (const modif::ReqSimulate &msg)
 Executes a Simulat. More...
 
virtual void StopSim (const modif::ReqStopSim &msg)
 Executes a StopSim. More...
 
virtual void Ignore (const modif::ReqIgnore &msg)
 Executes a Ignore. More...
 
virtual void StopIgn (const modif::ReqStopIgn &msg)
 Executes a StopIgn. 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 ()
 Start device monitoring via OPCUA subscriptions. More...
 
virtual void StopMonitoring ()
 Stop device monitoring. More...
 
virtual std::string GetName () const
 Get device id. More...
 
 Device (const std::string filename, const std::string name, DataContext &data_ctx)
 Device abstract class constructor. More...
 
virtual ~Device ()
 Default destructor. 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
 Check if device is Standby/NotReady. More...
 
virtual bool IsReady () const
 Check if device is Standby/Ready. More...
 
virtual bool IsOperational () const
 Check if device is Operational. More...
 
virtual void CheckHwFailure () const
 Check if device is in failure state. More...
 
virtual bool IsDisabling () const
 Check if device is disablig. More...
 
virtual void Init ()
 Executes a Init command. More...
 
virtual void Enable ()
 Executes a Enable command. More...
 
virtual void Disable ()
 Executes a Disable command. More...
 
virtual void Stop ()
 Executes a Stop command. More...
 
virtual void Reset ()
 Executes a Reset command. More...
 
virtual void HwReset (modif::ReqHwReset &hwResetMsg)
 Executes a hardware reset command. More...
 
virtual void HwInit (modif::ReqHwInit &hwInitMsg)
 Executes a hardware init command. More...
 
virtual void HwEnable (modif::ReqHwEnable &hwEnableMsg)
 Executes a hardware enable command. More...
 
virtual void HwDisable (modif::ReqHwDisable &hwDisableMsg)
 Executes a hardware disable command. More...
 
virtual void UpdateStatus ()=0
 UpdateStatus. More...
 
virtual void Setup (const modif::ReqSetup &setupMsg)=0
 Executes a setup. More...
 
virtual bool IsSetupActive (const modif::ReqSetup &setupMsg) const =0
 Check if setup is still active. More...
 
virtual void Status (const modif::ReqStatus &statusMsg, std::string &buffer)=0
 Obtain the status of the device. More...
 
virtual void Status (bool end_acq, const dit::did::Did &dictionary, CCfits::FITS *fits_handle=nullptr)=0
 Obtain the status of the device. More...
 
virtual void Simulate (const modif::ReqSimulate &msg)
 Executes a Simulat. More...
 
virtual void StopSim (const modif::ReqStopSim &msg)
 Executes a StopSim. More...
 
virtual void Ignore (const modif::ReqIgnore &msg)
 Executes a Ignore. More...
 
virtual void StopIgn (const modif::ReqStopIgn &msg)
 Executes a StopIgn. 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 ()
 Start device monitoring via OPCUA subscriptions. More...
 
virtual void StopMonitoring ()
 Stop device monitoring. More...
 
virtual std::string GetName () const
 Get device id. More...
 
- Public Member Functions inherited from devmgr::common::IDevice
virtual void CreateObjects (std::shared_ptr< devmgr::common::IDeviceConfig > config=nullptr)=0
 Create basic objects needed by the device class. More...
 
virtual void CreateObjects (std::shared_ptr< devmgr::common::IDeviceConfig > config=nullptr)=0
 Create basic objects needed by the device class. More...
 
virtual void CreateObjects (std::shared_ptr< devmgr::common::IDeviceConfig > config=nullptr)=0
 Create basic objects needed by the device class. More...
 

Protected Member Functions

bool IsMsgForMe (const std::string &id) const
 Check if received message id is addressed to me. More...
 
void UpdateDb (std::vector< std::string > attr_vector)
 Update device database. More...
 
void SetIgnore (bool flag)
 SetIgnore. More...
 
void SetSimulation (bool flag)
 SetSimulation. More...
 
void GetPrefix (const std::vector< std::string > prefix_list, std::string &prefix)
 Get prefix for writing attributes to the DB. More...
 
bool IsMsgForMe (const std::string &id) const
 Check if received message id is addressed to me. More...
 
void UpdateDb (std::vector< std::string > attr_vector)
 Update device database. More...
 
void SetIgnore (bool flag)
 SetIgnore. More...
 
void SetSimulation (bool flag)
 SetSimulation. More...
 
void GetPrefix (const std::vector< std::string > prefix_list, std::string &prefix)
 Get prefix for writing attributes to the DB. More...
 
bool IsMsgForMe (const std::string &id) const
 Check if received message id is addressed to me. More...
 
void UpdateDb (std::vector< std::string > attr_vector)
 Update device database. More...
 
void SetIgnore (bool flag)
 SetIgnore. More...
 
void SetSimulation (bool flag)
 SetSimulation. More...
 
void GetPrefix (const std::vector< std::string > prefix_list, std::string &prefix)
 Get prefix for writing attributes to the DB. More...
 

Protected Attributes

std::string m_filename
 device configuration filename. More...
 
std::string m_name
 device ID. More...
 
DataContextm_data_ctx
 reference to the data context object. More...
 
fcf::common::Dispatcher m_failure
 
fcf::common::Dispatcher m_normal
 
std::shared_ptr< DeviceConfigm_config
 
std::shared_ptr< DeviceLcsIfm_lcs_if
 

Detailed Description

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.

Constructor & Destructor Documentation

devmgr::common::Device::Device ( const std::string  filename,
const std::string  name,
DataContext data_ctx 
)

Device abstract class constructor.

Parameters
[in]filenameFilename of device configuration
[in]nameDevice ID
[in,out]data_ctxReference to the data context object
devmgr::common::Device::~Device ( )
virtual

Default destructor.

devmgr::common::Device::Device ( const std::string  filename,
const std::string  name,
DataContext data_ctx 
)

Device abstract class constructor.

Parameters
[in]filenameFilename of device configuration
[in]nameDevice ID
[in,out]data_ctxReference to the data context object
virtual devmgr::common::Device::~Device ( )
virtual

Default destructor.

devmgr::common::Device::Device ( const std::string  filename,
const std::string  name,
DataContext data_ctx 
)

Device abstract class constructor.

Parameters
[in]filenameFilename of device configuration
[in]nameDevice ID
[in,out]data_ctxReference to the data context object
virtual devmgr::common::Device::~Device ( )
virtual

Default destructor.

Member Function Documentation

void devmgr::common::Device::CheckHwFailure ( ) const
virtual

Check if device is in failure state.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in TestMyDevice.

virtual void devmgr::common::Device::CheckHwFailure ( ) const
virtual

Check if device is in failure state.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in TestMyDevice.

virtual void devmgr::common::Device::CheckHwFailure ( ) const
virtual

Check if device is in failure state.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in TestMyDevice.

void devmgr::common::Device::Disable ( )
virtual

Executes a Disable command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual void devmgr::common::Device::Disable ( )
virtual

Executes a Disable command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual void devmgr::common::Device::Disable ( )
virtual

Executes a Disable command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

void devmgr::common::Device::Enable ( )
virtual

Executes a Enable command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual void devmgr::common::Device::Enable ( )
virtual

Executes a Enable command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual void devmgr::common::Device::Enable ( )
virtual

Executes a Enable command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual std::shared_ptr<IDeviceConfig> devmgr::common::Device::GetConfig ( ) const
pure virtual
virtual std::shared_ptr<IDeviceConfig> devmgr::common::Device::GetConfig ( ) const
pure virtual
virtual std::shared_ptr<IDeviceConfig> devmgr::common::Device::GetConfig ( ) const
pure virtual
virtual std::shared_ptr<DeviceLcsIf> devmgr::common::Device::GetLcsIf ( ) const
pure virtual
virtual std::shared_ptr<DeviceLcsIf> devmgr::common::Device::GetLcsIf ( ) const
pure virtual
virtual std::shared_ptr<DeviceLcsIf> devmgr::common::Device::GetLcsIf ( ) const
pure virtual
virtual std::string devmgr::common::Device::GetName ( ) const
virtual

Get device id.

Implements devmgr::common::IDevice.

std::string devmgr::common::Device::GetName ( ) const
virtual

Get device id.

Implements devmgr::common::IDevice.

virtual std::string devmgr::common::Device::GetName ( ) const
virtual

Get device id.

Implements devmgr::common::IDevice.

void devmgr::common::Device::GetPrefix ( const std::vector< std::string >  prefix_list,
std::string &  prefix 
)
protected

Get prefix for writing attributes to the DB.

Parameters
prefix_listList of intermediate prefix values.
prefixString containing the formatted prefix.
void devmgr::common::Device::GetPrefix ( const std::vector< std::string >  prefix_list,
std::string &  prefix 
)
protected

Get prefix for writing attributes to the DB.

Parameters
prefix_listList of intermediate prefix values.
prefixString containing the formatted prefix.
void devmgr::common::Device::GetPrefix ( const std::vector< std::string >  prefix_list,
std::string &  prefix 
)
protected

Get prefix for writing attributes to the DB.

Parameters
prefix_listList of intermediate prefix values.
prefixString containing the formatted prefix.
virtual void devmgr::common::Device::HwDisable ( modif::ReqHwDisable hwDisableMsg)
virtual

Executes a hardware disable command.

Parameters
[in]hwDisableMsgpayload of the hw disable message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwDisable ( modif::ReqHwDisable hwDisableMsg)
virtual

Executes a hardware disable command.

Parameters
[in]hwDisableMsgpayload of the hw disable message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::HwDisable ( modif::ReqHwDisable hwDisableMsg)
virtual

Executes a hardware disable command.

Parameters
[in]hwDisableMsgpayload of the hw disable message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwEnable ( modif::ReqHwEnable hwEnableMsg)
virtual

Executes a hardware enable command.

Parameters
[in]hwEnableMsgpayload of the hw enable message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwEnable ( modif::ReqHwEnable hwEnableMsg)
virtual

Executes a hardware enable command.

Parameters
[in]hwEnableMsgpayload of the hw enable message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::HwEnable ( modif::ReqHwEnable hwEnableMsg)
virtual

Executes a hardware enable command.

Parameters
[in]hwEnableMsgpayload of the hw enable message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwInit ( modif::ReqHwInit hwInitMsg)
virtual

Executes a hardware init command.

Parameters
[in]hwInitMsgpayload of the hw init message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwInit ( modif::ReqHwInit hwInitMsg)
virtual

Executes a hardware init command.

Parameters
[in]hwInitMsgpayload of the hw init message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::HwInit ( modif::ReqHwInit hwInitMsg)
virtual

Executes a hardware init command.

Parameters
[in]hwInitMsgpayload of the hw init message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwReset ( modif::ReqHwReset hwResetMsg)
virtual

Executes a hardware reset command.

Parameters
[in]hwResetMsgpayload of the hw reset message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::HwReset ( modif::ReqHwReset hwResetMsg)
virtual

Executes a hardware reset command.

Parameters
[in]hwResetMsgpayload of the hw reset message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::HwReset ( modif::ReqHwReset hwResetMsg)
virtual

Executes a hardware reset command.

Parameters
[in]hwResetMsgpayload of the hw reset message
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::Ignore ( const modif::ReqIgnore msg)
virtual

Executes a Ignore.

Parameters
[in]msgcontains the payload of the Ignore message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Ignore ( const modif::ReqIgnore msg)
virtual

Executes a Ignore.

Parameters
[in]msgcontains the payload of the Ignore message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Ignore ( const modif::ReqIgnore msg)
virtual

Executes a Ignore.

Parameters
[in]msgcontains the payload of the Ignore message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Init ( )
virtual

Executes a Init command.

Returns
true if command is succesfully executed, false otherwise.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual void devmgr::common::Device::Init ( )
virtual

Executes a Init command.

Returns
true if command is succesfully executed, false otherwise.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

void devmgr::common::Device::Init ( )
virtual

Executes a Init command.

Returns
true if command is succesfully executed, false otherwise.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, and testDeviceFacade::TestMyDevice.

virtual bool devmgr::common::Device::IsDisabling ( ) const
virtual

Check if device is disablig.

Returns
true if device is disabling, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::sensor::Sensor, devmgr::sensor::Sensor, and devmgr::sensor::Sensor.

virtual bool devmgr::common::Device::IsDisabling ( ) const
virtual

Check if device is disablig.

Returns
true if device is disabling, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::sensor::Sensor, devmgr::sensor::Sensor, and devmgr::sensor::Sensor.

bool devmgr::common::Device::IsDisabling ( ) const
virtual

Check if device is disablig.

Returns
true if device is disabling, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::sensor::Sensor, devmgr::sensor::Sensor, and devmgr::sensor::Sensor.

bool devmgr::common::Device::IsMsgForMe ( const std::string &  id) const
protected

Check if received message id is addressed to me.

Parameters
[in]idmessage id
Returns
true is message id matches own device id, false otherwise.
bool devmgr::common::Device::IsMsgForMe ( const std::string &  id) const
protected

Check if received message id is addressed to me.

Parameters
[in]idmessage id
Returns
true is message id matches own device id, false otherwise.
bool devmgr::common::Device::IsMsgForMe ( const std::string &  id) const
protected

Check if received message id is addressed to me.

Parameters
[in]idmessage id
Returns
true is message id matches own device id, false otherwise.
virtual bool devmgr::common::Device::IsNotReady ( ) const
virtual

Check if device is Standby/NotReady.

Returns
true is device is Standby/NotReady, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and TestMyDevice.

virtual bool devmgr::common::Device::IsNotReady ( ) const
virtual

Check if device is Standby/NotReady.

Returns
true is device is Standby/NotReady, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and TestMyDevice.

bool devmgr::common::Device::IsNotReady ( ) const
virtual

Check if device is Standby/NotReady.

Returns
true is device is Standby/NotReady, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and TestMyDevice.

virtual bool devmgr::common::Device::IsOperational ( ) const
virtual

Check if device is Operational.

Returns
true is device is Operational, false otherwise

Implements devmgr::common::IDevice.

virtual bool devmgr::common::Device::IsOperational ( ) const
virtual

Check if device is Operational.

Returns
true is device is Operational, false otherwise

Implements devmgr::common::IDevice.

bool devmgr::common::Device::IsOperational ( ) const
virtual

Check if device is Operational.

Returns
true is device is Operational, false otherwise

Implements devmgr::common::IDevice.

virtual bool devmgr::common::Device::IsReady ( ) const
virtual

Check if device is Standby/Ready.

Returns
true is device is Standby/Ready, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and TestMyDevice.

virtual bool devmgr::common::Device::IsReady ( ) const
virtual

Check if device is Standby/Ready.

Returns
true is device is Standby/Ready, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and TestMyDevice.

bool devmgr::common::Device::IsReady ( ) const
virtual

Check if device is Standby/Ready.

Returns
true is device is Standby/Ready, false otherwise

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, and TestMyDevice.

virtual bool devmgr::common::Device::IsSetupActive ( const modif::ReqSetup setupMsg) const
pure virtual
virtual bool devmgr::common::Device::IsSetupActive ( const modif::ReqSetup setupMsg) const
pure virtual
virtual bool devmgr::common::Device::IsSetupActive ( const modif::ReqSetup setupMsg) const
pure virtual
virtual void devmgr::common::Device::RegisterComm ( std::shared_ptr< fcf::common::IComm >  comm_if,
fcf::common::Dispatcher<> &  failure,
fcf::common::Dispatcher<> &  normal 
)
pure virtual

Register a communication interface object.

Parameters
[in]comm_ifshared pointer to the communication interface object
[in]failuredispatcher object for failure events
[in]normaldispatcher 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.

See Also
iComm
commFactory
commMaker

Implements devmgr::common::IDevice.

Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::sensor::Sensor, and TestShutter.

virtual void devmgr::common::Device::RegisterComm ( std::shared_ptr< fcf::common::IComm >  comm_if,
fcf::common::Dispatcher<> &  failure,
fcf::common::Dispatcher<> &  normal 
)
pure virtual

Register a communication interface object.

Parameters
[in]comm_ifshared pointer to the communication interface object
[in]failuredispatcher object for failure events
[in]normaldispatcher 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.

See Also
iComm
commFactory
commMaker

Implements devmgr::common::IDevice.

Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::sensor::Sensor, and TestShutter.

virtual void devmgr::common::Device::RegisterComm ( std::shared_ptr< fcf::common::IComm >  comm_if,
fcf::common::Dispatcher<> &  failure,
fcf::common::Dispatcher<> &  normal 
)
pure virtual

Register a communication interface object.

Parameters
[in]comm_ifshared pointer to the communication interface object
[in]failuredispatcher object for failure events
[in]normaldispatcher 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.

See Also
iComm
commFactory
commMaker

Implements devmgr::common::IDevice.

Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::lamp::Lamp, devmgr::shutter::Shutter, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::sensor::Sensor, and TestShutter.

virtual void devmgr::common::Device::Reset ( )
virtual

Executes a Reset command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, and TestShutter.

void devmgr::common::Device::Reset ( )
virtual

Executes a Reset command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, and TestShutter.

virtual void devmgr::common::Device::Reset ( )
virtual

Executes a Reset command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

Reimplemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, and TestShutter.

void devmgr::common::Device::SetIgnore ( bool  flag)
protected

SetIgnore.

Parameters
flag
void devmgr::common::Device::SetIgnore ( bool  flag)
protected

SetIgnore.

Parameters
flag
void devmgr::common::Device::SetIgnore ( bool  flag)
protected

SetIgnore.

Parameters
flag
void devmgr::common::Device::SetSimulation ( bool  flag)
protected

SetSimulation.

Parameters
flag
void devmgr::common::Device::SetSimulation ( bool  flag)
protected

SetSimulation.

Parameters
flag
void devmgr::common::Device::SetSimulation ( bool  flag)
protected

SetSimulation.

Parameters
flag
virtual void devmgr::common::Device::Setup ( const modif::ReqSetup setupMsg)
pure virtual
virtual void devmgr::common::Device::Setup ( const modif::ReqSetup setupMsg)
pure virtual
virtual void devmgr::common::Device::Setup ( const modif::ReqSetup setupMsg)
pure virtual
void devmgr::common::Device::Simulate ( const modif::ReqSimulate msg)
virtual

Executes a Simulat.

Parameters
[in]msgcontains the payload of the Simulat message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Simulate ( const modif::ReqSimulate msg)
virtual

Executes a Simulat.

Parameters
[in]msgcontains the payload of the Simulat message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Simulate ( const modif::ReqSimulate msg)
virtual

Executes a Simulat.

Parameters
[in]msgcontains the payload of the Simulat message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::StartMonitoring ( )
virtual

Start device monitoring via OPCUA subscriptions.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StartMonitoring ( )
virtual

Start device monitoring via OPCUA subscriptions.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StartMonitoring ( )
virtual

Start device monitoring via OPCUA subscriptions.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Status ( const modif::ReqStatus statusMsg,
std::string &  buffer 
)
pure virtual
virtual void devmgr::common::Device::Status ( const modif::ReqStatus statusMsg,
std::string &  buffer 
)
pure virtual
virtual void devmgr::common::Device::Status ( const modif::ReqStatus statusMsg,
std::string &  buffer 
)
pure virtual
virtual void devmgr::common::Device::Status ( bool  end_acq,
const dit::did::Did dictionary,
CCfits::FITS *  fits_handle = nullptr 
)
pure virtual

Obtain the status of the device.

Parameters
end_acqFlag to indicate is the end of the acquisition
dictionaryReference to the dictionary object
fits_handlePointer 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.

Implements devmgr::common::IDevice.

Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::shutter::Shutter, devmgr::shutter::Shutter, devmgr::shutter::Shutter, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::lamp::Lamp, devmgr::lamp::Lamp, devmgr::lamp::Lamp, and TestShutter.

virtual void devmgr::common::Device::Status ( bool  end_acq,
const dit::did::Did dictionary,
CCfits::FITS *  fits_handle = nullptr 
)
pure virtual

Obtain the status of the device.

Parameters
end_acqFlag to indicate is the end of the acquisition
dictionaryReference to the dictionary object
fits_handlePointer 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.

Implements devmgr::common::IDevice.

Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::shutter::Shutter, devmgr::shutter::Shutter, devmgr::shutter::Shutter, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::lamp::Lamp, devmgr::lamp::Lamp, devmgr::lamp::Lamp, and TestShutter.

virtual void devmgr::common::Device::Status ( bool  end_acq,
const dit::did::Did dictionary,
CCfits::FITS *  fits_handle = nullptr 
)
pure virtual

Obtain the status of the device.

Parameters
end_acqFlag to indicate is the end of the acquisition
dictionaryReference to the dictionary object
fits_handlePointer 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.

Implements devmgr::common::IDevice.

Implemented in testDeviceFacade::TestFailureDevice, testDeviceFacade::TestMyDevice, TestMyDevice, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::motor::Motor, devmgr::shutter::Shutter, devmgr::shutter::Shutter, devmgr::shutter::Shutter, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::sensor::Sensor, devmgr::lamp::Lamp, devmgr::lamp::Lamp, devmgr::lamp::Lamp, and TestShutter.

void devmgr::common::Device::Stop ( )
virtual

Executes a Stop command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Stop ( )
virtual

Executes a Stop command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::Stop ( )
virtual

Executes a Stop command.

Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::StopIgn ( const modif::ReqStopIgn msg)
virtual

Executes a StopIgn.

Parameters
[in]msgcontains the payload of the StopIgn message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StopIgn ( const modif::ReqStopIgn msg)
virtual

Executes a StopIgn.

Parameters
[in]msgcontains the payload of the StopIgn message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StopIgn ( const modif::ReqStopIgn msg)
virtual

Executes a StopIgn.

Parameters
[in]msgcontains the payload of the StopIgn message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::StopMonitoring ( )
virtual

Stop device monitoring.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StopMonitoring ( )
virtual

Stop device monitoring.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StopMonitoring ( )
virtual

Stop device monitoring.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StopSim ( const modif::ReqStopSim msg)
virtual

Executes a StopSim.

Parameters
[in]msgcontains the payload of the StopSim message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::StopSim ( const modif::ReqStopSim msg)
virtual

Executes a StopSim.

Parameters
[in]msgcontains the payload of the StopSim message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

virtual void devmgr::common::Device::StopSim ( const modif::ReqStopSim msg)
virtual

Executes a StopSim.

Parameters
[in]msgcontains the payload of the StopSim message.
Exceptions
anexception if an error ocurrs.

Implements devmgr::common::IDevice.

void devmgr::common::Device::UpdateDb ( std::vector< std::string >  attr_vector)
protected

Update device database.

Parameters
attr_vectorList of attributes with their values.
void devmgr::common::Device::UpdateDb ( std::vector< std::string >  attr_vector)
protected

Update device database.

Parameters
attr_vectorList of attributes with their values.
void devmgr::common::Device::UpdateDb ( std::vector< std::string >  attr_vector)
protected

Update device database.

Parameters
attr_vectorList of attributes with their values.
virtual void devmgr::common::Device::UpdateStatus ( )
pure virtual
virtual void devmgr::common::Device::UpdateStatus ( )
pure virtual
virtual void devmgr::common::Device::UpdateStatus ( )
pure virtual

Member Data Documentation

std::shared_ptr< DeviceConfig > devmgr::common::Device::m_config
protected
DataContext & devmgr::common::Device::m_data_ctx
protected

reference to the data context object.

fcf::common::Dispatcher devmgr::common::Device::m_failure
protected
std::string devmgr::common::Device::m_filename
protected

device configuration filename.

std::shared_ptr< DeviceLcsIf > devmgr::common::Device::m_lcs_if
protected
std::string devmgr::common::Device::m_name
protected

device ID.

fcf::common::Dispatcher devmgr::common::Device::m_normal
protected

The documentation for this class was generated from the following files: