Go to documentation repository
The StringToParams method converts a String variable into the list of parameters and overwrites the existing list of parameters of the MsgObject object.
Syntax for method invocation:
function StringToParams(params: String)
Method arguments:
“param1<value1>,param2<value2>…”, where
param1<value1>,param2<value2> is a list of parameters with their values. Elements of the list are separated by commas without spaces. If no parameters need to be specified, an empty string is used after the vertical line (|), for example: “CAM|1|MD_START|”
Example. When registering an Attach event for any of the cameras, re-initiate the Attach event in the system with changed values of the Number of the PTZ device (telemetry_id) and Number of the microphone for synchronous recording (audio_id) parameters. The values must 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); } }