Configure Queue Management Alarm

Queue management alarm includes people queuing-up alarm, waiting time detection alarm, and real-time queue management alarm. You can set the alarm parameters to trigger the people queuing-up alarm when the queuing-up people amount in a region is larger than the configured threshold, trigger the waiting time detection alarm when the waiting time of a queue stays a certain length is longer than the configured threshold, and trigger real-time queue management alarm when queuing-up people amount changed or waiting time duration is longer than threshold.

  • 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 Queue Management Alarm
Note:

The queue management parameters, alarm linkage actions, and arming schedules can be directly configured by logging in to device via web browser.

  1. Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/Intelligent/channels/<ID>/capabilities for getting intelligent channel capability to check if the device supports queue management.

    The intelligent channel capability is returned in the message XML_IntelliCap by output pointer (lpOutputParam).

    If the node <isSupportPersonQueueDetection> is returned in the capability message, it indicates that queue management function is supported and you can perform the following steps.

    Otherwise, this function is not supported, please end this task.

  2. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/Intelligent/channels/<ID>/personQueueDetection/capabilities?format=json for getting the queue management capability to check the supported configuration parameters.

    The queue management capability is returned in the message JSON_PersonQueueDetectionInfoCap by output pointer (lpOutputParam).

  3. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/Intelligent/channels/<ID>/personQueueDetection?format=json for getting default or configured queue management parameters for reference.

    The queue management parameters are returned in the message JSON_PersonQueueDetectionInfo by the output pointer (lpOutputParam).

  4. Call NET_DVR_STDXMLConfig to pass through the request URL: PUT /ISAPI/Intelligent/channels/<ID>/personQueueDetection?format=json and set the input pointer (lpInputParam) to the message JSON_PersonQueueDetectionInfo for setting queue management parameters.
  5. Configure linkage action for queue management alarm.
    1. Call NET_DVR_GetSTDAbility with NET_DVR_GET_EVENT_TRIGGERS_CAPABILITIES (command No.: 3501) to get alarm linkage capability of device.

      The alarm linkage capability is returned in the message XML_EventTriggersCap by the output buffer (lpOutBuffer) in structure NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_PERSONQUEUE_TRIGGER (command No.: 4406) to get the default or configured linkage actions of queue management alarm for reference.

      The linkage actions are returned in the structure NET_DVR_EVENT_TRIGGER by the output buffer (lpOutBuffer) in structure NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_PERSONQUEUE_TRIGGER (command No.: 4407), and then set condition buffer (lpCondBuffer) and input buffer (lpInBuffer) in structure NET_DVR_STD_CONFIG to 4-byte channel No. and NET_DVR_EVENT_TRIGGER, respectively, for setting the linkage actions of queue management alarm.
      Note:

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

  6. Configure arming schedule of queue management alarm.
    1. Call NET_DVR_GetSTDAbility with NET_DVR_GET_PERSONQUEUE_SCHEDULE_CAPABILITIES (command No.: 4408) to get the arming schedule capability of queue management device.

      The arming schedule capability is returned in the message XML_Cap_Schedule by the output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.

    2. Optional: Call NET_DVR_GetSTDConfig with NET_DVR_GET_PERSONQUEUE_SCHEDULE (command No.: 4409) and set condition buffer (lpCondBuffer) in structure NET_DVR_STD_CONFIG to 4-byte channel No. for getting the default or configured arming schedule of queue management for reference.

      The arming schedule parameters are returned in the structure NET_DVR_EVENT_SCHEDULE by the output buffer (lpOutBuffer) in structure NET_DVR_STD_CONFIG.

    3. Call NET_DVR_SetSTDConfig with NET_DVR_SET_PERSONQUEUE_SCHEDULE (command No.: 4410), and then set condition buffer (lpCondBuffer) and input buffer (lpInBuffer) in structure NET_DVR_STD_CONFIG to 4-byte channel No. and NET_DVR_EVENT_SCHEDULE, respectively, for setting arming schedule of queue management.
  7. Optional: Set the uploading message type (lCommand) in alarm callback function to "COMM_VCA_ALARM" (macro definition value: 0x4993) for receiving queue management alarms, i.e., people queuing-up alarm, waiting time detection alarm, and real-time queue management alarm, in arming mode (refer to Receive Alarm/Event in Arming Mode) or listening mode (refer to Receive Alarm/Event in Listening Mode).

    The people queuing-up alarm is uploaded in the message JSON_EventNotificationAlert_PeopleQueuingUpAlarmMsg; the waiting time detection alarm is uploaded in the message JSON_EventNotificationAlert_WaitingTimeDetectionAlarmMsg; and the real-time queue management alarm is uploaded in the message JSON_EventNotificationAlert_RealTimeQueueManagementDataMsg.

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