Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The NotifyEventGlobal method  The NotifyEventGlobalStr method Next page


The NotifyEventStr method generates system events. The generated event is sent directly to the kernel on which the object is registered, and not to the entire system. In the NotifyEventStr method, an event is specified by a group of String arguments.

Syntax for method invocation:

 function NotifyEventStr(objtype : String, id : String, event : String, param<value> [, param<value>] : String )

Method arguments:

  1. objtype is a required argument. It corresponds to the type of system object for which you want to generate an event. Possible values: String type, range is limited by object types registered in the system.
  2. id is a required argument. It corresponds to the identification (registration) number of the object specified by the objtype argument. Possible values: String type, range is limited by the identification numbers of objects of the specified type registered in the system.
  3. event is a required argument. It specifies the event that you want to generate. Possible values: String type, range is limited by events available for the object of the specified type.
  4. param<value> is a required argument. You can specify several arguments of this type. It corresponds to the parameter(s) of the system event.

Syntax for setting a value to a parameter corresponds to a string:

"param<value>", where

param is a name of the parameter;

value is a value of the parameter.

Syntax for setting a value to several parameters corresponds to a string:

"param1<value1>,param2<value2>…".

Elements of the list are separated by commas without spaces. If no parameter needs to be specified, an empty string is used:

DoReactStr("CAM","1","MD_START","");

Possible values of the param argument: String type, range is limited by the available parameters of the specified event. Possible values of the value argument: String type, range depends on the parameter that you want to set.

Note

Two types of system messages are available in Axxon PSIM: events and reactions. The events usually contain some information and are used as notifications sent to all Axxon PSIM kernels connected to each other during the architecture configuration. The reactions are commands sent to specific objects. A reaction is transmitted only to the kernel on which the required object is registered, and not to the entire system. The DoReactStr and DoReact methods are used to generate reactions. The NotifyEventStr and NotifyEvent methods are used to generate events.

Example. When an alarm is received, send the “panic lock” event for the corresponding region of the camera. For camera identification numbers are from 1 to 4, use region 1. For camera numbers from 5 to 10, use region 2.

 if (Event.SourceType == "CAM" && Event.Action == "MD_START")
{
 var regionid;
 if (Event.SourceId <=4)
 {
 regionid = "1";
 }
 if ((Event.SourceId > 4) && (Event.SourceId <= 10))
 {
 regionid = "2";
 }
 NotifyEventStr("REGION", regionid, "PANIC_LOCK", "");
}