Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The DoReactSetup method  The DoReactGlobal method Next page


The DoReactSetupCore method is used to change the parameters of the system object. The method changes only the specified parameters of the object, leaving other parameters unchanged.

Syntax for method invocation:

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

Method arguments:

  1. objtype is a required argument. It corresponds to the type of system object which parameter values you want to set. 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. param<value> is a required argument. You can specify several arguments of this type. It corresponds to the parameter(s) of the system object reaction.

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.

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

Example. On macro 1, set the values of the following parameters of cameras 1-4: PTZ device number (telemetry_id) and number of the microphone for synchronous recording (audio_id). The values must be equal to the camera numbers plus 1.

 if (Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN")
{
 var i;
 for(i=1; i<=4; i=i+1)
 {
 DoReactSetupCore ("CAM", i, "telemetry_id<" + (i+1) +">,audio_id<" + (i+1) + ">");
 }
}