Manage Ring

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

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

Figure 1 Programming Flow of Managing Ring

  1. Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/VideoIntercom/capabilities for getting video intercom capability to check if ring management is supported.

    The video intercom capability is returned in the message XML_VideoIntercomCap by lpOutputParam.

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

    Otherwise, ring management is not supported by device, please end this task.

  2. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/VideoIntercom/ring/capabilities for getting ring capability to check the supported ring configuration parameters.

    The ring capability is returned in the message XML_Cap_RingParam by lpOutputParam.

  3. Perform the following operation(s) to manage ring, such as ring search, deleting rings, and uploading ring file.
    Option Description

    Ring Search

    1. Call NET_DVR_StartRemoteConfig with NET_DVR_GET_RING_LIST (command No.: 16039) and set lpInBuffer to NET_DVR_RING_SEARCH_COND for enabling persistent connection to start ring search and registering callback function (fRemoteConfigCallback) to return connection status and search results.

      Note:

      The macro definition value of connection status (i.e., 0 or 2) and related data (i.e., status value (1000, 1001, 1002) or search result structure (NET_DVR_RING_SEARCH_CFG)) are returned by dwType and lpBuffer, respectively, in the callback function.

    2. Call NET_DVR_StopRemoteConfig to disable the persistent connection and stop ring search when the called back status value is "1000".

    Delete Ring by Ring ID

    Call NET_DVR_STDXMLConfig to pass through the request URL: DELETE /ISAPI/VideoIntercom/ring/ringID/<ID>.

    Delete All Rings

    Call NET_DVR_STDXMLConfig to pass through the request URL: DELETE /ISAPI/VideoIntercom/ring.

    Upload Ring File

    1. Call NET_DVR_UploadFile_V40, set dwUploadType to "UPLOAD_RING_FILE" (macro definition value: 20), and set lpOutBuffer to NET_DVR_RING_UPLOAD_CFG for uploading ring file.

    2. Call NET_DVR_GetUploadState to get file uploading progress.

    3. Call NET_DVR_UploadClose to stop uploading ring file when the returned uploading progress is "100".

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