Configure Dredger Detection Alarm

Dredger detection can detect the ship staying time to distinguish if the ship is dredger, when the ship staying time exceeds the configured threshold, the dredger detection alarm will be triggered. It is widely applied to river monitoring under severe weather conditions, such as heavy rain, heavy fog, and so on.

  • Make sure you have called NET_DVR_Init to initialize the development environment.

  • Make sure you have called NET_DVR_Login_V40 to log in to the device.

Figure 1 Programming Flow of Configuring Dredger Detection Alarm

  1. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/capabilities for getting the thermal capability to check if the device supports ship detection by scene.

    The thermal capability is returned in the message XML_ThermalCap by lpOutBuffer.

    If supports, the node <isSupportShipsDetectionWithScene> is returned in the message and its value is "true", and then you can perform the following steps.

    Otherwise, ship detection by scene is not supported by device, please end this task.

  2. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/capabilities?format=json for getting the ship detection capability to check the supported parameters.

    The ship detection capabilities are returned in the message JSON_shipsDetectionCap by lpOutBuffer .

  3. Set basic parameters of ship detection.
    1. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/basicParam/capabilities?format=json for getting basic configuration capability of ship detection to check the supported parameters.

      The basic configuration capability of ship detection is returned in the message JSON_basicParamCap by lpOutBuffer.

    2. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/basicParam?format=json for getting default or configured basic parameters of ship detection for reference.

      The basic parameters of ship detection are returned in the message JSON_basicParam by lpOutBuffer.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/basicParam?format=json for setting basic parameters of ship detection.
  4. Set scene parameters for ship detection.
    1. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/capabilities?format=json for getting scene configuration capability.

      The scene configuration capability is returned in the JSON_ShipsDetectionSceneCap by lpOutBuffer.

    2. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/basicParam?format=json or /ISAPI/Thermal/channels/<ID>/shipsDetection?format=json for getting default or configured scene parameters of a or all scene(s) for reference

      The parameters of a or all scene(s) are returned in the message JSON_ShipsDetectionScene or JSON_ShipsDetectionSceneList by lpOutBuffer.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>?format=json or /ISAPI/Thermal/channels/<ID>/shipsDetection?format=json for creating a or all scenes(s).
    4. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>?format=json or /ISAPI/Thermal/channels/<ID>/shipsDetection?format=json and set lpInBuffer to JSON_ShipsDetectionScene or JSON_ShipsDetectionSceneList for setting parameters of a or all scenes.
    5. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: DELETE /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>?format=json or /ISAPI/Thermal/channels/<ID>/shipsDetection?format=json for deleting a or all scenes(s).
  5. Optional: Perform the following operation(s) to switch scene, start auto-switch, set capture ratio for scene, and set advanced parameters for ship detection.
    Option Description

    Switch Scene

    Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/goto?format=json

    Scene Auto-Switch

    1. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/sceneTrace/capabilities?format=json for getting scene auto-switch capability.

    2. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/sceneTrace?format=json for getting default or configured scene auto-switch parameters for reference.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/sceneTrace?format=json and set lpInBuffer to JSON_ShipsDetectionSceneTraceList for starting scene auto-switch.

    Capture Ratio

    1. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/captureRatio/capabilities?format=json for getting configuration capability of capture ratio.

    2. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/captureRatio?format=json for getting default or configured capture ratio for reference.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/captureRatio?format=json and set lpInBuffer to JSON_ShipsDetectionCaptureRatio for setting capture ratio.

    Advanced parameters

    1. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/advanceParam/capabilities?format=json for getting advanced configuration capability of ship detection to check the supported parameters.

    2. Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/advanceParam?format=json for getting default or configured advanced parameters of ship detection for reference.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/advanceParam?format=json and set lpInBuffer to JSON_advanceParam for setting advanced parameters of ship detection.

  6. Set the function mode to "dredgerDetection" to detect the dredger.
    1. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/shipsFunctionMode/capabilities?format=json for getting function mode capability to check the supported modes.

      The function mode capability is returned in the message JSON_Cap_functionMode by lpOutBuffer.

    2. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/shipsFunctionMode?format=json for getting default or configured function mode for reference.

      The function mode is returned in the message JSON_functionMode by lpOutBuffer.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/shipsFunctionMode?format=json and set lpInBuffer to JSON_functionMode for setting the function mode to "dredgerDetection".
  7. Set dredger detection rules.
    1. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/dredgerDetection/regions/capabilities?format=json for getting configuration capability of dredger detection rules to check the supported rule parameters.

      The rule configuration capability of dredger detection is returned in the message JSON_DredgerDetectionRuleListCap by lpOutBuffer.

    2. Optional: Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/dredgerDetection/regions/<ID>?format=json or /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/dredgerDetection/regions?format=json for getting default or configured rules of a or all dredger detection(s) for reference.

      The rules of a or all dredger detection(s) are returned in the message JSON_DredgerDetectionRule or JSON_DredgerDetectionRuleList by lpOutBuffer.

    3. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/dredgerDetection/regions/<ID>?format=json or /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/dredgerDetection/regions?format=json and set lpInBuffer to JSON_DredgerDetectionRule or JSON_DredgerDetectionRuleList for setting rules of a or all dredger detection(s).
  8. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Event/schedules/dredgerDetection/<ID>/scene/<SID> for setting the arming schedule of dredger detection alarm.
    Note:

    Before setting arming schedule, you can transmit this URI by GET method to get default or configured arming schedule for reference.

  9. Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Event/triggers/dredgerDetection/<ID>/scene/<SID> for setting linkage action of dredger detection alarm.
    Note:
    • Before setting linkage action, you can transmit this URI by GET method to get default or configured linkage actions for reference.

    • To receive the alarm via platform, the linkage action must be set to "center".

  10. Perform the following operation(s) after configuring the dredger detection alarm.
    Option Description

    Get Ship Statistics by Scene

    Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/shipsDetectionCount?format=json

    Clear Ship Statistics by Scene

    Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/resetCount?format=json

    Receive Alarm in Arming or Listening Mode

    Perform the flow of Receive Alarm/Event in Arming Mode or Receive Alarm/Event in Listening Mode and set lCommand in the registered alarm callback function (MSGCallBack) to "COMM_VCA_ALARM" (command No.: 0x4993).

    Note:

    The dredger detection alarm information is returned in the message JSON_EventNotificationAlert_dredgerDetection.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resources.