Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The Int_var method  The CreateMsg method Next page


The GetIPAddress method returns the IP address of the Axxon PSIM kernel according to the existing architecture of the distributed video surveillance system.

Syntax for method invocation:

function GetIPAddress (dst : String, src : String) : String

Method arguments:

  1. dst is a required argument. It specifies the name of the remote computer on which the Axxon PSIM kernel is installed. The value of the dst argument must match one of the computer names registered when configuring the architecture of the distributed video surveillance system. Possible values: String type that meets the requirements for network computer names; the range is limited to the computer names registered in the system.
  2. src is a required argument. It specifies the name of the local computer (the computer from which you run the script). The value of the src argument must match the name of the local computer as it is registered in Axxon PSIMPossible values: String type that meets the requirements for network computer names.

Note

The information about all connections of the local computer (kernel) to other remote computers (kernels) registered during the configuration of the distributed architecture is displayed in the Architecture tab of the System settings window.

Example. On a camera alarm, determine the name of the computer to which this camera is connected, and output in the debug window the IP address of the connection between this computer and the local computer on which the script is executed.

if (Event.SourceType == "CAM" && Event.Action == "MD_START")
{
 var camid = Event.SourceId;
 var compname = GetObjectParentId("CAM", camid, "COMPUTER");
 var ip = GetIPAddress("WS1","WS1"); \\if the script is run on the computer where kernel of Axxon PSIM software has been installed
 DebugLogString("IP-address of the alarmed camera computer" + ip);
}

Note

Instead of "WS1" in the example, you must enter the name of the computer on which the script is run and Axxon PSIM kernel is installed.