*Examples – Select a camera on a server

Configuration Article | CA-20220907-TP-83

VDG Sense | API | References

This large example shows which commands to send to the management server to get a specific camera from a server displayed on a specific monitor on some viewer station. A typical network consists of a management server, one or more managed servers and one or more viewer stations (NMS), and of course one or more cameras and possible one or more I/O devices. Camera images are displayed in panels. Panels are part of a layout. Layouts can be displayed on one of the monitors attached to a viewer station. To see a particular camera on a server we first have to select a layout on a monitor of that server.

To select a camera on a panel we use the command selectCamera. This will show a particular camera on the selected panel on all servers that have the layout with layoutid selected. To use this command we need layoutid , serverid and deviceid . These can be obtained with the commands getLayoutList and getDeviceList.

To select a particular layout on a particular server we use the command selectLayout. This command requires a layoutid and a divaid. These can be obtained with the commands getLayoutList and getDeviceList.

Here are all the steps in the correct order.

Get list

First we start with obtaining a List. This gives us a list of all servers in the network with their divaid’s. This id will be used further on to select the layout on the server with the command selectLayout.

Command url:

http://<server>/command?command=getDivaList

Result:

<result errorcode="0">   <divas count="4">     <diva>       <divaid>7015498111931795223</divaid>       <type>NVDR</type>       <options></options>     </diva>     <diva>       <divaid>8712348723918719871</divaid>       <type>NVDR</type>       <options></options>     </diva>     <diva>       <divaid>1237718987111238112</divaid>       <type>NMS</type>       <options></options>     </diva>     <diva>       <divaid>9890179877273119875</divaid>       <type>NMS</type>       <options></options>     </diva>   </divas>  </result>

Get server options

We might want to get extra information from the servers, i.e. to see what description it has. This step is not necessary, but can be used to give the user extra information. You need to issue this command for each server.

Command url:

http://<server>/command?command=getServerOptions&serverid=7015498111931795223

Result:

Get Layout list

Then we get the list with layouts. This gives us the layoutid’s. This id will be used in the commands selectLayout and selectCamera

Command url:

Result:

Get device list

We also need to get the device list. This gives us the serverids and deviceids. These will be used in the command selectCamera.

Command url:

Result:

Select a layout

Now we have all required information. We can select a particular layout on a monitor. This layout can be i.e. a full screen video, or a quad screen. Layouts can be freely configured in the system. We will use the first NMS from the results of getDivaList, the first monitor and we will use the Full screen Live layout.

Command url:

Result:

Select a camera

Finally we can select the camera. We want to see camera with name ‘Dome’ on the full screen live panel we just selected on the first monitor of some server. The selectCamera command requires a Camera view parameter.

Command url:
Result:

Result:

 

Related pages