Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuration Article | CA-20220907-TP-83

VDG Sense | API | References

Image Added

View file
nameCA-20220907-TP-83.pdf

Table of Contents

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.

...

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:

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

Result:

Code Block
<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:

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

Result:

Code Block
<result errorcode="0">
  <serveroptions>
    <description>VDG Sense</description>
    <title>NVSP 1016</title>
    <version>1.14.5</version>
    <registrationnumber>vdg-sense</registrationnumber>
    <cameracount>16</cameracount>
    <servercount>1</servercount>
    <transcodingbandwidth>deprecated</transcodingbandwidth>
    <transcodingquality>99</transcodingquality>
    <webtranscodedimagesrequested>False</webtranscodedimagesrequested>
    <webdefaultimagewidth>640</webdefaultimagewidth>
    <webdefaultimageheight>480</webdefaultimageheight>
    <oldeststoredimagetime>deprecated</oldeststoredimagetime>
    <neweststoredimagetime>deprecated</neweststoredimagetime>
  </serveroptions>
 </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:

Code Block
http://<server>/command?command=getLayoutList

Result:

Code Block
<result errorcode="0">
  <layouts count="3">
    <layout>
      <layoutid>1</layoutid>
      <name>Full screen Live</name>
      <panels>1</panels>
    </layout>
    <layout>
      <layoutid>3</layoutid>
      <name>Quad screen Live</name>
      <panels>4</panels>
    </layout>
    <layout>
      <layoutid>4</layoutid>
      <name>Playback</name>
      <panels>3</panels>
    </layout>
  </layouts>
 </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:

Code Block
http://<server>/command?command=getDeviceList

Result:

Code Block
<result errorcode="0">
  <devices count="4">
    <device>
      <name>Lab</name>
      <serverid>7015498111931795223</serverid>
      <deviceid>1</deviceid>
      <status>ConnectionLost</status>
      <type>camera</type>
    </device>
    <device>
      <name>Dome</name>
      <serverid>7015498111931795223</serverid>
      <deviceid>2</deviceid>
      <status>CameraNormal</status>
      <type>camera</type>
    </device>
    <device>
      <name>192.168.203.80</name>
      <serverid>8712348723918719871</serverid>
      <deviceid>1</deviceid>
      <status>CameraNormal</status>
      <type>camera</type>
    </device>
    <device>
      <name>YourCamera</name>
      <serverid>8712348723918719871</serverid>
      <deviceid>3</deviceid>
      <status>CameraNormal</status>
      <type>camera</type>
    </device>
  </devices>
 </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:

Code Block
http://<server>/command?command=selectLayout&divaid=1237718987111238112&monitorindex=0&layoutid=1

Result:

Code Block
<result errorcode="0">
  <description>Ok</description>
 </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:

Code Block
http://<server>/command?command=selectCamera&cameraview=serverid:7015498111931795223;deviceid:1&layoutid=1&panelindex=0

Result:

Code Block
<result errorcode="0">
  <description>Ok</description>
 </result>