Go to documentation repository
Format of events procedure for the Computer object:
OnEvent("SLAVE","_id_","_event_")
Operator format to describe actions with the Computer object:
DoReact("SLAVE","_id_","_command_" [,"_parameters_"]);
Format of events procedure for the Display object:
OnEvent("DISPLAY","_id_","_event_")
Operator format to describe actions with the Display:
DoReact("DISPLAY","_id_","_command_" [,"_parameters_"]);
Examples of using events and reactions of the Computer object:
Stop recording from camera 2 if there is no disk for archive recording.
OnEvent("SLAVE","1"," NO_DISC") { DoReact("CAM","2"," REC_STOP"); }
Get the archive depth of Camera 1 on Macro 1.
OnEvent ("MACRO","1","RUN"){ DoReact ("SLAVE","WS3","GET_DEPTH","cam<1>"); }
As the result, the following string will be displayed in the debug window:
Event : SLAVE|WS3|ARCHIVE_DEPTH|cam<1>,core_global<1>,date<11-07-13>,depth<42>,destination_id<1>,destination_source<PROGRAM>,fraction<970>,guid_pk<{003DFC83-0CEA-E211-A437-0017C401D5C2}>,owner<WS3>,param0<01:18>,slave_id<WS3>,time<13:30:33>
Besides, the Archive depth event will be displayed in the Event Viewer and the archive depth in Days:Hours format will be specified in the Additional information field. This information is also displayed in the debug window in the param0<> event parameter.
Example of using events and reactions of the Display object:
Show first display on the CLIENT computer when activating the first time zone.
OnEvent("TIME_ZONE","1","ACTIVATE") { DoReact("DISPLAY","1","ACTIVATE","macro_slave_id< CLIENT >"); }
OnEvent("CAM",N,"MD_START") { DoReact("DISPLAY","2","DEACTIVATE","macro_slave_id<CLIENT>"); DoReact("DISPLAY","1","ACTIVATE","macro_slave_id<CLIENT>"); } OnEvent("FSA_ZONE",M,"ALARM") { DoReact("DISPLAY","1","DEACTIVATE","macro_slave_id<CLIENT>"); DoReact("DISPLAY","2","ACTIVATE","macro_slave_id<CLIENT>"); }