Go to documentation repository
...
| Code Block | ||
|---|---|---|
| ||
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> - − 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:
...
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 recoedingsynchronous recoding (audio_id) parameters. The values should be equal to the corresponding camera camera numbers plus 1.
| Code Block | ||
|---|---|---|
| ||
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);
}
} |
...