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_CH_DEVICE_STATUS

### Structure Definition

C++C#

    1
    2
    3
    4
    5
    6
    7
    8
    typedef struct _net_sdk_ch_device_status_
    {
        unsigned short channel;
        unsigned short status;
        unsigned int chlType;
        char name[DD_MAX_CAMERA_NAME_BUF_LEN];
        unsigned char resv[32];
    } NET_SDK_CH_DEVICE_STATUS;

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    [StructLayout(LayoutKind.Sequential, Pack = 4)]
    public struct NET_SDK_CH_DEVICE_STATUS
    {
        public UInt16 channel;
        public UInt16 status;
        public UInt32 chlType;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 132)]
        public byte[] name;
        [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.U1, SizeConst = 32)]
        public byte[] resv;
        public string GetName()
        {
            return DevSdkHelper.RemoveEmptyChar(Encoding.UTF8.GetString(name).Trim());
        }
        public static int GetSize()
        {
            return System.Runtime.InteropServices.Marshal.SizeOf(typeof(NET_SDK_CH_DEVICE_STATUS));
        }
    }

### Function Description

Channel online status.

### Member Description

Member | Type | Remark
--- | --- | ---
channel | unsigned short | Channel, starting from 0.
status | unsigned short | Connection status, 0: offline, video loss; 1: online, signal.
chlType | unsigned int | See `CHANNEL_TYPE`.
name | char[DD_MAX_CAMERA_NAME_BUF_LEN] | The name of the device.
resv | unsigned char[32] | Reserved field.

Error Code