Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The NotifyEvent method  The NotifyEventStr method Next page


The NotifyEventGlobal method is used to generate system events. The generated event is sent to all system kernels connected via the network. In the NotifyEventGlobal method, the event is specified by the MsgObject object (see The MsgObject and Event objects and their built-in methods and properties)

Syntax for method invocation:

 function NotifyEventGlobal (msgevent : MsgObject)

Method arguments:

  1. msgevent is a required argument. It specifies the event sent to the system. Possible values: the MsgObject objects created earlier in the script.

Example. On macro 1, the first camera is set to record. The command must be sent to all system kernels as the event to be registered in the Event Viewer.

Note

When running this script, camera 1 is not set to record.

 if (Event.SourceType == "MACRO"&& Event.SourceId == "1" && Event.Action == "RUN")
{
var msgevent = CreateMsg();
msgevent.SourceType = "CAM";
msgevent.SourceId = "1";
msgevent.Action = "REC";
NotifyEventGlobal(msgevent);
}