ifw-fcf 7.1.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MockIDevice Class Reference

#include <mockIDevice.hpp>

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

Public Member Functions

 MOCK_METHOD1 (CreateObjects, void(std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig > config))
 
 MOCK_METHOD3 (RegisterComm, void(std::shared_ptr< ifw::core::protocol::base::IComm > comm_if, ifw::core::protocol::base::Dispatcher<> &failure, ifw::core::protocol::base::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())
 
 MOCK_METHOD0 (WriteConfig, void())
 
void Setup (const std::any &payload)
 Executes a setup.
 
 MOCK_METHOD1 (MockedSetup, void(const std::vector< std::shared_ptr< fcfif::SetupElem > > *))
 
bool IsSetupActive (const std::any &payload) const
 Check if setup is still active.
 
 MOCK_CONST_METHOD1 (MockedIsSetupActive, bool(const std::vector< std::shared_ptr< fcfif::SetupElem > > *))
 
void Status (const std::any &payload, std::string &buffer)
 Obtain the status of the device.
 
 MOCK_METHOD2 (MockedStatus, void(const std::vector< std::shared_ptr< fcfif::SetupElem > > *, std::string &buffer))
 
 MOCK_METHOD3 (Status, void(bool end_acq, const ifw::core::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_METHOD (std::shared_ptr< ifw::fcf::devmgr::common::DeviceLcsIf >, GetLcsIf,(),(const, noexcept))
 
 MOCK_METHOD (std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig >, GetConfig,(),(const, noexcept))
 
 MOCK_METHOD0 (StartMonitoring, void())
 
 MOCK_METHOD0 (StopMonitoring, void())
 
 MOCK_METHOD (void, UpdateCommunication,(),(const))
 
 MOCK_METHOD (std::string, GetName,(),(const, noexcept))
 
- Public Member Functions inherited from ifw::fcf::devmgr::common::IDevice
virtual void CreateObjects (std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig > config=nullptr)=0
 Create basic objects needed by the device class.
 
virtual void RegisterComm (std::shared_ptr< ifw::core::protocol::base::IComm > comm_if, ifw::core::protocol::base::Dispatcher<> &failure, ifw::core::protocol::base::Dispatcher<> &normal)=0
 Register a communication interface object.
 
virtual bool IsNotReady () const =0
 Check if device is Standby/NotReady.
 
virtual bool IsReady () const =0
 Check if device is Standby/Ready.
 
virtual bool IsOperational () const =0
 Check if device is Operational.
 
virtual void CheckHwFailure () const =0
 Check if device is in failure state.
 
virtual bool IsDisabling () const =0
 Check if device is disablig.
 
virtual void Init ()=0
 Executes a Init command.
 
virtual void Enable ()=0
 Executes a Enable command.
 
virtual void Disable ()=0
 Executes a Disable command.
 
virtual void Stop ()=0
 Executes a Stop command.
 
virtual void Reset ()=0
 Executes a Reset command.
 
virtual void UpdateStatus ()=0
 Update internal status by connecting to the LCS.
 
virtual void Status (bool end_acq, const ifw::core::dit::did::Did &dictionary, std::shared_ptr< CCfits::FITS > &fits_handle)=0
 Obtain the status of the device.
 
virtual void Simulate (rad::AnyEvent const &last_event)=0
 Executes a Simulat.
 
virtual void StopSim (rad::AnyEvent const &last_event)=0
 Executes a StopSim.
 
virtual void Ignore (rad::AnyEvent const &last_event)=0
 Executes a Ignore.
 
virtual void StopIgn (rad::AnyEvent const &last_event)=0
 Executes a StopIgn.
 
virtual void HwReset (rad::AnyEvent const &last_event)=0
 Executes a hardware reset command.
 
virtual void HwInit (rad::AnyEvent const &last_event)=0
 Executes a hardware init command.
 
virtual void HwEnable (rad::AnyEvent const &last_event)=0
 Executes a hardware enable command.
 
virtual void HwDisable (rad::AnyEvent const &last_event)=0
 Executes a hardware disable command.
 
virtual std::shared_ptr< DeviceLcsIfGetLcsIf () const noexcept=0
 Get a pointer of device LCS interface.
 
virtual std::shared_ptr< IDeviceConfigGetConfig () const =0
 Get a pointer of device configuration.
 
virtual void StartMonitoring ()=0
 Start device monitoring via OPCUA subscriptions.
 
virtual void StopMonitoring ()=0
 Stop device monitoring.
 
virtual void WriteConfig ()=0
 Write configuration into OLDB.
 
virtual std::string GetName () const noexcept=0
 Get device name.
 

Member Function Documentation

◆ IsSetupActive()

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 ifw::fcf::devmgr::common::IDevice.

◆ MOCK_CONST_METHOD0() [1/5]

MockIDevice::MOCK_CONST_METHOD0 ( CheckHwFailure ,
void()  )

◆ MOCK_CONST_METHOD0() [2/5]

MockIDevice::MOCK_CONST_METHOD0 ( IsDisabling ,
bool()  )

◆ MOCK_CONST_METHOD0() [3/5]

MockIDevice::MOCK_CONST_METHOD0 ( IsNotReady ,
bool()  )

◆ MOCK_CONST_METHOD0() [4/5]

MockIDevice::MOCK_CONST_METHOD0 ( IsOperational ,
bool()  )

◆ MOCK_CONST_METHOD0() [5/5]

MockIDevice::MOCK_CONST_METHOD0 ( IsReady ,
bool()  )

◆ MOCK_CONST_METHOD1()

MockIDevice::MOCK_CONST_METHOD1 ( MockedIsSetupActive ,
bool(const std::vector< std::shared_ptr< fcfif::SetupElem > > *)  )

◆ MOCK_METHOD() [1/4]

MockIDevice::MOCK_METHOD ( std::shared_ptr< ifw::fcf::devmgr::common::DeviceLcsIf > ,
GetLcsIf ,
() ,
(const, noexcept)  )

◆ MOCK_METHOD() [2/4]

MockIDevice::MOCK_METHOD ( std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig > ,
GetConfig ,
() ,
(const, noexcept)  )

◆ MOCK_METHOD() [3/4]

MockIDevice::MOCK_METHOD ( std::string ,
GetName ,
() ,
(const, noexcept)  )

◆ MOCK_METHOD() [4/4]

MockIDevice::MOCK_METHOD ( void ,
UpdateCommunication ,
() ,
(const)  )

◆ MOCK_METHOD0() [1/9]

MockIDevice::MOCK_METHOD0 ( Disable ,
void()  )

◆ MOCK_METHOD0() [2/9]

MockIDevice::MOCK_METHOD0 ( Enable ,
void()  )

◆ MOCK_METHOD0() [3/9]

MockIDevice::MOCK_METHOD0 ( Init ,
void()  )

◆ MOCK_METHOD0() [4/9]

MockIDevice::MOCK_METHOD0 ( Reset ,
void()  )

◆ MOCK_METHOD0() [5/9]

MockIDevice::MOCK_METHOD0 ( StartMonitoring ,
void()  )

◆ MOCK_METHOD0() [6/9]

MockIDevice::MOCK_METHOD0 ( Stop ,
void()  )

◆ MOCK_METHOD0() [7/9]

MockIDevice::MOCK_METHOD0 ( StopMonitoring ,
void()  )

◆ MOCK_METHOD0() [8/9]

MockIDevice::MOCK_METHOD0 ( UpdateStatus ,
void()  )

◆ MOCK_METHOD0() [9/9]

MockIDevice::MOCK_METHOD0 ( WriteConfig ,
void()  )

◆ MOCK_METHOD1() [1/10]

MockIDevice::MOCK_METHOD1 ( CreateObjects ,
void(std::shared_ptr< ifw::fcf::devmgr::common::IDeviceConfig > config)  )

◆ MOCK_METHOD1() [2/10]

MockIDevice::MOCK_METHOD1 ( HwDisable ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [3/10]

MockIDevice::MOCK_METHOD1 ( HwEnable ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [4/10]

MockIDevice::MOCK_METHOD1 ( HwInit ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [5/10]

MockIDevice::MOCK_METHOD1 ( HwReset ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [6/10]

MockIDevice::MOCK_METHOD1 ( Ignore ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [7/10]

MockIDevice::MOCK_METHOD1 ( MockedSetup ,
void(const std::vector< std::shared_ptr< fcfif::SetupElem > > *)  )

◆ MOCK_METHOD1() [8/10]

MockIDevice::MOCK_METHOD1 ( Simulate ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [9/10]

MockIDevice::MOCK_METHOD1 ( StopIgn ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD1() [10/10]

MockIDevice::MOCK_METHOD1 ( StopSim ,
void(rad::AnyEvent const &last_event)  )

◆ MOCK_METHOD2()

MockIDevice::MOCK_METHOD2 ( MockedStatus ,
void(const std::vector< std::shared_ptr< fcfif::SetupElem > > *, std::string &buffer)  )

◆ MOCK_METHOD3() [1/2]

MockIDevice::MOCK_METHOD3 ( RegisterComm ,
void(std::shared_ptr< ifw::core::protocol::base::IComm > comm_if, ifw::core::protocol::base::Dispatcher<> &failure, ifw::core::protocol::base::Dispatcher<> &normal)  )

◆ MOCK_METHOD3() [2/2]

MockIDevice::MOCK_METHOD3 ( Status ,
void(bool end_acq, const ifw::core::dit::did::Did &dictionary, std::shared_ptr< CCfits::FITS > &fits_handle)  )

◆ Setup()

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 ifw::fcf::devmgr::common::IDevice.

◆ Status()

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 ifw::fcf::devmgr::common::IDevice.


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