The GetParam method returns the value of the specified parameter of the system object for the MsgObject or Event object.
Syntax for method invocation:
function GetParam(param: String) : String |
Method arguments:
If the object has no parameter with this name, then the method returns an empty string. |
Example. When any event from any camera is registered, check from which computer the event comes. If the computer has the WS3 name, create the event copy in which the computer’s name is “Computer”.
if (Event.SourceType == "CAM") { var msg = Event.Clone(); if (msg.GetParam("SLAVE_id") == "WS3") { msg.SetParam("SLAVE_id", "Computer"); NotifyEvent(msg); } } |