BVMS Server- and Client-SDK
BVMS Server- and Client-SDK
BVMS Server- and Client-SDK
Bosch.Vms.SDK
AlarmReceiver Class
AlarmReceiver Methods
OnAlarm Method

# 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.SDK
Assembly: Bosch.Vms.SDK (in Bosch.Vms.SDK.dll) Version: 1.9.0.0
Syntax
C#
Copy

    public 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.
C#
Copy

    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

#### Reference

AlarmReceiver Class
Bosch.Vms.SDK Namespace

Copyright © Bosch Sicherheitssysteme GmbH