|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Abstract interface for receiving PROFINET alarm notifications. More...
#include <IAlarmListener.h>
Inheritance diagram for profinet::IAlarmListener:
Collaboration diagram for profinet::IAlarmListener:Public Member Functions | |
| virtual | ~IAlarmListener ()=default |
| Virtual destructor. | |
| virtual void | AddCallback (std::function< void(const AlarmNotification &)> callback)=0 |
| Registers a callback for received alarm notifications. | |
| virtual void | RemoveCallback (std::function< void(const AlarmNotification &)> callback)=0 |
| Remove a registered callback for received alarm notifications. | |
| virtual void | Start ()=0 |
| Starts alarm reception. | |
| virtual void | Stop ()=0 |
| Stops alarm reception. | |
| virtual bool | IsRunning () const =0 |
| Indicates whether the listener is currently running. | |
Abstract interface for receiving PROFINET alarm notifications.
Provides the minimal interface required by higher-level components such as ProfinetDevice. Implementations are responsible for receiving alarm notifications and invoking registered callbacks.
The interface deliberately does not expose transport-specific details such as Ethernet sockets, UDP sockets, frame parsing, or acknowledgement handling. Those responsibilities remain within the concrete listener.
Definition at line 30 of file IAlarmListener.h.
|
virtualdefault |
Virtual destructor.
Allows derived alarm listener implementations to be destroyed safely through an IAlarmListener pointer.
|
pure virtual |
Registers a callback for received alarm notifications.
| callback | Function invoked when an alarm notification is received. |
Implemented in profinet::AlarmListener.
|
pure virtual |
Indicates whether the listener is currently running.
Implemented in profinet::AlarmListener.
|
pure virtual |
Remove a registered callback for received alarm notifications.
| callback | Function invoked when an alarm notification is received which needs to be removed. |
Implemented in profinet::AlarmListener.
|
pure virtual |
Starts alarm reception.
Starts the underlying alarm transport and begins receiving alarm notifications.
| std::exception | Derived implementations may throw when the alarm listener cannot be started. |
Implemented in profinet::AlarmListener.
|
pure virtual |
Stops alarm reception.
Stops receiving alarms and releases the resources associated with the listener.
Implemented in profinet::AlarmListener.