using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace TSDome
{
    public class NetSDK
    {
         public NetSDK()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
        }
        public const int   NET_SDK_TRUE   =1;

        public const int NET_SDK_FALSE = 0;
          /*******************全局错误码 begin**********************/
        /*******************Global error code begin**********************/
        public const int NET_SDK_NOERROR = 0;							//< 没有错误 No error
        public const int NET_SDK_SUCCESS = 1;							//< 返回成功 Return success
        public const int NET_SDK_NOTVALID = -10000;						//< 非法请求 Illegal request 
        public const int NET_SDK_NO_INIT = -10001;						//< SDK未经初始化 SDK is not initialized
        public const int NET_SDK_ILLEGAL_PARAM = -10002;						//< 用户参数不合法 User parameters are invalid
        public const int NET_SDK_INVALID_HANDLE = -10003;						//< 句柄无效 Invalid handle
        public const int NET_SDK_UNINIT_ERROR = -10004;						//< SDK清理出错 SDK cleanup error
        public const int NET_SDK_TIMEOUT = -10005;						//< 等待超时 Waiting timeout
        public const int NET_SDK_MEMORY_ERROR = -10006;						//< 内存错误，创建内存失败 Memory error, memory creation failed
        public const int NET_SDK_NET_ERROR = -10007;						//< 网络错误 Network Error
        public const int NET_SDK_OPEN_FILE_ERROR = -10008;						//< 打开文件失败 fail to open the file
        public const int NET_SDK_UNKNOWNERROR = -10009;						//< 未知错误 unknown mistake
        public const int NET_SDK_DEV_VER_NOMATCH = -11000;						//< 收到数据不正确，可能版本不匹配 The received data is incorrect and the version may not match.
        public const int NET_SDK_NOTSUPPORT = -11001;						//< 版本不支持 Version not supported

        public const int NET_SDK_OPEN_CHANNEL_ERROR = -11200;						//< 打开通道失败 Open channel failed
        public const int NET_SDK_CLOSE_CHANNEL_ERROR = -11201;						//< 关闭通道失败 Closing the channel failed
        public const int NET_SDK_SUB_CONNECT_ERROR = -11202;						//< 建立媒体子连接失败 Establishing a media subconnection failed
        public const int NET_SDK_SUB_CONNECT_SEND_ERROR = -11203;						//< 媒体子连接通讯失败 Media sub-connection communication failed
        public const int NET_SDK_CHN_NOTCONNECT = -11204;						//  数字通道没有视频 Digital channel has no video
	    //< 用户管理部分错误码
        //<user management part error code
        public const int NET_SDK_NOPOWER = -11300;						//< 无权限 No permission
        public const int NET_SDK_PASSWORD_NOT_VALID = -11301;						//< 账号密码不对 The account password is incorrect.
        public const int NET_SDK_LOGIN_USER_NOEXIST = -11302;						//< 用户不存在 User does not exist
        public const int NET_SDK_USER_LOCKED = -11303;						//< 该用户被锁定 The user is locked
        public const int NET_SDK_USER_IN_BLACKLIST = -11304;						//< 该用户不允许访问(在黑名单中) This user is not allowed to access (in the blacklist)
        public const int NET_SDK_USER_HAS_USED = -11305;						//< 该用户以登陆 The user is logged in
        public const int NET_SDK_USER_NOT_LOGIN = -11306;						//< 该用户没有登陆 The user is not logged in
        public const int NET_SDK_CONNECT_DEVICE_ERROR = -11307;						//< 可能设备不存在 Maybe the device does not exist
        public const int NET_SDK_ACCOUNT_INPUT_NOT_VALID = -11308;						//< 用户管理输入不合法 User management input is illegal
        public const int NET_SDK_ACCOUNT_OVERLAP = -11309;						//< 索引重复 Index repeat
        public const int NET_SDK_ACCOUNT_OBJECT_NONE = -11310;						//< 不存在对象, 用于查询时 No object exists, used when querying
        public const int NET_SDK_ACCOUNT_OBJECT_NOT_VALID = -11311;						//< 不存在对象 No object exists
        public const int NET_SDK_ACCOUNT_OBJECT_IN_USE = -11312;						//< 对象正在使用 The object is in use
        public const int NET_SDK_ACCOUNT_SUBSET_OVERLAP = -11313;						//< 子集超范围 (如组的权限超过权限表，用户权限超出组的权限范围等等) The subset is out of range (such as the group's permissions exceed the permission table, the user permissions exceed the group's permission range, etc.)
        public const int NET_SDK_ACCOUNT_PWD_NOT_VALID = -11314;						//< 密码不正确 Incorrect password
        public const int NET_SDK_ACCOUNT_PWD_NOT_MATCH = -11315;						//< 密码不匹配 Passwords do not match
        public const int NET_SDK_ACCOUNT_RESERVED = -11316;   				//< 保留帐号 Reserved account


        // 配置管理相关错误码 Configuration management related error code

        public const int NET_SDK_OPT_RESTART = -11400;						//< 保存配置后需要重启应用程序 Need to restart the application after saving the configuration
        public const int NET_SDK_OPT_REBOOT = -11401;						//< 需要重启系统 Need to restart the system
        public const int NET_SDK_OPT_FILE_ERROR = -11402;						//< 写文件出错 Error writing a file
        public const int NET_SDK_OPT_CAPS_ERROR = -11403;						//< 配置特性不支持 Configuration feature is not supported
        public const int NET_SDK_OPT_VALIDATE_ERROR = -11404;						//< 配置校验失败 Configuration verification failed
        public const int NET_SDK_OPT_CONFIG_NOT_EXIST = -11405;						//< 请求或者设置的配置不存在 Request or set configuration does not exist

	// 

        public const int NET_SDK_CTRL_PAUSE_ERROR = -11500;						//< 暂停失败 Pause failed
        public const int NET_SDK_NOTFOUND = -11501;						//< 查找失败，没有找到对应文件 Failed to find, no corresponding file found
        public const int NET_SDK_CFG_NOT_ENABLE = -11502;           			//< 配置未启用 Configuration not enabled
        public const int NET_SDK_SNAPBUFFER_NOT_ENOUGH = -11503;						//< 抓图分配的的缓存空间不够 There is not enough cache space allocated for capture
        /*******************全局错误码 end**********************/
        /*******************Global error code end**********************/
        //< 云台操作类型 PTZ operation type
        public enum NET_PTZ_ControlType
        {
            NET_TILT_UP = 0,												
            NET_TILT_DOWN,													
            NET_PAN_LEFT,													
            NET_PAN_RIGHT,													
            NET_PAN_LEFTTOP,												
            NET_PAN_LEFTDOWN,												
            NET_PAN_RIGTHTOP,												
            NET_PAN_RIGTHDOWN,
            NET_ZOOM_OUT,													//< 变倍小 Small zoom
            NET_ZOOM_IN,													//< 变倍大 Big zoom
            NET_FOCUS_FAR,													//< 焦点后调 Focus adjustment
            NET_FOCUS_NEAR,													//< 焦点前调 Focus on the top
            NET_IRIS_OPEN,													//< 光圈扩大 Aperture expansion
            NET_IRIS_CLOSE,													//< 光圈缩小 Aperture reduction

            NET_EXTPTZ_OPERATION_ALARM,										//< 报警功能 Alarm function
            NET_EXTPTZ_LAMP_ON,												//< 灯光开 Light on
            NET_EXTPTZ_LAMP_OFF,											//< 灯光关 Light off
            NET_EXTPTZ_POINT_SET_CONTROL,									//< 设置预置点 Set preset point
            NET_EXTPTZ_POINT_DEL_CONTROL,									//< 清除预置点  Clear presets
            NET_EXTPTZ_POINT_MOVE_CONTROL,									//< 转预置点 Transfer preset point
            NET_EXTPTZ_STARTPANCRUISE,										//< 开始水平旋转 Start horizontal rotation		
            NET_EXTPTZ_STOPPANCRUISE,										//< 停止水平旋转 Stop horizontal rotation	
            NET_EXTPTZ_SETLEFTBORDER,										//< 设置左边界 Set the left border		
            NET_EXTPTZ_SETRIGHTBORDER,										//< 设置右边界 Set the right border
            NET_EXTPTZ_STARTLINESCAN,										//< 自动扫描开始 Automatic scanning starts
            NET_EXTPTZ_CLOSELINESCAN,										//< 自动扫描开停止 Automatic scanning on stop
            NET_EXTPTZ_ADDTOLOOP,											//< 加入预置点到巡航	p1巡航线路	p2预置点值 Add preset point to cruise p1 cruise route p2 preset point value
            NET_EXTPTZ_DELFROMLOOP,											//< 删除巡航中预置点	p1巡航线路	p2预置点值 Delete cruise preset point p1 cruise route p2 preset point value
            NET_EXTPTZ_POINT_LOOP_CONTROL,									//< 开始巡航 Start cruising
            NET_EXTPTZ_POINT_STOP_LOOP_CONTROL,								//< 停止巡航 Stop cruising
            NET_EXTPTZ_CLOSELOOP,											//< 清除巡航	p1巡航线路	Clear cruise p1 cruise route	
            NET_EXTPTZ_FASTGOTO,											//< 快速定位 Rapid positioning	
            NET_EXTPTZ_AUXIOPEN,											//< 辅助开关，关闭在子命令中 Auxiliary switch, closed in subcommand
            NET_EXTPTZ_OPERATION_MENU,										//< 球机菜单操作，其中包括开，关，确定等等 Ball machine menu operations, including on, off, OK, etc.
            NET_EXTPTZ_REVERSECOMM,											//< 镜头翻转 Lens flip
            NET_EXTPTZ_OPERATION_RESET,										//< 云台复位 PTZ reset
            NET_EXTPTZ_TOTAL,
        };
        public const int PAN_AUTO = 29;							//< 云台以SS的速度左右自动扫描 PTZ automatically scans around the speed of SS
        public const int SDK_NET_EXTPTZ_FASTGOTO = 30;							//< 三维定位 Three-dimensional positioning
        public const int SDK_NET_MAX_CHANNUM = 32;							//< 最大通道个数 Maximum number of channels
        public const int SDK_NET_DECORDR_CH = 16;          				//< 最大解码通道个数 Maximum number of decoding channels
        public const int SDK_NET_MAX_USER_NUM = 60;							//< 最多用户数 Maximum number of users
        public const int SDK_NET_MAX_RIGTH_NUM = 128;							//< 最多权限数 Maximum number of permissions
        public const int SDK_NET_MAX_GROUP_NUM = 50;							//< 最多组数 Maximum number of groups
        public const int SDK_NET_MAX_USER_LENGTH = 32;							//< 用户名密码最大长度 User name and password maximum length
        public const int SDK_NET_MAX_COMBINE_NUM = 2;							//< 最大组合编码通道数 Maximum combined coding channel number
        public const int SDK_NET_MAX_DECORDR_CH = 16;          				//< 最大解码通道个数 Maximum number of decoding channels

        public const int SDK_NET_MAX_DDNS_TYPE = 5;							//< 支持的DDNS种类 Supported DDNS types
        public const int SDK_NET_MAX_ARSP_TYPE = 5;							//< 支持的ARSP种类 Supported ARSP types
        public const int SDK_NET_MAX_ALARMSERVER_TYPE = 5;           				//< 支持报警中心种类 Support for alarm center types
        public const int SDK_NET_MAX_SYSFUNC = 20;						//< 最多系统功能个数 Maximum number of system functions
        public const int SDK_NET_MAX_PTZ_PROTOCOL_LENGTH = 32;						//< 云台协议名称最大长度 Maximum length of the PTZ protocol name
        public const int SDK_NET_N_WEEKS = 7;							//< 一个星期的天数 Number of days in a week
        public const int SDK_NET_N_TSECT = 6;							//< 时间段数 Time period
        public const int SDK_NET_MD_REGION_ROW = 32;							//< 动态检测区域行数 Dynamic detection area line number

        public const int SDK_NET_COVERNUM = 8;							//< 覆盖区域数 Number of coverage areas
        public const int SDK_NET_MAX_FILTERIP_NUM = 64;							//< IP地址最大过滤数 IP address maximum filter number
        public const int SDK_NET_NAME_PASSWORD_LEN = 64;							//< 用户名密码最大长度 User name and password maximum length
        public const int SDK_NET_MAX_PATH_LENGTH = 260;							//< 路径最大长度 Path length
        public const int SDK_NET_N_MIN_TSECT=2;							//< 
        public const int SDK_NET_MAX_RETURNED_LOGLIST = 128;							//< 一页日志的最多日志条数 Maximum number of logs for one page of logs
        public const int SDK_NET_MAX_MAC_LEN = 32;       				//< MAC地址字符最大长度 MAC address character maximum length
        public const int SDK_NET_IW_ENCODING_TOKEN_MAX=128;
        public const int SDK_NET_MAX_AP_NUMBER=10;
        public const int SDK_NET_MAX_INFO_LEN=128;
        public const int SDK_NET_MAX_USERNAME_LENGTH = 64;							//< 用户名最大长度 Maximum length of username
        public const int SDK_NET_MAX_SERIALNO_LENGTH = 128;         				//< 最大解码通道个数 Maximum number of decoding channels
        public const int SDK_NET_MAX_MULTINET_NUM = 8;						//< 数字通道多连接的最大数目 Maximum number of multi-connections for digital channels
        public const int SDK_NET_URL_ADDRESS_LENGTH=256;

///< DDNS参数
        public const int SDK_NET_MAX_DDNS_IDSIZE = 64;						//< 设备标识最大长度 Device identification maximum length
        public const int SDK_NET_MAX_DDNS_NAMELEN = 64;						//< 主机名长度 Host name length
        public const int SDK_NET_MAX_DDNS_PWDLEN = 32;						//< 密码长度 Password length
        public const int SDK_NET_MAX_DDNS_IPSIZE = 64;							//< IP地址长度 IP address length
        public const int SDK_NET_MAX_SERIALINFO_SIZE = 16;							//< 序列号以及用户名长度 Serial number and username length

        //智能分析 Insight
        public const int SDK_NET_MAX_ANALYIZE_CHANNEL = 8;							//< 最多的智能分析通道数 The maximum number of intelligent analysis channels

        public const int SDK_NET_ZHDL_AUDIO_NUM = 16;		//音频文件最大个数 Maximum number of audio files
        public const int SDK_NET_ZHDL_AUDIO_NAME_LEN = 64;	//音频文件名称最大长度 Maximum length of audio file name

        public const int SDK_NET_PATH_NAME_LEN=128;
        public const int SDK_NET_MAX_SIP_ID_LEN=64;
       // public const int SDK_NET_NAME_PASSWORD_LEN = 64;

        ///< DDNS服务器设备的信息
        [StructLayoutAttribute(LayoutKind.Sequential)]
        public struct NET_DDNS_INFO
        {
            [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_DDNS_IDSIZE, ArraySubType = UnmanagedType.I1)]
            public char[] ID;								//< 设备标识 Equipment Identity
            [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_DDNS_IDSIZE, ArraySubType = UnmanagedType.I1)]
            public char[] IP;								//< 内网IP Intranet IP
            public int WebPort;													//< Web端口,默认为80 Web port, the default is 80
            public int MediaPort;													//< 媒体TCP端口,默认为34567 Media TCP port, the default is 34567
            public int MobilePort;												//< 手机监控端口，默认为34599 Mobile phone monitoring port, the default is 34599
            public int UPNPWebPort;												//< UPNP启动下Web端口,UPNP不开启为0 UPNP starts the web port, UPNP does not open to 0.
            public int UPNPMediaPort;												//< UPNP启动下媒体端口,UPNP不开启为0 UPNP starts the media port, UPNP does not open to 0.
            public int UPNPMobilePort;											//< UPNP启动下手机监控端口,UPNP不开启为0 UPNP starts the mobile phone monitoring port, UPNP does not open to 0
            [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_DDNS_NAMELEN, ArraySubType = UnmanagedType.I1)]
            public char[] Username;						//< 用户名 username
            [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_DDNS_PWDLEN, ArraySubType = UnmanagedType.I1)]
            public char[] Password;							//< 密码 password
        }

        ///< DDNS信息查询模式 DDNS information query mode
        public struct NET_SearchMode
        {
            public int nType;														//< 查询类型，见SearchModeType Query type, see SearchModeType
            [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_DDNS_IPSIZE, ArraySubType = UnmanagedType.I1)]
            public char[] szSerIP;							//< 服务器地址 server address
            public int nSerPort;													//< 服务器端口号 Server port number
            [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_SERIALINFO_SIZE, ArraySubType = UnmanagedType.I1)]
            public char[] szSerialInfo;					//< 如果是按序列号，则为序列号，如果是用户名，则为用户名 If it is a serial number, it is the serial number, if it is a user name, it is the user name.
        }

///< DDNS信息查询类型
        public enum NET_SearchModeType
        {
            DDNS_SERIAL = 0,												//< 按序列号 By serial number
            DDNS_USERNAME,													//< 按用户名 By username
        };

///< 实时预览扩展接口增加的参数: 预览类型
        public enum NET_SDK_RealPlayType
        {
            NET_SDK_RType_Realplay = 0,										//< 实时预览 Live preview
            NET_SDK_RType_Main_Realplay2,									//< 实时监视-主码流，等同于NET_SDK_RType_Realplay Real-time monitoring - primary stream, equivalent to NET_SDK_RType_Realplay
	        NET_SDK_RType_Main_Realplay3,
            NET_SDK_RType_Sub_Realplay_1,									//< 实时监视-辅码流1 Real-time monitoring - auxiliary stream 1
            NET_SDK_RType_Sub_Realplay_2,									//< 实时监视-辅码流2 Real-time monitoring - auxiliary stream 2
            NET_SDK_RType_Sub_Realplay_3,									//< 实时监视-辅码流3 Real-time monitoring - auxiliary stream 3

            NET_SDK_RType_Multiplay_1,										//< 多画面预览－1画面 ulti-screen preview-1 screen
            NET_SDK_RType_Multiplay_4,										//< 多画面预览－4画面 ulti-screen preview-4 screen
            NET_SDK_RType_Multiplay_6,										//< 多画面预览－6画面 ulti-screen preview-6 screen
            NET_SDK_RType_Multiplay_8,										//< 多画面预览－8画面 ulti-screen preview-8 screen
            NET_SDK_RType_Multiplay_9,										//< 多画面预览－9画面 ulti-screen preview-9 screen
            NET_SDK_RType_Multiplay_12,										//< 多画面预览－12画面 ulti-screen preview-12 screen
            NET_SDK_RType_Multiplay_16,										//< 多画面预览－16画面 ulti-screen preview-16 screen
        }

        ///< 组合编码模式 Combined coding mode
        public enum Net_SDK_CombinType
        {
	        NET_SDK_COMBIN_NONE,
	        NET_SDK_COMBIN_1,
	        NET_SDK_COMBIN_2,
	        NET_SDK_COMBIN_3,
	        NET_SDK_COMBIN_4,
	        NET_SDK_COMBIN_5,
	        NET_SDK_COMBIN_6,
	        NET_SDK_COMBIN_7,
	        NET_SDK_COMBIN_8,
	        NET_SDK_COMBIN_9,
	        NET_SDK_COMBIN_10,
	        NET_SDK_COMBIN_11,
	        NET_SDK_COMBIN_12,
	        NET_SDK_COMBIN_13,
	        NET_SDK_COMBIN_14,
	        NET_SDK_COMBIN_15,
	        NET_SDK_COMBIN_16,
	        NET_SDK_COMBIN_1_4,
	        NET_SDK_COMBIN_5_8,
	        NET_SDK_COMBIN_9_12,
	        NET_SDK_COMBIN_13_16,
	        NET_SDK_COMBIN_1_8,
	        NET_SDK_COMBIN_9_16,
	        NET_SDK_COMBIN_1_9,
	        NET_SDK_COMBIN_8_16,
	        NET_SDK_COMBIN_1_16
        };


        ///< 分辨率枚举 模拟通道 Resolution enumeration analog channel
        public enum NET_SDK_CAPTURE_SIZE_t 
        {
	        NET_SDK_CAPTURE_SIZE_D1,										//< 720*576(PAL)	720*480(NTSC)
	        NET_SDK_CAPTURE_SIZE_HD1,										//< 352*576(PAL)	352*480(NTSC)
	        NET_SDK_CAPTURE_SIZE_HF1080,									//< 960*1080(PAL)	960*1080(NTSC)
	        NET_SDK_CAPTURE_SIZE_CIF,										//< 352*288(PAL)	352*240(NTSC)
	        NET_SDK_CAPTURE_SIZE_QCIF,										//< 176*144(PAL)	176*120(NTSC)
	        NET_SDK_CAPTURE_SIZE_VGA,										//< 640*480(PAL)	640*480(NTSC)
	        NET_SDK_CAPTURE_SIZE_QVGA,										//< 320*240(PAL)	320*240(NTSC)
	        NET_SDK_CAPTURE_SIZE_H3M,										//< 960*1440
	        NET_SDK_CAPTURE_SIZE_H4M,										//< 1280*1440
	        NET_SDK_CAPTURE_SIZE_ND1,										//< 240*192
	        NET_SDK_CAPTURE_SIZE_650TVL,									//< 926*576
	        NET_SDK_CAPTURE_SIZE_720P,										//< 1280*720
	        NET_SDK_CAPTURE_SIZE_1_3M,										//< 1280*960
	        NET_SDK_CAPTURE_SIZE_UXGA ,										//< 1600*1200
	        NET_SDK_CAPTURE_SIZE_1080P,										//< 1920*1080
	        NET_SDK_CAPTURE_SIZE_WUXGA,										//< 1920*1200
	        NET_SDK_CAPTURE_SIZE_4M,										//< 2560*1440
	        NET_SDK_CAPTURE_SIZE_3M,										//< 1920*1440
	        NET_SDK_CAPTURE_SIZE_5M,										//< 2592*2048
	        NET_SDK_CAPTURE_SIZE_6M,										//< 3072*2048
	        NET_SDK_CAPTURE_SIZE_8M,										//< 3840*2160


	        NET_SDK_CAPTURE_SIZE_NR=32,
        };

        ///< 捕获码流控制模式类型 Capture stream control mode type
        public enum NET_SDK_capture_brc_t 
        {
            NET_SDK_CAPTURE_BRC_CBR,										//< 固定码流 Fixed stream
            NET_SDK_CAPTURE_BRC_VBR,										//< 可变码流 Variable stream
            NET_SDK_CAPTURE_BRC_MBR,										//< 混合码流 Mixed stream
            NET_SDK_CAPTURE_BRC_NR											//< 枚举的码流控制模式数目。 The number of code stream control modes enumerated.
        };

        ///< 捕获压缩格式类型 Capture compression format type
        public enum NET_SDK_CAPTURE_COMP_t 
        {
	        NET_SDK_CAPTURE_COMP_DIVX_MPEG4,								//< DIVX MPEG4
	        NET_SDK_CAPTURE_COMP_MS_MPEG4,									//< MS MPEG4
	        NET_SDK_CAPTURE_COMP_MPEG2,										//< MPEG2
	        NET_SDK_CAPTURE_COMP_MPEG1,										//< MPEG1
	        NET_SDK_CAPTURE_COMP_H263,										//< H.263
	        NET_SDK_CAPTURE_COMP_MJPG,										//< MJPG
	        NET_SDK_CAPTURE_COMP_FCC_MPEG4,									//< FCC MPEG4
	        NET_SDK_CAPTURE_COMP_H264,										//< H.264
	        NET_SDK_CAPTURE_COMP_H265,										//< H.265
	        NET_SDK_CAPTURE_COMP_H264H,										//< H.264+
	        NET_SDK_CAPTURE_COMP_H265H,										//< H.265+
            NET_SDK_CAPTURE_COMP_NR											//< 枚举的压缩标准数目。Number of compression standards enumerated
        };

        ///< 捕获通道类型 Capture channel type
        public enum NET_SDK_CAPTURE_CHANNEL_t 
        {
            NET_SDK_CHL_MAIN_T = 0,											//< 主通道	－	主码流1 Main channel - main stream 1
            NET_SDK_CHL_2END_T = 1,											//< 辅通道	－	出辅码流2  Secondary channel - secondary stream 2
            NET_SDK_CHL_3IRD_T = 2,											//< 辅通道	－	出辅码流3  Auxiliary channel - auxiliary stream 3
            NET_SDK_CHL_4RTH_T = 3,											//< 辅通道	－	出辅码流4 Auxiliary channel - auxiliary stream 4
            NET_SDK_CHL_JPEG_T = 4,											//< 辅通道	－	出JPEG抓图 Secondary channel - JPEG capture
	        NET_SDK_CHL_FUNCTION_NUM
        };
        ///< 音频编码类型 Audio coding type
        public enum NET_SDK_AudioEncodeTypes
        {
	        NET_SDK_AUDIO_ENCODE_NONE = 0,
	        NET_SDK_AUDIO_ENCODE_G729_8KBIT,
	        NET_SDK_AUDIO_ENCODE_G726_16KBIT,
	        NET_SDK_AUDIO_ENCODE_G726_24KBIT,
	        NET_SDK_AUDIO_ENCODE_G726_32KBIT,
	        NET_SDK_AUDIO_ENCODE_G726_40KBIT,
	        NET_SDK_AUDIO_ENCODE_PCM_8TO16BIT,
	        NET_SDK_AUDIO_ENCODE_PCM_ALAW,
	        NET_SDK_AUDIO_ENCODE_PCM_ULAW,
	        NET_SDK_AUDIO_ENCODE_ADPCM8K16BIT,
	        NET_SDK_AUDIO_ENCODE_ADPCM16K16BIT,
        	NET_SDK_AUDIO_ENCODE_G711_ALAW,
	        NET_SDK_AUDIO_ENCODE_MPEG2_LAYER1,
	        NET_SDK_AUDIO_ENCODE_AMR8K16BIT,
        	NET_SDK_AUDIO_ENCODE_G711_ULAW,
        	NET_SDK_AUDIO_ENCODE_IMA_ADPCM_8K16BIT,
	        NET_SDK_AUDIO_ENCODE_TYPES_NR,
        };


        ///< 配置类型 Configuration type
        public enum NET_SDK_CONFIG_TYPE
        {
	        NET_SDK_CONFIG_NOTHING = 0,										//<
            NET_SDK_CONFIG_USER,											//< 用户信息, 包含了权限列表, 用户列表和组列表 User information, including permission lists, user lists, and group lists
            NET_SDK_CONFIG_ADD_USER,										//< 增加用户 increase user
            NET_SDK_CONFIG_MODIFY_USER,										//< 修改用户 Modify user
            NET_SDK_CONFIG_DELETE_USER,										//< 删除用户 delete users
            NET_SDK_CONFIG_ADD_GROUP,										//< 增加组 Increase group
            NET_SDK_CONFIG_MODIFY_GROUP,									//< 修改组 Modify group
            NET_SDK_COFIG_DELETE_GROUP,										//< 删除组 Delete group
            NET_SDK_CONFIG_MODIFY_PSW,										//< 修改密码 change Password
            NET_SDK_CONFIG_ABILITY_SYSFUNC,									//< 支持的网络功能 Supported network features
            NET_SDK_CONFIG_ABILTY_ENCODE,									//< 编码能力 Coding ability
            NET_SDK_CONFIG_ABILITY_PTZPRO,									//< 云台协议 Yuntai Agreement
            NET_SDK_COMFIG_ABILITY_COMMPRO,									//< 串口协议 Serial protocol
            NET_SDK_CONFIG_ABILITY_MOTION_FUNC,								//< 动态检测块 Dynamic detection block
            NET_SDK_CONFIG_ABILITY_BLIND_FUNC,								//< 视频遮挡块 Video occlusion block
            NET_SDK_CONFIG_ABILITY_DDNS_SERVER,								//< DDNS服务支持类型 DDNS service support type
            NET_SDK_CONFIG_ABILITY_TALK,									//< 对讲编码类型 Intercom coding type
            NET_SDK_CONFIG_SYSINFO,											//< 系统信息 system message
            NET_SDK_CONFIG_SYSNORMAL,										//< 普通配置 Normal configuration
            NET_SDK_CONFIG_SYSENCODE,										//< 编码配置 Coding configuration
            NET_SDK_CONFIG_SYSNET,											//< 网络设置 Network settings
            NET_SDK_CONFIG_PTZ,												//< 云台页面 PTZ page
            NET_SDK_CONFIG_COMM,											//< 串口页面 Serial page
            NET_SDK_CONFIG_RECORD,											//< 录像设置界面 Recording interface
            NET_SDK_CONFIG_MOTION,											//< 动态检测页面 Dynamic detection page
            NET_SDK_CONFIG_SHELTER,											//< 视频遮挡 Video occlusion
            NET_SDK_CONFIG_VIDEO_LOSS,  									//< 视频丢失, Video loss
            NET_SDK_CONFIG_ALARM_IN,										//< 报警输入 Alarm input
            NET_SDK_CONFIG_ALARM_OUT,										//< 报警输出 Alarm Output
            NET_SDK_CONFIG_DISK_MANAGER,									//< 硬盘管理界面 Hard disk management interface
            NET_SDK_CONFIG_OUT_MODE,										//< 输出模式界面 Output mode interface
            NET_SDK_CONFIG_CHANNEL_NAME,									//< 通道名称 Channel name
            NET_SDK_CONFIG_AUTO,											//< 自动维护界面配置 Automatic maintenance interface configuration
            NET_SDK_CONFIG_DEFAULT,     									//< 恢复默认界面配置 Restore default interface configuration
            NET_SDK_CONFIG_DISK_INFO,										//< 硬盘信息 Hard disk information
            NET_SDK_CONFIG_LOG_INFO,										//< 查询日志 Query log
            NET_SDK_CONFIG_NET_IPFILTER,									//< IP地址过滤 IP address filtering
            NET_SDK_CONFIG_NET_DHCP,										//< DHCP配置 DDNS configuration
            NET_SDK_CONFIG_NET_DDNS,										//< DDNS配置 DDNS configuration
            NET_SDK_CONFIG_NET_EMAIL,										//< 电子邮件配置 Email configuration
            NET_SDK_CONFIG_NET_MULTICAST,									//< 多播配置 Multicast configuration
            NET_SDK_CONFIG_NET_NTP,											//< NTP配置 NTP configuration
            NET_SDK_CONFIG_NET_PPPOE,										//< PPPOE配置 PPPOE configuration
            NET_SDK_CONFIG_NET_DNS,											//< DNS配置 DNS configuration
            NET_SDK_CONFIG_NET_FTPSERVER,									//< FTP服务器配置 FTP server configuration
            NET_SDK_CONFIG_SYS_TIME,										//< 系统时间配置 System time configuration
            NET_SDK_CONFIG_CLEAR_LOG,										//< 清除日志 Clear log
            NET_SDK_REBOOT_DEV,												//< 重启启动设备 Restart the boot device
            NET_SDK_CONFIG_ABILITY_LANG,									//< 支持语言 Support language
            NET_SDK_CONFIG_VIDEO_FORMAT,									//< 视频格式 Video format
            NET_SDK_CONFIG_COMBINEENCODE,									//< 组合编码 Combined coding
            NET_SDK_CONFIG_EXPORT,											//< 配置导出 Configuration export
            NET_SDK_CONFIG_IMPORT,											//< 配置导入 Configuration import
            NET_SDK_LOG_EXPORT,												//< 日志导出 Log export
            NET_SDK_CONFIG_COMBINEENCODEMODE,								//< 组合编码模式 Combined coding mode
            NET_SDK_WORK_STATE,												//< 运行状态 Operating status
            NET_SDK_ABILITY_LANGLIST,										//< 实际支持的语言集 Actual supported set of languages
            NET_SDK_CONFIG_NET_ARSP,										//< ARSP配置	 ARSP configuration				
            NET_SDK_CONFIG_SNAP_STORAGE,									//< 抓图存储配置 Capture storage configuration
            NET_SDK_CONFIG_NET_3G,											//< 3G拨号配置 3G dialing configuration
            NET_SDK_CONFIG_NET_MOBILE,										//< 移动监控配置 Mobile monitoring configuration
            NET_SDK_CONFIG_UPGRADEINFO,										//< 获取升级信息 Get upgrade information
	        NET_SDK_CONFIG_NET_DECODER,										//< 
            NET_SDK_ABILITY_VSTD,											//< 实际支持的视频制式 Actually supported video format
            NET_SDK_CONFIG_ABILITY_VSTD,									//< 支持视频制式 Support video format
            NET_SDK_CONFIG_NET_UPNP,										//< UPUN设置 UPUN settings
	        NET_SDK_CONFIG_NET_WIFI,										//< WIFI
            NET_SDK_CONFIG_NET_WIFI_AP_LIST,								//< WIFI节点列表 WIFI node list
            NET_SDK_CONFIG_SYSENCODE_SIMPLIIFY,								//< 简化的编码配置 Simplified coding configuration
            NET_SDK_CONFIG_ALARM_CENTER,									//< 告警中心 Alarm center
            NET_SDK_CONFIG_NET_ALARM,										//< 网络告警 Network alarm
            NET_SDK_VIDEO_PREVIEW,											//< 预览 Preview
            NET_SDK_CONFIG_ABILITY_SERIALNO,								//< 序列号 serial number
	        NET_SDK_CONFIG_NET_RTSP,										//< RTSP
	        NET_SDK_CONFIG_NET_XMWST,										//< 厦门威思通
	        NET_SDK_GUISET,													//< GUISET
            NET_SDK_CATCHPIC,												//< 抓图 Capture
            NET_SDK_VIDEOCOLOR,												//< 视频颜色设置 Video color setting
            NET_SDK_CAMERAPARAM,											//< 摄像机参数 Camera parameter
            NET_SDK_NETDECORDER,											//< 数字通道解码器 Digital channel decoder
            NET_SDK_IPC_SYNCTIME,											//< IPC时同步本地时间, Set有效, 无Get Synchronize local time when IPC, Set is valid, no Get
	        NET_SDK_CONFIG_NET_DANALE,										//< 大拿科技云平台
	        NET_SDK_CONFIG_NET_LT,											//< 浪涛科技云平台
            NET_SDK_CONFIG_RS485,											//< 传送的数据结构和NET_SDK_CONFIG_PTZ一样 The data structure transmitted is the same as NET_SDK_CONFIG_PTZ
            NET_SDK_CONFIG_ABILITY_RS485,									//< 云台协议 PTZ Agreement
            NET_SDK_CONFIG_CHANNEL_MODE,                                    //< 通道模式 Channel mode
            NET_SDK_CONFIG_NET_AUTOUPGRADE,									//< 自动升级 auto update
            NET_SDK_CONFIG_NET_DAS,											//< 300平台DAS服务器 300 platform DAS server
            NET_SDK_ABILITY_ANALY,											//< 智能分析能力级别 Intelligent analysis capability level

            NET_SDK_CONFIG_INTELALALY,										//< 智能分析 Intelligent analysis
            NET_SDK_CONFIG_INTELALALYLINK,									//< 智能联动 Intelligent linkage
            NET_SDK_CPC_CLEARDATA,											//< 清楚人数统计 Clear demographics
            NET_SDK_CONFIG_VIDEOOUT,										//< 输出分辨率 Output resolution
            NET_SDK_CONFIG_ABILITY_SEARCHPRO,								//< NVR支持的搜索协议 NVR-supported search protocol
	        NET_SDK_CONFIG_YLTXCLOUD,										//< 云领天下，云配置界面
            NET_SDK_CONFIG_ANNIDDNS,                                        //< Anni DDNS 配置界面 Anni DDNS configuration interface
            NET_SDK_CONFIG_NETPORT,											//< 获得额外的网络端口 Get additional network ports
	        NET_SDK_CONFIG_ANNITCP,											//< Anni TCPport
            NET_SDK_CONFIG_CHANGECHANWND,									//< 切换NVR 数字通道所在窗口 Switch the window where the NVR digital channel is located
            NET_SDK_CONFIG_OEM,												// < 获取OEM 信息 Get OEM information
            NET_SDK_CONFIG_WND_N0,											// < 修改窗口分割 Modify window split
	        NET_SDK_CONFIG_TEST_MAIL,										// < 
            NET_SDK_CONFIG_TEST_SHELL,										// < shell 设置 Shell settings
	        NET_SDK_CONFIG_NET_TUTK,										// < TUTK 云
	        NET_SDK_CONFIG_NET_UMEYE,										// < 万佳安DAS
	        NET_SDK_CONFIG_NET_WJADAS,
            NET_SDK_NETDECORDER_V4,											// < 数字通道配，兼容RTSP 协议扩展 Digital channel configuration, compatible with RTSP protocol extension
            NET_SDK_CONFIG_HDDTEST,										    // < HDD测试 HDD test
            NET_SDK_CONFIG_PROJECT,                                         // < 播放计划 Play plan
            NET_SDK_CONFIG_LED,												// < 跑马灯 Marquee
            NET_SDK_CONFIG_DIGIENCODE,										// < 数字通道的编码配置 Digital channel coding configuration
	        NET_SDK_CONFIG_NET_DROPBOX,										// < DROPBOX
            NET_SDK_CONFIG_TIMEZONE,										// < 时区 Time zone
            NET_SDK_CONFIG_SCANMODE,                                        // < 信号源 signal source
            NET_SDK_CONFIG_NETIPVERSION,									// < IP协议版本 IP protocol version
            NET_SDK_CONFIG_NETIPV6COMMON,									// < IPV6网络设置 IPV6 network settings
	        NET_SDK_CONFIG_ABILITY_LOCATION,								// < 3G协议
	        NET_SDK_CONFIG_ABILITY_ISP,										// < 3G
	        NET_SDK_CONFIG_NET_8021X,										// < 8021X
	        NET_SDK_CONFIG_NET_GB28181,										// <GB28181配置
	        NET_SDK_CONFIG_DEVICE_CATALOG,									///<设备目录结构，用于28181协议
            NET_SDK_CONFIG_CUSTOM_EXPORT,									///<配置信息导出 Configuration information export
        };

///< 报警事件码
public enum NET_SDK_EventCodeTypes
{
	NET_SDK_EVENT_CODE_INIT = 0,
    NET_SDK_EVENT_CODE_LOCAL_ALARM = 1,								//< 本地报警 Local alarm
    NET_SDK_EVENT_CODE_NET_ALARM,									//< 网络报警 Network alarm
    NET_SDK_EVENT_CODE_MANUAL_ALARM,								//< 手动报警 Manual alarm
    NET_SDK_EVENT_CODE_VIDEO_MOTION,								//< 动态检测 Dynamic detection
    NET_SDK_EVENT_CODE_VIDEO_LOSS,		 							//< 视频丢失 Video loss
    NET_SDK_EVENT_CODE_VIDEO_BLIND,									//< 视频遮挡 Video occlusion
    NET_SDK_EVENT_CODE_VIDEO_TITLE,									//< 通道名称 Channel name
    NET_SDK_EVENT_CODE_VIDEO_SPLIT,									//< 画面切割 Picture cutting
    NET_SDK_EVENT_CODE_VIDEO_TOUR,									//< 云台巡航 PTZ cruise
    NET_SDK_EVENT_CODE_STORAGE_NOT_EXIST,							//< 无存储介质 No storage medium
    NET_SDK_EVENT_CODE_STORAGE_FAILURE,								//< 存储失败 Storage failure
    NET_SDK_EVENT_CODE_LOW_SPACE,									//< 磁盘空间不足 Insufficient disk space
    NET_SDK_EVENT_CODE_NET_ABORT,									//< 网络丢失 Network loss
    NET_SDK_EVENT_CODE_COMM,										//< 串口 Serial port
    NET_SDK_EVENT_CODE_STORAGE_READ_ERROR,							//< 读磁盘错误 Read disk error
    NET_SDK_EVENT_CODE_STORAGE_WRITE_ERROR,							//< 写磁盘错误 Write disk error
    NET_SDK_EVENT_CODE_NET_IPCONFLICT,								//< IP冲突 IP conflict
    NET_SDK_EVENT_CODE_ALARM_EMERGENCY,								//< 紧急告警 Emergency warning
    NET_SDK_EVENT_CODE_DEC_CONNECT,									//< IPC上线提示 IPC online prompt
    NET_SDK_EVENT_CODE_UPGRADE,										//< 升级 upgrade
	NET_SDK_EVENT_CODE_BACKUP,
    NET_SDK_EVENT_CODE_Shutdown,									//死机 Crash
	NET_SDK_EVENT_CODE_REBOOT,
	NET_SDK_EVENT_CODE_NEWFILE,										
	NET_SDK_EVENT_CODE_ANALYZE,	
	NET_SDK_EVENT_CODE_SOUNDLIGHT,
	NET_SDK_EVENT_CODE_RFM433,
	NET_SDK_EVENT_CODE_NR,
};

///< 编码配置的类型 Type of encoding configuration
public enum NET_SDK_ENCODE_TYPE_BY_RECORD
{
	NET_SDK_ENCODE_TYPE_TIM = 0,
	NET_SDK_ENCODE_TYPE_MTD = 1,
	NET_SDK_ENCODE_TYPE_ALM = 2,
	NET_SDK_ENCODE_TYPE_NUM = 3,
    NET_SDK_ENCODE_TYPE_SNAP_TIMER = 0,								//< 定时抓图 Timing capture
    NET_SDK_ENCODE_TYPE_SNAP_TRIGGER = 1,							//< 触发抓图 Trigger capture
};

///< 辅码流类型 Secondary stream type
public const int NET_SDK_EXTRATYPES=3;

///< 网络传输策略 Network transmission strategy
public enum NET_SDK_TransferPolicy
{
    NET_SDK_TRANSFER_POLICY_AUTO,									//< 自适应 Adaptive
    NET_SDK_TRANSFER_POLICY_QUALITY,								//< 质量优先 Quality priority
    NET_SDK_TRANSFER_POLICY_FLUENCY,								//< 流量优先 Traffic priority
	NET_SDK_TRANSFER_POLICY_NR,
};

public enum  NET_SDK_DebugTestType
{
	NET_SDK_SYSTEM_TEST_MAIL,										// < 
    NET_SDK_SYSTEM_TEST_SHELL,										// < shell 设置 Shell settings
    NET_SDK_SYSTEM_TEST_HDD,										// < 硬盘测试 Hard disk test
	NET_SDK_SYSTEM_TEST_NR											// 
};

///< 矩形框 Rectangle
public struct NET_SDK_Rect
{
	int left;
	int top;
	int right;
	int bottom;
}

///< 音频输入格式，语音对讲用 Audio input format, voice intercom
public struct NET_SDK_AudioInFormatConfig
{
    int iBitRate;													//< 码流大小, kbps为单位, 比如192kbps, 128kbps Stream size, in kbps, such as 192kbps, 128kbps
    int iSampleRate;												//< 采样率，Hz为单位，比如44100Hz Sampling rate, in Hz, such as 44100Hz
    int iSampleBit;													//< 采样的位深 Sampled bit depth
    int iEncodeType;												//< 编码方式，参照AudioEncodeTypes定义 Encoding method, refer to AudioEncodeTypes definition
};

///< 语音对讲格式 Voice intercom format
public enum NET_SDK_TALK_CODING_TYPE
{
	NET_SDK_TALK_DEFAULT = 0,
	NET_SDK_TALK_PCM = 1,											//< PCM
	NET_SDK_TALK_G711a,												//< G711a
	NET_SDK_TALK_AMR,												//< AMR
	NET_SDK_TALK_G711u,												//< G711u
	NET_SDK_TALK_G726,												//< G726
};

//语音对讲 Voice intercom
public struct NET_SDK_TALKDECODE_INFO
{
    NET_SDK_TALK_CODING_TYPE encodeType;						//< 编码类型 Coding type
    int nAudioBit;						//< 用实际的值表示，如8位 则填值为8 Expressed by the actual value, such as 8 bits, the value is 8
    uint dwSampleRate;					//< 采样率，如16k 则填值为16000 The sampling rate, such as 16k, is 16000.
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
	char[]							reserved;
};

/// 系统时间结构 System time structure
public struct NET_SDK_SYSTEM_TIME
{
    public int year;														//< 年    
	public int  month;														//< 月, January = 1, February = 2, 依次类推   
	public int  day;														//< 日   
	public int  wday;														//< 星期,Sunday = 0, Monday = 1, 依次类推   
	public int  hour;														//< 时   
	public int  minute;													//< 分   
	public int  second;													//< 秒。   
    public int isdst;														//< 夏令时标识。    Daylight saving time logo.
}

///时区 Time zone
public struct NET_SDK_TimeZoneConfig
{
	int iFirstUserTimeZone;		///< 
	int iTimeMin;			///< 分钟
};

///信号源 signal source
public struct NET_SDK_ScanModeConfigAll
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
	int[] sCanModeConfigAll;
};


///< 录像设置相关结构体 时间段 Recording related structure time period
public struct NET_SDK_TIMESECTION
{
	int enable;														//< 使能
	int startHour;													//< 开始时间:小时
	int	startMinute;												//< 开始时间:分钟
	int	startSecond;												//< 开始时间:秒钟
	int	endHour;													//< 结束时间:小时
	int	endMinute;													//< 结束时间:分
	int	endSecond;													//< 结束时间:秒钟
}	

///< 时间结构
public struct NET_SDK_TIME
{
	public int dwYear;														//< 年
	public int dwMonth;													//< 月
	public int dwDay;														//< 日
	public int dwHour;														//< 时
	public int dwMinute;													//< 分
	public int dwSecond;													//< 秒
}
/*
///< 时间结构
public struct NEW_NET_SDK_TIME											
{
	uint second			:6;									//<	秒	1-60		
	uint minute			:6;									//<	分	1-60		
	uint hour			:5;									//<	时	1-24		
	uint day			:5;									//<	日	1-31		
	uint month			:4;									//<	月	1-12		
	uint year			:6;									//<	年	2000-2063	
}*/
///< 夏令时结构
public struct NET_SDK_DSTPoint
{
	int	iYear;														//< 年
	int	iMonth;														//< 月
	int	iWeek;														//< 周1:first  to2 3 4 -1:last one   0:表示使用按日计算的方法[-1,4]
	int	iWeekDay;													//< 星期,[0, 6] sunday = 0
	int Hour;														//< 时
	int Minute;														//< 分
};

///< 视频格式 Video format
public struct NET_SDK_VIDEO_FORMAT
{
    int iCompression;											//< 压缩模式 	 Compressed mode
    int iResolution;											//< 分辨率 参照枚举capture_size_t Resolution reference enumeration capture_size_t	
    int iBitRateControl;										//< 码流控制 参照枚举capture_brc_t	 Code stream control reference enumeration capture_brc_t
    int iQuality;												//< 码流的画质 档次1-6	The quality of the code stream	
    int nFPS;													//< 帧率值，NTSC/PAL不区分,负数表示多秒一帧		Frame rate value, NTSC/PAL is not distinguished, negative number means multi-second frame
    int nBitRate;												//< 0-4096k,该列表主要由客户端保存，设备只接收实际的码流值而不是下标。0-4096k, the list is mainly saved by the client, and the device only receives the actual code stream value instead of the subscript.
    int iGOP;													//< 描述两个I帧之间的间隔时间，2-12  Describe the interval between two I frames, 2-12
};

///< 音频格式   audio format
public struct  NET_SDK_AUDIO_FORMAT
{
    int nBitRate;												//< 码流kbps	 Code stream kbps
    int nFrequency;												//< 采样频率	Sampling frequency
    int nMaxVolume;												//< 最大音量阈值 Maximum volume threshold
};

///< 媒体格式 Media format
public struct NET_SDK_MEDIA_FORMAT
{
    NET_SDK_VIDEO_FORMAT vfFormat;									//< 视频格式定义 Video format definition			
    NET_SDK_AUDIO_FORMAT afFormat;									//< 音频格式定义  Audio format definition
    char bVideoEnable;								//< 开启视频编码 Turn on video encoding
    char bAudioEnable;								//< 开启音频编码 Turn on audio encoding	
} ;

///< IP地址格式 IP address format
public struct NET_SDK_CONFIG_IPAddress
{	
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
	byte[]	c;											//< IPv4 c[0].c[1].c[2].c[3] -- xxx.xxx.xxx.xxx
}

//*********** 用户帐号管理相关结构体**************//
//*********** User account management related structure **************//
///<  此结构供其他结构体使用 This structure is used by other structures
public struct NET_OPR_RIGHT
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
	public char[] name;
}

///< 用户信息 User Info
public struct NET_SDK_USER_INFO
{
    public int rigthNum;											//< 具有的权限的数目 Number of permissions
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_RIGTH_NUM*SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] rights;		//< 权限列表 Permission list
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] groupname;					//< 所在用户组组名称 User group name
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] memo;						//< 备注(描述) Remarks (description)
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] name;						//< 用户名 username
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] passWord;					//< 密码 password
    public char reserved;											//< 是否保留 Whether to keep
    public char shareable;											//< 本用户是否允许复用 1-复用，0-不复用 Whether the user allows multiplexing 1 - multiplexing, 0 - no multiplexing
    public int iEncryptType;										//< 加密方式 NET_SDK_PASSWORDENCRYPT（IPC不加密，DVR加密方式为MD5）Encryption method NET_SDK_PASSWORDENCRYPT (IPC is not encrypted, DVR encryption is MD5) 
    public char TimeJudge;											//< 时间判断  大于（）为true Time judgment greater than () is true
}

public enum NET_SDK_PASSWORDENCRYPT
{
    PASSWORD_PLAIN,		///< 密码不加密方式 Password is not encrypted
    PASSWORD_MD5,		///< MD5密码加密方式 MD5 password encryption method
    PASSWORD_3DES,		///< 3DES加密方式 3DES encryption method
    PASSWORD_HSQD,		///<客户黄山奇盾特殊加密方式(只判断，不校验) Customer Huangshan Qidun special encryption method (only judge, not verified)
    PASSWORD_NR,		///< 加密种类 Type of encryption
};

///< 组信息 Group information
public struct NET_SDK_USER_GROUP_INFO
{
    public int rigthNum;											//< 组的权限个数 Number of permissions for the group
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] memo;						//< 备注 Remarks
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] name;						//< 组名称 Group name
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_RIGTH_NUM*SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] rights;	//< 权限列表 Permission list
}

///< 用户信息配置结构
public struct NET_SDK_USER_MANAGE_INFO
{
    public int rigthNum;								//< 权限数目 Number of permissions
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_RIGTH_NUM, ArraySubType = UnmanagedType.I1)]
    public NET_OPR_RIGHT[] rightList;		//< 权限列表 ermission list
    public int groupNum;								//< 组数目 Number of groups
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_GROUP_NUM, ArraySubType = UnmanagedType.I1)]
    public NET_SDK_USER_GROUP_INFO[] groupList;		//< 组列表 Group list
    public int userNum;								//< 用户数目 Number of users
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_NUM, ArraySubType = UnmanagedType.I1)]
    public NET_SDK_USER_INFO[] userList;			//< 用户列表 user list
}

///< 修改用户请求 Modify user request
public struct NET_SDK_CONF_MODIFYUSER
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] UserName;		//< 用户名 username
    public NET_SDK_USER_INFO User;									//< 用户信息 User Info
}

///< 修改组请求 Modify group request
public struct NET_SDK_CONF_MODIFYGROUP
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] GroupName;		//< 组名称 Group name
    public NET_SDK_USER_GROUP_INFO Group;									//< 组信息 Group information
}


///< 修改用户密码请求 Modify user password request
public struct NET_SDK_CONF_MODIFY_PSW
{
    public int iEncryptType;							//< 加密方式 NET_SDK_PASSWORDENCRYPT（IPC不加密，DVR加密方式为MD5） Encryption method NET_SDK_PASSWORDENCRYPT (IPC is not encrypted, DVR encryption is MD5)
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
	public char[]					sUserName;		//< 用户名 user name
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public char[] Password;		//< 用户旧密码 User old password
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    public byte[] NewPassword;	//< 用户新密码 User new password
};

///< 普通配置页结构体   Normal configuration page structure
///< 命令ID: NET_SDK_CONFIG_SYSNORMAL
public struct NET_SDK_CONFIG_NORMAL
{
    NET_SDK_SYSTEM_TIME sysTime;									//< 系统时间 system time
    int iLocalNo;													//< 本机编号:[0, 998] Local number
    int iOverWrite;													//< 硬盘满时处理 "OverWrite", "StopRecord"	Hard disk full processing	
    int iSnapInterval;												//< 定时抓图的时间间隔, 以秒为单位 Time interval for timing capture, in seconds
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
    char[] sMachineName;											//< 机器名 Machine name
    int iVideoStartOutPut;											//< 输出模式 Output mode
    int iAutoLogout;												//< 本地菜单自动注销(分钟)	[0, 120] Local menu is automatically logged off (minutes)
    int iVideoFormat;												//< 视频制式:"PAL", "NTSC", "SECAM" Video format: "PAL", "NTSC", "SECAM"
	int iLanguage;													//< 语言选择:"English", "SimpChinese", "TradChinese", "Italian", "Spanish", "Japanese", "Russian", "French", "German", ...	
	int iDateFormat;												//< 日期格式:"YYMMDD", "MMDDYY", "DDMMYY"
	int iDateSeparator;												//< 日期分割符:".", "-", "/"
	int iTimeFormat;												//< 时间制式:"12", "24"
    int iDSTRule;													//< 夏令时规则  Daylight saving time rules
    int iWorkDay;													//< 工作日 Working day
    NET_SDK_DSTPoint dDSTStart;										//< 起始时间 Start time
    NET_SDK_DSTPoint dDSTEnd;										//< 结束时间 End Time
	
}

//*========================以下编码配置相关========================//
//*========================The following encoding configuration is related========================//
//< 单个通道编码设置 Single channel encoding setting
//< 命令ID: NET_SDK_CONFIG_SYSENCODE
public struct NET_SDK_CONFIG_ENCODE
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_ENCODE_TYPE_BY_RECORD.NET_SDK_ENCODE_TYPE_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_MEDIA_FORMAT[] dstMainFmt;		//< 主码流格式 	Primary stream format
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_EXTRATYPES, ArraySubType = UnmanagedType.I1)]
NET_SDK_MEDIA_FORMAT[] dstExtraFmt;			//< 辅码流格式  Auxiliary stream format
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_ENCODE_TYPE_BY_RECORD.NET_SDK_ENCODE_TYPE_NUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_MEDIA_FORMAT[] dstSnapFmt;		//< 抓图格式 Capture format
};

//< 全部通道编码设置 All channel encoding settings
//< 命令ID: NET_SDK_CONFIG_SYSENCODE
public struct  NET_SDK_EncodeConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_CONFIG_ENCODE[] vEncodeConfigAll;	//< 通道编码设置列表 Channel encoding settings list
};

///< 单通道编码设置  Single channel encoding setting
///< 命令ID: NET_SDK_CONFIG_SYSENCODE_SIMPLIIFY
public struct NET_SDK_CONFIG_ENCODE_SIMPLIIFY
{
    NET_SDK_MEDIA_FORMAT dstMainFmt;								//< 主码流格式 	Primary stream format
    NET_SDK_MEDIA_FORMAT dstExtraFmt;								//< 辅码流格式 Auxiliary stream format
};

///< 全通道编码配置 Full channel encoding configuration
///< 命令ID: NET_SDK_CONFIG_SYSENCODE_SIMPLIIFY
public struct NET_SDK_EncodeConfigAll_SIMPLIIFY
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_CONFIG_ENCODE_SIMPLIIFY[] vEncodeConfigAll; //< 通道编码设置列表 Channel encoding settings list
};

///< 组合编码 Combined coding
///< 命令ID: NET_SDK_CONFIG_COMBINEENCODE
public struct NET_SDK_CombineEncodeConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_COMBINE_NUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_CONFIG_ENCODE[] vEncodeConfigAll;
};

///< 单通道组合编码模式 Single channel combined coding mode
///< 命令ID: NET_SDK_CONFIG_COMBINEENCODEMODE
public struct NET_SDK_CombEncodeParam
{
int iEncodeMode;	 //见Net_SDK_CombinType
};

///< 全通道组合编码模式 Full channel combined coding mode
///< 命令ID: NET_SDK_CONFIG_COMBINEENCODEMODE
public struct NET_SDK_CombEncodeModeAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_COMBINE_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_CombEncodeParam[] vEncodeParam;	//< 列表 List
};

///< 视频物件结构 Video object structure
public struct  NET_SDK_VIDEO_WIDGET
{
    uint rgbaFrontground;									//< 物件的前景MakeRGB，和透明度	 The foreground of the object MakeRGB, and transparency
    uint rgbaBackground;									//< 物件的后景MakeRGB，和透明度	 The background of the object MakeRGB, and transparency
    NET_SDK_Rect rcRelativePos;									//< 物件边距与整长的比例*8191 The ratio of the edge of the object to the whole length *8191
    char bPreviewBlend;											//< 预览叠加	 Preview overlay
    char bEncodeBlend;											//< 编码叠加     Code stack
};

///< 单个通道视频物件设置 Single channel video object settings
///< 命令ID: NET_SDK_CONFIG_OUT_MODE
public struct NET_SDK_CONFIG_VIDEOWIDGET
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_COVERNUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_VIDEO_WIDGET[] dstCovers;			//< 区块列表 Block list 
NET_SDK_VIDEO_WIDGET ChannelTitle;							//< 通道名OSD Channel name OSD
NET_SDK_VIDEO_WIDGET TimeTitle;								//< 时间0SD Time 0SD
public struct ChannelName 
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] strName;					//< 通道名 Channel name
}													//< 通道名称 Channel name
int iCoverNum;										//< 当前该通道有几个叠加的区域 There are currently several superimposed regions on this channel.
};

///< 全通道视频物件设置 Full channel video object settings
///< 命令ID: NET_SDK_CONFIG_OUT_MODE
public struct NET_SDK_VideoWidgetConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_CONFIG_VIDEOWIDGET[] vVideoWidegetConfigAll;
};

///< 视频颜色 ideo color
public struct NET_SDK_VIDEOCOLOR_PARAM
{
    int nBrightness;												//< 亮度	0-100 brightness
    int nContrast;													//< 对比度	0-100 Contrast
    int nSaturation;												//< 饱和度	0-100 saturation
    int nHue;														//< 色度	0-100 Chroma
    int mGain;														//< 增益	0-100 第7位置1表示自动增益	Gain 0-100 7th position 1 indicates automatic gain	
    int mWhitebalance;												//< 自动白电平控制，bit7置位表示开启自动控制.0x0,0x1,0x2分别代表低,中,高等级 Automatic white level control, bit7 set means automatic control is enabled. 0x0, 0x1, 0x2 represent low, medium and high levels respectively.
    int nAcutance;          										//< 锐度   0-15 Sharpness
};

///< 视频颜色设置 Video color setting
public struct NET_SDK_VIDEOCOLOR_ST
{
    NET_SDK_TIMESECTION tsTimeSection;						//< 时间段 period
    NET_SDK_VIDEOCOLOR_PARAM dstColor;							//< 颜色定义 Color definition
    int iEnable;							//< 使能	Enable
};

///< 单个通道视频颜色设置 Single channel video color setting
///< 命令ID: NET_SDK_VIDEOCOLOR
public struct NET_SDK_CONFIG_VIDEOCOLOR
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_N_MIN_TSECT, ArraySubType = UnmanagedType.I1)]
NET_SDK_VIDEOCOLOR_ST[] dstVideoColor;
};

///< 全通道视频颜色设置  Full channel video color settings
///< 命令ID: NET_SDK_VIDEOCOLOR
public struct NET_SDK_VideoColorConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_CONFIG_VIDEOCOLOR[] vVideoColorAll;
};


///< 所有通道名称标题 All channel name titles
///< 命令ID: NET_SDK_CONFIG_CHANNEL_NAME
public struct NET_SDK_ChannelNameConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_CHANNUM*SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] channelTitle;
};

///< 输出模式 Output mode
///< 命令ID: NET_SDK_GUISET
public struct NET_SDK_GUISetConfig
{
    int iWindowAlpha;										//< 窗口透明度	[128, 255] Window transparency
    int bTimeTitleEn;										//< 时间标题显示使能 Time title display enable
    int bChannelTitleEn;									//< 通道标题显示使能 Channel title display enable	 
    int bAlarmStatus;										//< 报警状态 Alarm status
    int bRecordStatus;										//< 录像状态显示使能 Record status display enable
    int bChanStateRecEn;									//< 录像标志显示使能 Video logo display enable
    int bChanStateVlsEn;									//< 视频丢失标志显示使能 Video loss flag display enable
    int bChanStateLckEn;									//< 通道锁定标志显示使能 Channel lock flag display enable	 
    int bChanStateMtdEn;									//< 动态检测标志显示使能 Dynamic detection flag display enable
    int bBitRateEn;										//< 码流显示使能 Code stream display enable
    int bRemoteEnable;										//< 遥控器使能 Remote control enabled
    int bDeflick;											//< 抗抖动 Anti-jitter
};

///< 输出视频分辨率 Output video resolution
///< 命令ID:NET_SDK_CONFIG_VIDEOOUT
public struct NET_SDK_VideoOutConfig
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =16*32, ArraySubType = UnmanagedType.I1)]
char[]     szResultion;									//< 最大16种分别率 格式如1024*768 Maximum 16 separate rate formats such as 1024*768
int nNum;													//< 分辨率种类个数 Number of resolution types
int nCurIndex;												//< 当前所用的分辨率在数字中的序号 The serial number of the currently used resolution in the number
};

///< 普通网络设置 Normal network settings
///< 命令ID: NET_SDK_CONFIG_SYSNET
public struct NET_SDK_CONFIG_NET_COMMON
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] HostName;						//< 主机名 CPU name
NET_SDK_CONFIG_IPAddress HostIP;								//< 主机IP Host IP
NET_SDK_CONFIG_IPAddress Submask;								//< 子网掩码 Subnet mask
NET_SDK_CONFIG_IPAddress Gateway;								//< 网关IP Gateway IP
int HttpPort;													//< HTTP服务端口 HTTP service port
int TCPPort;													//< TCP侦听端口 TCP listening port
int SSLPort;													//< SSL侦听端口 SSL listening port
int UDPPort;													//< UDP侦听端口 UDP listening port
int MaxConn;													//< 最大连接数 Maximum number of connections
int MonMode;													//< 监视协议 {"TCP", "UDP", "MCAST", ...} Monitoring protocol {"TCP", "UDP", "MCAST", ...}
int MaxBps;														//< 限定码流值 Qualified code stream value
int TransferPlan;												//< 传输策略 Transmission strategy
char bUseHSDownLoad;											//< 是否启用高速录像下载测率  Whether to enable high-speed video download rate
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_MAC_LEN, ArraySubType = UnmanagedType.I1)]
char[] sMac;									//< MAC地址 MAC address
};

///< 设备信息 Device Information
public struct NET_SDK_PRODUCTINFO
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
    char[] username; 												//< 设备用户名 Device username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[] password;												//< 设备密码 Device password
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =64, ArraySubType = UnmanagedType.I1)]
char[] sSerialNo;												//< 设备序列号 devise serial number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[] productName;											//< 设备型号 Equipment model
int deviceType;													//< 设备类型, 参见产品手册 Equipment type, see product brochure
int reserve;													//< 保留字段 reserved text
};

///< 设备查询结构体 Device query structure
///< NET_SDK_SearchDevice函数第1个参数 Function first parameter
public struct NET_SDK_SEARCH_DEVINFO
{
NET_SDK_CONFIG_NET_COMMON	netcomcfg;							//< 参考 NET_SDK_CONFIG_NET_COMMON
NET_SDK_PRODUCTINFO			productinf;							//< 参考 NET_SDK_PRODUCTINFO
};

///< 单个网卡的DHCP配置 DHCP configuration for a single NIC
public struct NET_SDK_NetDHCPConfig
{
int				bEnable;							//< 使能	 
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]			
char[]						ifName;							//< 名称
};
///< 所有网卡的DHCP配置 DHCP configuration for all NICs
///< 命令ID: NET_SDK_CONFIG_NET_DHCP
public struct NET_SDK_NetDHCPConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =4, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetDHCPConfig[]		vNetDHCPConfig;
};

///< DNS设置 DNS settings
///< 命令ID: NET_SDK_CONFIG_NET_DNS
public struct NET_SDK_NetDNSConfig
{
    NET_SDK_CONFIG_IPAddress PrimaryDNS;						//< 主DNS Primary DNS
    NET_SDK_CONFIG_IPAddress SecondaryDNS;			 		//< 备用DNS Alternate DNS
};

///< 网络服务器结构定义 Network server structure definition
public struct NET_SDK_RemoteServerConfig
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] ServerName;						//< 服务名 Service Name
NET_SDK_CONFIG_IPAddress ip;									//< IP地址 IP address
int Port;														//< 端口号 The port number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] UserName;						//< 用户名 username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] Password;						//< 密码	password
char Anonymity;													//< 是否匿名登录 Whether to log in anonymously
};

///< IP权限设置 IP permission settings
///< 命令ID: NET_SDK_CONFIG_NET_IPFILTER
public struct NET_SDK_NetIPFilterConfig
{
    char Enable;													//< 是否开启 Whether to open
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_FILTERIP_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_CONFIG_IPAddress[] BannedList;	//< 黑名单列表 Blacklist
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_FILTERIP_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_CONFIG_IPAddress[] TrustList;	//< 白名单列表 Whitelist
};

///< 组播设置 Multicast settings
///< 命令ID: NET_SDK_CONFIG_NET_MULTICAST
public struct NET_SDK_NetMultiCastConfig
{
char						Enable;								//< 是否开启
NET_SDK_RemoteServerConfig Server;								//< 组播服务器 Multicast server
};

///< PPPOE设置 PPPOE settings
///< 命令ID: NET_SDK_CONFIG_NET_PPPOE
public struct NET_SDK_NetPPPoEConfig
{
char						Enable;								//< 是否开启
NET_SDK_RemoteServerConfig Server;								//< PPPOE服务器 PPPOE server
NET_SDK_CONFIG_IPAddress addr;								//< 拨号后获得的IP地址 IP address obtained after dialing
};

///< DDNS设置 DDNS settings
public struct NET_SDK_NetDDNSConfig
{
char Enable;													//< 是否开启
char Online;													//< 是否在线 Whether online
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] DDNSKey;						//< DDNS类型名称 DDNS type name
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] HostName;						//< 主机名 CPU name
NET_SDK_RemoteServerConfig Server;								//< DDNS服务器 DDNS server
};

///< DDNS设置 DDNS settings
///< 命令ID: NET_SDK_CONFIG_NET_DDNS
public struct NET_SDK_NetDDNSConfigALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_DDNS_TYPE, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetDDNSConfig[] ddnsConfig;
};

///< FTP设置 FTP settings
///< 命令ID: NET_SDK_CONFIG_NET_FTPSERVER
public struct NET_SDK_FtpServerConfig
{
    char bEnable;							//< 服务器使能  Server enable   
    NET_SDK_RemoteServerConfig Server;								//< FTP服务器 FTP server
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_PATH_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[] cRemoteDir;						//< 远程目录 Remote directory
    int iMaxFileLen;						//< 文件最大长度 Maximum file length
};

///< NTP设置 NTP settings
///< 命令: NET_SDK_CONFIG_NET_NTP
public struct NET_SDK_NetNTPConfig
{
    char Enable;								//< 是否开启 Whether to open
    NET_SDK_RemoteServerConfig Server;								//< PPPOE服务器 PPPOE server
    int UpdatePeriod;						//< 更新周期 Update Cycle	
    int TimeZone;							//< 时区 Time zone
};

///< DAS设置 DAS settings
///< 命令: NET_SDK_CONFIG_NET_DAS
public struct NET_SDK_DASInfo
{
    int Enable;											//< 是否开启 Whether to open
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] ServerAddr;			//< 服务器地址	server address	
    int Port;											//< 端口 port
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] UserName;			//< 用户名 
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[]			Passwd;				//< 密码
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] DevID;				//< 设备ID Device ID
};

public const int  SDK_NET_MAX_EMAIL_TITLE_LEN=64;

public const int  SDK_NET_MAX_EMAIL_RECIEVERS=5;

public const int  SDK_NET_EMAIL_ADDR_LEN=32;

///< EMAIL设置 EMAIL settings
///< 命令ID: NET_SDK_CONFIG_NET_EMAIL
public struct NET_SDK_NetEmailConfig
{
    char Enable;								//< 是否开启 Whether to open
    NET_SDK_RemoteServerConfig Server;								//< smtp 服务器地址使用字符串形式填充, 可以填ip,也可以填域名 The smtp server address is filled in string form, you can fill in ip, you can also fill in the domain name.
char						bUseSSL;							//< SSL
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_EMAIL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
char[] SendAddr;							//< 发送地址 sending address
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_EMAIL_RECIEVERS*SDK_NET_EMAIL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
char[] Recievers;//< 接收人地址 Recipient address
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_EMAIL_TITLE_LEN, ArraySubType = UnmanagedType.I1)]
char[] Title;						//< 邮件主题 Email Subject
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_N_MIN_TSECT, ArraySubType = UnmanagedType.I1)]
NET_SDK_TIMESECTION[] Schedule;				//< email有效时间 Email effective time
};

///< ARSP(主动注册服务器)设置 ARSP (Active Registration Server) settings
public struct NET_SDK_NetARSPConfig 
{
    char bEnable;							//< 是否开启 Whether to open
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sARSPKey;//< DNS类型名称 DNS type name
    int iInterval;							//< 保活间隔时间 Keep-alive interval
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sURL;	//< 本机域名 Native domain
    NET_SDK_RemoteServerConfig Server;								//< DDNS服务器 DDNS server
    int nHttpPort;													//< 服务器HTTP端口 Server HTTP port
};

///< ARSP(主动注册服务器)设置 ARSP (Active Registration Server) settings
///< 命令ID: NET_SDK_CONFIG_NET_ARSP
public struct NET_SDK_NetARSPConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_ARSP_TYPE, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetARSPConfig[]		vNetARSPConfigAll;
};

///< 解码器地址设置 Decoder address setting
public struct NET_SDK_NetDecoderConfig
{
    char Enable;													//< 是否开启 Whether to open
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] UserName;						//< DDNS类型名称, 目前有: JUFENG DDNS type name, currently available: JUFENG
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] PassWord;						//< 主机名 CPU name
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] Address;						//< 地址 address
int Protocol;													//< 协议 protocol
int Port;														//< 解码器连接端口 Decoder connection port
int Channel;													//< 解码器连接通道号 Decoder connection channel number
int Interval;													//< 轮巡的间隔时间(s) Round trip interval (s)
};

///< 所有通道的解码器地址设置 Decoder address setting for all channels
///< 命令ID: NET_SDK_CONFIG_NET_DECODER
public struct NET_SDK_NetDecoderConfigAll_V1
{	
//NET_SDK_NetDecoderConfig vNetDecoderConfig[SDK_NET_MAX_DECORDR_CH];
    char Enable; //自动添加使能  Automatic add enable
    int nforcesearch; //手动搜索	 Manual search
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
    char[] reserve; 
};


///< 3G拨号设置 3G dialing settings
///< 命令ID: NET_SDK_CONFIG_NET_3G
public struct NET_SDK_Net3GConfig
{
    char bEnable;													//< 无线模块使能标志 Wireless module enable flag
    int iNetType;													//< 无线网络类型 Wireless network type
//char strLocation[32];
//char strISP[32];
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sAPN;							//< 接入点名称 Access point name
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] sDialNum;						//< 拨号号码 dial number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] sUserName;						//< 拨号用户名 Dial-up username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] sPassword;						//< 拨号密码 Dial-up password
NET_SDK_CONFIG_IPAddress addr;									//< 拨号后获得的IP地址 IP address obtained after dialing
};

public struct NET_SDK_Net3GConfigV2
{
    char bEnable;													//< 无线模块使能标志 Wireless module enable flag
    int iNetType;													//< 无线网络类型 Wireless network type
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
    char[] strLocation;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
    char[] strISP;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sAPN;							//< 接入点名称 Access point name
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sDialNum;						//< 拨号号码 dial number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] sUserName;						//< 拨号用户名 Dial-up username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] sPassword;						//< 拨号密码 Dial-up password
NET_SDK_CONFIG_IPAddress addr;									//< 拨号后获得的IP地址 IP address obtained after dialing
};
///< 手机监控设置 Phone monitoring settings
///< 命令ID: NET_SDK_CONFIG_NET_MOBILE
public struct NET_SDK_NetMoblieConfig
{
char bEnable;													//< 是否开启
NET_SDK_RemoteServerConfig Server;								//< 服务器
};

///< RTSP设置 RTSP settings
///< 命令ID: NET_SDK_CONFIG_NET_RTSP
public struct NET_SDK_NetRTSPConfig
{
    char bServer;													//< 是否是服务器模式 Is it a server mode?
    char bClient;													//< 是否是客户端模式 Is it a client mode?
    NET_SDK_RemoteServerConfig Server;								//< 服务器模式配置 Server mode configuration
    NET_SDK_RemoteServerConfig Client;								//< 客户端模式配置 Client mode configuration
};

///< UPNP设置 UPNP settings
///< 命令ID: NET_SDK_CONFIG_NET_UPNP
public struct NET_SDK_NetUPNPConfig
{
    char bEnable;													//< 使能标志 Enable flag
char bState;													//< 状态, 1: OK 0: NOK
int iHTTPPort;													//< HTTP连接映射后的端口 HTTP connection mapped port
int iMediaPort;													//< 媒体连接映射后的端口 Media connection mapped port
int iMobliePort;												//< 手机监控映射后的端口 The phone monitors the mapped port
};

///< WIFI设置 WIFI settings
///< 命令ID: NET_SDK_CONFIG_NET_WIFI
public struct NET_SDK_NetWifiConfig
{
char						bEnable;							//< 使能
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =36, ArraySubType = UnmanagedType.I1)]
char[]						sSSID;							//< SSID Number
int nChannel;							//< 通道号 Channel number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]						sNetType;						//< Infra, Adhoc
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]						sEncrypType;					//< NONE, WEP, TKIP, AES
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]						sAuth;							//< OPEN, SHARED, WEPAUTO, WPAPSK, WPA2PSK, WPANONE, WPA, WPA2
int							nKeyType;							//< 0:Hex 1:ASCII
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_IW_ENCODING_TOKEN_MAX, ArraySubType = UnmanagedType.I1)]
char[]						sKeys;
NET_SDK_CONFIG_IPAddress	HostIP;								//< host ip
NET_SDK_CONFIG_IPAddress	Submask;							//< netmask
NET_SDK_CONFIG_IPAddress	Gateway;							//< gateway
};

///< 厦门威思通平台设置
///< 命令ID: NET_SDK_CONFIG_NET_XMWST
public struct NET_SDK_NetXMWSTConfig
{
int	bEnable;										//< 使能
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =24, ArraySubType = UnmanagedType.I1)]
char[] acDeviceID;									//< DVR设备ID号 DVR device ID number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[] acServerName;								//< 服务器域名 Server domain name
int iServerPort;									//< 服务器侦听端口  Server listening port
uint iStreamType;									//< 码流类型:按位表示，0--主码流，1--辅码流Code stream type: bitwise representation, 0--primary stream, 1--aux stream
};

///< 大拿科技云平台
///< 命令ID: NET_SDK_CONFIG_NET_DANALE
public struct NET_SDK_NetDanaleConfig
{
int	bEnable;										//< 使能
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =40, ArraySubType = UnmanagedType.I1)]
char[]			szDevID;									//< 设备ID
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]			szServer;									//< 服务器地址
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =44, ArraySubType = UnmanagedType.I1)]
char[]			szReserve;									//< 保留字
};

///< 浪涛科技云平台
///< 命令ID: NET_SDK_CONFIG_NET_LT
public struct NET_SDK_NetLTConfig
{
int	Enable;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =24, ArraySubType = UnmanagedType.I1)]
char[]			UID;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]			Server;
int				Port;
};

public struct NET_SDK_NetLTConfig_T1
{
int	Enable;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =24, ArraySubType = UnmanagedType.I1)]
char[]			UID;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]			Server;
int				Port;
int				nStatus;
};

public struct NET_SDK_NetTUTKConfig
{
int Enable;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =24, ArraySubType = UnmanagedType.I1)]
char[] TUID;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =36, ArraySubType = UnmanagedType.I1)]
char[] Reserve;
int	nStatus;

};



public struct NET_SDK_UMEYE_T1
{
int Enable;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =24, ArraySubType = UnmanagedType.I1)]
char[]		 UMID;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]		 Server;
int			 Port;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =36, ArraySubType = UnmanagedType.I1)]
char[]		 Reserve;
int			 nStatus;
};


///< 自动升级系统设置 Automatically upgrade system settings
///< 命令ID: NET_SDK_CONFIG_NET_AUTOUPGRADE
public struct NET_SDK_NetAutoUpgradeConfig
{
int	Enable;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]			ServerAddr;
int				Port;
int				Count;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]			UserName;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]			Password;
};

public enum NET_SDK_RSSI_SINGNAL
{
NET_SDK_RSSI_NO_SIGNAL,											//< -90db
NET_SDK_RSSI_VERY_LOW,											//< -81db
NET_SDK_RSSI_LOW,												//< -71db
NET_SDK_RSSI_GOOD,												//< -67db
NET_SDK_RSSI_VERY_GOOD,											//< -57db
NET_SDK_RSSI_EXCELLENT											//< -57db
};

public struct NET_SDK_NetWifiDevice
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =36, ArraySubType = UnmanagedType.I1)]
char[]		sSSID;											//< SSID Number
int			nRSSI;												//< SEE SDK_RSSI_SINGNAL
int nChannel;											//< 通道号 Channel number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]		sNetType;										//< Infra, Adhoc
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]		sEncrypType;									//< NONE, WEP, TKIP, AES
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =32, ArraySubType = UnmanagedType.I1)]
char[]		sAuth;											//< OPEN, SHARED, WEPAUTO, WPAPSK, WPA2PSK, WPANONE, WPA, WPA2
};

///< WIFI网络服务 WIFI network service
///< 命令ID: NET_SDK_CONFIG_NET_WIFI_AP_LIST
public struct NET_SDK_NetWifiDeviceAll
{
int						nDevNumber;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_AP_NUMBER, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetWifiDevice[]	vNetWifiDeviceAll;
};

///< 报警中心设置 Alarm center setting
public struct NET_SDK_NetAlarmCenterConfig
{
    char bEnable;								//< 是否开启 Whether to open
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sAlarmServerKey;	//< 报警中心协议类型名称, Alarm Center Protocol Type Name
NET_SDK_RemoteServerConfig Server;							//< 报警中心服务器 Alarm center server
char bAlarm;									//< 是否是报警 Is it an alarm?
char bLog;									//< 是否是日志 Is it a log
};

public struct NET_SDK_NetAlarmServerConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_ALARMSERVER_TYPE, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetAlarmCenterConfig[] vAlarmServerConfigAll;
};

///< 报警中心消息类型 Alarm center message type
public enum NET_SDK_AlarmCenterMsgType
{
    NET_SDK_ALARMCENTER_ALARM,										//< 告警消息 Alarm message
    NET_SDK_ALARMCENTER_LOG,										//< 日志消息 Log message
};

///< 报警中心状态 Alarm center status
public enum NET_SDK_AlarmCenterStatus
{
    NET_SDK_AC_START,												//< 开始 Start
    NET_SDK_AC_STOP,												//< 停止 stop
};

///< 告警中心消息内容 Alarm Center Message Content
public struct NET_SDK_NetAlarmCenterMsg
{
    NET_SDK_CONFIG_IPAddress HostIP;								//< 设备IP Device IP
    int nChannel;							//< 通道 aisle
    int nType;								//< 类型 见AlarmCenterMsgType Type See AlarmCenterMsgType
    int nStatus;							//< 状态 见AlarmCenterStatus Status See AlarmCenterStatus
    NET_SDK_SYSTEM_TIME Time;								//< 发生时间 Time of occurrence
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_INFO_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sEvent;		//< 事件 event
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_INFO_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sSerialID;		//< 设备序列号 devise serial number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst =SDK_NET_MAX_INFO_LEN, ArraySubType = UnmanagedType.I1)]
    char[] sDescrip;		//< 描述 description
};

///< 编码信息   Coded information
public struct NET_SDK_EncodeInfo
{
    char bEnable;							//< 使能项 Enable item
    int iStreamType;						//< 码流类型，capture_channel_t tream type, capture_channel_t
    char bHaveAudio;							//< 是否支持音频 Whether to support audio
    uint uiCompression;						//< capture_comp_t的掩码 Capture_comp_t mask
    uint uiResolution;						//< capture_size_t的掩码 Capture_size_t mask
};

///< 编码能力   Coding ability
///< 命令ID: NET_SDK_CONFIG_ABILTY_ENCODE
public struct NET_SDK_CONFIG_EncodeAbility
{
    uint iMaxEncodePower;								//< 支持的最大编码能力 Maximum encoding capability supported
    int iChannelMaxSetSync;								//< 每个通道分辨率是否需要同步 0-不同步, 1 -同步Whether each channel resolution needs to be synchronized 0-out of sync, 1 - sync
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
    uint[] nMaxPowerPerChannel;		//< 每个通道支持的最高编码能力 Maximum encoding capability supported by each channel
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
uint[] ImageSizePerChannel;		//< 每个通道支持的图像分辨率 Image resolution supported by each channel
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
uint[] ExImageSizePerChannel;		//< 每个通道支持的辅码流图像分辨率 Secondary stream image resolution supported by each channel
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_CAPTURE_CHANNEL_t.NET_SDK_CHL_FUNCTION_NUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_EncodeInfo[] vEncodeInfo;			//< 编码信息,暂时最大就4中码流 Encoded information, temporarily up to 4 streams
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_CAPTURE_CHANNEL_t.NET_SDK_CHL_FUNCTION_NUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_EncodeInfo[] vCombEncInfo;			//< 组合编码信息,暂时最大就4中码流 Combine coded information, temporarily up to 4 streams
int iMaxBps;										//< 最高码流Kbps Highest code stream Kbps
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_CHANNUM * (int)NET_SDK_CAPTURE_CHANNEL_t.NET_SDK_CHL_FUNCTION_NUM, ArraySubType = UnmanagedType.I1)]
uint[] ExImageSizePerChannelEx;	//< 每个通道支持的辅码流图像分辨率 Secondary stream image resolution supported by each channel
};

///< 串口协议 Serial protocol
public enum NET_SDK_CommProtocol
{
NET_SDK_CONSOLE = 0,
NET_SDK_KEYBOARD,
NET_SDK_COM_TYPES,
};
///< 串口协议 Serial protocol
///< 命令ID: NET_SDK_COMFIG_ABILITY_COMMPRO
public struct NET_SDK_COMMFUNC
{
    int nProNum;							//< 协议个数 Number of agreements
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=100*32, ArraySubType = UnmanagedType.I1)]
    char[] vCommProtocol;				//< 协议内容, 每个协议最多由32个字符组成 Protocol content, each protocol consists of up to 32 characters
};

///< 云台协议 PTZ Agreement
///< 命令ID NET_SDK_CONFIG_ABILITY_PTZPRO -- PTZ设备  NET_SDK_CONFIG_ABILITY_RS485 -- RS485设备
public struct NET_SDK_PTZPROTOCOLFUNC
{
    int nProNum;							//< 协议个数 Number of agreements
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=100*32, ArraySubType = UnmanagedType.I1)]
    char[] vPTZProtocol; 				//每个协议最多由32个字符组成 Each protocol consists of up to 32 characters
};

///<3G协议
// NET_SDK_CONFIG_ABILITY_ISP  当调用改命令字时需要通过当前的location来获取location下的ISP When calling the change command word, you need to obtain the ISP under the location through the current location.
public struct NET_SDK_SingleLocation{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] vLocation;
};

public struct NET_SDK_WirelessLocation
{
    int nProNum;							//<类型个数 Number of types
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64*32, ArraySubType = UnmanagedType.I1)]
    char[] vLocation;							//<类型描述 Type description
};

public struct NET_SDK_MobileISPInfo
{
    int iNetType;			///< 无线网络类型 Wireless network type
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
    char[] szAPN;			///< 接入点名称 Access point name
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] szDialNum;		///< 拨号号码 dial number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] szUserName;	///< 拨号用户名 Dial-up username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] szPassword;	///< 拨号密码 Dial-up password
};

public struct NET_SDK_ISP
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] vISP;
NET_SDK_MobileISPInfo ispInfo;
};

public struct NET_SDK_WirelessISP
{
int						  nProNum;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
NET_SDK_ISP[]				  vISP;
};
///< 区域遮挡能力集 Area occlusion capability set
///< 命令ID: NET_SDK_CONFIG_ABILITY_BLIND_FUNC
public struct NET_SDK_BlindDetectFunction
{
    int iBlindConverNum;					//< 区域遮挡块数 Number of area occlusion blocks
};

///< 动检区域能力集 Dynamic inspection area capability set
///< 命令ID: NET_SDK_CONFIG_ABILITY_MOTION_FUNC
public struct NET_SDK_MotionDetectFunction
{
    int iGridRow;							//< 网格行数 Number of grid rows
    int iGridColumn;						//< 网格列数 Number of grid columns
};

///< 支持的DDNS类型 Supported DDNS types
///< 命令ID: NET_SDK_CONFIG_ABILITY_DDNS_SERVER
public struct NET_SDK_DDNSServiceFunction
{
    int nTypeNum;							//< 类型 Types of
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_DDNS_TYPE*64, ArraySubType = UnmanagedType.I1)]
    char[] vDDNSType;//< 类型描述 Type description
};

///< 支持语言 Support language
///< 命令ID: NET_SDK_CONFIG_ABILITY_LANG
public struct NET_SDK_MultiLangFunction
{
    int nLangNum;							//< 支持语音的数目	 Number of voices supported
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=128*64, ArraySubType = UnmanagedType.I1)]
    char[] vLanguageName;				//< 支持的语言 Supported language
};

///< 支持的视频制式 Supported video formats
///< 命令ID: NET_SDK_CONFIG_ABILITY_VSTD
public struct NET_SDK_MultiVstd
{
    int nVstdNum;							//< 制式数目 Number of systems
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=3*64, ArraySubType = UnmanagedType.I1)]
    char[] vVstdName;					//< 制式描述, 每种3个字符描述 System description, each 3 character description
};

///< 编码功能 Coding function
public enum NET_SDK_EncodeFunctionTypes
{
    NET_SDK_ENCODE_FUNCTION_TYPE_DOUBLE_STREAM,						//< 双码流功能 Dual stream function
    NET_SDK_ENCODE_FUNCTION_TYPE_COMBINE_STREAM,					//< 组合编码功能 Combined coding function
    NET_SDK_ENCODE_FUNCTION_TYPE_SNAP_STREAM,						//< 抓图功能 Capture function
    NET_SDK_ENCODE_FUNCTION_TYPE_WATER_MARK,						//< Watermark function
    NET_SDK_ENCODE_FUNCTION_TYPE_NR,
};

///< 串口类型 Serial port type
public enum NET_SDK_CommTypes
{
    NET_SDK_COMM_TYPES_RS485,										//< 485串口 485 serial port
    NET_SDK_COMM_TYPES_RS232,										//< 232串口 232 serial port
    NET_SDK_COMM_TYPES_NR
};

///< 输入法类型 Input method type
public enum NET_SDK_InputMethod
{
    NET_SDK_NO_SUPPORT_CHINESE,										//< 不支持中文输入 Chinese input is not supported
    NET_SDK_NO_SUPPORT_NR
};

///< 提示类型 Prompt type
public enum NET_SDK_TipShow
{
    NET_SDK_NO_BEEP_TIP_SHOW,										//< 蜂鸣提示 Beep prompt
    NET_SDK_NO_FTP_TIP_SHOW,										//< FTP 提示    FTP prompt
    NET_SDK_NO_EMAIL_TIP_SHOW,										//< EMAIL提示 EMAIL prompt
    NET_SDK_NO_TIP_SHOW_NR
};

///< 车载功能 Car function
public enum NET_SDK_MobileDVR
{
NET_SDK_MOBILEDVR_STATUS_EXCHANGE,
NET_SDK_MOBILEDVR_DELAY_SET,
NET_SDK_MOBILEDVR_CARPLATE_SET,
NET_SDK_MOBILEDVR_GPS_TIMING,
NET_SDK_MOBILEDVR_NR
};
public const int NET_SDK_OTHER_NR=4;
///< 其他功能  other features
public enum NET_SDK_OtherFunction
{
    NET_SDK_OTHER_DOWNLOADPAUSE,									//< 录像下载暂停功能 Video download pause function
    NET_SDK_OTHER_USB_SUPPORT_RECORD,								//< USB支持录像功能 USB support recording function
    NET_SDK_OTHER_SD_SUPPORT_RECORD,								//< SD支持录像功能 SD supports video recording function
    NET_SDK_OTHER_ONVIF_CLIENT_SUPPORT,								//< 支持子码流回放 Support substream playback
    NET_SDK_OTHER_SUPPORT_IPV6,										//< 支持IPV6 Support IPV6
};


///< 报警功能 Alarm function
public enum NET_SDK_AlarmFucntionTypes
{
    NET_SDK_ALARM_FUNCTION_TYPE_MOTION_DETECT,						//< 动态检测 Dynamic detection
    NET_SDK_ALARM_FUNCTION_TYPE_BLIND_DETECT,						//< 视屏遮挡 Video occlusion
    NET_SDK_ALARM_FUNCTION_TYPE_LOSS_DETECT,						//< 视屏丢失 Video loss
    NET_SDK_ALARM_FUNCTION_TYPE_LOCAL_ALARM,						//< 本地报警 Local alarm
    NET_SDK_ALARM_FUNCTION_TYPE_NET_ALARM,							//< 网络报警 Network alarm
    NET_SDK_ALARM_FUNCTION_TYPE_IP_CONFLICT,						//< IP地址冲突 IP address conflict
    NET_SDK_ALARM_FUNCTION_TYPE_NET_ABORT,							//< 网络异常 network anomaly
    NET_SDK_ALARM_FUNCTION_TYPE_STORAGE_NOTEXIST,					//< 存储设备不存在 Storage device does not exist
    NET_SDK_ALARM_FUNCTION_TYPE_STORAGE_LOWSPACE,					//< 存储设备容量不足 Insufficient storage device capacity
    NET_SDK_ALARM_FUNCTION_TYPE_STORAGE_FAILURE,					//< 存储设备访问失败 Storage device access failed
    NET_SDK_ALARM_FUNCTION_TYPE_VIEDO_ANALYZE,						//< 视频分析 Video analysis
    NET_SDK_ALARM_FUNCTION_TYPE_NR
};

/// 信号源 signal source
public enum NET_SDK_SCANMODE{
SCAN_DISABLE=0,
SCAN_AUTO,
SCAN_TVI,
SCAN_HDA,
SCAN_HDC,
SCAN_MANUAL,
SCAN_TEST
};
/// 网络服务功能 Network service function
public enum NET_SDK_ServerSubTypes
{
NET_SDK_SERVER_SUBTYPES_DANAV2,		///大拿云版本二
NET_SDK_SERVER_SUBTYPES_YLTX,		///云领天下
NET_SDK_SERVER_SUBTYPES_ANNIDDNS,   ///ANNI DDNS
NET_SDK_SERVER_SUBTYPES_TUTK,		/// TUTK 
NET_SERVER_SUBTYPES_UMEYE,			/// TS云
NET_SERVER_SUBTYPES_WJADAS,			/// WJA DAS
NET_SDK_SERVER_TYPES_DROPBOX,				///DROP
	
NET_SERVER_TYPES_SCANMODE,			///信号切换
NET_SERVER_TYPES_8021X,				///8021X
NET_SDK_SERVER_TYPES_GB28181,		//GB28181
NET_SDK_SERVER_SUBTYPES_NR = 96,
};
///< 网络服务功能 Network service function
public enum NET_SDK_NetServerTypes
{
    NET_SDK_SERVER_TYPES_IPFILTER,									//< 白黑名单 White list
    NET_SDK_SERVER_TYPES_DHCP,										//< DHCP功能 DHCP function
    NET_SDK_SERVER_TYPES_DDNS,										//< DDNS功能 DDNS function
    NET_SDK_SERVER_TYPES_EMAIL,										//< Email功能 Email function
    NET_SDK_SERVER_TYPES_MULTICAST,									//< 多播功能 Multicast function
    NET_SDK_SERVER_TYPES_NTP,										//< NTP功能 NTP function
    NET_SDK_SERVER_TYPES_PPPOE,										//< PPPOE功能 PPPOE function
    NET_SDK_SERVER_TYPES_DNS,										//< DNS功能 DNS function
    NET_SDK_SERVER_TYPES_ARSP,										//< 主动注册服务 Active registration service
    NET_SDK_SERVER_TYPES_3G,            							//< 3G拨号 3G dialing
    NET_SDK_SERVER_TYPES_MOBILE,        							//< 手机监控  Phone monitoring
NET_SDK_SERVER_TYPES_UPNP,										//< UPNP
NET_SDK_SERVER_TYPES_FTP,										//< FTP
NET_SDK_SERVER_TYPES_WIFI,          							//<WIFI
NET_SDK_SERVER_TYPES_ALARM_CENTER,  							//< 告警中心 Alarm center
NET_SDK_SERVER_TYPES_RTSP = 19,									//< RTSP
NET_SDK_SERVER_TYPES_SHORT_MSG,									//< 发送报警短信 Send an alarm message
NET_SDK_SERVER_TYPES_MULTIMEDIA_MSG,							//< 发送带截图的彩信 Send a multimedia message with a screenshot
NET_SDK_SERVER_TYPES_DAS,										//< DAS
NET_SDK_SERVER_TYPES_LOCALSDK_PLATFORM,							//< 网络平台信息设置 Network platform information setting
NET_SDK_SERVER_AUTO_UPGRADE_TS,									//< 自动升级系统 Automatic upgrade system
NET_SDK_SERVER_TYPES_NAT,										//< NAT穿透，MTU配置 NAT penetration, MTU configuration
NET_SDK_SERVER_TYPES_VPN,										//< VPN配置 VPN configuration
NET_SDK_SERVER_TYPES_XMWST_TS,									//< 厦门威思通、大拿科技云
NET_SDK_SERVER_TYPES_LTP2P_TS,									//< 浪涛P2P
NET_SDK_SERVER_TYPES_MASK_TS,								//< 
	
NET_SDK_SERVER_TYPES_NR = 32,									//< 注意: 30 31不要再用了
};

///< 预览功能 Preview function
public enum NET_SDK_PreviewTypes
{
    NET_SDK_PREVIEW_TYPES_TOUR,										//< 轮巡 Round tour
    NET_SDK_PREVIEW_TYPES_TALK,										//< GUI界面配置 GUI interface configuration
    NET_SDK_PREVIEW_TYPES_NR
};

///< 支持的系统功能 Supported system features
///< 命令ID: NET_SDK_CONFIG_ABILITY_SYSFUNC
public struct NET_SDK_SystemFunction
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_EncodeFunctionTypes.NET_SDK_ENCODE_FUNCTION_TYPE_NR, ArraySubType = UnmanagedType.I1)]
int[] vEncodeFunction;	//< 编码功能EncodeFunctionTypes
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_AlarmFucntionTypes.NET_SDK_ALARM_FUNCTION_TYPE_NR, ArraySubType = UnmanagedType.I1)]
int[] vAlarmFunction;	//< 报警功能AlarmFucntionTypes
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_NetServerTypes.NET_SDK_SERVER_TYPES_NR, ArraySubType = UnmanagedType.I1)]
int[] vNetServerFunction;		//< 网络服务功能NetServerTypes
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_PreviewTypes.NET_SDK_PREVIEW_TYPES_NR, ArraySubType = UnmanagedType.I1)]
int[] vPreviewFunction;		//< 预览功能PreviewTypes
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_CommTypes.NET_SDK_COMM_TYPES_NR, ArraySubType = UnmanagedType.I1)]
int[] vCommFunction;				//< 串口类型CommTypes
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_InputMethod.NET_SDK_NO_SUPPORT_NR, ArraySubType = UnmanagedType.I1)]
int[] vInputMethodFunction;		//< 输入法类型InputMethod
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_TipShow.NET_SDK_NO_TIP_SHOW_NR, ArraySubType = UnmanagedType.I1)]
int[] vTipShowFunction;			//< 标签显示TipShow
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_MobileDVR.NET_SDK_MOBILEDVR_NR, ArraySubType = UnmanagedType.I1)]
int[] vMobileDVRFunction;			//< 车载功能MobileCar
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_SDK_OTHER_NR, ArraySubType = UnmanagedType.I1)]
int[] vOtherFunction;					//< 其他功能OtherFunction
};

///< 串口属性设置 Serial port property settings
public struct NET_SDK_COMMATTRI
{
    int iDataBits;									//< 数据位取值为5,6,7,8  Supported system features
    int iStopBits;									//< 停止位 Stop bit
    int iParity;									//< 校验位 Check Digit
    int iBaudRate;									//< 实际波特率 Actual baud rate
};

///< 串口配置 Serial port configuration
///< 命令ID: NET_SDK_CONFIG_COMM
public struct NET_SDK_CONFIG_COMM_X
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]				iProtocolName;							//< 串口协议:“Console” 
int iPortNo;									//< 端口号 The port number
NET_SDK_COMMATTRI aCommAttri;									//< 串口属性  Serial port attribute
};

///< 串口配置 Serial port configuration
///< 命令ID: NET_SDK_CONFIG_COMM
public struct NET_SDK_CommConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_CommProtocol.NET_SDK_COM_TYPES, ArraySubType = UnmanagedType.I1)]
NET_SDK_CONFIG_COMM_X[] vCommConfig;
};

///< 云台设置 PTZ setting
///< 命令ID NET_SDK_CONFIG_PTZ -- PTZ设备 NET_SDK_CONFIG_RS485 -- RS485设备
public struct NET_SDK_STR_CONFIG_PTZ
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_PTZ_PROTOCOL_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[] sProtocolName;	//< 协议名称 	 Agreement name
    int ideviceNo;										//< 云台设备地址编号 	 PTZ device address number
    int iNumberInMatrixs;								//< 在矩阵中的统一编号	 Uniform number in the matrix
    int iPortNo;										//< 串口端口号	[1, 4] 	Serial port number [1, 4]
    NET_SDK_COMMATTRI dstComm;										//< 串口属性 	Serial port attribute
};




///< 所有通道云台协议
///< 命令ID NET_SDK_CONFIG_PTZ -- PTZ设备 NET_SDK_CONFIG_RS485 -- RS485设备
///< 注意: RS485设备任何通道都只取通道0的值,
///< All channel PTZ protocols
///< Command ID NET_SDK_CONFIG_PTZ -- PTZ device NET_SDK_CONFIG_RS485 -- RS485 device
///< Note: Any channel of the RS485 device only takes the value of channel 0.
public struct NET_SDK_STR_PTZCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_STR_CONFIG_PTZ[] ptzAll;
};

///< 时间段格式 Time period format
public struct NET_SDK_CONFIG_WORKSHEET
{	
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_N_WEEKS*SDK_NET_N_TSECT, ArraySubType = UnmanagedType.I1)]
    NET_SDK_TIMESECTION[] tsSchedule;//< 时间段 period
};

///< 录像模式种类 Video mode type
public enum NET_SDK_RecordModeTypes
{
    NET_SDK_RECORD_MODE_CLOSED,										//< 关闭录像 Close the video
    NET_SDK_RECORD_MODE_MANUAL,										//< 手动录像 Manual recording
    NET_SDK_RECORD_MODE_CONFIG,										//< 按配置录像 Record by configuration
    NET_SDK_RECORD_MODE_NR,		
};

///< 录像设置 Recording settings
///< 命令ID: NET_SDK_CONFIG_RECORD
public struct NET_SDK_RECORDCONFIG
{
    int iPreRecord;							//< 预录时间，为零时表示关闭	Pre-recorded time, zero means off
    char bRedundancy;						//< 冗余开关 Redundant switch
    //char						bSnapShot;							//< 快照开关	 Snapshot switch
    int iPacketLength;						//< 录像打包长度（分钟）[1, 255] Video packing length (minutes) [1, 255]
    int iRecordMode;						//< 录像模式，0 关闭，1 禁止 2 配置 Recording mode, 0 off, 1 disabled 2 Configuration 
    NET_SDK_CONFIG_WORKSHEET wcWorkSheet;						//< 录像时间段	 Recording time period
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_N_WEEKS*SDK_NET_N_TSECT, ArraySubType = UnmanagedType.I1)]
    uint[] typeMask;		//< 录像类型掩码 Recording type mask
};

///< 录像设置结构体 Video setting structure
///< 命令ID: NET_SDK_CONFIG_RECORD
public struct NET_SDK_RECORDCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM + SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_RECORDCONFIG[] vRecordConfigAll;
};

///< 图片设置 Picture setting
///< 命令ID: NET_SDK_CONFIG_SNAP_STORAGE
public struct NET_SDK_SnapshotConfig
{
    int iPreSnap;							//< 预抓图片数 Pre-fetched pictures
    char bRedundancy;						//< 冗余开关 Redundant switch
    int iSnapMode;							//< 录像模式，见RecordModeTypes Video mode, see RecordModeTypes
    NET_SDK_CONFIG_WORKSHEET wcWorkSheet;						//< 录像时间段 Recording time period
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_N_WEEKS*SDK_NET_N_TSECT, ArraySubType = UnmanagedType.I1)]
    uint[] typeMask;		//< 录像类型掩码，见public enum RecordTypes Video type mask, see public enum RecordTypes
};

///< 全通道图片设置 Full channel picture settings
///< 命令ID: NET_SDK_CONFIG_SNAP_STORAGE
public struct NET_SDK_SnapshotConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_SnapshotConfig[] vSnapshotConfigAll;
};

///< 报警相关结构体 Alarm related structure
///< 云台联动结构 PTZ linkage structure
public struct NET_SDK_PtzLinkConfig
{
    int iType;								//< 联动的类型  Type of linkage
    int iValue;								//< 联动的类型对应的值 The value corresponding to the type of linkage
};

///< 事件 event
public struct NET_SDK_EventHandler
{
    uint dwRecord;							//< 录象掩码  Video mask
    uint iRecordLatch;						//< 录像延时：10～300 sec  	 Video delay: 10 ~ 300 sec
    uint dwTour;								//< 轮巡掩码 	 Round robin mask
    uint dwSnapShot;							//< 抓图掩码 Capture mask
    uint dwAlarmOut;							//< 报警输出通道掩码 Alarm output channel mask
    uint dwMatrix;							//< 矩阵掩码 Matrix mask
    int iEventLatch;						//< 联动开始延时时间，s为单位 Linkage start delay time, s is the unit
    int iAOLatch;							//< 报警输出延时：10～300 sec  Alarm output delay: 10 ~ 300 sec
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_PtzLinkConfig[] PtzLink;		//< 云台联动项 PTZ linkage item
    NET_SDK_CONFIG_WORKSHEET schedule;							//< 录像时间段 Recording time period
    char bRecordEn;							//< 录像使能  Like enable
    char bTourEn;							//< 轮巡使能 Round patrol
    char bSnapEn;							//< 抓图使能 Capture map enable	
    char bAlarmOutEn;						//< 报警使能 Alarm enable
    char bPtzEn;								//< 云台联动使能 PTZ linkage enable
    char bTip;								//< 屏幕提示使能 	Screen prompt enable
    char bMail;								//< 发送邮件 send email	
    char bMessage;							//< 发送消息到报警中心 	Send a message to the alarm center
    char bBeep;								//< 蜂鸣 	Buzzer
    char bVoice;								//< 语音提示 	Voice prompts	
    char bFTP;								//< 启动FTP传输 Start FTP transfer
    char bMatrixEn;							//< 矩阵使能 Matrix enable
    char bLog;								//< 日志使能，目前只有在WTN动态检测中使用 Log enable, currently only used in WTN dynamic detection
    char bMessagetoNet;						//< 消息上传给网络使能 Message upload to network enable
    char bShowInfo;							//< 是否在GUI上和编码里显示报警信息 Whether to display alarm information on the GUI and in the code
    uint dwShowInfoMask;						//< 要联动显示报警信息的通道掩码 Channel mask to be linked to display alarm information
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
    char[] pAlarmInfo;						//< 要显示的报警信息 Alarm information to display
    char bShortMsg;							//< 发送短信 send messages
    char bMultimediaMsg;						//< 发送彩信 Send MMS
};

///< 动态检测设置 Dynamic detection settings
///< 命令ID: NET_SDK_CONFIG_MOTION
public struct NET_SDK_MOTIONCONFIG
{
    char bEnable;							//< 动态检测开启  Dynamic detection on
    int iLevel;								//< 灵敏度 Sensitivity
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MD_REGION_ROW, ArraySubType = UnmanagedType.I1)]
    uint[] mRegion;		//< 区域，每一行使用一个二进制串 	Area, each line uses a binary string
    NET_SDK_EventHandler hEvent;								//< 动态检测联动 Dynamic detection linkage
};

///< 全通道动态检测配置 Full channel dynamic detection configuration
///< 命令ID: NET_SDK_CONFIG_MOTION
public struct NET_SDK_MOTIONCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_MOTIONCONFIG[]		vMotionDetectAll;
};

///< 遮挡检测配置 Occlusion detection configuration
///< 命令ID: NET_SDK_CONFIG_SHELTER
public struct NET_SDK_BLINDDETECTCONFIG
{
    char bEnable;							//< 遮挡检测开启 Occlusion detection turned on
    int iLevel;								//< 灵敏度：1～6 Sensitivity: 1~6
    NET_SDK_EventHandler hEvent;								//< 遮挡检测联动 Occlusion detection linkage
};

///< 全通道遮挡检测配置 Full channel occlusion detection configuration
///< 命令ID: NET_SDK_CONFIG_SHELTER
public struct NET_SDK_BLINDDETECTCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_BLINDDETECTCONFIG[]	vBlindDetectAll;
};

///< 视频丢失事件结构 Video loss event structure
///< 命令ID: NET_SDK_CONFIG_VIDEO_LOSS
public struct NET_SDK_VIDEOLOSSCONFIG
{
char						bEnable;							//< 使能
NET_SDK_EventHandler hEvent;								//< 处理参数 Processing parameter
};

///< 所有通道的基本时间结构 Basic time structure of all channels
///< 命令ID: NET_SDK_CONFIG_VIDEO_LOSS
public struct NET_SDK_VIDEOLOSSCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_VIDEOLOSSCONFIG[]		vGenericEventConfig;
};

///< 报警输入配置 Alarm input configuration
///< 命令ID: NET_SDK_CONFIG_ALARM_IN
public struct NET_SDK_ALARM_INPUTCONFIG
{
    char bEnable;							//< 报警输入开关 Alarm input switch
    int iSensorType;						//< 传感器类型常开 or 常闭 Sensor type normally open or normally closed
    NET_SDK_EventHandler hEvent;								//< 报警联动 Alarm linkage
};

///< 所有通道的报警输入配置 Alarm input configuration for all channels
///< 命令ID: NET_SDK_CONFIG_ALARM_IN
public struct NET_SDK_ALARM_INPUTCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_ALARM_INPUTCONFIG[]	vAlarmConfigAll;
};

///< 网路报警 Network alarm
///< 命令ID: NET_SDK_CONFIG_NET_ALARM
public struct NET_SDK_NETALARMCONFIG
{
char						bEnable;							//< 使能
NET_SDK_EventHandler hEvent;								//< 处理参数 Processing parameter
};

///< 所有通道的网路报警结构 Network alarm structure for all channels
///< 命令ID: NET_SDK_CONFIG_NET_ALARM
public struct NET_SDK_NETALARMCONFIG_ALL
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_NETALARMCONFIG[] vNetAlarmConfig;
};

///< 本地报警输出配置 Local alarm output configuration
///< 命令ID: NET_SDK_CONFIG_ALARM_OUT
public struct NET_SDK_AlarmOutConfig
{
    int nAlarmOutType;							//< 报警输出类型: 配置,手动,关闭 larm output type: configuration, manual, off
    int nAlarmOutStatus;						//< 报警状态: 0:打开 1;闭合 Alarm status: 0: open 1; closed
};

///< 所有通道的报警输出配置 Alarm output configuration for all channels
///< 命令ID: NET_SDK_CONFIG_ALARM_OUT
public struct NET_SDK_AlarmOutConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_AlarmOutConfig[]	vAlarmOutConfigAll;
};

///< 串口能力集 Serial port capability set
///< 命令ID: NET_SDK_CONFIG_ABILITY_SERIALNO
public struct NET_SDK_AbilitySerialNo
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USERNAME_LENGTH, ArraySubType = UnmanagedType.I1)]
char[]					serialNo;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USERNAME_LENGTH, ArraySubType = UnmanagedType.I1)]
char[]					productType;
};

///< 驱动器信息结构 Drive information structure
public struct NET_SDK_DriverInformation 
{
    int iDriverType;							//< 驱动器类型 Drive type
    char bIsCurrent;								//< 是否为当前工作盘 Is it the current work disk?
    uint uiTotalSpace;							//< 总容量，MB为单位 Total capacity, MB is the unit
    uint uiRemainSpace;							//< 剩余容量，MB为单位 Remaining capacity, MB is the unit
    int iStatus;								//< 错误标志，文件系统初始化时被设置 Error flag, set when file system is initialized
    int iLogicSerialNo;							//< 逻辑序号 Logical sequence number
    NET_SDK_SYSTEM_TIME tmStartTimeNew;							//< 新录像时间段的开始时间 Start time of the new recording time period
    NET_SDK_SYSTEM_TIME tmEndTimeNew;							//< 新录像时间段的结束时间 End time of the new recording period
    NET_SDK_SYSTEM_TIME tmStartTimeOld;							//< 老录像时间段的开始时间 The start time of the old recording time period
    NET_SDK_SYSTEM_TIME tmEndTimeOld;							//< 老录像时间段的结束时间 End time of the old recording time period
};


public const int NET_SDK_MAX_DRIVER_PER_DISK = 2;							//< 每个磁盘最多的分区数 Maximum number of partitions per disk
public const int NET_SDK_MAX_DISK_PER_MACHINE = 8;							//< 最多支持8块硬盘 Supports up to 8 hard drives


///< 硬盘管理 Hard disk management
public struct NET_SDK_STORAGEDISK
{
    int iPhysicalNo;								//< 序号 Serial number
    int iPartNumber;								//< 分区数 Number of partitions
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_SDK_MAX_DRIVER_PER_DISK, ArraySubType = UnmanagedType.I1)]
NET_SDK_DriverInformation[] diPartitions;
};

///< 全部硬盘的信息列表, 最多8块硬盘 List of all hard drives, up to 8 hard drives
///< 命令ID: NET_SDK_CONFIG_DISK_INFO
public struct NET_SDK_StorageDeviceInformationAll
{
    int iDiskNumber;												//< 硬盘数目 Number of hard disks
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_SDK_MAX_DISK_PER_MACHINE, ArraySubType = UnmanagedType.I1)]
NET_SDK_STORAGEDISK[] vStorageDeviceInfoAll;
int iMaxDiskNumber;												//< 设备支持的最大的硬盘数 The maximum number of hard disks supported by the device
};

/// 存储设备控制类型 Storage device control type
public enum NET_SDK_StorageDeviceControlTypes
{
    NET_SDK_STORAGE_DEVICE_CONTROL_SETTYPE,							//< 设置类型 Setting type
    NET_SDK_STORAGE_DEVICE_CONTROL_RECOVER,							//< 恢复错误 Recovery error
    NET_SDK_STORAGE_DEVICE_CONTROL_PARTITIONS,						//< 分区操作 Partition operation
    NET_SDK_STORAGE_DEVICE_CONTROL_CLEAR,							//< 清除操作 Clear operation
    NET_SDK_STORAGE_DEVICE_CONTROL_NR,
};

///< 清除磁盘数据类型 Clear disk data type
public enum NET_SDK_StorageDeviceClearTypes
{
    NET_SDK_STORAGE_DEVICE_CLEAR_DATA,								//< 清除录像数据 Clear video data
    NET_SDK_STORAGE_DEVICE_CLEAR_PARTITIONS,						//< 清除分区 Clear partition
    NET_SDK_STORAGE_DEVICE_CLEAR_NR,
};

///< 驱动器类型 Drive type
public enum NET_SDK_FileSystemDriverTypes
{
    NET_SDK_DRIVER_READ_WRITE = 0,								//< 读写驱动器 Read and write drive
    NET_SDK_DRIVER_READ_ONLY = 1,								//< 只读驱动器 Read only drive
    NET_SDK_DRIVER_EVENTS = 2,								//< 事件驱动器 Event driver
    NET_SDK_DRIVER_REDUNDANT = 3,								//< 冗余驱动器 Redundant drive
    NET_SDK_DRIVER_SNAPSHOT = 4,								//< 快照驱动器 Snapshot drive
    NET_SDK_DRIVER_TYPE_NR = 5,								//< 驱动器类型个数 Number of drive types
    NET_SDK_DRIVER_UNUSED = 0xff,								//< 没有使用的驱动器结构 Unused drive structure
};

///< 存储设备控制 Storage device control
///< 命令ID: NET_SDK_CONFIG_DISK_MANAGER
public struct NET_SDK_StorageDeviceControl
{
int							iAction;							//< 见public enum NET_SDK_StorageDeviceControlTypes
int iSerialNo;							//< 磁盘序列号 Disk serial number
int iPartNo;							//< 分区号 Partition number
int							iType;								//< public enum NET_SDK_StorageDeviceClearTypes或者NET_SDK_FileSystemDriverTypes
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=2, ArraySubType = UnmanagedType.I1)]
int[] iPartSize;						//< 各个分区的大小 The size of each partition
};

///< 设备信息 Device Information
public struct NET_SDK_DEVICEINFO
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
public char[] sSoftWareVersion;				//< 软件版本信息 Software version information
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
public char[] sHardWareVersion;				//< 硬件版本信息 Hardware version information
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
public char[] sEncryptVersion;				//< 加密版本信息 Encrypted version information
public NET_SDK_SYSTEM_TIME tmBuildTime;						//< 软件创建时间 Software creation time
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
public char[] sSerialNumber;					//< 设备序列号 devise serial number
public int byChanNum;							//< 视频输入通道数 Number of video input channels
public int iVideoOutChannel;					//< 视频输出通道数 Number of video output channels
public int byAlarmInPortNum;					//< 报警输入通道数 Number of alarm input channels
public int byAlarmOutPortNum;					//< 报警输出通道数 Number of alarm output channels
public int iTalkInChannel;						//< 对讲输入通道数 Intercom input channel number
public int iTalkOutChannel;					//< 对讲输出通道数 Intercom output channel number
public int iDeviceType;						//< 设备类型 Equipment type	 
public int iAudioInChannel;					//< 音频输入通道数 Number of audio input channels
public int iCombineSwitch;						//< 组合编码通道分割模式是否支持切换 Whether the combined code channel split mode supports switching
public int iDigChannel;						//< 数字通道数 Number of digital channels
public uint uiDeviceRunTime;					//< 系统运行时间 System runtime
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
public char[] sHardWare;						//< 设备型号 Equipment model
public int iExternCom;							//< 其他厂家对接，用于指代厂家吧，方便做些特殊处理#endif Other manufacturers docking, used to refer to the manufacturer, it is convenient to do some special treatment 
public int nPreViewChannel;					//< 多通道的预览通道数 Multi-channel preview channel number
}

///< 自动维护设置 Automatic maintenance settings
public struct NET_SDK_AutoMaintainConfig
{
    int iAutoRebootDay;						//< 自动重启设置日期 Automatically restart setting date
    int iAutoRebootHour;					//< 重启整点时间	[0, 23]	 Restart the whole time
    int iAutoDeleteFilesDays;				//< 自动删除文件时间[0, 30] Automatic file deletion time
};

///< 默认配置种类 Default configuration type
public enum NET_SDK_DefaultConfigKinds
{
    NET_SDK_DEFAULT_CFG_GENERAL,									//< 普通配置 Normal configuration
    NET_SDK_DEFAULT_CFG_ENCODE,										//< 编码配置 Coding configuration
    NET_SDK_DEFAULT_CFG_RECORD,										//< 录像配置 Video configuration
    NET_SDK_DEFAULT_CFG_NET_SERVICE,								//< 网络服务 Internet service
    NET_SDK_DEFAULT_CFG_NET_COMMON,									//< 通用网络 General network
    NET_SDK_DEFAULT_CFG_ALARM,										//< 报警 Call the police
    NET_SDK_DEFAULT_CFG_PTZCOMM,									//< 云台，串口 PTZ, serial port
    NET_SDK_DEFAULT_CFG_USERMANAGER,								//< 用户管理 User Management
    NET_SDK_DEFAULT_CFG_PREVIEW,									//< 预览配置 Preview configuration
    NET_SDK_CFG_CAMERA_PARAM,										//< 网络摄像头配置 Webcam configuration
    NET_SDK_DEFAULT_CFG_END,
};

///< 恢复的默认配置种类 Restored default configuration type
///< 命令ID: NET_SDK_CONFIG_DEFAULT
public struct NET_SDK_SetDefaultConfigTypes
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_DefaultConfigKinds.NET_SDK_DEFAULT_CFG_END, ArraySubType = UnmanagedType.I1)]
int[]				vSetDefaultKinds;
}; 

public struct NET_SDK_CLIENTINFO
{
    public int nChannel;							//< 通道号 Channel number
    public int nStream;							//< 0: 主码流, 1: 子码流 0: primary stream, 1: substream
    public int nMode;								//< 0: TCP方式,1: UDP方式, 2:多播方式,3: RTP方式, 4: 音视频分开(TCP)0: TCP mode, 1: UDP mode, 2: multicast mode, 3: RTP mode, 4: audio and video separation (TCP)
    public int nComType;							//< 只对组合编码通道有效, 组合编码通道的拼图模式 Only for the combined encoding channel, the combination of the encoding channel puzzle mode
}

///< 按文件查找录像的查找类型 Find the type of search by video file
public enum NET_SDK_File_Type
{
NET_SDK_RECORD_ALL		= 0,									//< 全 ALL
NET_SDK_RECORD_ALARM = 1,									//< 外部报警录像 External alarm recording
NET_SDK_RECORD_DETECT,											//< 视频侦测录像 Video detection video
NET_SDK_RECORD_REGULAR,											//< 普通录像 Ordinary video
NET_SDK_RECORD_MANUAL,											//< 手动录像 Manual recording
NET_SDK_PIC_ALL = 10,									//< 图片, 全 Picture ALL
NET_SDK_PIC_ALARM,												//< 外部报警录像 External alarm
NET_SDK_PIC_DETECT,												//< 视频侦测录像 Video detection
NET_SDK_PIC_REGULAR,											//< 普通录像 Ordinary
NET_SDK_PIC_MANUAL,												//< 手动录像 Manual
NET_SDK_TYPE_NUM
};

///< 按文件查询录像的查询条件 Query conditions for video recording by file
///< 不支持同步 Synchronization is not supported
public struct NET_SDK_FINDINFO
{
    public int nChannelN0;							//< 通道号 Channel number
    public int nFileType;							//< 文件类型, 见SDK_File_Type file type
    public int nStream;						//< 码流类型 Code stream type
    public NET_SDK_TIME startTime;							//< 开始时间 Starting time
    public NET_SDK_TIME endTime;							//< 结束时间 End Time
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
    public char[] szCard;							//< 卡号 card number
}

///< 录像文件返回结构体 Video file return structure
public struct NET_SDK_FILE_DATA
{
    public int ch;									//< 通道号 Channel number
    public int size;								//< 文件大小 File size
    public int nstream;							//< 码流类型 Code stream type
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=108, ArraySubType = UnmanagedType.I1)]
    public char[] sFileName;						//< 文件名 file name
public NET_SDK_SYSTEM_TIME stBeginTime;						//< 文件开始时间 File start time
public NET_SDK_SYSTEM_TIME stEndTime;							//< 文件结束时间 File end time
}

///< 回放动作 Playback action
public enum NET_SDK_PlayBackAction
{
    NET_SDK_PLAY_BACK_PAUSE,										//< 暂停回放 Pause playback
    NET_SDK_PLAY_BACK_CONTINUE,										//< 继续回放 Continue playback
    NET_SDK_PLAY_BACK_SEEK,											//< 回放定位, 时间s为单位 Playback positioning, time s is the unit
    NET_SDK_PLAY_BACK_FAST,											//< 加速回放 Accelerated playback
    NET_SDK_PLAY_BACK_SLOW,											//< 减速回放 Slow down playback
    NET_SDK_PLAY_BACK_SEEK_PERCENT,									//< 回放定位百分比 Playback targeting percentage
    NET_SDK_PLAY_FORWARD,											//< 前向回放 Forward playback
    NET_SDK_PLAY_BACKWARD                                           //< 倒放 Upside down
};

///< 按时间段查询录像的查询条件 Query the query conditions of the video by time period
public struct NET_SDK_SearchByTime
{
    int nHighChannel;						//< 33~64录像通道号掩码 33~64 recording channel number mask
    int nLowChannel;						//< 1~32录像通道号掩码 1~32 recording channel number mask
    int nFileType;							//< 文件类型, 见SDK_File_Type File type, see SDK_File_Type
    int nStream;							//< 码流类型 Code stream type
    NET_SDK_SYSTEM_TIME stBeginTime;						//< 查询开始时间 Query start time
    NET_SDK_SYSTEM_TIME stEndTime;							//< 查询结束时间 Query end time
    int iSync;								//< 查询的通道是否需要同步 Whether the channel being queried needs to be synchronized
};

///< 每个通道的按时间记录的录像信息 Time-recorded video information for each channel
public struct NET_SDK_SearchByTimeInfo
{
    int iChannel;							//< 录像通道号 Recording channel number
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=720, ArraySubType = UnmanagedType.I1)]
    byte[] cRecordBitMap;					//< 录像记录用720个字节的5760位来表示一天中的1440分钟 The video recording uses 5,760 bits of 720 bytes to represent 1440 minutes of the day.
                                                            //< 0000:无录像 0001:F_COMMON 0002:F_ALERT 0003:F_DYNAMIC 0004:F_CARD 0005:F_HAND
};

///< 按时间搜索录像的结果 Search results by time
public struct NET_SDK_SearchByTimeResult
{
    int nInfoNum;							//< 通道的录像记录信息个数 Number of video recording information of the channel
int							nStream;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_SearchByTimeInfo[] ByTimeInfo;	//< 通道的录像记录信息 Channel recording information
};

///< 报警信息 Alarm information
public struct NET_SDK_AlarmInfo
{
    public int nChannel;													//< 产生报警的通道号 The channel number that generated the alarm
    public int iEvent;														//< 报警事件 Alarm event
    public int iStatus;													//< 状态 status
    public NET_SDK_SYSTEM_TIME SysTime;									//< 时间 time
}

///< 日志查询条件 Log query condition
public struct NET_SDK_LogSearchCondition
{
    int nType;														//< 日志类型 Log type
    int iLogPosition;												//< 从上次查询的结束时的日志指针 Log pointer from the end of the last query
    NET_SDK_SYSTEM_TIME stBeginTime;								//< 查询日志开始时间 Query log start time
    NET_SDK_SYSTEM_TIME stEndTime;									//< 查询日志结束时间 Query log end time
};

///< 1条日志信息 1 log information
public struct NET_SDK_LogItem
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=24,ArraySubType = UnmanagedType.I1)]
    char[] sType;													//< 日志类型 Log type
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
    char[] sUser;													//< 日志用户 Log user
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=68, ArraySubType = UnmanagedType.I1)]
    char[] sData;													//< 日志数据 Log data
    NET_SDK_SYSTEM_TIME stLogTime;									//< 日志时间 Log time
    int iLogPosition;												//< 从上次查询的结束时的日志指针 Log pointer from the end of the last query
};

///< 日志返回信息 Log return information
public struct NET_SDK_LogList
{
    int iNumLog;													//< 日志条数 Number of logs
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_RETURNED_LOGLIST, ArraySubType = UnmanagedType.I1)]
    NET_SDK_LogItem[] Logs;				//< 日志列表, 1次查询最多返回128条 Log list, up to 128 entries in 1 query
};

///< 语音对讲格式 Voice intercom format
public struct NET_SDK_AudioInFormatConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_AudioEncodeTypes.NET_SDK_AUDIO_ENCODE_TYPES_NR, ArraySubType = UnmanagedType.I1)]
NET_SDK_AudioInFormatConfig[] vAudioInFormatConfig;
};

///< 告警状态 Alarm status
public struct NET_SDK_DVR_ALARMSTATE
{
    int iVideoMotion;												//< 移动侦测状态,用掩码表示通道号,bit0代表通道一,以此类推 1: 有告警 0: 无告警 Motion detection status, with mask indicating channel number, bit0 for channel one, and so on 1: alarm 0: no alarm
    int iVideoBlind;												//< 视频遮挡状态,用掩码表示通道号,bit0代表通道一,以此类推 1: 有告警 0: 无告警 Video occlusion status, with mask indicating channel number, bit0 for channel one, and so on 1: alarm 0: no alarm
    int iVideoLoss;													//< 视频丢失状态,用掩码表示通道号,bit0代表通道一,以此类推 1: 有告警 0: 无告警 The video is lost, the mask is used to indicate the channel number, bit0 is the channel 1, and so on. 1: There is an alarm 0: No alarm
    int iAlarmIn;													//< 告警输入状态,用掩码表示通道号,bit0代表通道一,以此类推 1: 有告警 0: 无告警 Alarm input status, mask indicates the channel number, bit0 represents channel 1, and so on 1: Alarm 0: No alarm
    int iAlarmOut;													//< 告警输出状态,用掩码表示通道号,bit0代表通道一,以此类推 1: 有告警 0: 无告警 Alarm output status, with mask indicating channel number, bit0 for channel one, and so on 1: alarm 0: no alarm
};

///< 通道状态 Channel status
public struct NET_SDK_DVR_CHANNELSTATE
{
    char bRecord;												//< 是否正在录像 Whether you are recording
    int iBitrate;												//< 当前码率 Current code rate
};

///< DVR工作状态 DVR working status
///< 命令ID: NET_SDK_WORK_STATE
public struct NET_SDK_DVR_WORKSTATE
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_DVR_CHANNELSTATE[] vChnState;		//< 通道状态 Channel status
    NET_SDK_DVR_ALARMSTATE vAlarmState;								//< 报警状态 Alarm status
};


///< 按键值, 不能随便更改 Key value, can't be changed casually
public enum NET_SDK_KeyBoardValue
{
NET_SDK_KEY_0, 
NET_SDK_KEY_1,
NET_SDK_KEY_2, 
NET_SDK_KEY_3, 
NET_SDK_KEY_4, 
NET_SDK_KEY_5, 
NET_SDK_KEY_6,
NET_SDK_KEY_7, 
NET_SDK_KEY_8, 
NET_SDK_KEY_9,
NET_SDK_KEY_10,
NET_SDK_KEY_11, 
NET_SDK_KEY_12,
NET_SDK_KEY_13,
NET_SDK_KEY_14,
NET_SDK_KEY_15,
NET_SDK_KEY_16,
NET_SDK_KEY_10PLUS,
NET_SDK_KEY_UP = 20,     										//< 上或者云台向上
NET_SDK_KEY_DOWN,        										//< 下或者云台向下
NET_SDK_KEY_LEFT,        										//< 左或者云台向左
NET_SDK_KEY_RIGHT,       										//< 右或者云台向右
NET_SDK_KEY_SHIFT,												//< Shift建
NET_SDK_KEY_PGUP,        										//< 上一页  Previous page
NET_SDK_KEY_PGDN,        										//< 下一页 Next page
NET_SDK_KEY_RET,         										//< 确认 confirm
NET_SDK_KEY_ESC,         										//< 取消或退出
NET_SDK_KEY_FUNC,        										//< 切换输入法 Switch input method
NET_SDK_KEY_PLAY,        										//< 播放/暂停
NET_SDK_KEY_BACK,        										//< 倒放
NET_SDK_KEY_STOP,        										//< 停止
NET_SDK_KEY_FAST,        										//< 快放
NET_SDK_KEY_SLOW,        										//< 慢放
NET_SDK_KEY_NEXT,        										//< 下一个文件 Next file
NET_SDK_KEY_PREV,        										//< 上一个文件 Previous file
NET_SDK_KEY_REC = 40,    										//< 录像设置 Recording settings
NET_SDK_KEY_SEARCH,      										//< 录像查询 Video query
NET_SDK_KEY_INFO,        										//< 系统信息 system message
NET_SDK_KEY_ALARM,       										//< 告警输出 Alarm output Remote address setting
NET_SDK_KEY_ADDR,        										//< 遥控器地址设置 Remote address setting
NET_SDK_KEY_BACKUP,      										//< 备份 Backup
NET_SDK_KEY_SPLIT,       										//< 画面分割模式切换，每按一次切换到下一个风格模式 Screen split mode switch, each press to switch to the next style mode
NET_SDK_KEY_SPLIT1,      										//< 单画面
NET_SDK_KEY_SPLIT4,      										//< 四画面
NET_SDK_KEY_SPLIT8,      										//< 八画面
NET_SDK_KEY_SPLIT9,      										//< 九画面
NET_SDK_KEY_SPLIT16,     										//< 16画面
NET_SDK_KEY_SHUT,        										//< 关机 Shut down
NET_SDK_KEY_MENU,        										//< 菜单 menu
NET_SDK_KEY_PTZ = 60,    										//< 进入云台控制模式 Enter the PTZ control mode
NET_SDK_KEY_TELE,        										//< 变倍减 Zoom reduction
NET_SDK_KEY_WIDE,        										//< 变倍加 Variable double
NET_SDK_KEY_IRIS_SMALL,  										//< 光圈增 Aperture increase
NET_SDK_KEY_IRIS_LARGE,  										//< 光圈减 Aperture reduction
NET_SDK_KEY_FOCUS_NEAR,  										//< 聚焦远 Focus far
NET_SDK_KEY_FOCUS_FAR,   										//< 聚焦近 Focus near
NET_SDK_KEY_BRUSH,       										//< 雨刷 Wiper
NET_SDK_KEY_LIGHT,       										//< 灯光 light
NET_SDK_KEY_SPRESET,     										//< 设置预置点 Set preset point
NET_SDK_KEY_GPRESET,     										//< 转至预置点 Go to preset point
NET_SDK_KEY_DPRESET,     										//< 清除预置点  Clear presets
NET_SDK_KEY_PATTERN,     										//< 模式 mode 
NET_SDK_KEY_AUTOSCAN,    										//< 自动扫描开始结束 Automatic scanning begins and ends
NET_SDK_KEY_AUTOTOUR,    										//< 自动巡航 Automatic cruise
NET_SDK_KEY_AUTOPAN,     										//< 线扫开始/结束 Line sweep start/end
};

/// 按键状态Button status
public enum NET_SDK_KeyBoardState
{
    NET_SDK_KEYBOARD_KEYDOWN,										//< 按键按下 Button press
    NET_SDK_KEYBOARD_KEYUP,											//< 按键松开 Release button
};

///< 按键值 Button value
public struct NET_SDK_KeyBoardData
{
    int iValue;														//< 键值 Key value
    int iState;														//< 按键状态 Release button
};

public enum NET_SDK_MouseMsg
{
NET_SDK_MOUSEMOVE,
NET_SDK_LBUTTONDOWN,
NET_SDK_LBUTTONUP,
NET_SDK_LBUTTONDBLCLK,
NET_SDK_RBUTTONDOWN,
NET_SDK_RBUTTONUP,
};

public struct NET_SDK_MouseData
{
int   msg;
short key;
short x;
short y;
short z;
};

///< 升级信息获取 Upgrade information acquisition
///< 命令ID: NET_SDK_CONFIG_UPGRADEINFO
public struct NET_SDK_UpgradeInfo
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
char[]			szSerial;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]			szHardware;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]			strVersion;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]			szVendor;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]			strProduct;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=2, ArraySubType = UnmanagedType.I1)]
uint[]	uiLogoArea;
};

///< 网络报警 Network alarm
public struct NET_SDK_AlarmNet
{
    int iEvent;														//< 目前未使用 Not currently used
    int iState;														//< 每bit表示一个通道,bit0:第一通道,0-无报警 1-有报警, 依次类推 Each bit represents one channel, bit0: first channel, 0-no alarm 1-with alarm, and so on
};

public enum NET_SDK_SERIAL_TYPE
{
NET_RS232 = 0,													//< 232串口
NET_RS485 = 1,													//< 485串口
};


public enum NET_MEDIA_PACK_TYPE
{
    NET_FILE_HEAD = 0,	    								//< 文件头 File header
    NET_VIDEO_I_FRAME = 1,										//< 视频I帧 Video I frame
    NET_VIDEO_B_FRAME = 2,										//< 视频B帧 Video B frame
    NET_VIDEO_P_FRAME = 3,										//< 视频P帧 Video P frame
    NET_VIDEO_BP_FRAME = 4,										//< 视频BP帧 Video BP frame
    NET_VIDEO_BBP_FRAME = 5,										//< 视频B帧B帧P帧 Video B frame B frame P frame
    NET_VIDEO_J_FRAME = 6,										//< 图片帧 Picture frame
    NET_AUDIO_PACKET = 10,										//< 音频包 Audio package
};

public struct NET_SDK_PACKET_INFO_EX
{
    public int nPacketType;	//< 包类型,见NET_MEDIA_PACK_TYPE Package type, see NET_MEDIA_PACK_TYPE
    public IntPtr pPacketBuffer;	//数据的起始地址，包含我们自己的私有头		 The starting address of the data, including our own private header				
    public int dwPacketSize;	//包大小--包括我们自己的私有头 Package size - including our own private header
    public IntPtr pAVContent;		//音视数据的起始地址，不包含私有头 The starting address of the audiovisual data, does not contain the private header
    public int dwContentSize;  //数据大小，不包含私有头 Data size, no private headers

    // 绝对时标Absolute time scale
public int				nYear;											//< 时标:年		
public int				nMonth;											//< 时标:月
public int				nDay;											//< 时标:日
public int				nHour;											//< 时标:时
public int				nMinute;										//< 时标:分
public int				nSecond;										//< 时标:秒
public uint dwTimeStamp;									//< 相对时标低位，单位为毫秒 Relative time scale low, in milliseconds
public uint dwTimeStampHigh;								//< 相对时标高位，单位为毫秒 Relative time scale high, in milliseconds
public uint dwFrameNum;										//< 帧序号 Frame number
public uint dwFrameRate;									//< 帧率 Frame rate
public ushort uWidth;											//< 图像宽度 mage width
public ushort uHeight;										//< 图像高度 Image height
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=6, ArraySubType = UnmanagedType.I1)]
public uint[] Reserved;									//< 保留字段 reserved text
}

///< OEM设置 OEM settings
public struct NET_SDK_OEMInfo
{
int  nOEMID;						//< OEM ID
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] sCompanyName;					//< 公司名 Company Name
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] sTel;							//< 电话 phone
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] sAddr;						//< 地址 address
};

///< 曝光配置 Exposure configuration
public struct NET_SDK_ExposureParam
{
    int level;								//< 曝光等级 Exposure level
    uint leastTime;							//< 自动曝光时间下限或手动曝光时间，单位微秒 Automatic exposure time lower limit or manual exposure time in microseconds
    uint mostTime;							//< 自动曝光时间上限，单位微秒 Maximum exposure time in microseconds
};

///< 增益配置 Gain configuration
public struct NET_SDK_GainParam
{
    int gain;								//< 自动增益上限(自动增益启用)或固定增益值 Automatic gain upper limit (automatic gain enable) or fixed gain value
    int autoGain;							//< 自动增益是否启用，0:不开启  1:开启 Whether the automatic gain is enabled, 0: not open 1: open
};

///< 网络摄像头参数 Webcam parameters
///< 命令ID: NET_SDK_CAMERAPARAM
public struct NET_SDK_CameraParam
{
    uint whiteBalance;       				//< 白平衡 White balance
    uint dayNightColor;      				//< 日夜模式，取值有彩色、自动切换和黑白 Day and night mode, with color, auto switch and black and white
    uint elecLevel;          				//< 参考电平值 Reference level value
    uint apertureMode;       				//< 自动光圈模式 Auto iris mode
    uint BLCMode;            				//< 背光补偿模式 Backlight compensation mode
    NET_SDK_ExposureParam exposureParam;						//< 曝光配置 Exposure configuration
    NET_SDK_GainParam gainParam;							//< 增益配置 Gain configuration
    uint PictureFlip;						//< 图片上下翻转 Picture flips up and down
    uint PictureMirror;						//< 图片左右翻转 Image flip left and right
    uint RejectFlicker;						//< 日光灯防闪功能 Fluorescent lamp anti-flash function
    uint EsShutter;							//< 电子慢快门功能 Electronic slow shutter function
    int ircut_mode;							//< IR-CUT切换 0 = 红外灯同步切换 1 = 自动切换 IR-CUT switching 0 = infrared light synchronous switching 1 = automatic switching
    int dnc_thr;							//< 日夜转换阈值 Day and night conversion threshold
    int ae_sensitivity;						//< AE灵敏度配置 AE sensitivity configuration
    int Day_nfLevel;						//< noise filter 等级，0-5,0不滤波，1-5 值越大滤波效果越明显 Noise filter level, 0-5, 0 is not filtered, the larger the value of 1-5, the more obvious the filtering effect
    int Night_nfLevel;						//< noise filter 等级，0-5,0不滤波，1-5 值越大滤波效果越明显 Noise filter level, 0-5, 0 is not filtered, the larger the value of 1-5, the more obvious the filtering effect
    int Ircut_swap;							//< ircut 正常序= 0        反序= 1 Ircut normal order = 0 reverse order = 1
};

///< 多个摄像头的参数 Multiple camera parameters
///< 命令ID: NET_SDK_CAMERAPARAM
public struct NET_SDK_CameraParamAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_CameraParam[] vCameraParamAll;
};

public enum NET_SDK_DEVICE_TYPE
{
    NET_SDK_DEVICE_TYPE_DVR,										//< 普通DVR设备 Ordinary DVR device
    NET_SDK_DEVICE_TYPE_NVR,										//< NVR设备 NVR device
    NET_SDK_DEVICE_TYPE_IPC,										//< IPC设备 IPC equipment
    NET_SDK_DEVICE_TYPE_HVR,										//< 混合dvr Mixed dvr
    NET_SDK_DEVICE_TYPE_IVR,										//< 智能dvr Smart dvr
    NET_SDK_DEVICE_TYPE_MVR,										//< 车载dvr Car dvr
    NET_SDK_DEVICE_TYPE_NR
};

///< 解码器地址设置 Decoder address setting
public struct NET_SDK_NetDecorderConfig
{
char	Enable;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SDK_NET_MAX_USERNAME_LENGTH, ArraySubType = UnmanagedType.I1)]//< 是否开启 Whether to open
char[] UserName;					//< 用户名 username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
char[] PassWord;					//< 密码 password
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_FILTERIP_NUM, ArraySubType = UnmanagedType.I1)]
char[]	Address;						//< IP	
int Protocol;												//< 协议 protocol
int Port;													//< 解码器连接端口 Decoder connection port
int Channel;												//< 解码器连接通道号 Decoder connection channel number
int Interval;												//< 轮巡的间隔时间(s),0:表示永久 Round trip interval (s), 0: indicates permanent
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USERNAME_LENGTH, ArraySubType = UnmanagedType.I1)]
char[] ConfName;					//< 配置名称 Configuration name
int DevType;												//< 设备类型 Equipment type
int StreamType;												//< 连接的码流类型CaptureChannelTypes Connected stream type CaptureChannelTypes
};


///< 数字通道的配置 Digital channel configuration
///< 命令ID: NET_SDK_NETDECORDER
public struct NET_SDK_NetDigitChnConfig
{
    int Enable;								//< 数字通道是否开启	 Whether the digital channel is turned on	
    int ConnType;							//<	连接类型, 取DecoderConnectType的值 0 单连接 1 多连接 Connection type, take the value of DecoderConnectType 0 Single connection 1 Multiple connection
    int TourIntv;							//<	多连接时轮巡间隔 Multi-connection round robin interval
    uint SingleConnId;						//< 单连接时的连接配置ID, 从1开始，0表示无效 Connection configuration ID for single connection, starting with 1 and 0 is invalid
    int EnCheckTime;						//< 开启对时 Turn on the time
    int ConfNum;							//< 多连接时的数目 Number of multiple connections
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_MULTINET_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_NetDecorderConfig[] vNetDecorderConf; //< 网络设备通道配置表 Network device channel configuration table
};

///< 所有数字通道的配置 Configuration of all digital channels
///< 命令ID: NET_SDK_NETDECORDER
public struct NET_SDK_NetDecorderConfigAll
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetDigitChnConfig[] DigitChnConf;
};

///< 解码器地址设置 Decoder address setting
public struct NET_SDK_NetDecorderConfig_V4
{
    char Enable;													//< 是否开启 Whether to open
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USERNAME_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[] UserName;					//< 用户名 username
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] PassWord;					//< 密码 password
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_URL_ADDRESS_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[]	Address;						//< IP	
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_URL_ADDRESS_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[]	Address2;						//< IP	
    int Protocol;												//< 协议 protocol
    int Port;													//< 解码器连接端口 Decoder connection port
    int Channel;												//< 解码器连接通道号 Decoder connection channel number
    int Interval;												//< 轮巡的间隔时间(s),0:表示永久 Round trip interval (s), 0: indicates permanent
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USERNAME_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[] ConfName;					//< 配置名称 Configuration name
    int DevType;												//< 设备类型 Equipment type
    int StreamType;												//< 连接的码流类型CaptureChannelTypes Connected stream type
};


public struct NET_SDK_NetDigitChnConfig_V4
{
    int Enable;								//< 数字通道是否开启	Whether the digital channel is turned on 	
    int ConnType;							//<	连接类型, 取DecoderConnectType的值 0 单连接 1 多连接 Connection type, take the value of DecoderConnectType 0 Single connection 1 Multiple connection
    int TourIntv;							//<	多连接时轮巡间隔 Multi-connection round robin interval
    uint SingleConnId;						//< 单连接时的连接配置ID, 从1开始，0表示无效 Connection configuration ID for single connection, starting with 1 and 0 is invalid
    int EnCheckTime;						//< 开启对时 Turn on the time
    int ConfNum;							//< 多连接时的数目 Number of multiple connections
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=4, ArraySubType = UnmanagedType.I1)]
    NET_SDK_NetDecorderConfig_V4[] vNetDecorderConf; //< 网络设备通道配置表 Network device channel configuration table
};


public struct NET_SDK_NetDecorderConfigAll_V4
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
NET_SDK_NetDigitChnConfig_V4[] DigitChnConf;
};



///< 通道模式汇总 Channel mode summary
public const int SDK_NET_MAX_HVR_CHNCAP=32;

///< 一种通道模式的信息 Channel mode information
public struct NET_SDK_HVR_CHNCAP 
{
    short nD1Chn;		// 支持的D1路数 Number of supported D1 channels
    short n4MChn;		// 支持的4M路数 Supported 4M channels
    short n960HChn;		// 支持的960H路数 Number of supported 960H channels
    short n6MChn;
    short n720PChn;		// 支持的720P路数 Supported 720P channels
    short n8MChn;		// 支持的8M路数 Supported 8M channels
    short n1080PChn;	// 支持的1080P路数 Supported 1080P channels
    short nH4MChn;		// 支持的4M-N路数 Supported 4M-N channels
    short nCIFChn;		// 支持的CIF通道数 Number of supported CIF channels
    short nResv4;
    short n3MChn;    	// 支持的3M路数 Supported 3M channels
    short nResv3;
    short n960PChn;  	// 支持的960P路数 Supported 960P channels
    short nResv2;
    short n5MChn;    	// 支持的5M路数 Supported 5M channels
    short nResv1;    	// 支持的5M路数 Supported 5M channels
};

///< 设备的通道模式信息 Channel mode information of the device
public struct NET_SDK_CAPTURE_HVRCAP 
{
    NET_SDK_HVR_CHNCAP DigitalCap;								//< 支持的数字通道信息 Supported digital channel information
    NET_SDK_HVR_CHNCAP AnalogCap;								//< 支持的模拟通道信息 Supported analog channel information
    int MaxPlayBackWayChn;						//< 支持的最大回放路数 Maximum number of playback channels supported
};

///< 设备所有的通道模式 All channel modes of the device
public struct NET_SDK_CAPTURE_TOTAL_HVRCAP 
{
    int nHVRCap;								//< 实际支持的模式 Actual supported mode
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_HVR_CHNCAP, ArraySubType = UnmanagedType.I1)]
    NET_SDK_CAPTURE_HVRCAP[] HVRCap;			//< 所有模式的汇总 Summary of all modes
};

///< 通道模式配置 Channel mode configuration
///< 命令ID: NET_SDK_CONFIG_CHANNEL_MODE
public struct NET_SDK_NetDecorderChnModeConfig
{
NET_SDK_CAPTURE_TOTAL_HVRCAP 	HVRTotalCap;
int HVRCurCapMode;					//< 设置的时候值设为小于0是总体设置(增、删), 大于等于32是恢复默认 When set, the value is set to less than 0 is the overall setting (add, delete), greater than or equal to 32 is to restore the default
};


public const int MAX_PROTOCOL_NAME_LEN=16;

public const int MAX_SEARCH_DECORDER_NUM=64;

public enum SearchProtocl
{
    PROTOCOL_Private = 0,										//< 以私有协议搜索 Search by private agreement
    PROTOCOL_Onvif = 1,										//< 以Onvif协议搜索 Search by Onvif protocol
    PROTOCOL_NetIP		= 3,
    PROTOCOL_All = -1										//< 全部协议 All agreements
};


///< 设备(NVR)支持的设备搜索协议 Device Search Protocol supported by Device (NVR)
///< 对应NET_SDK_CONFIG_ABILITY_SEARCHPRO
public struct NET_SDK_SEARCHPROTOCOLFUNC
{
    int nProNum;							//< 协议个数(一般均包括了"NONE", 因此实际协议数目为nProNum - 1) The number of protocols (generally including "NONE", so the actual number of protocols is nProNum - 1)
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32*32, ArraySubType = UnmanagedType.I1)]
char[]						vSearchProtocol; 			//< 每个协议最多由32个字符组成,一般的格式是xxx_0, xxx_1, xxx表示协议名称, _后面的数字表示SearchProtocl,应用层进行解析 Each protocol consists of up to 32 characters. The general format is xxx_0, xxx_1, xxx indicates the protocol name, the number after _ indicates SearchProtocl, and the application layer parses.
    //< note: 一般第一个都是NONE,这个可以不用理会,如果不支持任何搜索协议,也将只有NONE这一个返回 Note: Generally the first one is NONE, this can be ignored, if you do not support any search protocol, only NONE will return
};

///< 设备远程搜索出来的设备信息 Device information remotely searched by the device
public struct NET_SDK_SearchByRemote_Device
{
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
    char[] sDevName;	//< 设备名称 Device name
int nDevType;							//< 设备类型 Equipment type
NET_SDK_CONFIG_IPAddress DevIP;								//< 设备IP Device IP
int nPort;								//< 设备端口 Device port
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_MAC_LEN, ArraySubType = UnmanagedType.I1)]
char[]						sMacAddr;		//< Mac地址
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
char[]						sUserName;	//< 用户登录名
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_USER_LENGTH, ArraySubType = UnmanagedType.I1)]
char[]						sUserPwd;	//< 用户登录密码
int nProtocol;							//< 协议,见SearchProtocl Agreement, see SearchProtocl
};

///< 设备远程搜索出来的全部设备 All devices that the device searches remotely
public struct NET_SDK_SearchByRemote_DeviceAll
{
    int nDevNumber;								//< 搜索结果设备数目 Number of search results
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=MAX_SEARCH_DECORDER_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_SearchByRemote_Device[] vDeviceAll;	//< 搜索出来的设备 Searched device
};

///< 云领天下添加云配置协议
public struct NET_SDK_YLTX_Cloud
{
int		bEnableCloud;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
char[]	szServerPath;
int		nPort;	
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]	szID;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[]	szPassword;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
char[]	szName;	
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
char[]    szReserverse;
};


///< 网络端口配置------------Network port configuration
public struct NET_SDK_NetPortConfig
{
    int nOnvifServerPort;   //ONVIF 端口 port
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=15, ArraySubType = UnmanagedType.I1)]
    int[] nreserved;
};



public struct NET_SDK_AnniPort
{
    int TCPPort;			///< TCP侦听端口 TCP listening port
int MobilePort;
[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
char[] rev;			///< 保留字段 reserved text
};

//智能相关--- Intelligent correlation


public const int NET_IMP_MAX_OSC_NUM=4;
/** 最大边界点数 */
/** Maximum number of boundary points */
public const int NET_IMP_MAX_BOUNDARY_POINT_NUM=8;
public const int NET_IMP_MAX_POINT_NUM=10; 
public const int NET_IMP_NAME_BUF_SIZE=16;
/** URP单绊线最多条数 */
        /*Maximum number of URP single-twist lines*/
public const int NET_IMP_URP_MAX_TRIPWIRE_CNT=8;
/** 坐标点 */
/** Coordinate points */

/** 周界检测模式 */
/** Perimeter detection mode */
public enum URP_PERIMETER_MODE_E
{
    NET_IMP_URP_PMODE_INTRUSION = 0,			/**< 入侵 */ /**< Intrusion */
    NET_IMP_URP_PMODE_ENTER,				/**< 进入 */ /**< Enter */
    NET_IMP_URP_PMODE_EXIT				/**< 离开 */  /**< leave */
} 

public struct NET_SDK_URP_IMP_POINT_S
{
	short s16X;					/**< x */
	short s16Y;					/**< y */
}

/** 线结构 */
/** Line structure */
public struct NET_SDK_URP_LINE_S
{
    NET_SDK_URP_IMP_POINT_S stStartPt;			/**< 线段起点 */ /**< Starting point of line segment */
    NET_SDK_URP_IMP_POINT_S stEndPt;			/**< 线段终点 */ /**< End of line segment */
}
//added by mzhang 2011-11-14 14:00:14
public struct NET_SDK_URP_POLYGON_REGION_S
{
	int s32Valid;
	int s32PointNum;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_IMP_MAX_BOUNDARY_POINT_NUM, ArraySubType = UnmanagedType.I1)]
	NET_SDK_URP_IMP_POINT_S[] astPoint;
} 
public struct NET_SDK_URP_OSC_SPECL_REGIONS_S
{
    int s32Valid; //是否有效 is it effective
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_IMP_MAX_BOUNDARY_POINT_NUM, ArraySubType = UnmanagedType.I1)]
    char[] as8Name; //区域名称 Area name
     NET_SDK_URP_POLYGON_REGION_S stOscRg; //要检测区域定义 To detect the zone definition
     NET_SDK_URP_POLYGON_REGION_S astSubRgA; //检测区域中的无效子区域 Invalid subregion in the detection area
     NET_SDK_URP_POLYGON_REGION_S astSubRgB; //检测区域中的无效子区域 Invalid subregion in the detection area
     NET_SDK_URP_POLYGON_REGION_S astSubRgC; //检测区域中的无效子区域 Invalid subregion in the detection area
} 
public struct NET_SDK_URP_OSC_LMT_PARA_S
{
    int s32TimeMin; //时间约束 Time constraint
    int s32SizeMin; //最小尺寸 smallest size
    int s32SizeMax; //最大尺寸 biggest size
} 

public struct NET_SDK_URP_OSC_RULE_PARA_S
{
    int s32SceneType; //场景类型 Scene type
    int s32CameraType; //相机类型 Camera type
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_IMP_MAX_OSC_NUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_URP_OSC_SPECL_REGIONS_S[] astSpclRgs; //要处理的区域个数 The number of areas to be processed
    NET_SDK_URP_OSC_LMT_PARA_S stOscPara; //一些约束 Some constraints
}


/** URP周界检测边界点 */
/** URP perimeter detection boundary point */
public struct NET_SDK_URP_PERIMETER_LIMIT_BOUNDARY_S
{
    int s32BoundaryPtNum;					/**< 边界点数目 */ /**< number of boundary points */
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_IMP_MAX_BOUNDARY_POINT_NUM, ArraySubType = UnmanagedType.I1)]
	NET_SDK_URP_IMP_POINT_S[]		astBoundaryPts;	/**< 边界点集合 */ /**< 边界点集合 */
}

/** URP周界检测限制参数 */
/** URP perimeter detection limit parameter */
public struct NET_SDK_URP_PERIMETER_LIMIT_PARA_S
{
    int s32MinDist;						/**< 最小像素距离 */ /**< minimum pixel distance */
    int s32MinTime;						/**< 最短时间 */ /**< minimum time */
    int s32DirectionLimit;					/**< 是否做方向限制 */ /**< Whether to make direction restrictions */
    int s32ForbiddenDirection;					/**< 禁止方向角度(单位: 角度) */ /**< Prohibited direction angle (unit: angle) */
    NET_SDK_URP_PERIMETER_LIMIT_BOUNDARY_S stBoundary;			/**< 周界边界区域 */ /**< perimeter boundary area */
}

/** URP周界检测规则参数 */
/** URP perimeter detection rule parameters */
public struct NET_SDK_URP_PERIMETER_RULE_PARA_S
{
    int s32TypeLimit;						/**< 目标类型限制 */ /**< target type limit */
    int s32TypeHuman;						/**< 目标类别：人(限定类型时使用) *//**< Target category: People (used when qualifying types) */
    int s32TypeVehicle;						/**< 目标类别：车 */ /**< Target category: car */
    int s32Mode;						/**< 周界模式 */ /**< perimeter mode */
    NET_SDK_URP_PERIMETER_LIMIT_PARA_S stLimitPara;				/**< 周界限制参数 */ /**< perimeter limit parameter */
} 
public struct NET_SDK_URP_TRIPWIRE_S
{
    int s32Valid;						/**< 是否有效 */ /**< is valid */
    int s32IsDoubleDirection;				/**< 表示该绊线是否为双向绊线(0: 否, 1: 是) */ /**< indicates whether the line is a two-way line (0: no, 1: yes) */
    int s32ForbiddenDirection;				/**< 单绊线禁止方向角度(单位: 度) */ /**< Single eye line prohibited direction angle (unit: degree) */
    NET_SDK_URP_LINE_S stLine;						/**< 单绊线位置 */ /**< Single line position */
}

/** URP单绊线限制参数 */
/** URP single line limit parameter */
public struct NET_SDK_URP_TRIPWIRE_LIMIT_PARA_S
{
    int s32MinDist;						/**< 最小像素距离 */ /**< minimum pixel distance */
    int s32MinTime;						/**< 最短时间 */ /**< minimum time */
}
/** URP单绊线规则参数 */
/** URP single line rule parameters */
public struct NET_SDK_URP_TRIPWIRE_RULE_PARA_S
{
	int s32TypeLimit;						/**< 目标类型限制 */ /*< target type limit */
    int s32TypeHuman;						/**< 目标类别：人(限定类型时使用) */ /**< Target category: People (used when qualifying types) */
    int s32TypeVehicle;						/**< 目标类别：车 */ /**< Target category: car */
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=NET_IMP_URP_MAX_TRIPWIRE_CNT, ArraySubType = UnmanagedType.I1)]
    NET_SDK_URP_TRIPWIRE_S[] astLines;		/**< 单绊线 */ /**< Single line */
     NET_SDK_URP_TRIPWIRE_LIMIT_PARA_S stLimitPara;				/**< 单绊线限制参数 */ /**< Single line limit parameter */
} 

public struct NET_SDK_PEA_RULE_S
{
    int iShowTrack;						/// 是否显示轨迹 Whether to display the track
    int iShowRule;						/// 是否显示规则 Whether to display rules
    int iLevel;						   /// 警戒级别2：低级；1：中级；0: 高级 Alert Level 2: Low Level; 1: Intermediate Level; 0: Advanced
    int iPerimeterEnable;					/// 周界规则使能 Perimeter rule enable
    NET_SDK_URP_PERIMETER_RULE_PARA_S stPerimeterRulePara;	/**< 周界检测 */ /**< perimeter detection */
    int iTripWireEnable;					/// 单绊线规则使能 Single line rule enable
    NET_SDK_URP_TRIPWIRE_RULE_PARA_S stTripwireRulePara;	/**< 单绊线检测 */ /**< Single line detection */
}


public struct NET_SDK_OSC_RULE_S
{
    int iShowTrack;				/// 是否显示轨迹 Whether to display the track
    int iShowRule;						     /// 是否显示规则 Whether to display rules
    int iLevel;						     /// 警戒级别2：低级；1：中级；0: 高级 Alert Level 2: Low Level; 1: Intermediate Level; 0: Advanced
    int iAbandumEnable;		   	/// 物品遗留使能 Item legacy enable
    NET_SDK_URP_OSC_RULE_PARA_S stObjAbandumRulePara; /// 物品遗留参数 Item legacy parameter
    int iStolenEnable;			  	 /// 物品被盗使能 Theft of the item enables
    NET_SDK_URP_OSC_RULE_PARA_S stObjStolenRulePara;   /// 物品被盗参数 Item stolen parameter
    int iNoParkingEnable;		 	  	 /// 非法停车使能 Illegal parking enable
    NET_SDK_URP_OSC_RULE_PARA_S stNoParkingRulePara;   /// 非法停车参数 Illegal parking parameter
} 

public struct NET_SDK_AVD_RULE_S
{
    int iLevel;						     /// 灵敏度档位，1-5档，数值越大越灵敏越易报警 Sensitivity gear position, 1-5 files, the bigger the value, the more sensitive it is, the easier it is to alarm
    int itBrightAbnmlEnable;				///< 亮度异常使能 Abnormal brightness enable
    int iClarityEnable;					///< 清晰度检测使能 Sharpness detection enable
    int iNoiseEnable;					///< 噪声检测使能 Noise detection enable
    int iColorEnable;					///< 偏色检测使能 Color cast detection enabled
    int iFreezeEnable;					///< 画面冻结检测使能 Screen freeze detection enable
    int iNosignalEnable;					///< 信号缺失检测使能 Signal missing detection enable
    int iChangeEnable;					///< 场景变换检测使能 Scene change detection enable
    int iInterfereEnable;					///< 人为干扰检测使能  Human interference detection enable
    int iPtzLoseCtlEnable;					///< PTZ失控检测使能 PTZ out of control detection enabled
}
public struct NET_SDK_CPC_RULE_S
{
	int     s32RulePointNum;        /* CPC2 Rule points Num */
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=10, ArraySubType = UnmanagedType.I1)]
	int[]     s32InOutFlag;       /* CPC2 Rule For In Out Flag */
	uint     u32WalkFlag;            /* The person Walk Direation: 0 is UpDown, 1 is LeftRight*/
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=10, ArraySubType = UnmanagedType.I1)]
	NET_SDK_URP_IMP_POINT_S[]	stRulePoint;	    /* CPC2 Rule points */
	int     s32Sizemin;				/* Minimum Size in pixels */
	int     s32Sizemax;				/* Maximum Size in pixels */
	int     s32Countmax;			/* Maximum targets couted in one frame ?*/
	int     s32Sensitivity;			/* Algorithm Sensitivity ?*/
	uint     u32Flag;				/* Algorithm Flag (reserved)*/
}

//各种算法的规则配置集合 Rule configuration set for various algorithms
public struct NET_SDK_RuleConfig
{
    NET_SDK_PEA_RULE_S stRulePea;   //周界检测与绊线配置 Perimeter detection and squall line configuration
    NET_SDK_OSC_RULE_S stRuleOSC;	//物品盗移、滞留，非法停车配置 Object theft, detention, illegal parking configuration
    NET_SDK_AVD_RULE_S stRuleAVD;	//异常视频信号诊断配置 Abnormal video signal diagnostic configuration
    NET_SDK_CPC_RULE_S stRuleCPC;	//人头计数算法配置 Head counting algorithm configuration
}


//一个通道的智能分析配置 Intelligent analysis configuration for one channel
public struct NET_SDK_AnalyzeConfig
{
    char bEnable;      //是否启用视频分析功能 Whether to enable video analytics
    int moduleType;   //使用的那种算法模块 Algorithm module used
    NET_SDK_EventHandler hEvent;  //联动事件 Linkage event
    NET_SDK_RuleConfig stRuleConfig; //各种算法的规则配置 Rule configuration for various algorithms
}

//智能分析能力 Intelligent analysis capability
public struct NET_SDK_AnalyzeAbility
{
    uint uIntelPEA; //智能PEA支持，位对应通道 Intelligent PEA support, bit corresponding channel
    uint uAlgorithmPEA;//PEA支持的算法类型，例如拌线 The type of algorithm supported by PEA, such as the mix line
    uint uIntelOSC; //智能OSC支持，位对应通道 Intelligent OSC support, bit corresponding channel
    uint uAlgorithmOSC;//OSC支持的算法类型 Algorithm types supported by OSC
    uint uIntelAVD; //智能AVD支持，位对应通道 Intelligent AVD support, bit corresponding channel
    uint uAlgorithmAVD;//AVD支持的算法类型 Type of algorithm supported by AVD
    uint uIntelCPC; //人流量记数支持，位对应通道 Human flow count support, bit corresponding channel
    uint uAlgorithmCPC;//CPC支持的算法类型 Type of algorithm supported by CPC
};


//所有通道的智能分析配置 Intelligent analysis configuration for all channels
public struct NET_SDK_AnalyzeConfigAll
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_ANALYIZE_CHANNEL, ArraySubType = UnmanagedType.I1)]
	NET_SDK_AnalyzeConfig[] vAnalyzeAll;
}


public struct NET_SDK_CPCLink
{
	int NoteTime;
    int ClearHour; //OSD叠加人数清零时间，－1为不清零 OSD stacking number is cleared, -1 is not cleared
	NET_SDK_VIDEO_WIDGET CPCInfo;
};

public struct NET_SDK_AnalyzeLink
{
	NET_SDK_CPCLink CPCLinkConfig;
};

public struct NET_SDK_AnalyzeLinkAll
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_ANALYIZE_CHANNEL, ArraySubType = UnmanagedType.I1)]
	NET_SDK_AnalyzeLink[] vAnalyzeLinkAll;
};

// Anni DDNS配置 Anni DDNS configuration
public struct NET_SDK_ANNI_DDNS
{
    int Enable;	///< 是否开启 Whether to open
    int Online;	///< 是否在线 Whether online
    int AutoMode; ///< 模式: 手动, 自动 Mode: manual, automatic
    int Interval;			///< 保活间隔时间 Keep-alive interval
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] DDNSKey;	///< DDNS类型: E-Video , PPADDNS DDNS type: E-Video, PPADDNS
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
    char[] DomainName;	///< 域名 domain name
    NET_SDK_RemoteServerConfig Server;		///< DDNS服务器 DDNS server
};


// 窗口拖动配置
/// 视频通道配置
// window drag configuration
/// Video channel configuration
public struct NET_SDK_VideoChannel
{
    int iChnType;		///< 通道类型   默认填1 Channel type Default 1
    int iChn;			///< 通道号 Channel number
};

public struct NET_SDK_VideoChannelAll
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
    NET_SDK_VideoChannel[] vVideoChannel;  //窗口对应通道 Window corresponding channel
};

public enum NET_SDK_WindowStyle
{
    /// 只输出一个通道，组合序号对应的就是输出的通道号。Only one channel is output, and the combined serial number corresponds to the channel number of the output.
		split1,	
		split2,	
		split4,	
		split8,
		split9,	
		split16,
		splitPIP,
	
		split6,
		
		split12,
		split25,
		split36,	
		split13,		
		split5,
		split10,
		split20,
		split3,
		splitNR,
};

public struct NET_SDK_SystemLastState
{
    int nLastSpt;   ///< 记录上次手动切换分割模式,设备启动时切换到最后一次分割状态           NET_SDK_WindowStyle Record the last manual switch split mode, switch to the last split state when the device starts
    int nLastSubSpt;	///< 记录上次手动切换分割模式,设备启动时切换到最后一次分割状态       /// 同时输出2*2四个通道，组合序号0输出0-3通道，组合序号1输出4-7通道，依次类推。 Record the last manual switch split mode, switch to the last split state when the device starts /// Output 2*2 four channels at the same time, combination number 0 output 0-3 channel, combination number 1 output 4-7 channel, and so on.
    NET_SDK_TIMESECTION tsWorkHour;			///这个值不要改，直接用get返回后的值，默认是不开启，0-24 Do not change this value, directly use the value returned by get, the default is not open, 0-24
};


// 颜色设置： Color settings:

public enum NET_SDK_COLOR_NUM{
	COL_BRIGHTNESS=0,
	COL_CONTRAST,
	COL_SATURATION,
	COL_HUE,
	COL_VSHARPNESS,
	COL_HSHARPNESS,
	COL_UGAIN,
	COL_VGAIN,
	COL_YFIR_PEAK,
	COL_TFSTRENGTH,
	COL_SFSTRENGTH,
	COL_MAXPARAM
};

//ZHDL 操作文件一些命令 Operation file some commands
public enum ENUM_ZHDLOperations
{
    NET_ZHDL_OPR_PLAYFILE,   //播放或者关闭 Play or close
    NET_ZHDL_OPR_DELFILE,    //删除文件 Delete Files
	NET_ZHDL_OPR_NR,
};

public struct NET_SDK_COLOR_BASE
{
	int color_default;
	int LimitHigh;
	int LimitLow;
};

public struct NET_SDK_VIDEO_CUSTOM_COLOR{
	int VideoChannel;
	int VideoFormat;
	int VideoSySFormat;
	int Videotype;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = (int)NET_SDK_COLOR_NUM.COL_MAXPARAM, ArraySubType = UnmanagedType.I1)]
	NET_SDK_COLOR_BASE[] ColorBase;
};

public struct NET_SDK_ZHDLFileInfo
{
    int action; // 1 播放 0 停止 1 play 0 stop
	int  volume;
	uint fileLen;
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_ZHDL_AUDIO_NAME_LEN, ArraySubType = UnmanagedType.I1)]
	char[] fileName;
};
//上传或播放文件 Upload or play a file
public struct NET_SDK_ZHDLFileInfo_T
{
	NET_SDK_ZHDLFileInfo info;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=256, ArraySubType = UnmanagedType.I1)]
	char[] pathName;
};

//音乐文件 Music file
public struct NET_SDK_ZHDLAudioFileList
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_ZHDL_AUDIO_NUM*SDK_NET_ZHDL_AUDIO_NAME_LEN, ArraySubType = UnmanagedType.I1)]
	char[] strName;
};


public struct NET_SDK_ZHDLAudioConfig
{
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_ZHDL_AUDIO_NAME_LEN, ArraySubType = UnmanagedType.I1)]
    char[] fileName; //播放文件名 Play file name
     uint weeks; 		//播放星期 按位表示 0 星期日 1 星期一... Play weekdays Bitwise representation 0 Sunday 1 Monday...
     NET_SDK_TIMESECTION time;		//配置时间段 Configuration time period
     int volume;		//播放音量 Playback volume
};


public struct NET_SDK_ZHDLAudioConfigAll
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_ZHDL_AUDIO_NUM, ArraySubType = UnmanagedType.I1)]
	NET_SDK_ZHDLAudioConfig[] vAudioCfg;
};

public enum NET_SDK_ZHDLLedModeTypes
{
    NET_ZHDLLED_MODE_CLOSED,	//关闭警灯 Turn off the lights
    NET_ZHDLLED_MODE_AUTO,		//警灯自动模式：光敏联动（夜晚自动点亮） Police light automatic mode: photosensitive linkage (automatically lit at night)
    NET_ZHDLLED_MODE_CONFIG,	//警灯配置模式 Police light configuration mode
	NET_ZHDLLED_MODE_NR,		
};

public struct NET_SDK_ZHDLLedConfig
{
    int iLedMode;			//NET_SDK_ZHDLLedModeTypes,警灯模式 Police light mode
	NET_SDK_CONFIG_WORKSHEET  worksheet;
};

public enum EZ_SDK_IMAGE_SIZE_TYPE
{
	EZ_SDK_IMAGE_SIZE_D1, //704x576
	EZ_SDK_IMAGE_SIZE_D1_NTSC, //704x480
	EZ_SDK_IMAGE_SIZE_H1080P,  //960x1080
	EZ_SDK_IMAGE_SIZE_CIF,  //352x288
	EZ_SDK_IMAGE_SIZE_CIF_NTSC,  //352x240
	EZ_SDK_IMAGE_SIZE_VGA,  //640x480
	EZ_SDK_IMAGE_SIZE_NVGA,  //640x360
	EZ_SDK_IMAGE_SIZE_QVGA,  //320x240
	EZ_SDK_IMAGE_SIZE_SVGA,  //800x600
	EZ_SDK_IMAGE_SIZE_960H,  //960x576
	EZ_SDK_IMAGE_SIZE_960H_NTSC,  //960x480
	EZ_SDK_IMAGE_SIZE_720x480,  //720x480
	EZ_SDK_IMAGE_SIZE_720P,  //1280x720
	EZ_SDK_IMAGE_SIZE_1_3M,  //1280x960
	EZ_SDK_IMAGE_SIZE_SXGA,  //1280x1024
	EZ_SDK_IMAGE_SIZE_1080P,  //1920x1080
    EZ_SDK_IMAGE_SIZE_4M,  //2560x1440  原先是2_5但这个值没什么用，和IPC 修改一致直接改成4M	 Originally 2_5 but this value is useless, and it is directly changed to 4M in accordance with the IPC modification.
	EZ_SDK_IMAGE_SIZE_3M,  //2048x1536
	EZ_SDK_IMAGE_SIZE_5M,  //2592x1944
	EZ_SDK_IMAGE_SIZE_3M_2048x1520,  //2048x1520
	EZ_SDK_IMAGE_SIZE_4M_2592x1520,  //2592x1520
	EZ_SDK_IMAGE_SIZE_720x576,  //720x576
	EZ_SDK_IMAGE_SIZE_3M_2304x1296,  //2304x1296
	EZ_SDK_IMAGE_SIZE_4M_2688x1520,  //2688x1520
	EZ_SDK_IMAGE_SIZE_8M_3840x2160, //4k
	EZ_SDK_IMAGE_SIZE_H4M,  	
	EZ_SDK_IMAGE_SIZE_H3M,
	EZ_SDK_IMAGE_SIZE_NR,
}



public struct NET_SDK_DIGI_ENConfig
{
    uint iCompressionMask;		//	支持的数字通道编码方式掩码 Supported digital channel encoding mode mask
    uint iResolutionMask;		//	分辨率掩码EZ_SDK_IMAGE_SIZE_TYPE Resolution mask EZ_SDK_IMAGE_SIZE_TYPE
    uint iFpsMask;				//	fps掩码  -1就是25，没获取到 Fps mask -1 is 25, not obtained
    int iCompression;			//  压缩模式 	 Compressed mode
    int iResolution;			//  分辨率 参照枚举capture_size_t	 Resolution reference enumeration capture_size_t
    int iBitRateControl;		//  码流控制 参照枚举capture_brc_t Code stream control reference enumeration capture_brc_t
    int iQuality;				//  码流的画质 档次1-6		The quality of the code stream Grade 1-6
    int nFPS;					//  帧率值，NTSC/PAL不区分,负数表示多秒一帧		Frame rate value, NTSC/PAL is not distinguished, negative number means multi-second frame
    int nBitRate;				// 设备只接收实际的码流值而不是下标。The device only receives the actual stream value instead of the subscript.
    int iGOP;					// i帧间隔秒数 i frame interval seconds
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=6, ArraySubType = UnmanagedType.I1)]
	int[]					reserved;				
};


// 数字通道的编码配置 Digital channel coding configuration
public struct  NET_SDK_DIGI_Config
{
	NET_SDK_DIGI_ENConfig	maincfg;
	NET_SDK_DIGI_ENConfig   subcfg;
};
public struct NET_SDK_DIGI_ConfigAll
{
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
	NET_SDK_DIGI_Config[] digiEncode;
};

 public struct NET_SDK_DROPBOX
{
	int Enable;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
	char[] AppKey;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
	char[] AppSecret;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=64, ArraySubType = UnmanagedType.I1)]
	char[] Code;
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=128, ArraySubType = UnmanagedType.I1)]
    char[] Token; ///<注意:该字段不可随意修改!!! Note: This field cannot be modified arbitrarily!!!
    int TokenVailid;///<注意:该字段不可随意修改!!!	Note: This field cannot be modified arbitrarily!!!
    uint Record;	/// 录象掩码 Video mask
    uint SnapShot;	/// 抓图掩码 Capture mask
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=16, ArraySubType = UnmanagedType.I1)]
	char[] Reserve;

};

 public struct NET_SDK_TIMEZONE
 {
	 int iFirstUserTimeZone;		///< 
     int iTimeMin;			///< 分钟 minute
 };
 public enum NET_SDK_NetIPVersion
 {
	 IP_VERSION_4,
	 IP_VERSION_6,
 };

 public struct NET_SDK_NetIPVersionConfig
 {
     short IPVersion; ///< 参照NetIPVersion Reference NetIPVersion
	 short Reserve;
 };

 public struct NET_SDK_NetCommonIPv6Config
 {
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_DDNS_IPSIZE, ArraySubType = UnmanagedType.I1)]
     char[] LinkAddr;		///<链路地址  Link address
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_DDNS_IPSIZE, ArraySubType = UnmanagedType.I1)]
     char[] HostIP;			///< IP地址 IP address
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_DDNS_IPSIZE, ArraySubType = UnmanagedType.I1)]
    char[] Gateway;			///< 默认网管 Default network management
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_DDNS_IPSIZE, ArraySubType = UnmanagedType.I1)]
	 char[] PrimaryDNS;	    ///< DNS
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_DDNS_IPSIZE, ArraySubType = UnmanagedType.I1)]
     char[] SecondaryDNS;	///< 备用DNS	 Alternate DNS
	 int  IPNum;			    
 };

 public struct NET_SDK_CONFIG_8021X
 {
	 int Enable;
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
	 char[] Username;
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=32, ArraySubType = UnmanagedType.I1)]
	 char[] Password;
     int Prototype; //认证方法 EAP-MD5\EAP-PEAP Authentication method EAP-MD5\EAP-PEAP
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=56, ArraySubType = UnmanagedType.I1)]
	 char[] Reserved;
 };

 public struct NET_SDK_CONFIG_GB28181
 {
     int bEnable;				///< 是否启用注册 Whether to enable registration
     int LocalPort;					///< 本地端口 Local port
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
     char[] ServerID;	///< 服务器id Server id
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_PATH_NAME_LEN, ArraySubType = UnmanagedType.I1)]
     char[] ServerDomain;	///< 服务器域 Server domain
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_PATH_NAME_LEN, ArraySubType = UnmanagedType.I1)]
     char[] RegistrarAddr;	///< 注册服务器地址 Registration server address
     int RegistrarPort;				///< 注册服务器端口 Registration server port
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
     char[] Username;	///< 用户名称 user name
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
     char[] AuthID;	///< 验证id Verification id
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_NAME_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
     char[] Password;	///< 验证密码 verify password
     int Expires;						///< 注册有效期 Registration period
     short AliveTime;					///< 保活时间，暂未使用 Keep alive, not used yet
     short HbeatTime;					///< 心跳发送间隔 Heartbeat transmission interval
     short HbeatCounts;					///< 最大心跳超时次数 Maximum heartbeat timeout
     uint RegInterval;					///< 如果注册失败,与上一次注册时间间隔(秒),最少60秒(默认) If the registration fails, the last registration interval (seconds), at least 60 seconds (default)
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=8, ArraySubType = UnmanagedType.I1)]
	 char[] Reserve;
 };

 ///< 设备目录结构，用于28181协议
 ///< 设备目录结构，用于28181协议
 public struct NET_SDK_DEVICE_CATALOG_VIDEOID
 {
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_SIP_ID_LEN, ArraySubType = UnmanagedType.I1)]
	 char[] VideoID;
 };
public struct NET_SDK_DEVICE_CATALOG_ALARMINID
{
    [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_SIP_ID_LEN, ArraySubType = UnmanagedType.I1)]
	char[] AlarmInID;
};

 public struct NET_SDK_DEVICE_CATALOG
 {
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
	 NET_SDK_DEVICE_CATALOG_VIDEOID[]   DevCatalog;
     [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst=SDK_NET_MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
	 NET_SDK_DEVICE_CATALOG_ALARMINID[] AlarmInID;
	 
 };

 public struct NET_SDK_HDDTEST
 {
     int iRet;			//成功，失败 success, failure
     int iMask;			//MASK 标识有几个SATA 口  MASK 标识 有 几个 SATA 口 MASK logo has several SATA ports
 };

/*
 * @func:   NET_SDK_Init
 * @brief:  NetSdk库初始化
 * @parm:   fNetDisConnect cbDisConnect	处理断线的回调函数
 * @parm:   unsigned int dwUser	用户自定义数据
 * @return: NET_SDK_API int :  成功返回 1, 失败返回 0
 */
 /*
* @func: NET_SDK_Init
* @brief: NetSdk library initialization
* @parm: fNetDisConnect cbDisConnect handles the callback function of a broken line
* @parm: unsigned int dwUser user-defined data
* @return: NET_SDK_API int : success returns 1, failure returns 0
*/
 public delegate void fNetDisConnect(int lLoginID, string pchDVRIP, int nDVRPort, IntPtr dwUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
 public static extern int NET_SDK_Init(fNetDisConnect cbDisConnect, IntPtr dwUser);


/*
 * @func:   NET_SDK_Cleanup
 * @brief:  NetSdk库反初始化 NetSdk library deinitialization
 * @return: NET_SDK_API char 
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char  NET_SDK_Cleanup();

/*
 * @func:   NET_SDK_GetLastError
 * @brief:  获取错误信息
 * @return: NET_SDK_API int CALL_METHOD
 */
/*
* @func: NET_SDK_GetLastError
* @brief: Get error message
* @return: NET_SDK_API int CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int  NET_SDK_GetLastError();

/*
 * @func:   NET_SDK_SetConnectTime
 * @brief:  设置连接设备超时时间和尝试次数
 * @parm:   int nWaitTime 单位ms 默认5000ms
 * @parm:   int nTryTimes 次数   默认3次
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_SetConnectTime
* @brief: Set the connection device timeout and number of attempts
* @parm: int nWaitTime unit ms default 5000ms
* @parm: int nTryTimes times 3 times
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char  NET_SDK_SetConnectTime(int nWaitTime, int nTryTimes);

/*
 * @func:   NET_SDK_Login
 * @brief:  登录设备
 * @parm:   char * sDVRIP			设备IP
 * @parm:   unsigned short wDVRPort 设备TCP断开
 * @parm:   char * sUserName		登录用户名
 * @parm:   char * sPassword		登录密码
 * @parm:   LPNET_SDK_DEVICEINFO lpDeviceInfo	登录成功返回的设备信息
 * @parm:   int nType				登录类型 0==web 1 ==升级工具 2 == 搜索工具
 * @parm:   int * error				错误码
 * @return: NET_SDK_API int        成功返回>0 失败返回<=0
 */
/*
* @func: NET_SDK_Login
* @brief: Login device
* @parm: char * sDVRIP device IP
* @parm: unsigned short wDVRPort device TCP disconnected
* @parm: char * sUserName login username
* @parm: char * sPassword login password
* @parm: LPNET_SDK_DEVICEINFO lpDeviceInfo Device information returned successfully by login
* @parm: int nType Login Type 0==web 1 ==Upgrade Tool 2 == Search Tool
* @parm: int * error error code
* @return: NET_SDK_API int success returns >0 failed return <=0
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int  NET_SDK_Login(string sDVRIP, ushort wDVRPort, string sUserName, string sPassword,
							   ref NET_SDK_DEVICEINFO lpDeviceInfo, int nType, ref int error,int nWaitTime,int nTryTimes);

/*
 * @func:   NET_SDK_Logout
 * @brief:  退出登录 sign out
 * @parm:   int lLoginID  NET_SDK_Login的有效返回值 Valid return value
 * @return: NET_SDK_API int 
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_Logout(int lLoginID);

/*
 * @func:   NET_SDK_SetDVRMessCallBack
 * @brief:  设置接收DVR信息回调, 例如报警信息,以ID号区分不同的消息
 * Set to receive DVR information callbacks, such as alarm information, to distinguish different messages by ID number
 * @parm:   fNetMessCallBack cbAlarmcallback
 * @parm:   unsigned int lUser
 * @return: NET_SDK_API char CALL_METHOD
 */
public delegate char fNetMessCallBack(int lLoginID, IntPtr pBuf, uint dwBufLen, IntPtr dwUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SetDVRMessCallBack(fNetMessCallBack cbAlarmcallback, IntPtr lUser);

/*
 * @func:   NET_SDK_SetupAlarmChan
 * @brief:  建立报警上传通道 Establish an alarm upload channel
 * @parm:   int lLoginID
 * @return: NET_SDK_API int CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_SetupAlarmChan(int lLoginID);

/*
 * @func:   NET_SDK_CloseAlarmChan
 * @brief:  关闭报警上传通道 Turn off the alarm upload channel
 * @parm:   int lLoginID
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_CloseAlarmChan(int lLoginID);


/*
 * @func:   NET_SDK_GetDevConfig
 * @brief:  获取远程设备相关配置
 * @parm:   int lLoginID					NET_SDK_Login的有效返回值
 * @parm:   unsigned int dwCommand			配置类型, 见NET_SDK_CONFIG_TYPE
 * @parm:   int nChannelNO					需要获取配置的通道号, -1表示全部通道
 * @parm:   char* lpOutBuffer				缓冲区	 
 * @parm:   unsigned int dwOutBufferSize	缓冲区大小
 * @parm:   unsigned int* lpBytesReturned	返回的数据大小
 * @parm:   int waittime					等待超时时间				
 * @return: NET_SDK_API int
 */
/*
* @func: NET_SDK_GetDevConfig
* @brief: Get remote device related configuration
* @parm: int lLoginID Valid return value of NET_SDK_Login
* @parm: unsigned int dwCommand configuration type, see NET_SDK_CONFIG_TYPE
* @parm: int nChannelNO needs to get the configured channel number, -1 means all channels
* @parm: char* lpOutBuffer buffer
* @parm: unsigned int dwOutBufferSize buffer size
* @parm: unsigned int* lpBytesReturned returned data size
* @parm: int waittime wait timeout
* @return: NET_SDK_API int
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetDevConfig(int lLoginID, uint dwCommand, int nChannelNO, IntPtr lpOutBuffer, uint dwOutBufferSize, ref uint lpBytesReturned, int waittime);


/*
 * @func:   NET_SDK_GetDevConfigV2          V2，可兼容NET_SDK_GetDevConfig， 但为了其他应用不至于改动太大，前面的接口不废弃
 * @brief:  获取远程设备相关配置
 * @parm:   int lLoginID					NET_SDK_Login的有效返回值
 * @parm:   unsigned int dwCommand			配置类型, 见NET_SDK_CONFIG_TYPE
 * @parm:   int nChannelNO					需要获取配置的通道号, -1表示全部通道
 * @parm:   char *lpInBuffer,               传入参数，用于传给设备
 * @parm:   unsigned int dwInBufferSize    输入参数大
 * @parm:   char* lpOutBuffer				缓冲区	 
 * @parm:   unsigned int dwOutBufferSize	缓冲区大小
 * @parm:   unsigned int* lpBytesReturned	返回的数据大小
 * @parm:   int waittime					等待超时时间				
 * @return: NET_SDK_API int
 */
/*
  * @func: NET_SDK_GetDevConfigV2 V2, compatible with NET_SDK_GetDevConfig, but for other applications not to change too much, the previous interface is not obsolete
  * @brief: Get remote device related configuration
  * @parm: int lLoginID Valid return value of NET_SDK_Login
  * @parm: unsigned int dwCommand configuration type, see NET_SDK_CONFIG_TYPE
  * @parm: int nChannelNO needs to get the configured channel number, -1 means all channels
  * @parm: char *lpInBuffer, passed in parameters for passing to the device
  * @parm: unsigned int dwInBufferSize input parameter is large
  * @parm: char* lpOutBuffer buffer
  * @parm: unsigned int dwOutBufferSize buffer size
  * @parm: unsigned int* lpBytesReturned returned data size
  * @parm: int waittime wait timeout
  * @return: NET_SDK_API int
  */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetDevConfigV2(int lLoginID, uint dwCommand, int nChannelNO,IntPtr lpInBuffer, uint dwInBufferSize,string lpOutBuffer, uint dwOutBufferSize,ref uint lpBytesReturned, int waittime);
/*
 * @func:   NET_SDK_SetDevConfig
 * @brief:  设置远程设备相关配置
 * @parm:   int lLoginID					NET_SDK_Login的有效返回值
 * @parm:   unsigned int dwCommand			配置类型, 见NET_SDK_CONFIG_TYPE
 * @parm:   int nChannelNO					需要设置的通道号, -1表示全部通道
 * @parm:   char * lpInBuffer				设置的数据缓冲区指针
 * @parm:   unsigned int dwInBufferSize    设置的数据的大小 
 * @parm:   int waittime				    等待超时时间
 * @return: NET_SDK_API int
 */
/*
* @func: NET_SDK_SetDevConfig
* @brief: Set remote device related configuration
* @parm: int lLoginID Valid return value of NET_SDK_Login
* @parm: unsigned int dwCommand configuration type, see NET_SDK_CONFIG_TYPE
* @parm: int nChannelNO The channel number to be set, -1 indicates all channels
* @parm: char * lpInBuffer set data buffer pointer
* @parm: unsigned int dwInBufferSize The size of the set data
* @parm: int waittime wait timeout
* @return: NET_SDK_API int
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int  NET_SDK_SetDevConfig(int lLoginID, uint dwCommand, int nChannelNO, IntPtr lpInBuffer, int dwInBufferSize, int waittime);

/*
 * @func:   NET_SDK_SetConfigOverNet
 * @brief:  跨网段设置设备配置，目前只支持对网络配置进行设置
 * Set device configuration across network segments. Currently, only network configuration settings are supported.
 * @parm:   unsigned int dwCommand
 * @parm:   int nChannelNO
 * @parm:   char * lpInBuffer
 * @parm:   unsigned int dwInBufferSize
 * @parm:   int waittime
 * @return: NET_SDK_API int
 */

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_SetConfigOverNet(uint dwCommand, int nChannelNO,string lpInBuffer, uint dwInBufferSize, int waittime);

/*
 * @func:   NET_SDK_FindDVRLog
 * @brief:  查询日志
 * @parm:   int lLoginID							NET_SDK_Login的有效返回值
 * @parm:   NET_SDK_LogSearchCondition* pFindParam	指定查询条件
 * @parm:   NET_SDK_LogList* pRetBuffer				返回的日志列表
 * @parm:   int lBufSize							返回的数据大小
 * @parm:   int waittime							等待超时时间
 * @return: NET_SDK_API char
 */
/*
* @func: NET_SDK_FindDVRLog
* @brief: Query log
* @parm: int lLoginID Valid return value of NET_SDK_Login
* @parm: NET_SDK_LogSearchCondition* pFindParam specifies the query criteria
* @parm: NET_SDK_LogList* list of logs returned by pRetBuffer
* @parm: int lBufSize the size of the data returned
* @parm: int waittime wait timeout
* @return: NET_SDK_API char
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_FindDVRLog(int lLoginID,ref NET_SDK_LogSearchCondition pFindParam,ref NET_SDK_LogList pRetBuffer, int lBufSize, int waittime);

/*
 * @func:   NET_SDK_RealPlay
 * @brief:  打开实时预览
 * @parm:   int lLoginID                           NET_SDK_Login的有效返回值
 * @parm:   LPNET_SDK_CLIENTINFO lpClientInfo       预览方式
 * @return: NET_SDK_API int						返回预览句柄
 */
/*
* @func: NET_SDK_RealPlay
* @brief: Open live preview
* @parm: int lLoginID Valid return value of NET_SDK_Login
* @parm: LPNET_SDK_CLIENTINFO lpClientInfo preview mode
* @return: NET_SDK_API int returns the preview handle
*/

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_RealPlay(int lLoginID, ref NET_SDK_CLIENTINFO lpClientInfo,int nWaittimes);

/*
 * @func:   NET_SDK_StopRealPlay
 * @brief:  停止实时预览
 * @parm:   int lRealHandle						NET_SDK_RealPlay的有效返回值
 * @return: NET_SDK_API char
 */
/*
* @func: NET_SDK_StopRealPlay
* @brief: Stop live preview
* @parm: int lRealHandle Valid return value of NET_SDK_RealPlay
* @return: NET_SDK_API char
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopRealPlay(int lRealHandle);


/*
 * @func:   NET_SDK_PauseRealPlay
 * @brief:  暂停实时预览
 * @parm:   int lRealHandle						NET_SDK_RealPlay的有效返回值
 * @parm:   char bPause								true 暂停 false 继续预览
 * @return: NET_SDK_API int
 */
/*
* @func: NET_SDK_PauseRealPlay
* @brief: Pause live preview
* @parm: int lRealHandle Valid return value of NET_SDK_RealPlay
* @parm: char bPause true pause false continue preview
* @return: NET_SDK_API int
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_PauseRealPlay(int lRealHandle, char bPause);

/*
 * @func:   NET_SDK_SetRealDataCallBack
 * @brief:  设置实时预览的回调函数
 * @parm:   int lRealHandle					   NET_SDK_RealPlay的有效返回值
 * @parm:   fNetRealDataCallBack cbRealData		   预览回调, 用户自己在此函数中处理客户端收到的实时视频数据,如显示、保存等
 * @parm:   int dwUser							   用户自定义数据
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_SetRealDataCallBack
* @brief: Set the callback function for live preview
* @parm: int lRealHandle Valid return value of NET_SDK_RealPlay
* @parm: fNetRealDataCallBack cbRealData preview callback, the user handles the real-time video data received by the client in this function, such as display, save, etc.
* @parm: int dwUser user-defined data
* @return: NET_SDK_API char CALL_METHOD
*/
public delegate int fNetRealDataCallBack(int lRealHandle, int dwDataType, IntPtr pBuffer, int dwBufSize, IntPtr pUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SetRealDataCallBack(int lRealHandle,fNetRealDataCallBack cbRealData, int dwUser);

/*
 * @func:   NET_SDK_DelRealDataCallBack
 * @brief:  清除实时预览的回调函数接口 该接口需要在NET_SDK_StopRealPlay前调用
 * @parm:   int lRealHandle						NET_SDK_RealPlay的有效返回值
 * @parm:   fNetRealDataCallBack cbRealData			预览回调
 * @parm:   int dwUser								用户自定义数据			
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_DelRealDataCallBack
* @brief: Clear the callback function interface for live preview. This interface needs to be called before NET_SDK_StopRealPlay
* @parm: int lRealHandle Valid return value of NET_SDK_RealPlay
* @parm: fNetRealDataCallBack cbRealData preview callback
* @parm: int dwUser user-defined data
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char  NET_SDK_DelRealDataCallBack(int lRealHandle,fNetRealDataCallBack cbRealData, int dwUser);

/*
 * @func:    NET_SDK_SetRealDataCallBack_EX
 * @brief:   设置实时预览的回调函数 EX版本
 * @param:   int lRealHandle						NET_SDK_RealPlay的有效返回值
 * @param:   fNetRealDataCallBack_EX cbRealDataEX   预览回调, 用户自己在此函数中处理客户端收到的实时视频数据,如显示、保存等
 * @param:   int dwUser							用户自定义数据
 * @return:  NET_SDK_API char CALL_METHOD
 * @note:    None
 */
/*
* @func: NET_SDK_SetRealDataCallBack_EX
* @brief: Set the callback function for live preview EX version
* @param: int lRealHandle Valid return value of NET_SDK_RealPlay
* @param: fNetRealDataCallBack_EX cbRealDataEX preview callback, the user himself processes the real-time video data received by the client in this function, such as display, save, etc.
* @param: int dwUser user-defined data
* @return: NET_SDK_API char CALL_METHOD
* @note: None
*/
///< 原始数据回调原型-带有帧具体信息 Raw data callback prototype - with frame specific information
public delegate int fNetRealDataCallBack_EX(int lRealHandle, ref NET_SDK_PACKET_INFO_EX pFrame, IntPtr dwUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SetRealDataCallBack_EX(int lRealHandle,fNetRealDataCallBack_EX cbRealDataEX, IntPtr dwUser);

/*
 * @func:    NET_SDK_DelRealDataCallBack_EX
 * @brief:   清除实时预览的回调函数接口(EX版本) 该接口需要在NET_SDK_StopRealPlay前调用
 * @param:   int lRealHandle						NET_SDK_RealPlay的有效返回值
 * @param:   fNetRealDataCallBack_EX cbRealDataEX	预览回调
 * @param:   int dwUser							用户自定义数据
 * @return:  NET_SDK_API char CALL_METHOD
 * @note:    None
 */
/*
* @func: NET_SDK_DelRealDataCallBack_EX
* @brief: Clear the callback function interface for live preview (EX version) This interface needs to be called before NET_SDK_StopRealPlay
* @param: int lRealHandle Valid return value of NET_SDK_RealPlay
* @param: fNetRealDataCallBack_EX cbRealDataEX preview callback
* @param: int dwUser user-defined data
* @return: NET_SDK_API char CALL_METHOD
* @note: None
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char  NET_SDK_DelRealDataCallBack_EX(int lRealHandle,fNetRealDataCallBack_EX cbRealDataEX, int dwUser);

/*
 * @func:   NET_SDK_FindFileByName
 * @brief:  根据文件名查询录像
 * @parm:   int lLoginID                           NET_SDK_Login的有效返回值				
 * @parm:   NET_SDK_FINDINFO* lpFindInfo            查询录像的条件
 * @parm:   NET_SDK_FILE_DATA* lpFileData           查询结果
 * @parm:   int lMaxCount                           一次查询指定允许的最大查询数目
 * @parm:   int* findcount							返回的查询结果数目
 * @parm:   int waittime							等待超时时间
 * @return: NET_SDK_API int
 */
/*
* @func: NET_SDK_FindFileByName
* @brief: Query video based on file name
* @parm: int lLoginID Valid return value of NET_SDK_Login
* @parm: NET_SDK_FINDINFO* lpFindInfo Query the conditions of the recording
* @parm: NET_SDK_FILE_DATA* lpFileData query result
* @parm: int lMaxCount specifies the maximum number of queries allowed in a single query
* @parm: int* the number of query results returned by findcount
* @parm: int waittime wait timeout
* @return: NET_SDK_API int
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int  NET_SDK_FindFileByName(int lLoginID,ref NET_SDK_FINDINFO lpFindInfo,IntPtr lpFileData, int lMaxCount,ref int findcount, int waittime);

/*
 * @func:   NET_SDK_FindFileByTime
 * @brief:  根据时间查询录像
 * @parm:   int lLoginID							NET_SDK_Login的有效返回值				
 * @parm:   NET_SDK_SearchByTime* lpFindInfo		查询录像的条件
 * @parm:   NET_SDK_SearchByTimeResult* lpFileData  结果列表
 * @parm:   int waittime							等待超时时间
 * @return: NET_SDK_API int
 */
/*
* @func: NET_SDK_FindFileByTime
* @brief: Query video according to time
* @parm: int lLoginID Valid return value of NET_SDK_Login
* @parm: NET_SDK_SearchByTime* lpFindInfo Query the conditions of the recording
* @parm: NET_SDK_SearchByTimeResult* lpFileData result list
* @parm: int waittime wait timeout
* @return: NET_SDK_API int
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_FindFileByTime(int lLoginID,ref NET_SDK_SearchByTime lpFindInfo,ref NET_SDK_SearchByTimeResult lpFileData, int waittime);

/*
 * @func:   NET_SDK_PlayBackByName
 * @brief:  根据文件名进行回放
 * @parm:   int lLoginID									 登录句柄
 * @parm:   NET_SDK_FILE_DATA* sPlayBackFile				 回放文件的信息
 * @parm:   fNetDownLoadPosCallBack cbDownLoadPos			 进度回调
 * @parm:   fNetRealDataCallBack fDownLoadDataCallBack       回放回调
 * @parm:   int dwDataUser									 用户自定义数据, 2个回调共用1个自定义数据
 * @return: NET_SDK_API int 回放句柄
 */
/*
* @func: NET_SDK_PlayBackByName
* @brief: Playback based on file name
* @parm: int lLoginID login handle
* @parm: NET_SDK_FILE_DATA* sPlayBackFile Playback file information
* @parm: fNetDownLoadPosCallBack cbDownLoadPos progress callback
* @parm: fNetRealDataCallBack fDownLoadDataCallBack playback callback
* @parm: int dwDataUser user-defined data, 2 callbacks share 1 custom data
* @return: NET_SDK_API int playback handle
*/
///< 回放录像进度回调原形 Playback video progress callback prototype
public delegate void fNetDownLoadPosCallBack(int lPlayHandle, int lTotalSize, int lDownLoadSize, int dwUser);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_PlayBackByName(int lLoginID,ref NET_SDK_FILE_DATA sPlayBackFile, fNetDownLoadPosCallBack cbDownLoadPos, fNetRealDataCallBack fDownLoadDataCallBack, int dwDataUser);


[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_PlayBackByName_Ex(int lLoginID,ref NET_SDK_FILE_DATA sPlayBackFile, fNetDownLoadPosCallBack cbDownLoadPos, fNetRealDataCallBack_EX fDownLoadDataCallBack, int dwDataUser);

/*
 * @func:   NET_SDK_PlayBackByTime
 * @brief:  按时间进行录像回放 Video playback by time
 * @parm:   int lLoginID
 * @parm:   NET_SDK_FINDINFO* lpFindInfo
 * @parm:   fNetRealDataCallBack fDownLoadDataCallBack
 * @parm:   int dwDataUser
 * @parm:   fNetDownLoadPosCallBack cbDownLoadPos
 * @parm:   int dwPosUser
 * @return: NET_SDK_API int 回放句柄 Playback handle
 */

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_PlayBackByTime(int lLoginID,ref NET_SDK_FINDINFO lpFindInfo,fNetRealDataCallBack fDownLoadDataCallBack, int dwDataUser,
											fNetDownLoadPosCallBack cbDownLoadPos, int dwPosUser);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_PlayBackByTime_Ex(int lLoginID,ref NET_SDK_FINDINFO lpFindInfo, fNetRealDataCallBack_EX fDownLoadDataCallBack, int dwDataUser,
													   fNetDownLoadPosCallBack cbDownLoadPos, int dwPosUser);

/*
 * @func:   NET_SDK_StopPlayBack
 * @brief:  停止回放 Stop playback
 * @parm:   int lPlayHandle
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopPlayBack(int lPlayHandle);

/*
 * @func:   NET_SDK_PlayBackControl
 * @brief:  回放控制分,暂停,定位等等 Playback control points, pauses, positioning, etc.
 * @parm:   int lPlayHandle
 * @parm:   int lControlCode
 * @parm:   int lCtrlValue
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern  char NET_SDK_PlayBackControl(int lPlayHandle, int lControlCode,int lCtrlValue);

/*
 * @func:   NET_SDK_GetFileByName
 * @brief:  录像下载,用户可以不使用回调，自己通过NET_SDK_GetDownloadPos获取进度
 * Video download, users can use the NET_SDK_GetDownloadPos to get progress without using the callback
 * @parm:   int lLoginID
 * @parm:   NET_SDK_FILE_DATA * sPlayBackFile
 * @parm:   char * sSavedFileName
 * @parm:   fNetDownLoadPosCallBack cbDownLoadPos
 * @parm:   int dwDataUser
 * @return: NET_SDK_API int CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetFileByName(int lLoginID,ref NET_SDK_FILE_DATA sPlayBackFile,string sSavedFileName, 
											fNetDownLoadPosCallBack cbDownLoadPos, int dwDataUser);



[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern  int  NET_SDK_GetFileByNameV2(int lLoginID,ref NET_SDK_FILE_DATA sPlayBackFile,fNetDownLoadPosCallBack cbDownLoadPos, fNetRealDataCallBack fDownLoadDataCallBack,int dwDataUser);

/*
 * @func:   NET_SDK_GetFileByTime
 * @brief:  录像下载,用户可以不使用回调，自己通过NET_SDK_GetDownloadPos获取进度
 * Video download, users can use the NET_SDK_GetDownloadPos to get progress without using the callback
 * @parm:   int lLoginID
 * @parm:   NET_SDK_FINDINFO * lpFindInfo
 * @parm:   char * sSavedFileDIR
 * @parm:   char bMerge
 * @parm:   fNetDownLoadPosCallBack cbDownLoadPos
 * @parm:   int dwDataUser
 * @return: NET_SDK_API int CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetFileByTime(int lLoginID, ref NET_SDK_FINDINFO lpFindInfo, string sSavedFileDIR, char bMerge,
											fNetDownLoadPosCallBack cbDownLoadPos, int dwDataUser);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetFileByTime_V2(int lLoginID, ref NET_SDK_FINDINFO lpFindInfo, string sSavedFileDIR, char bMerge,
												   fNetDownLoadPosCallBack cbDownLoadPos , int dwDataUser,int nFileType);//0默认为裸码流1：AVI


[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetFileByTime_V3(int lLoginID,ref NET_SDK_FINDINFO lpFindInfo, fNetDownLoadPosCallBack cbDownLoadPos, fNetRealDataCallBack fDownLoadDataCallBack, int dwDataUser);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetFileByTime_V4(int lLoginID, ref NET_SDK_FINDINFO lpFindInfo, string sSavedFileDIR, char bMerge,
                                                   fNetDownLoadPosCallBack cbDownLoadPos, int dwDataUser, int nFileType);//0默认为裸码流1：AVI
/*
 * @func:   NET_SDK_StopGetFile
 * @brief:  停止下载录像文件 Stop downloading video files
 * @parm:   int lFileHandle
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopGetFile(int lFileHandle);

/*
 * @func:   NET_SDK_GetDownloadPos
 * @brief:  获取下载进度 Get download progress
 * @parm:   int lFileHandle
 * @return: NET_SDK_API int CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetDownloadPos(int lFileHandle);

/*
 * @func:   NET_SDK_Upgrade
 * @brief:  开始升级 Start upgrading
 * @parm:   int lLoginID
 * @parm:   char * sFileName
 * @parm:   int nType
 * @parm:   fNetUpgradeCallBack cbUpgrade
 * @parm:   int dwUser
 * @return: NET_SDK_API int CALL_METHOD
 */
///< 升级设备程序回调原形
public delegate void fNetUpgradeCallBack(int lLoginID, int lUpgradechannel, int nTotalSize, int nSendSize, int dwUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_Upgrade(int lLoginID, string sFileName, int nType, fNetUpgradeCallBack cbUpgrade , int dwUser );


/*
 * @func:   NET_SDK_GetUpgradeState
 * @brief:  获取升级状态 1 成功， 2 正在升级 3 失败 Get upgrade status 1 Success, 2 Upgrade 3 Failure
 * @parm:   int lUpgradeHandle
 * @return: NET_SDK_API int CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetUpgradeState(int lUpgradeHandle);


/*
 * @func:   NET_SDK_CloseUpgradeHandle
 * @brief:  关闭升级 Close upgrade
 * @parm:   int lUpgradeHandle
 * @return: NET_SDK_API int CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_CloseUpgradeHandle(int lUpgradeHandle);

/*
 * @func:   NET_SDK_PTZControl
 * @brief:  云台控制，包括预置点设置，巡航路线，快速定位等等, 如果需要指定云台速度, lParm1表示速度
 * @parm:   int lLoginID
 * @parm:   int nChannelNo
 * @parm:   int lPTZCommand
 * @parm:   int lParam1
 * @parm:   int lParam2
 * @parm:   int lParam3
 * @parm:   char bStop
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_PTZControl
* @brief: PTZ control, including preset point setting, cruise route, fast positioning, etc. If you need to specify the PTZ speed, lParm1 indicates the speed.
* @parm: int lLoginID
* @parm: int nChannelNo
* @parm: int lPTZCommand
* @parm: int lParam1
* @parm: int lParam2
* @parm: int lParam3
* @parm: char bStop
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_PTZControl(int lLoginID,int nChannelNo, int lPTZCommand, 
									int lParam1, int lParam2, int lParam3, char bStop);

/*
 * @func:   NET_SDK_ControlDVR
 * @brief:  设备控制: 返回值 
 * @parm:   int lLoginID
 * @parm:   int type
 * @parm:   int waittime
 * @return: NET_SDK_API char true 成功, false 失败
 */
/*
* @func: NET_SDK_ControlDVR
* @brief: Device Control: Return Value
* @parm: int lLoginID
* @parm: int type
* @parm: int waittime
* @return: NET_SDK_API char true success, false failure
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_ControlDVR(int lLoginID, int type, int waittime);

/*
 * @func:   NET_SDK_SearchDevice
 * @brief:  搜索局域网内的设备 Search for devices in the LAN
 * @parm:   char * szBuf
 * @parm:   int nBufLen
 * @parm:   int * pRetLen
 * @parm:   int nSearchTime
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SearchDevice(string szBuf, int nBufLen, string pRetLen, int nSearchTime);

/*
 * @func:   NET_SDK_StartVoiceCom_MR
 * @brief:  开启语音对讲
 * @parm:   int lLoginID				登录ID
 * @parm:   fNetAudioDataCallBack pVcb  接收对讲语音数据回调
 * @parm:   int dwDataUser				用户自定义数据
 * @return: NET_SDK_API int
 */
/*
* @func: NET_SDK_StartVoiceCom_MR
* @brief: Turn on voice intercom
* @parm: int lLoginID login ID
* @parm: fNetAudioDataCallBack pVcb Receive intercom voice data callback
* @parm: int dwDataUser user-defined data
* @return: NET_SDK_API int
*/
///< 语音对讲的音频数据回调函数原形 Voice intercom audio data callback function prototype
public delegate void fNetAudioDataCallBack(int lVoiceHandle, string pDataBuf, int dwBufSize, char byAudioFlag, int dwUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_StartVoiceCom_MR(int lLoginID, fNetAudioDataCallBack pVcb, int dwDataUser);

/*
 * @func:   NET_SDK_VoiceComSendData
 * @brief:  客户端往设备发送对讲数据 The client sends the intercom data to the device.
 * @parm:   int lVoiceHandle
 * @parm:   char * pSendBuf
 * @parm:   int lBufSize
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_VoiceComSendData(int lVoiceHandle,string pSendBuf, int lBufSize);

/*
 * @func:   NET_SDK_StopVoiceCom
 * @brief:  停止语音对讲 Stop voice intercom
 * @parm:   int lVoiceHandle
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopVoiceCom(int lVoiceHandle);

/*
 * @func:   NET_SDK_SetTalkMode
 * @brief:  设置对讲音频编码方式, 用户可以不设置, 默认为G711A编码 Set the intercom audio encoding mode, the user can not set, the default is G711A encoding.
 * @parm:   int lLoginID
 * @parm:   NET_SDK_AudioInFormatConfig* pTalkMode
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SetTalkMode(int lLoginID,ref NET_SDK_AudioInFormatConfig pTalkMode);

/*
 * @func:   NET_SDK_StartDVRRecord
 * @brief:  Start DVR Record
 * @parm:   int lLoginID
 * @parm:   int nChannelNo
 * @parm:   int lRecordType  录像模式, 见NET_SDK_RecordModeTypes
 * @return: NET_SDK_API char
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StartDVRRecord(int lLoginID, int nChannelNo ,int lRecordType);

/*
 * @func:   NET_SDK_StopDVRRecord
 * @brief:  远程停止设备录像 Remote stop device recording
 * @parm:   int lLoginID
 * @parm:   int nChannelNo
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopDVRRecord(int lLoginID, int nChannelNo);

/*
 * @func:   NET_SDK_SetSystemDateTime
 * @brief:  远程设置设备系统时间 Remotely set device system time
 * @parm:   int lLoginID
 * @parm:   NET_SDK_SYSTEM_TIME * pSysTime
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SetSystemDateTime(int lLoginID,ref NET_SDK_SYSTEM_TIME pSysTime);

/*
 * @func:   NET_SDK_GetDVRWorkState
 * @brief:  Get DVR Workstate
 * @parm:   int lLoginID
 * @parm:   NET_SDK_DVR_WORKSTATE * pWorkState
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_GetDVRWorkState(int lLoginID,ref NET_SDK_DVR_WORKSTATE pWorkState);

/*
 * @func:   NET_SDK_ClickKey
 * @brief: 
 * @parm:   int lLoginID
 * @parm:   NET_SDK_KeyBoardData * pKeyBoardData
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_ClickKey(int lLoginID,ref NET_SDK_KeyBoardData pKeyBoardData);


/*
 * @func:   NET_SDK_ClickMouse
 * @brief: 
 * @parm:   int lLoginID
 * @parm:   NET_SDK_MouseData * pMouseData
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_ClickMouse(int lLoginID,ref NET_SDK_MouseData pMouseData);

/*
 * @func:   NET_SDK_StorageManage
 * @brief:  设备磁盘管理
 * @parm:   int lLoginID
 * @parm:   NET_SDK_StorageDeviceControl * pStorageCtl
 * @return: NET_SDK_API int CALL_METHOD
 */
/*
* @func: NET_SDK_StorageManage
* @brief: Device Disk Management
* @parm: int lLoginID
* @parm: NET_SDK_StorageDeviceControl * pStorageCtl
* @return: NET_SDK_API int CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_StorageManage(int lLoginID,ref NET_SDK_StorageDeviceControl pStorageCtl);

/*
 * @func:   NET_SDK_SendNetAlarmMsg
 * @brief:  
 * @parm:   int lLoginID
 * @parm:   NET_SDK_AlarmNet * pAlarmInfo
 * @return: NET_SDK_API char CALL_METHOD
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SendNetAlarmMsg(int lLoginID,ref NET_SDK_AlarmNet pAlarmInfo);

/*
 * @func:   NET_SDK_CatchPic
 * @brief:  抓图, 保存到文件
 * @parm:   int lLoginID
 * @parm:   int nChannel
 * @parm:   char * sFileName
 * @return: NET_SDK_API char CALL_METHOD
 * @note:   文件是jpg格式, nChannel取值从-2开始, -2 对设备的活动窗口截屏, 图像为bmp
 *			-1 对整个设备全局截屏, 图像为bmp
 *			>= 0  通道号, 对通道视频截图, 图像为jpg格式
 */
/*
* @func: NET_SDK_CatchPic
* @brief: capture, save to file
* @parm: int lLoginID
* @parm: int nChannel
* @parm: char * sFileName
* @return: NET_SDK_API char CALL_METHOD
* @note: The file is in jpg format, nChannel takes a value from -2, -2 takes a screenshot of the active window of the device, and the image is bmp
* -1 Global screen capture of the entire device, the image is bmp
* >= 0 channel number, screenshot of channel video, image is jpg format
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_CatchPic(int lLoginID, int nChannel, string sFileName);

/*
 * @func:   NET_SDK_CatchPicInBuffer
 * @brief:  抓图, 数据保存到buffer
 * @parm:   int lLoginID
 * @parm:   int nChannel
 * @parm:   char * pBuffer
 * @parm:   int nBufLen
 * @parm:   int * pPicLen
 * @return: NET_SDK_API char CALL_METHOD
 * @note:   nChannel取值从-2开始, -2 对设备的活动窗口截屏, buffer里面的内容为bmp图像
 *			-1 对整个设备全局截屏, buffer里面的内容为bmp图像
 *			>= 0  通道号, 对通道视频截图, buffer里面的内容为jpg图像
 */
/*
* @func: NET_SDK_CatchPicInBuffer
* @brief: capture the graph, save the data to the buffer
* @parm: int lLoginID
* @parm: int nChannel
* @parm: char * pBuffer
* @parm: int nBufLen
* @parm: int * pPicLen
* @return: NET_SDK_API char CALL_METHOD
* @note: nChannel takes a value from -2, -2 takes a screenshot of the active window of the device, and the contents of the buffer are bmp images.
* -1 Global screen capture of the entire device, the contents of the buffer are bmp images
* >= 0 channel number, screenshot of channel video, content inside buffer is jpg image
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_CatchPicInBuffer(int lLoginID, int nChannel, string pBuffer, int nBufLen,string pPicLen);


/*
 * @func:    NET_SDK_StartAlarmCenterListen
 * @brief:  
 * @param:   int nPort
 * @param:   fNetMessCallBack cbAlarmCenter
 * @param:   unsigned int dwDataUser
 * @return:  NET_SDK_API char CALL_METHOD
 * @note:    None
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StartAlarmCenterListen(int nPort, fNetMessCallBack cbAlarmCenter, uint dwDataUser);

/*
 * @func:    NET_SDK_StopAlarmCenterListen
 * @brief:  
 * @return:  NET_SDK_API char CALL_METHOD
 * @note:    None
 */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopAlarmCenterListen();

/*
 * @func:   NET_SDK_SerialWrite
 * @brief:  写透明串口232,485
 * @parm:   int lLoginID
 * @parm:   NET_SDK_SERIAL_TYPE nType
 * @parm:   char * pBuffer
 * @parm:   int nBufLen
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_SerialWrite
* @brief: Write transparent serial port 232, 485
* @parm: int lLoginID
* @parm: NET_SDK_SERIAL_TYPE nType
* @parm: char * pBuffer
* @parm: int nBufLen
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SerialWrite(int lLoginID, NET_SDK_SERIAL_TYPE nType, string pBuffer, int nBufLen);

/*
 * @func:   NET_SDK_SerialRead
 * @brief:  读透明串口232,485
 * @parm:   int lLoginID
 * @parm:   NET_SDK_SERIAL_TYPE nType
 * @parm:   char * pBuffer
 * @parm:   int nBufLen
 * @parm:   int * pReadLen
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_SerialRead
* @brief: Read transparent serial port 232, 485
* @parm: int lLoginID
* @parm: NET_SDK_SERIAL_TYPE nType
* @parm: char * pBuffer
* @parm: int nBufLen
* @parm: int * pReadLen
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern  char NET_SDK_SerialRead(int lLoginID, NET_SDK_SERIAL_TYPE nType,string pBuffer, int nBufLen, string pReadLen);

/*
 * @func:   NET_SDK_GetDDNSInfo
 * @brief:  获取DDNS服务信息
 * @parm:   NET_SearchMode & searchmode
 * @parm:   NET_DDNS_INFO * pDevicInfo
 * @parm:   int maxDeviceNum
 * @parm:   int & nretNum
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_GetDDNSInfo
* @brief: Get DDNS service information
* @parm: NET_SearchMode & searchmode
* @parm: NET_DDNS_INFO * pDevicInfo
* @parm: int maxDeviceNum
* @parm: int & nretNum
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_GetDDNSInfo(ref NET_SearchMode searchmode,ref NET_DDNS_INFO pDevicInfo, int maxDeviceNum,ref int nretNum);

/*
 * @func:   NET_SDK_MakeKeyFrame
 * @brief:  强制I帧
 * @parm:   int lLoginID
 * @parm:   int nChannel	通道号
 * @parm:   int nStream		0表示主码流，为1表示子码流
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_MakeKeyFrame
* @brief: Force I frame
* @parm: int lLoginID
* @parm: int nChannel channel number
* @parm: int nStream 0 indicates the main stream, and 1 indicates the substream
* @return: NET_SDK_API char CALL_METHOD
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_MakeKeyFrame(int lLoginID, int nChannel, int nStream);

/*
 * @func:   NET_SDK_GetOEMInfo
 * @brief: 
 * @parm:   int lLoginID
 * @parm:   NET_SDK_OEMInfo * pOEMInfo
 * @return: NET_SDK_API char CALL_METHOD
 */

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_GetOEMInfo(int lLoginID,ref NET_SDK_OEMInfo pOEMInfo);


/*
 *  @func:    	 NET_SDK_SearchDeviceByRemote
 *  @brief:   	 通过远程设备搜索其他设备
 *  @param[in]:  int lLoginID			登录ID
 *  @param[in]:  SearchProtocl protocol 以何种协议搜索设备
 *  @param[out]:  NET_SDK_SearchByRemote_DeviceAll * resultlist 搜索结果
 *  @param[int]: int waittime 等待超时时间,单位毫秒,默认15000毫秒
 *  @return:  	 NET_SDK_API char CALL_METHOD 函数调用成功返回true, 失败返回false
 *  @note:    	 此接口是阻塞式的 
 */
//-------------the follow is add for glink cloud function ---begin

/*
  * @func: NET_SDK_InitGlinkClient
  * @brief: Initialize Glink
  * @param clientName client name
  * @param firstStartTime The first time the client is enabled
  * @param clientUDID client UDID, ios can specify the value casually
  * @param version client version number
  * @param type client type
  * @return returns 0 successfully, fails returns negative
  * @note: This interface is blocking
  */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SearchDeviceByRemote(int lLoginID, SearchProtocl protocol,ref NET_SDK_SearchByRemote_DeviceAll resultlist, int waittime);

//-------------the follow is add for glink cloud function ---begin

/*
 *  @func:    	 NET_SDK_InitGlinkClient
 *  @brief:   	 初始化Glink
 *  @param clientName		客户端名称
 *  @param firstStartTime	客户端首次启用时间
 *  @param clientUDID		客户端的UDID，ios可以随便指定值
 *  @param version			客户端版本号
 *  @param type				客户端类型
 *  @return					成功返回0，失败返回负数
 *  @note:    				此接口是阻塞式的 
 */
//-------------the follow is add for glink cloud function ---begin

/*
  * @func: NET_SDK_InitGlinkClient
  * @brief: Initialize Glink
  * @param clientName client name
  * @param firstStartTime The first time the client is enabled
  * @param clientUDID client UDID, ios can specify the value casually
  * @param version client version number
  * @param type client type
  * @return returns 0 successfully, fails returns negative
  * @note: This interface is blocking
  */
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_InitGlink(string clientName, string firstStartTime, string clientUDID, int version, int type);

/*
 * @func:   NET_SDK_GlinkStatusChangeCallback
 * @brief:  设置接收glinkID 
 * @parm:   fGlinkStatusChanged cbglinkStatusChanged
 * @parm:   unsigned int lUser
 * @return: NET_SDK_API char CALL_METHOD
 */
/*
* @func: NET_SDK_GlinkStatusChangeCallback
* @brief: Set to receive glinkID
* @parm: fGlinkStatusChanged cbglinkStatusChanged
* @parm: unsigned int lUser
* @return: NET_SDK_API char CALL_METHOD
*/
///< 预链接状态改变 回调原形 Pre-link state change callback prototype
public delegate void fGlinkStatusChanged(string linkID, int nStauts);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_GlinkStatusChangeCallback(fGlinkStatusChanged cbglinkStatusChanged, uint lUser);


/*
 * @func:   NET_SDK_GetIDPreStatus
 * @brief:  获取预链接状态
 * @parm:   fGlinkStatusChanged cbglinkStatusChanged
 * @parm:   unsigned int lUser
 * @return: int ,0:为初始状态，表明未返回  -5400未返回  -2 设备离线  -1 非法IG 1： 在内网 2在外网 3 同在内外网
 */
/*
* @func: NET_SDK_GetIDPreStatus
* @brief: Get pre-link status
* @parm: fGlinkStatusChanged cbglinkStatusChanged
* @parm: unsigned int lUser
* @return: int , 0: is the initial state, indicating no return -5400 is not returned -2 device is offline -1 is illegal IG 1: is on the intranet 2 is on the external network 3 with the internal and external network
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_GetIDPreStatus(string gnkID);
/*
 *  @func:    	 NET_SDK_AddPreLink
 *  @brief:   	 添加预链接  
 *  @param[in]:  const char* gnkID  浪涛云ID
 *  @note:    	 此接口是异步模式的，ID 状态通过 NET_SDK_GlinkStatusChangeCallback所设置的回调函数返回
 */
/*
* @func: NET_SDK_AddPreLink
* @brief: Add pre-links
* @param[in]: const char* gnkID Wave Cloud ID
* @note: This interface is in asynchronous mode, and the ID state is returned by the callback function set by NET_SDK_GlinkStatusChangeCallback
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_AddPreLink(string gnkID);

/*
 *  @func:    	 NET_SDK_EnableAudioSend
 *  @brief:   	 发送音频数据
 *  @param[in]:  视频通道句柄，是否开启
 *  @note:    	 设备只在云登录的情况下处理该问题，其他登录方式下，音频默认发送
 */
/*
* @func: NET_SDK_EnableAudioSend
* @brief: Send audio data
* @param[in]: Video channel handle, whether to enable
* @note: The device only handles this problem in the case of cloud login. In other login modes, the audio is sent by default.
*/
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_EnableAudioSend(int lRealHandle, char bEnable);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_DebugTest(int lLoginID, uint dwCommand, int nChannelNO,string lpinbuffer,uint insize, string lpOutBuffer, uint dwOutBufferSize, ref uint lpBytesReturned, int waittime);

public delegate void fDevSearchCallbakc(ref NET_SDK_SEARCH_DEVINFO devinfo, int dwUser);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StartSearch( fDevSearchCallbakc serchcb, int dwuser);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_StopSearch();

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_UpGradeMusicFile(int lLoginID, NET_SDK_ZHDLFileInfo_T info,  fNetUpgradeCallBack cbUpgrade , int dwUser);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern int NET_SDK_CloseMusicUpgradeHandle(int lUpgradeHandle);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_GetMusicConfig(int lLoginID,string lpOutBuffer,uint dwOutBufferSize,ref uint lpBytesReturned,int waittime/*=500*/);

[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_SetMusicConfig(int lLoginID, uint dwCommand,string lpInBuffer,uint dwInBufferSize,int waittime/*=500*/);
[DllImport(@"..\bin\NetSdkModule.dll")]
public static extern char NET_SDK_MD5Encrypt(byte[] strOutput,byte[] strInput);
    }
}
