robot Object

In ogScript, use the robot object to communicate with CamBot robotic cameras through the CamBot PC User Interface. Functions in the robot object are typically set through a user interface.

To call a general-purpose function, use:

robot.functionname (parameters);

For example:

robot.setHost (Server01);

The following table lists the functions of the robot object.

Function

Parameters

Returns

Description

setHost

String [Host]

N/A

Set a default host to use for CamBot commands where no host has been defined.

getHost

N/A

String

Get the default host previously defined.

setPort

Integer [Port]

N/A

Set a default port to use for CamBot commands where no host has been defined.

getPort

N/A

Integer

Get the default port previously defined.

sendCambot

String [CamBot Command]

N/A

Equivalent of calling:

sendCambot (getHost(), getPort(), command, null)

sendCambot

String [CamBot Command] Function [Callback]

N/A

Equivalent of calling:

sendCambot (getHost(), getPort(), CamBot Command, Callback);

sendCambot

String [Host], Int [Port],

String [CamBot Command]

N/A

Equivalent of calling:

sendCambot (Host, Port, CamBot Command, null);

sendCambot

String [Host], Int [Port],

String [CamBot Command] Function [Callback]

N/A

Send the provided CamBot command to the provided host at the provided port. Invoke the callback function when done.

Callback function signature:

Function (Boolean success, String sentData, String receivedData, Exception javaException)