NET_DVR_SetupAlarmChan_V50

Set up persistent connection to receive alarm/event information (supports alarm/event subscription).

API Definition

LONG NET_DVR_SetupAlarmChan_V50(
  LONG                         lUserID,
  NET_DVR_SETUPALARM_PARAM_V50     lpSetupParam,
  char                         *pData,
  DWORD                        dwDataLen,
);

Parameters

lUserID

[IN] Value returned by NET_DVR_Login_V40.

lpSetupParam

[IN] Arming parameters, refer to the structure NET_DVR_SETUPALARM_PARAM_V50 for details.

pData

[IN] Alarm/event subscription conditions.

dwDataLen

[IN] Length of alarm/event subscription conditions.

Return Values

Return -1 for failure, and return other values as the handles of NET_DVR_CloseAlarmChan_V30.

If -1 is returned, you can call NET_DVR_GetLastError to get the error code.

Remarks

This API supports alarm/event subscription, you can specify the types of alarm or event to be uploaded by device by setting pData and dwDataLen.