Configure Reverse Entering Alarm

When a detection target enters the rule region in opposite detection direction, the reverse entering alarm is triggered. You can also set alarm linkage action and arming schedule to receive the alarm information from platform or system and control period that is able to trigger alarm as needed.

  • 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 device.

Figure 1 Programming Flow of Configuring Reverse Entering Alarm

  1. Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/System/Video/inputs/channels/<ID>/counting/capabilities for getting people counting capability to check if reverse entering alarm is supported.

    The people counting capability is returned in the message XML_CountingCap by lpOutputParam.

    If supports, the node <isSupportReverseAlarm> is returned and its value is "true", and then you can perform the following steps; otherwise, it indicates that reverse entering alarm is not supported,please end this task.

  2. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/System/Video/inputs/channels/<ID>/counting/reverseAlarm?format=json for getting default or configured reverse entering alarm parameters for reference.

    The parameters are returned in the message JSON_reverseAlarm by lpOutputParam.

  3. Call NET_DVR_STDXMLConfig to pass through the request URL: PUT /ISAPI/System/Video/inputs/channels/<ID>/counting/reverseAlarm?format=json and set lpInputParam to JSON_reverseAlarm for setting parameters of reverse entering alarm.
  4. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/Event/triggers/<eventType>-<channelID> (the <ID> in the URL should be set to "reverseEntrance-<channelID>") for getting default or configured linkage parameters of reverse entering alarm for reference.

    The alarm linkage parameters are returned in the message XML_EventTrigger by lpOutputParam. And the default linkage action is "center" (alarm receiving center).

  5. Call NET_DVR_STDXMLConfig to pass through the request URL: PUT /ISAPI/Event/triggers/<eventType>-<channelID> (the <ID> in the URL should be set to "reverseEntrance-<channelID>") and set lpInputParam to XML_EventTrigger for setting linkage action of reverse entering alarm.
    Note:

    To receive alarm in alarm receiving center, the linkage action must be set to "center".

  6. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/Event/schedules/reverseEntrance/<ID> (the <ID> in the URL should be set to "reverseEntrance-<channelID>") for getting default or configured arming schedule of reverse entering alarm for reference.

    The arming schedule is returned in the message XML_Schedule by lpOutputParam. And the default arming schedule is "all-day".

  7. Call NET_DVR_STDXMLConfig to pass through the request URL: PUT /ISAPI/Event/schedules/reverseEntrance/<ID> (the <ID> in the URL should be set to "reverseEntrance-<channelID>") and set lpInputParam to XML_Schedule for setting arming schedule of reverse entering alarm.
  8. Optional: Set lCommand of alarm/event callback function MSGCallBack to "COMM_VCA_ALARM" (command No.: 0x4993) for receiving reverse entering alarm in arming mode (refer to Receive Alarm/Event in Arming Mode for details) or listening mode (refer to Receive Alarm/Event in Listening Mode for details).

    The reverse entering alarm information is called back in the message JSON_EventNotificationAlert_reverseEntrance.

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