ifw-fcf  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
MockIDevice Class Reference

#include <mockIDevice.hpp>

Inheritance diagram for MockIDevice:
fcf::devmgr::common::IDevice

Public Member Functions

 MOCK_METHOD1 (CreateObjects, void(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config))
 
 MOCK_METHOD3 (RegisterComm, void(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal))
 
 MOCK_CONST_METHOD0 (IsNotReady, bool())
 
 MOCK_CONST_METHOD0 (IsReady, bool())
 
 MOCK_CONST_METHOD0 (IsOperational, bool())
 
 MOCK_CONST_METHOD0 (CheckHwFailure, void())
 
 MOCK_CONST_METHOD0 (IsDisabling, bool())
 
 MOCK_METHOD0 (Init, void())
 
 MOCK_METHOD0 (Enable, void())
 
 MOCK_METHOD0 (Disable, void())
 
 MOCK_METHOD0 (Stop, void())
 
 MOCK_METHOD0 (Reset, void())
 
 MOCK_METHOD0 (UpdateStatus, void())
 
void Setup (const std::any &payload)
 Executes a setup. More...
 
 MOCK_METHOD1 (MockedSetup, void(const std::vector< std::shared_ptr< fcfif::FcsUnion >> *))
 
bool IsSetupActive (const std::any &payload) const
 Check if setup is still active. More...
 
 MOCK_CONST_METHOD1 (MockedIsSetupActive, bool(const std::vector< std::shared_ptr< fcfif::FcsUnion >> *))
 
void Status (const std::any &payload, std::string &buffer)
 Obtain the status of the device. More...
 
 MOCK_METHOD2 (MockedStatus, void(const std::vector< std::shared_ptr< fcfif::FcsUnion >> *, std::string &buffer))
 
 MOCK_METHOD3 (Status, void(bool end_acq, const dit::did::Did &dictionary, std::shared_ptr< CCfits::FITS > &fits_handle))
 
 MOCK_METHOD1 (Simulate, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (StopSim, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (Ignore, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (StopIgn, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (HwReset, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (HwInit, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (HwEnable, void(rad::AnyEvent const &last_event))
 
 MOCK_METHOD1 (HwDisable, void(rad::AnyEvent const &last_event))
 
 MOCK_CONST_METHOD0 (GetLcsIf, std::shared_ptr< fcf::devmgr::common::DeviceLcsIf >())
 
 MOCK_CONST_METHOD0 (GetConfig, std::shared_ptr< fcf::devmgr::common::IDeviceConfig >())
 
 MOCK_METHOD0 (StartMonitoring, void())
 
 MOCK_METHOD0 (StopMonitoring, void())
 
 MOCK_CONST_METHOD0 (GetName, std::string())
 
- Public Member Functions inherited from fcf::devmgr::common::IDevice
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 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...
 

Member Function Documentation

bool MockIDevice::IsSetupActive ( const std::any &  payload) const
inlinevirtual

Check if setup is still active.

Parameters
[in]payloadSetup message object

This method validate if condition requested by the setup message has been achieved.

Implements fcf::devmgr::common::IDevice.

MockIDevice::MOCK_CONST_METHOD0 ( IsNotReady  ,
bool()   
)
MockIDevice::MOCK_CONST_METHOD0 ( IsReady  ,
bool()   
)
MockIDevice::MOCK_CONST_METHOD0 ( IsOperational  ,
bool()   
)
MockIDevice::MOCK_CONST_METHOD0 ( CheckHwFailure  ,
void()   
)
MockIDevice::MOCK_CONST_METHOD0 ( IsDisabling  ,
bool()   
)
MockIDevice::MOCK_CONST_METHOD0 ( GetLcsIf  ,
std::shared_ptr< fcf::devmgr::common::DeviceLcsIf () 
)
MockIDevice::MOCK_CONST_METHOD0 ( GetConfig  ,
std::shared_ptr< fcf::devmgr::common::IDeviceConfig () 
)
MockIDevice::MOCK_CONST_METHOD0 ( GetName  ,
std::  string() 
)
MockIDevice::MOCK_CONST_METHOD1 ( MockedIsSetupActive  ,
bool(const std::vector< std::shared_ptr< fcfif::FcsUnion >> *)   
)
MockIDevice::MOCK_METHOD0 ( Init  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( Enable  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( Disable  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( Stop  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( Reset  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( UpdateStatus  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( StartMonitoring  ,
void()   
)
MockIDevice::MOCK_METHOD0 ( StopMonitoring  ,
void()   
)
MockIDevice::MOCK_METHOD1 ( CreateObjects  ,
void(std::shared_ptr< fcf::devmgr::common::IDeviceConfig > config)   
)
MockIDevice::MOCK_METHOD1 ( MockedSetup  ,
void(const std::vector< std::shared_ptr< fcfif::FcsUnion >> *)   
)
MockIDevice::MOCK_METHOD1 ( Simulate  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( StopSim  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( Ignore  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( StopIgn  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( HwReset  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( HwInit  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( HwEnable  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD1 ( HwDisable  ,
void(rad::AnyEvent const &last_event)   
)
MockIDevice::MOCK_METHOD2 ( MockedStatus  ,
void(const std::vector< std::shared_ptr< fcfif::FcsUnion >> *, std::string &buffer)   
)
MockIDevice::MOCK_METHOD3 ( RegisterComm  ,
void(std::shared_ptr< fcf::common::IComm > comm_if, fcf::common::Dispatcher<> &failure, fcf::common::Dispatcher<> &normal)   
)
MockIDevice::MOCK_METHOD3 ( Status  ,
void(bool end_acq, const dit::did::Did &dictionary, std::shared_ptr< CCfits::FITS > &fits_handle)   
)
void MockIDevice::Setup ( const std::any &  payload)
inlinevirtual

Executes a setup.

Parameters
[in]payloadcontains the payload of the setup message.
Exceptions
anexception if an error ocurrs.

Implements fcf::devmgr::common::IDevice.

void MockIDevice::Status ( const std::any &  payload,
std::string &  buffer 
)
inlinevirtual

Obtain the status of the device.

Parameters
payloadStatus message object
bufferBuffer where the status will be written

Implements fcf::devmgr::common::IDevice.


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