Control Barrier Gate Status

In the entrance and exit scene, you can remotely control the barrier gate status via device network SDK, such as falling the gate, rising the gate, stopping the gate at a certain position, and locking the gate.

  • Make sure you have called NET_DVR_Init to initialize the integration environment.

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

Figure 1 API Calling Flow of Controlling Barrier Gate Status

  1. Call NET_DVR_GetDeviceAbility, set the capability type (dwAbilityType) to "DEVICE_ABILITY_INFO" (0x011), and set pInbuf to XML_Desc_ITDeviceAbility for getting intelligent traffic capability to check whether the device supports this function.

    The intelligent traffic capability is returned in the message XML_ITDeviceAbility by pOutBuf.

    If supports, the node <ITCAbility> is returned in the message, and then you can perform the following steps.

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

  2. Call NET_DVR_RemoteControl with "NET_DVR_BARRIERGATE_CTRL" (command No.: 3128) and set lpInBuffer to NET_DVR_BARRIERGATE_CFG for remotely controlling the barrier.

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