Documentation for Intellect 4.9.8. Documentation for other versions of Intellect is available too.

Skip to end of metadata
Go to start of metadata

The StringToParams method transforms a String variable into the list of parameters and overwrites the existing parameter list of the MsgObject object.

Method call syntax

 StringToParams(String params)

Method arguments:

params - Required argument. A String type variable to be transformed into a list of parameters for the MsgObject object. It takes the following values:  String variables matching the syntax for MsgObject parameter list representation:

“param1<value1>,param2<value2>…”, where

param1<value1>,param2<value2> - list of parameters and their values. Elements of the list are separated by commas with no white space. If no parameters need to be specified, an empty string is used after the vertical line (|), for example:

“CAM|1|MD_START|”

Usage examples

Example. Upon registration the connection (“Attach”) event for any camera, in the system retrigger the “Attach” event with modified Number of the PTZ device (telemetry_id) and Number of the microphone for  synchronous recoeding (audio_id) parameters.  The values should be equal to the corresponding  camera numbers plus 1.

if (Event.SourceType == "CAM" && Event.Action == "ATTACH") 
 {
var i;
for (i=1,i<=4;i=i+1)
{
 var msg = Event.Clone(); 
 var str = "telemetry_id<" + (i+1) +">,audio_id<" + (i+1) + ">"; 
 msg.StringToParams(str); 
 NotifyEvent(msg); 
 }
}