Alert() - The Alert Function

This function is used to send a DyNet 2 packet onto the network indicating some sort of alert or alarm.
These alerts will show up in System Manager.

Unlike 0x6c block data messages the Alert() command will create a D2 message which can be read on the trunk or via a TCP based connection.

Syntax

Alert(AlertArea=x,AlertID=x,AlertDuplicate=x,AlertState=x,AlertJoin=x,AlertType=x,AlertMessage="x")
AlertState, AlertType, and AlertMessage are required the rest are optional.

Parameters
  • "AlertArea" is the area number (0-65534) you want the alert for - Default is "Not Specified"

  • "AlertID" is the ID number of the alert (0-65534)- Default is "Not Specified"

  • "AlertJoin" is the value of the alert - Default is "0xFF"

  • "AlertState" is the state of the alert

    • 0 = Created

    • 1 = Acknowledge

    • 2 = Restore

    • 3 = Restore Acknowledge

    • 4 = Clear

  • "AlertType" is the type of alert - Default is "Not Specified"

    • 0 = Fault

    • 1 = Alarm

    • 2 = Event

  • "AlertMessage" is the message contained the alert (Maximum length = 100 characters)

    • Must be a string containing any ASCII Characters including special symbols and numbers.

  • "AlertDuplicate" tells other systems if duplicate alerts should be ignored - Default of "True"

Examples

Example 1

This task will send an alert onto the network warning that someone failed to log in to the device.

Task1()
{
    Name="Alert Message from Failed Pin"
	Alert(AlertState=0,AlertType=1,AlertMessage="Someone tried to log in with the wrong PIN!!!")    //Other parameters are default.
}

Example 2

This task will clear an event for area 7 with a join of 0x01.

Task1()
{
    Name="Security Disabled Alert"
	Alert(AlertArea=7,AlertID=22,AlertDuplicate=False,AlertState=4,AlertType=2,AlertJoin=0x01,AlertMessage="Security System Disabled")
}