Still trying to work through this based on the SDK Programmer Guide and the JavaDocs, but struggling with a few things.
The SDK guide says
Most alarms in Ignition are defined on tags. However, it is possible for modules to generate their own alarms. All alarm evaluation is handled by the AlarmManager, you simply give it the definition of an alarm through AlarmManager.registerAlarm(...), and it provides you with an AlarmEvaluator that you update from time to time with the current value.
However, registerAlarm takes 4 parameters, and we're not sure how to construct them to raise a simple alarm.
Here's what I see in the JavaDocs.
AlarmEvaluator registerAlarm(QualifiedPath sourcePath, PropertyValueSource parentProperties, AlarmConfiguration configuration, ExpressionParseContext expressionContext)
Registers the configuration of an alarm for a specific source, also providing the context for references in bound alarm properties. The result is an AlarmEvaluator which will be used by the source to evaluate values. When the source is done or removed, it should release the AlarmExecutor to unregister it from the system.
So let's say we want to raise a simple alarm that shows the user that a bad thing happened whenever we encounter a condition (hypothetically, we can use as an example, an exception is encountered during a critical operation).
What would we need need to pass in as a QualifiedPath, PropertyValueSource and ExpressionParseContext when we're wanting to raise the alarm on something in memory instead of on a tag?
Once we have an AlarmEvaluator, how do we update it from time to time?