|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Google Mock implementation of IAlarmListener. More...
#include <mockAlarmListener.h>
Inheritance diagram for profinet::MockAlarmListener:
Collaboration diagram for profinet::MockAlarmListener:Public Member Functions | |
| MockAlarmListener ()=default | |
| Constructs a mock alarm listener. | |
| ~MockAlarmListener () override=default | |
| Destroys the mock alarm listener. | |
| MOCK_METHOD (void, AddAlarmNotificationCallback,(std::function< void(const AlarmNotification &)> callback),(override)) | |
| Mocks Alarm Notification AddCallback(). | |
| MOCK_METHOD (void, RemoveAlarmNotificationCallback,(std::function< void(const AlarmNotification &)> callback),(override)) | |
| Mocks Alarm Notification RemoveCallback(). | |
| MOCK_METHOD (void, AddRtaAlarmCallback,(std::function< void(const RtaError &)> callback),(override)) | |
| Mocks RTA Alarm AddCallback(). | |
| MOCK_METHOD (void, RemoveRtaAlarmCallback,(std::function< void(const RtaError &)> callback),(override)) | |
| Mocks RTA Alarm RemoveCallback(). | |
| MOCK_METHOD (void, Start,(std::unique_ptr< IRawEthernetSocket >, std::unique_ptr< IUdpSocket >),(override)) | |
| Mocks Start(). | |
| MOCK_METHOD (void, Stop,(),(override)) | |
| Mocks Stop(). | |
| MOCK_METHOD (bool, IsRunning,(),(const, override)) | |
| Mocks IsRunning(). | |
Public Member Functions inherited from profinet::IAlarmListener | |
| virtual | ~IAlarmListener ()=default |
| Virtual destructor. | |
| virtual void | AddAlarmNotificationCallback (std::function< void(const AlarmNotification &)> callback)=0 |
| Registers a callback for received alarm notifications. | |
| virtual void | RemoveAlarmNotificationCallback (std::function< void(const AlarmNotification &)> callback)=0 |
| Remove a registered callback for received alarm notifications. | |
| virtual void | AddRtaAlarmCallback (std::function< void(const RtaError &)> callback)=0 |
| Registers a callback for received rta alarms. | |
| virtual void | RemoveRtaAlarmCallback (std::function< void(const RtaError &)> callback)=0 |
| Remove a registered callback for received rta alarms. | |
| virtual void | Start (std::unique_ptr< IRawEthernetSocket > eSocket=nullptr, std::unique_ptr< IUdpSocket > uSocket=nullptr)=0 |
| Starts alarm reception. | |
| virtual void | Stop ()=0 |
| Stops alarm reception. | |
| virtual bool | IsRunning () const =0 |
| Indicates whether the listener is currently running. | |
Google Mock implementation of IAlarmListener.
Allows unit tests to configure and verify calls to alarm listener lifecycle and callback-registration operations. The mock performs no actual network communication.
Definition at line 26 of file mockAlarmListener.h.
|
default |
Constructs a mock alarm listener.
|
overridedefault |
Destroys the mock alarm listener.
| profinet::MockAlarmListener::MOCK_METHOD | ( | bool | , |
| IsRunning | , | ||
| () | , | ||
| (const, override) | |||
| ) |
Mocks IsRunning().
| profinet::MockAlarmListener::MOCK_METHOD | ( | void | , |
| AddAlarmNotificationCallback | , | ||
| (std::function< void(const AlarmNotification &)> callback) | , | ||
| (override) | |||
| ) |
Mocks Alarm Notification AddCallback().
| profinet::MockAlarmListener::MOCK_METHOD | ( | void | , |
| AddRtaAlarmCallback | , | ||
| (std::function< void(const RtaError &)> callback) | , | ||
| (override) | |||
| ) |
Mocks RTA Alarm AddCallback().
| profinet::MockAlarmListener::MOCK_METHOD | ( | void | , |
| RemoveAlarmNotificationCallback | , | ||
| (std::function< void(const AlarmNotification &)> callback) | , | ||
| (override) | |||
| ) |
Mocks Alarm Notification RemoveCallback().
| profinet::MockAlarmListener::MOCK_METHOD | ( | void | , |
| RemoveRtaAlarmCallback | , | ||
| (std::function< void(const RtaError &)> callback) | , | ||
| (override) | |||
| ) |
Mocks RTA Alarm RemoveCallback().
| profinet::MockAlarmListener::MOCK_METHOD | ( | void | , |
| Start | , | ||
| (std::unique_ptr< IRawEthernetSocket >, std::unique_ptr< IUdpSocket >) | , | ||
| (override) | |||
| ) |
Mocks Start().