Go to documentation repository
The NotifyEventGlobalStr method is used to generate system events. The generated event is sent to all system kernels connected via the network. In the NotifyEventGlobalStr method, the event is specified by a group of String arguments.
Syntax for method invocation:
function NotifyEventGlobalStr(objtype : String, id : String, event : String, param<value> [, param<value>] : String )
Method arguments:
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:
NotifyEventGlobalStr("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"; } NotifyEventGlobalStr("REGION", regionid, "PANIC_LOCK", ""); }