Versions Compared

Key

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

...

 Обработка всех объектов производится перебором страниц, до получения пустого массива.

XML

  <baseObjects>
  <STREAMING_SERVER>
    <extId>1</extId>
    <extId>1</extId><id>STREAMING_SERVER:1</id>
    <name>RTSP Сервер 1</name>
    <state>
    <id>STREAMING_SERVER:1<  <id>normal</id>
      <type>NORMAL</type>
  <name>RTSP Сервер 1<</name>state>
    <type>STREAMING_SERVER</type>
    <state><cams>1;</cams>
    <port>554</port>
  </STREAMING_SERVER>
  <MACRO>
    <extId>001</extId>
    <id>normal<<id>MACRO:001</id>
    <name>001 ВКЛ Осв. 01</name>
    <state>
     <id>normal</id>
     <type>NORMAL</type>
    </state>
    </state><type>MACRO</type>
  </MACRO>
  <CAM>
    <extId>1</extId>
    <id>CAM:1</id>
    <name>Камера 1</name>
    <regionId/>
    <state>
      <fullState>ARMED|DETACHED</fullState>
      <id>disconnected</id>
      <type>ALARM</type>
    </state>
    <type>STREAMING_SERVER<<type>CAM</type>
    <additionalInfo/>
    <cams>1;3;</cams><micId/>
    <presets/>
    <port>559<<speakerId/port>>
    <telemetryId>1.1</telemetryId>
  </STREAMING_SERVER>CAM>
</baseObjects>

JSON

[ {
  "type" : "CAM",
  "id" : "CAM:2",
  "extId" : "2",
  "name" : "Camera 2",
  "regionId" : "2.1",
  "state" : {
    "id" : "alarmed",
    "type" : "ALARM"
  },
  "presets" : [ ]
}, {
  "type" : "CAM",
  "id" : "CAM:1",
  "extId" : "1",
  "name" : "Camera 1",
  "state" : {
    "id" : "armed",
    "type" : "NORMAL"
  },
  "presets" : [ ]
}, {
  "type" : "GRAY",
  "id" : "GRAY:1",
  "extId" : "1",
  "name" : "Sensor 1",
  "state" : {
    "id" : "disconnected",
    "type" : "ALARM"
  }
}, {
  "type" : "GRELE",
  "id" : "GRELE:2",
  "extId" : "2",
  "name" : "Relay 2",
  "state" : {
    "id" : "disabled",
    "type" : "NORMAL"
  }
}, {
  "type" : "GRELE",
  "id" : "GRELE:1",
  "extId" : "1",
  "name" : "Relay 1",
  "regionId" : "2.1",
  "state" : {
    "id" : "disabled",
    "type" : "NORMAL"
  }
}, {
  "type" : "GRAY",
  "id" : "GRAY:2",
  "extId" : "2",
  "name" : "Sensor 2",
  "state" : {
    "id" : "disconnected",
    "type" : "ALARM"
  }
} ]