For smart device, you can call HCNetSDK APIs to set region exiting detection and alarm parameters without passing through the request URLs.
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 the device.
The smart device capability is returned in the message XML_SmartCap by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
If the node <isSupportRegionExiting> is returned in the message and its value is "true", it indicates that region exiting detection is supported, you can continue to perform this step.
Otherwise, the region exiting detection is not supported by device, please end this task.
The region exiting detection capability is returned in the message XML_Cap_RegionExiting by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
The region exiting detection parameters are returned in the structure NET_DVR_REGION_EXITING_DETECTION by output buffer (lpOutBuffer) of structure NET_DVR_STD_CONFIG.
The detection region parameters are returned in the structure NET_DVR_REGIONEXITING_REGION by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
The arming schedule capability of region exiting detection is returned in the message XML_Cap_Schedule by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
The arming schedule parameters of region exiting detection are returned in the structure NET_DVR_EVENT_SCHEDULE by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
The alarm linkage capability is returned in the message XML_EventTriggersCap by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
The alarm linkage parameters are returned in the structure NET_DVR_EVENT_TRIGGER by output buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY.
To receive the alarm in the platform, the linkage action must be set to "center" (upload to center).
The above region exiting detection parameters can also be configured by logging in to device via web browser.
The command (lCommand) to receive line crossing alarms should be set to "COMM_ALARM_RULE" (command No.: 0x1102) and the alarm/event type (wEventTypeEx) to "ENUM_VCA_EVENT_EXIT_AREA" in the APIs NET_DVR_SetDVRMessageCallBack_V50 and NET_DVR_StartListen_V30.
For the alarm details, refer to the structure NET_VCA_RULE_ALARM.
Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release resources.