AlarmReceiverOnAlarm Method |  |
Override this method in your own class derived from AlarmReceiver.
This method is called when an alarm is fired or when the alarm state has changed.
Namespace: Bosch.Vms.SDKAssembly: Bosch.Vms.SDK (in Bosch.Vms.SDK.dll) Version: 1.9.0.0
Syntaxpublic abstract void OnAlarm(
AlarmData alarmData
)
Parameters
- alarmData AlarmData
- Alarm data.
Remarks
Do not block in this method. Blocking may cause a connection break or lead to dismissed alarms.
Note that the SDK does not notify alarm-receivers about alarms where the workflow-settings of the alarm-options specify
that the alarm is a record-only alarm.
Example
This sample shows how to implement a custom alarm receiver class derived from AlarmReceiver.
public class MyAlarmReceiver: AlarmReceiver
{
public override void OnAlarm(AlarmData alarmData)
{
Console.WriteLine(String.Format("Alarm '{0}' with state '{1}'", alarmData.DisplayName, alarmData.State));
}
}
See Also