Main Controller Settings

The main controller is mainly used to authenticate access permissions, connect to peripherals, and communicate with the lane controller and the upper-level platform.

Function

Description

Upload Audio File of Main Controller

  1. Call NET_DVR_GetDeviceAbility, set the capability type dwAbilityType to "ACS_ABILITY" (macro definition value: 0x801), and set the input parameter pointer pInBuf to the message XML_Desc_AcsAbility for getting the access control capability to check whether the device supports uploading the audio file of the main controller.

    The capability is returned in the message XML_AcsAbility by the output parameter pointer pOutBuf. The related node is <UploadRightControllerAudio>.

  2. Call NET_DVR_UploadFile_V40, set dwUploadType to "UPLOAD_RIGHT_CONTROLLER_AUDIO" (macro definition value: 42), and set lpInBuffer to the structure NET_DVR_RIGHT_CONTROLLER_AUDIO_PARAM for uploading the audio file of the main controller.

  3. Call NET_DVR_GetUploadState to get file uploading progress.

    Note:

    If the progress is "4" (network disconnected), you should stop uploading first and perform step 2 again when the network is restored.

  4. Call NET_DVR_UploadClose to stop uploading the audio file.

Download Audio File of Main Controller

  1. Call NET_DVR_GetDeviceAbility, set the capability type dwAbilityType to "ACS_ABILITY" (macro definition value: 0x801), and set the input parameter pointer pInBuf to the message XML_Desc_AcsAbility for getting the access control capability to check whether the device supports downloading the audio file of the main controller.

    The capability is returned in the message XML_AcsAbility by the output parameter pointer pOutBuf. The related node is <DownloadRightControllerAudio>.

  2. Call NET_DVR_StartDownload, set dwDownloadType to "NET_SDK_DOWNLOAD_RIGHT_CONTROLLER_AUDIO" (macro definition value: 24), and set lpInBuffer to the structure NET_DVR_RIGHT_CONTROLLER_AUDIO_PARAM for downloading the audio file of the main controller.

  3. Call NET_DVR_GetDownloadState to get file downloading progress.

    Note:

    If the progress is "4" (network disconnected), you should stop downloading first and perform step 2 again when the network is restored.

  4. Call NET_DVR_StopDownload to stop downloading the audio file.

Get Configuration Capability of Audio File of Main Controller

Call NET_DVR_STDXMLConfig to transmit the request URL: GET /ISAPI/AccessControl/RightControllerAudio/capabilities.

The configuration capability is returned in the message XML_Cap_RightControllerAudio by lpOutBuffer.

Get Audio File Parameters of Main Controller

Call NET_DVR_STDXMLConfig to transmit the request URL: GET /ISAPI/AccessControl/RightControllerAudio/<ID>.

The parameters are returned in the message XML_RightControllerAudio by lpOutBuffer.

Set Audio File Parameters of Main Controller

Call NET_DVR_STDXMLConfig to transmit the request URL: PUT /ISAPI/AccessControl/RightControllerAudio/<ID> and set lpInBuffer to the message XML_RightControllerAudio.

Delete Audio File of Main Controller

Call NET_DVR_STDXMLConfig to transmit the request URL: DELETE /ISAPI/AccessControl/RightControllerAudio/<ID>.

Note:

To check whether the device supports configuring audio file parameters of the main controller, you can call NET_DVR_STDXMLConfig to transmit the request URL: GET /ISAPI/AccessControl/capabilities for getting the access control capability.

The capability is returned in the message XML_Cap_AccessControl by lpOutBuffer. If this function is supported by the device, the node <isSupportRightControllerAudio> will be returned in the message and its value is "true".