Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_GetSmartEventConfig

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    7
    BOOL NET_SDK_GetSmartEventConfig(
        LONG lUserID,
        DWORD dwCommand,
        LONG lChannel,
        LPVOID lpOutBuffer,
        DWORD dwOutBufferSize,
        LPDWORD lpBytesReturned);

    1
    2
    3
    4
    5
    6
    7
    public static extern Boolean NET_SDK_GetSmartEventConfig(
        Int32 lUserID,
        UInt32 dwCommand,
        Int32 lChannel,
        IntPtr lpOutBuffer,
        UInt32 dwOutBufferSize,
        ref int lpBytesReturned);

### Function Description

Edit intelligent event parameter configuration (currently only supports NVR).

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
dwCommandin | DWORD | Smart event type.
lChannelin | LONG | Channel number, starting from 0. This parameter is invalid for IPC devices.
lpOutBufferout | LPVOID | Output data.
dwOutBufferSizeout | DWORD | Output data cache.
lpBytesReturnedout | LPDWORD | Output size.

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

Depending on the dwCommand, the corresponding lpOutBuffer data structure is as follows:

dwCommand macro definition | dwCommand corresponding value | dwCommand meaning | Data structure (lpOutBuffer) definition
--- | --- | --- | ---
NET_SDK_SMART_EVENT_TYPE_PASSLINE | 0x17 | Count targets by crossing the line | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_TRAFFIC | 0x18 | Count targets by area | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_PEA_TARGET | 0x19 | Perimeter defense, regional intrusion detection | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_VSD | 0x1a | Video secondary structuring | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_NVR_AOIENTRY | 0x1e | Entering the area for NVR | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_NVR_AOILEAVE | 0x1f | Leaving the area for NVR | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_PVD | 0x20 | Illegal parking detection | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_LOITER | 0x21 | Loitering detection | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`
NET_SDK_SMART_EVENT_TYPE_TRIPWIRE | 0x26 | Perimeter prevention, cross-border detection | `NET_SDK_IVE_COMMON_CFG` + ruleCfgCount * `NET_SDK_IVE_DETECT_RULE_CFG`

Error Code