Message and event handling in cinnamon is currently based on the TwinCAT 3 EventLogger. This is well integrated into the TwinCAT ecosystem and enables the easy generation of alarms and messages on the HMI.
The event classes in cinnamon are therefore essentially just wrapper classes around the TwinCAT 3 EventLogger objects, which they equip with additional functions and the interfaces required by cinnamon. As with the EventLogger, a distinction is made between alarms and messages. While messages can simply be triggered and do not require a response from the operator, alarms must be acknowledged by the operator. If necessary, stop categories can be defined for alarms, which, in combination with cinnamon OpMode handling, cause a machine to stop at different speeds.
Message services are used to manage alarms and events. These services handle thrown events independently. They also implement an observer pattern that users can subscribe to. Every time an alarm is thrown or cleared, they notify all subscribers by calling notify methods.
The message and event handling includes three cinnamon libraries:
Message Interfaces
Message Services
Concrete Messages