Interface IAlarmsManager
- Namespace
- Acuit.Pinpoint.Workstation
- Assembly
- Acuit.Pinpoint.Workstation.Interfaces.dll
An alarms manager service.
public interface IAlarmsManager : INotifyPropertyChanged
- Inherited Members
Remarks
As alarms are added, they are queued for display. Only one alarm is displayed at a time, as the "active" alarm. When the active alarm is acknowledged, it is removed from the display and the next alarm in the queue, if one exists, is displayed as the new active alarm.
Properties
ActiveAlarm
Gets the active alarm, or null if no alarm is active.
IAlarm ActiveAlarm { get; }
Property Value
IsDisplayingAlarmInMessageBox
Gets whether an alarm message is currently being displayed via a message box.
bool IsDisplayingAlarmInMessageBox { get; }
Property Value
Methods
AcknowledgeAlarm()
Acknowledges the active alarm.
void AcknowledgeAlarm()
Remarks
This does nothing if no alarm is active.
This method is not thread-safe and should be called from the main user interface thread. The IApplicationDispatcher service can be used to invoke this from a background thread.
AddNewAlarm(string)
Adds a new alarm.
void AddNewAlarm(string message)
Parameters
message
stringThe alarm message.
Remarks
This is the same as calling AddNewAlarm(string, string, bool) with no context and interactive set to false.
This method is not thread-safe and should be called from the main user interface thread. The IApplicationDispatcher service can be used to invoke this from a background thread.
AddNewAlarm(string, string, bool)
Adds a new alarm.
void AddNewAlarm(string message, string context, bool interactive)
Parameters
message
stringThe alarm message.
context
stringAn optional alarm context. This is included in the alarm message when it is shown in the alarm display, since it can appear when the context for which the alarm applies (e.g., the current unit) no longer exists. It is not included when the alarm message is shown modally (and, thus, the context is implied).
interactive
boolWhether this alarm is the result of an interactive operator action. When this is true, and the workstation is manned, then the error will be displayed modally, and the method will not return until the operator has closed the message box.
Remarks
If interactive
is false or the station is automated, then the message (with context, if provided), will be queued to be displayed in the alarm display.
Otherwise, message
is displayed via an error message box.
If context
is not null or empty, then the message with context is formatted like "context: message".
An informational entry will be added to the application log containing the message (with context, if provided).
This method is not thread-safe and should be called from the main user interface thread. The IApplicationDispatcher service can be used to invoke this from a background thread.