Message handling
The message handling can be used in different ways in the project. Alarms can be displayed on the HMI and reactions can be triggered. It can also be used to communicate internally between controllers.
Message Definitions
Message are defined in the local interface of a controller. The definitions can be overwritten in the controller instance.
MessageType
The Message Hander has 4 predefined message types:
- error
- warning
- info
- maintenance
The message type has no influence on the effect of the message. The type can be used to color the message on the HMI.
User-defined message types
For special applications, up to five additional user types can be defined.
uiClass: General UI class (inspired by bootstrap CSS representation at service ui): https://getbootstrap.com/docs/5.0/content/tables/#variants
AckType
Each message can be configured by modelType MessageAcknowledgeType to set a quitter behavior. The following basic settings are possible:
- msgNoAcknowledge: The message does not require any acknowledgment
- msgGlobalAcknowledge: The message can be acknowledged by any object number
- msgLocalAcknowledge: The message can only be acknowledged by the object number which has set the message
- msgExpUserAcknowledge: The user must explicitly acknowledge the message with the object and alarm number (MessageId)
Via the switch enAEMsgAckWhileActiveAllowed, the message can be allowed to be acknowledged already during which it is active (set and not yet reset).
UseCase
Message Options
The message options are defined in the configuration of the UP project.
Cluster
- A cluster combines the information of different messages.
- Each controller can query the active level or the set reactions of each cluster.
- A message can be assigned to exactly one cluster
Cluster Configuration
Cluster Instances
It is possible to use instantiatable clusters.
- If a controller is instanced in different places, a cluster can be assigned during instanciation.
Reaction
- A maximum of 32 reactions can be defined in a cluster
- Several reactions can be configured for each message
- Each controller can react to every reaction
- A reaction is active until the message is reset and acknowledged.
Reaction Configuration
Reactions can be defined in a cluster or global. If they are defined in the globalDdefinition, they can be used in all clusters.
Level
- Levels are used to prioritize messages
- The level is active until the message is reset and acknowledged.
Level Configuration
Levels can be defined in a cluster or global. If they are defined in the globalDdefinition, they can be used in all clusters.
Best Practise
Levels shoud be defined global or in clusters. Mixing is tricky and should be avoided.
Example
An example project is available here