Configure Radar Line Crossing Alarm

The radar PTZ camera detects people, vehicles, or objects crossing a predefined virtual line to trigger line crossing alarm, and some certain actions can be taken when the alarm is triggered. The crossing direction can be set to bidirectional, from left to right, or from right to left.

  • 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 API Calling Flow of Configuring Radar Line Crossing Alarm

  1. Call NET_DVR_STDXMLConfig to transmit /ISAPI/System/capabilities or /ISAPI/Smart/capabilities by GET method for getting device or smart capability to check.

    The device capability (XML_DeviceCap) or smart capability (XML_SmartCap) is returned by lpOutputParam.

  2. Check whether the device supports radar line crossing detection.
    • It supports and continue the following steps when the nodes <isSupporLineDetection> and <isSupportRadarLineDetection> is returned in the XML_DeviceCap and their values are "true".

      \
    • It supports and continue the following steps when the node <isSupportLineDetection> is returned in the XML_SmartCap and its value is "true".

    • It does not support and end this task when neither the XML_DeviceCap nor the XML_SmartCap contains node <isSupporLineDetection.

  3. Optional: Call NET_DVR_STDXMLConfig to transmit /ISAPI/Smart/RadarChannels/<ID>/radarLineDetection/capabilities?format=json by GET method for getting configuration capability of radar line crossing detection.

    The configuration capability is returned in the message JSON_RadarLineDetectionCap by lpOutputParam.

  4. Call NET_DVR_STDXMLConfig to transmit /ISAPI/Smart/RadarChannels/<ID>/radarLineDetection?format=json by PUT method and set lpInputParam to JSON_RadarLineDetection for setting radar line crossing detection parameters of a channel.
  5. Call NET_DVR_STDXMLConfig to transmit /ISAPI/Smart/RadarChannels/<ID>/radarLineDetection/lineItems/<lineID>?format=json or /ISAPI/Smart/RadarChannels/<ID>/radarLineDetection/lineItems?format=json by PUT method and set lpInputParam to JSON_LineItemInfo or JSON_LineItemList respectively, for setting parameters of one or all detection line(s).
  6. Optional: Call NET_DVR_STDXMLConfig to transmit /ISAPI/Event/channels/<ID>/capabilities or /ISAPI/Event/channels/capabilities by GET method for getting event capability of one or all channel(s).

    The event capability is returned in the message XML_ChannelEventCap by lpOutputParam.

  7. Call NET_DVR_STDXMLConfig to transmit /ISAPI/Event/schedules/radarLineDetections/<ID> or /ISAPI/Event/schedules/radarLineDetections by PUT method, set <ID> in the single configuration URI to "radarLineDetection-<channelID>" (e.g., /ISAPI/Event/schedules/radarLineDetections/radarLineDetection-101), and set lpInputParam to XML_RadarLineDetectionScheduleList or XML_Schedule respectively, for setting arming schedules of one or all channel(s).
  8. Optional: Call NET_DVR_STDXMLConfig to transmit /ISAPI/Event/triggersCap by GET method for getting linkage capability of radar line crossing alarm.

    The linkage capability is returned in the message XML_EventTriggersCap by lpOutputParam.

  9. Call NET_DVR_STDXMLConfig to transmit /ISAPI/Event/triggers/<eventType>-<channelID> by PUT method, set <ID> in the URI to "radarLineDetection-<channelID>" (e.g., /ISAPI/Event/triggers/radarLineDetection-101), and set lpInputParam to XML_EventTrigger for setting linkage action of a radar line crossing alarm.
    Note:

    To receive alarm in the platform, the linkage action must be set to "center" (upload to center).

  10. Optional: Set lCommand to "COMM_ALARM_RULE" (command No.: 0x1102) and set wEventTypeEx to "ENUM_VCA_EVENT_TRAVERSE_PLANE" for receiving radar line crossing alarm in arming mode (see Receive Alarm/Event in Arming Mode) or listening mode (see Receive Alarm/Event in Listening Mode) when alarm is triggered.

    The radar line crossing alarm details are returned in the structure NET_VCA_RULE_ALARM.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release resources.