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_SetDeviceManualAlarm

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    BOOL NET_SDK_SetDeviceManualAlarm(
        LONG lUserID,
        LONG* pAlarmChannel,
        LONG* pValue,
        LONG lAlarmChannelCount,
        BOOL bAlarmOpen);

    1
    2
    3
    4
    5
    6
    public static extern bool NET_SDK_SetDeviceManualAlarm(
        Int32 lUserID,
        int[] pAramChannel,
        int[] pValue,
        int lAramChannelCount,
        bool bAlarmOpen);

### Function Description

Set up a manual alarm.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
pAlarmChannelin | LONG* | Channel list (the number of elements is specified by lAlarmChannelCount).
pValuein | LONG* | The manual alarm status corresponding to the channel (1 means the manual alarm is turned on for the current channel, 0 means it is turned off; if all are 0, the alarm is turned off for all channels).
lAlarmChannelCountin | LONG | The number of manual alarm channels in pAlarmChannel (Note: The number of alarm channels in the device channel is obtained in the `NET_SDK_DEVICEINFO`:: sensorOutputNum field, and this structure is returned through parameters after calling `NET_SDK_Login`).
bAlarmOpenin | BOOL | TRUE means turning on the alarm, FALSE means turning off the alarm.

### Return Value

- Type：BOOL

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

### Remarks

None

Error Code