diff --git a/DM_Weight.Commons/DM_Weight.Commons.csproj b/DM_Weight.Commons/DM_Weight.Commons.csproj
new file mode 100644
index 0000000..467963e
--- /dev/null
+++ b/DM_Weight.Commons/DM_Weight.Commons.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net6.0-windows
+ enable
+ true
+
+
+
+
+
+
+
diff --git a/DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs b/DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs
new file mode 100644
index 0000000..fce3c87
--- /dev/null
+++ b/DM_Weight.Commons/ValidatRules/ValidationErrorMappingBehavior.cs
@@ -0,0 +1,75 @@
+using Microsoft.Xaml.Behaviors;
+using System.Collections.ObjectModel;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace DM_Weight.Commons.ValidatRules
+{
+ public class ValidationErrorMappingBehavior : Behavior
+ {
+ #region Properties
+
+ public static readonly DependencyProperty ValidationErrorsProperty =
+ DependencyProperty.Register("ValidationErrors", typeof(ObservableCollection),
+ typeof(ValidationErrorMappingBehavior), new PropertyMetadata(new ObservableCollection()));
+
+ public ObservableCollection ValidationErrors
+ {
+ get { return (ObservableCollection)this.GetValue(ValidationErrorsProperty); }
+ set { this.SetValue(ValidationErrorsProperty, value); }
+ }
+
+ public static readonly DependencyProperty HasValidationErrorProperty = DependencyProperty.Register("HasValidationError",
+ typeof(bool), typeof(ValidationErrorMappingBehavior), new PropertyMetadata(false));
+
+ public bool HasValidationError
+ {
+ get { return (bool)this.GetValue(HasValidationErrorProperty); }
+ set { this.SetValue(HasValidationErrorProperty, value); }
+ }
+
+ #endregion
+
+ #region Constructors
+
+ public ValidationErrorMappingBehavior()
+ : base()
+ { }
+
+ #endregion
+
+ #region Events & Event Methods
+
+ private void Validation_Error(object sender, ValidationErrorEventArgs e)
+ {
+ if (e.Action == ValidationErrorEventAction.Added)
+ {
+ this.ValidationErrors.Add(e.Error);
+ }
+ else
+ {
+ this.ValidationErrors.Remove(e.Error);
+ }
+
+ this.HasValidationError = this.ValidationErrors.Count > 0;
+ }
+
+ #endregion
+
+ #region Support Methods
+
+ protected override void OnAttached()
+ {
+ base.OnAttached();
+ Validation.AddErrorHandler(this.AssociatedObject, Validation_Error);
+ }
+
+ protected override void OnDetaching()
+ {
+ base.OnDetaching();
+ Validation.RemoveErrorHandler(this.AssociatedObject, Validation_Error);
+ }
+
+ #endregion
+ }
+}
diff --git a/DM_Weight.sln b/DM_Weight.sln
new file mode 100644
index 0000000..cd46efa
--- /dev/null
+++ b/DM_Weight.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32922.545
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DM_Weight", "DM_Weight\DM_Weight.csproj", "{439FA76B-F874-40DB-BAF2-E3647CD55B10}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DM_Weight.Commons", "DM_Weight.Commons\DM_Weight.Commons.csproj", "{7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x64.ActiveCfg = Debug|x64
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x64.Build.0 = Debug|x64
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x86.ActiveCfg = Debug|x86
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Debug|x86.Build.0 = Debug|x86
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|Any CPU.Build.0 = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x64.ActiveCfg = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x64.Build.0 = Release|Any CPU
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x86.ActiveCfg = Debug|x86
+ {439FA76B-F874-40DB-BAF2-E3647CD55B10}.Release|x86.Build.0 = Debug|x86
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x64.Build.0 = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Debug|x86.Build.0 = Debug|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x64.ActiveCfg = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x64.Build.0 = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x86.ActiveCfg = Release|Any CPU
+ {7F9FA18B-5C28-476E-97D4-B5504B8DEB9B}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {E50E8179-1102-41F1-92F5-2905C75898A6}
+ EndGlobalSection
+EndGlobal
diff --git a/DM_Weight/App.config b/DM_Weight/App.config
new file mode 100644
index 0000000..d80df9f
--- /dev/null
+++ b/DM_Weight/App.config
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DM_Weight/App.xaml b/DM_Weight/App.xaml
new file mode 100644
index 0000000..ef8d445
--- /dev/null
+++ b/DM_Weight/App.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DM_Weight/App.xaml.cs b/DM_Weight/App.xaml.cs
new file mode 100644
index 0000000..5913d5b
--- /dev/null
+++ b/DM_Weight/App.xaml.cs
@@ -0,0 +1,264 @@
+
+using DM_Weight.util.TabTip;
+using DM_Weight.util;
+using DM_Weight.ViewModels;
+using DM_Weight.Views.Dialog;
+using DM_Weight.Views;
+using log4net.Config;
+using Prism.Ioc;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Configuration;
+using System.Data;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using Prism.Unity;
+using log4net;
+using System.Windows.Interop;
+using System.Windows.Threading;
+using System.Timers;
+using DM_Weight.HIKVISION;
+
+namespace DM_Weight
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : PrismApplication
+ {
+ private readonly ILog logger = LogManager.GetLogger(typeof(App));
+ public App()
+ {
+ TabTipAutomation.IgnoreHardwareKeyboard = HardwareKeyboardIgnoreOptions.IgnoreAll;
+ TabTipAutomation.BindTo();
+ TabTipAutomation.BindTo();
+ }
+
+
+
+ protected override Window CreateShell()
+ {
+ //UI线程未捕获异常处理事件
+ this.DispatcherUnhandledException += OnDispatcherUnhandledException;
+ //Task线程内未捕获异常处理事件
+ TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
+ //多线程异常
+ AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
+
+ return Container.Resolve();
+ }
+
+ void OnDispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
+ {
+ logger.Error($"发生错误:{e.Exception.Message}");
+ e.Handled = true;
+ }
+
+ void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
+ {
+
+ foreach (Exception item in e.Exception.InnerExceptions)
+ {
+ logger.Error($"异常类型:{item.GetType()}{Environment.NewLine}来自:{item.Source}{Environment.NewLine}异常内容:{item.Message}");
+ }
+
+ //将异常标识为已经观察到
+ e.SetObserved();
+ }
+
+ void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
+ {
+ logger.Error($"Unhandled exception.{e.ToString()}");
+ }
+
+
+ protected override void InitializeShell(Window shell)
+ {
+
+ base.InitializeShell(shell);
+ }
+
+ protected override void RegisterTypes(IContainerRegistry containerRegistry)
+ {
+
+ //日期加时间页面
+ containerRegistry.RegisterDialog();
+ containerRegistry.RegisterForNavigation();
+ // 注入日志
+ XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));
+ //containerRegistry.RegisterInstance(LogManager.GetLogger(""));
+
+ // 串口工具
+ //containerRegistry.RegisterSingleton();
+ // 指纹机工具
+ //containerRegistry.RegisterSingleton();
+ // 组态屏工具
+ //containerRegistry.RegisterSingleton();
+ // 录像机
+ //containerRegistry.RegisterSingleton();
+
+ containerRegistry.Register();
+
+ // 主窗口
+ containerRegistry.Register();
+ containerRegistry.RegisterForNavigation();
+
+ // 分页
+ //containerRegistry.Register();
+ //containerRegistry.Register();
+
+ // 登录页面
+ containerRegistry.RegisterForNavigation();
+
+ // 布局页面
+ containerRegistry.RegisterForNavigation();
+
+ // 录入指纹模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+
+
+ #region 取药
+
+ ////交接柜补药
+ //containerRegistry.RegisterForNavigation();
+ ////交接柜补药页面弹窗
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+
+
+
+ //// 处方取药页面
+ //containerRegistry.RegisterForNavigation();
+ //// 处方取药模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 调拨取药页面
+ //containerRegistry.RegisterForNavigation();
+ //// 调拨取药模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 抽屉取药页面
+ //containerRegistry.RegisterForNavigation();
+ //// 自选取药模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 自选取药页面
+ //containerRegistry.RegisterForNavigation();
+
+ ////多处方取药
+ //containerRegistry.RegisterForNavigation();
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ #region 加药
+ // 自选加药页面
+ //containerRegistry.RegisterForNavigation();
+ //// 调拨加药页面
+ //containerRegistry.RegisterForNavigation();
+
+ //// 调拨取药模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 抽屉加药页面
+ //containerRegistry.RegisterForNavigation();
+ //// 自选加药模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ ////多批次抽屉加药
+ //containerRegistry.RegisterForNavigation();
+ ////药品请领
+ //containerRegistry.RegisterForNavigation();
+ //// 药品请领模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+
+ ////请领列表
+ //containerRegistry.RegisterForNavigation();
+ ////请领入库
+ //containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ #region 还药
+ // 还药页面
+ //containerRegistry.RegisterForNavigation();
+ //// 按记录归还药品模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+
+ //// 还药页面2
+ //containerRegistry.RegisterForNavigation();
+ //// 按处方归还药品模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 还空瓶页面
+ //containerRegistry.RegisterForNavigation();
+ //// 归还空瓶模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 空瓶销毁模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ #endregion
+
+ #region 库存管理
+ // 库存列表页面
+ //containerRegistry.RegisterForNavigation();
+ //// 库位绑定模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ ////同一药品多批次库位绑定
+ //containerRegistry.RegisterForNavigation();
+ //// 库存盘点页面
+ //containerRegistry.RegisterForNavigation();
+ //// 药品列表页面
+ //containerRegistry.RegisterForNavigation();
+
+ ////交接班记录
+ //containerRegistry.RegisterForNavigation();
+ ////交接班弹窗
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
+ #endregion
+
+ #region 系统设置
+ // 用户管理页面
+ //containerRegistry.RegisterForNavigation();
+ //// 编辑用户模态框
+ //containerRegistry.RegisterDialog();
+ //containerRegistry.RegisterForNavigation();
+ //// 角色管理页面
+ //containerRegistry.RegisterForNavigation();
+ //// 系统设置
+ //containerRegistry.RegisterForNavigation();
+ //// 调试页面
+ //containerRegistry.RegisterForNavigation();
+ ////主设置页面
+ //containerRegistry.RegisterForNavigation();
+ ////两个冰箱抽屉设置页面
+ //containerRegistry.RegisterForNavigation();
+ ////只有一个冰箱抽屉设置页面
+ //containerRegistry.RegisterForNavigation();
+
+ #endregion
+
+ // 设备记录页面
+ //containerRegistry.RegisterForNavigation();
+
+ //containerRegistry.RegisterForNavigation();
+
+
+ }
+ }
+}
diff --git a/DM_Weight/AssemblyInfo.cs b/DM_Weight/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/DM_Weight/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/DM_Weight/Common/CRC16MODBUS.cs b/DM_Weight/Common/CRC16MODBUS.cs
new file mode 100644
index 0000000..6384cf7
--- /dev/null
+++ b/DM_Weight/Common/CRC16MODBUS.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.Common
+{
+ public class CRC16MODBUS
+ {
+ /// Name: CRC-16/MODBUS x16+x15+x2+1
+ /// Poly: 0x8005
+ /// Init: 0xFFFF
+ /// Refin: true
+ /// Refout: true
+ /// Xorout: 0x0000
+ ///******************************添加数据CRC16MODBUS校验位*******************************************
+ public static byte[] CrcModBus(byte[] buffer, int start = 0, int len = 0)
+ {
+ if (buffer == null || buffer.Length == 0) return null;
+ if (start < 0) return null;
+ if (len == 0) len = buffer.Length - start;
+ int length = start + len;
+ if (length > buffer.Length) return null;
+ ushort crc = 0xFFFF;// Initial value
+ for (int i = start; i < length; i++)
+ {
+ crc ^= buffer[i];
+ for (int j = 0; j < 8; j++)
+ {
+ if ((crc & 1) > 0)
+ crc = (ushort)((crc >> 1) ^ 0xA001);// 0xA001 = reverse 0x8005
+ else
+ crc = (ushort)(crc >> 1);
+ }
+ }
+ byte[] ret = BitConverter.GetBytes(crc);
+ //Array.Reverse(ret);
+ return ret;
+ }
+ }
+}
diff --git a/DM_Weight/Common/CommonClass.cs b/DM_Weight/Common/CommonClass.cs
new file mode 100644
index 0000000..daf7730
--- /dev/null
+++ b/DM_Weight/Common/CommonClass.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml;
+
+namespace DM_Weight.Common
+{
+ public class CommonClass
+ {
+ //手动实现调用配置的逻辑 规避修改配置文件后不起作用的问题
+ public static string ReadAppSetting(string key)
+ {
+ string xPath = "/configuration/appSettings//add[@key='" + key + "']";
+ XmlDocument doc = new XmlDocument();
+ string exeFileName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
+ doc.Load(exeFileName + ".dll.config");
+ XmlNode node = doc.SelectSingleNode(xPath);
+ return node.Attributes["value"].Value;
+ }
+ public static void SaveAppSetting(string key,string value)
+ {
+ Configuration _configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
+ _configuration.AppSettings.Settings[key].Value = value;
+ _configuration.Save();
+ ConfigurationManager.RefreshSection(key);
+ }
+ }
+}
diff --git a/DM_Weight/Common/PrismManager.cs b/DM_Weight/Common/PrismManager.cs
new file mode 100644
index 0000000..459848b
--- /dev/null
+++ b/DM_Weight/Common/PrismManager.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.Common
+{
+ public class PrismManager
+ {
+ /////
+ ///// 主页面区域,主要呈现登录页及登录后页面
+ /////
+ //public static readonly string MainViewRegionName = "MainContent";
+ ///
+ /// 设置菜单页面跳转,主要呈现设置下子菜单
+ ///
+ public static readonly string SettingViewRegionName = "SettingViewContent";
+ /////
+ ///// 主页面各菜单页
+ /////
+ //public static readonly string HomeViewRegionName = "HomeViewContent";
+ }
+}
diff --git a/DM_Weight/Common/TemperatureRangeRule.cs b/DM_Weight/Common/TemperatureRangeRule.cs
new file mode 100644
index 0000000..111c8b2
--- /dev/null
+++ b/DM_Weight/Common/TemperatureRangeRule.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows.Data;
+
+namespace DM_Weight.Common
+{
+ //设置冰箱温度规则
+ public class TemperatureRangeRule : ValidationRule
+ {
+ //冰箱温度设置区间为取自配置文件(2~8度)
+ public override ValidationResult Validate(object value, CultureInfo cultureInfo)
+ {
+ bool flag = false;
+ string tips = string.Empty;
+ try
+ {
+ string[] rang = value.ToString().Split('-');
+ if (rang.Length >= 2)
+ {
+ bool bSRange = int.TryParse(rang[0], out int sRange);
+ bool bERange = int.TryParse(rang[1], out int eRange);
+ if (bSRange && bERange)
+ {
+ if ((sRange < 2 || eRange > 8||sRange>8||eRange<2))
+ {
+ tips = "温度区间设置2-8度,请检查输入";
+ return new ValidationResult(flag, tips);
+ }
+ else
+ {
+ flag = true;
+ }
+ }
+ else
+ {
+ tips = "请输入正确的数值";
+ return new ValidationResult(flag, tips);
+ }
+
+ }
+ else
+ {
+ tips = "请输入正确的数值";
+ return new ValidationResult(flag, tips);
+ }
+ return new ValidationResult(flag, tips);
+ }
+ catch (Exception ex)
+ {
+ tips = $"校验异常{ex.ToString()}";
+ return new ValidationResult(flag, tips);
+ }
+ }
+ }
+}
diff --git a/DM_Weight/Components/pagination/Pagination.xaml b/DM_Weight/Components/pagination/Pagination.xaml
new file mode 100644
index 0000000..8b3eee6
--- /dev/null
+++ b/DM_Weight/Components/pagination/Pagination.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DM_Weight/Components/pagination/Pagination.xaml.cs b/DM_Weight/Components/pagination/Pagination.xaml.cs
new file mode 100644
index 0000000..3b404f6
--- /dev/null
+++ b/DM_Weight/Components/pagination/Pagination.xaml.cs
@@ -0,0 +1,265 @@
+using NetTaste;
+using Prism.Commands;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace DM_Weight.Components.pagination
+{
+ ///
+ /// Pagination.xaml 的交互逻辑
+ ///
+ public partial class Pagination : UserControl
+ {
+ public Pagination()
+ {
+ InitializeComponent();
+ ResetInfoText();
+ ResetCurrentPageText();
+ }
+
+ static Pagination()
+ {
+ InitializeCommands();
+
+ }
+
+ private static readonly Type _typeofSelf = typeof(Pagination);
+
+
+ private static void InitializeCommands()
+ {
+ FirstCommand = new RoutedCommand("First", _typeofSelf);
+ PrevCommand = new RoutedCommand("Prev", _typeofSelf);
+ NextCommand = new RoutedCommand("Next", _typeofSelf);
+ EndCommand = new RoutedCommand("End", _typeofSelf);
+
+
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(FirstCommand, OnFirstComman, OnCanFirstComman));
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(PrevCommand, OnPrevCommand, OnCanPrevCommand));
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(NextCommand, OnNextCommand, OnCanNextCommand));
+ CommandManager.RegisterClassCommandBinding(_typeofSelf,
+ new CommandBinding(EndCommand, OnEndCommand, OnCanEndCommand));
+ }
+
+
+
+ public static RoutedCommand FirstCommand { get; private set; }
+ private static void OnFirstComman(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage = 1;
+ }
+
+ private static void OnCanFirstComman(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage > 1;
+ }
+
+ public static RoutedCommand PrevCommand { get; private set; }
+ private static void OnPrevCommand(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage--;
+ }
+
+ private static void OnCanPrevCommand(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage > 1;
+ }
+
+ public static RoutedCommand NextCommand { get; private set; }
+
+ private static void OnNextCommand(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage++;
+ }
+
+ private static void OnCanNextCommand(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage < ctrl.PageCount;
+ }
+ public static RoutedCommand EndCommand { get; private set; }
+ private static void OnEndCommand(object sender, RoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ ctrl.CurrentPage = ctrl.PageCount;
+ }
+
+ private static void OnCanEndCommand(object sender, CanExecuteRoutedEventArgs e)
+ {
+ var ctrl = sender as Pagination;
+ e.CanExecute = ctrl.CurrentPage < ctrl.PageCount;
+ }
+
+
+
+ // 默认当前页码
+ public static int DefaultCurrentPage = 1;
+ // 默认总条数
+ public static int DefaultTotalPages = 0;
+ // 默认每页条数列表
+ public static List DefaultPageSizeList = new List { 10, 20, 50, 100 };
+ // 是否显示页码条数信息
+ public static bool DefaultInfoTextIsEnabel = true;
+ // 默认每页条数
+ public static int DefaultPageSize = 10;
+
+
+ public static readonly DependencyProperty CurrentPageProperty = DependencyProperty
+ .Register("CurrentPage",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultCurrentPage, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ public static readonly DependencyProperty PageSizeProperty = DependencyProperty
+ .Register("PageSize",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultPageSize, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ public static readonly DependencyProperty TotalPagesProperty = DependencyProperty
+ .Register("TotalPages",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultTotalPages, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnItemsSourceChanged)));
+ public static readonly DependencyProperty InfoTextIsEnabelProperty = DependencyProperty
+ .Register("InfoTextIsEnabel",
+ typeof(bool),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(DefaultInfoTextIsEnabel, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ Pagination p = (Pagination)d;
+
+ p.ResetInfoText();
+ }
+
+ [Bindable(true)]
+ [Category("Appearance")]
+ public int CurrentPage
+ {
+ get { return (int)GetValue(CurrentPageProperty); }
+ set
+ {
+ SetValue(CurrentPageProperty, value);
+ if (InfoTextIsEnabel)
+ {
+ ResetInfoText();
+ }
+ ResetCurrentPageText();
+ }
+ }
+
+
+ //private static void OnCurrentPageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ //{
+ // Pagination p = d as Pagination;
+
+ // if (p != null)
+ // {
+ // Console.WriteLine(e.NewValue);
+ // }
+ //}
+
+ [Bindable(true)]
+ [Category("Appearance")]
+ public int PageSize
+ {
+ get { return (int)GetValue(PageSizeProperty); }
+ set
+ {
+ SetValue(PageSizeProperty, value);
+ if (InfoTextIsEnabel)
+ {
+ ResetInfoText();
+ }
+ ResetCurrentPageText();
+ }
+ }
+
+
+ [Bindable(true)]
+ [Category("Appearance")]
+ public int TotalPages
+ {
+ get { return (int)GetValue(TotalPagesProperty); }
+ set
+ {
+ SetValue(TotalPagesProperty, value);
+ if (InfoTextIsEnabel)
+ {
+ ResetInfoText();
+ }
+ ResetCurrentPageText();
+ }
+ }
+
+ public bool InfoTextIsEnabel
+ {
+ get { return (bool)GetValue(InfoTextIsEnabelProperty); }
+ set { SetValue(InfoTextIsEnabelProperty, value); }
+ }
+
+ public int PageCount
+ {
+ get => (int)Math.Ceiling((double)TotalPages / PageSize);
+ }
+
+
+ public void ResetInfoText()
+ {
+ this.Dispatcher.BeginInvoke(() =>
+ {
+ if (InfoTextIsEnabel)
+ {
+ if (TotalPages <= PageSize)
+ {
+ this.InfoBlock.Text = $"1-{TotalPages}/{TotalPages}";
+ if (TotalPages == 0)
+ {
+ this.InfoBlock.Text = $"0-{TotalPages}/{TotalPages}";
+ }
+ } else
+ {
+ this.InfoBlock.Text = ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages;
+ }
+
+ } else
+ {
+ this.InfoBlock.Visibility = Visibility.Visible;
+ }
+
+ });
+
+ }
+
+ public void ResetCurrentPageText()
+ {
+ this.Dispatcher.BeginInvoke(() =>
+ {
+ this.CurrentPageText.Text = CurrentPage + "";
+ });
+
+ }
+
+ }
+}
diff --git a/DM_Weight/Components/pagination/PaginationViewModel.cs b/DM_Weight/Components/pagination/PaginationViewModel.cs
new file mode 100644
index 0000000..00a7f0b
--- /dev/null
+++ b/DM_Weight/Components/pagination/PaginationViewModel.cs
@@ -0,0 +1,81 @@
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace DM_Weight.Components.pagination
+{
+ public class PaginationViewModel: BindableBase, IRegionMemberLifetime
+ {
+ public static readonly DependencyProperty PageSizeProperty = DependencyProperty
+ .Register("CurrentPage",
+ typeof(int),
+ typeof(Pagination),
+ new FrameworkPropertyMetadata(10));
+
+ // 每页条数
+ private int _pageSize = 10;
+ // 当前页码
+ private int _currentPage = 1;
+ // 总条数
+ private int _totalPages = 0;
+
+ public int PageSize { get=> _pageSize; set => SetProperty(ref _pageSize, value); }
+ public int CurrentPage { get => _currentPage; set => SetProperty(ref _currentPage, value); }
+ public int TotalPages { get => _totalPages; set => SetProperty(ref _totalPages, value); }
+ // 总页数
+ public int PageCount
+ {
+ get => (int)Math.Ceiling((double)TotalPages/ PageSize);
+ }
+
+ public string InfoText
+ {
+ get => ((CurrentPage - 1) * PageSize + 1) + "-" + (CurrentPage * PageSize > TotalPages ? TotalPages : CurrentPage * PageSize) + "/" + TotalPages;
+ }
+
+ public bool KeepAlive => false;
+
+
+ public DelegateCommand ToFirst
+ {
+ get => new(() =>
+ {
+ CurrentPage = 1;
+ });
+ }
+
+
+
+ public DelegateCommand ToPrve
+ {
+ get => new(() =>
+ {
+ CurrentPage -= 1;
+ });
+ }
+
+ public DelegateCommand ToNext
+ {
+ get => new(() =>
+ {
+ CurrentPage += 1;
+ });
+ }
+
+ public DelegateCommand ToEnd
+ {
+ get => new(() =>
+ {
+ CurrentPage = PageCount;
+ });
+ }
+
+
+ }
+}
diff --git a/DM_Weight/DM_Weight.csproj b/DM_Weight/DM_Weight.csproj
new file mode 100644
index 0000000..0fcbf69
--- /dev/null
+++ b/DM_Weight/DM_Weight.csproj
@@ -0,0 +1,144 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+
+ 毒麻管理程序
+ Images\favicon.ico
+ AnyCPU;x86;x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tlbimp
+ 0
+ 1
+ fe9ded34-e159-408e-8490-b720a5e632c7
+ 0
+ false
+ False
+
+
+ tlbimp
+ 0
+ 6
+ 4018f953-1bfe-441e-8a04-dc8ba1ff060e
+ 0
+ false
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+ Never
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DM_Weight/HIKVISION/CHCNetSDK.cs b/DM_Weight/HIKVISION/CHCNetSDK.cs
new file mode 100644
index 0000000..2752498
--- /dev/null
+++ b/DM_Weight/HIKVISION/CHCNetSDK.cs
@@ -0,0 +1,20375 @@
+using System;
+using System.Runtime.InteropServices;
+namespace PreviewDemo
+{
+ ///
+ /// CHCNetSDK ժҪ˵
+ ///
+ public class CHCNetSDK
+ {
+ public CHCNetSDK()
+ {
+ //
+ // TODO: ڴ˴ӹ캯
+ //
+ }
+
+ //SDK
+ public const int SDK_PLAYMPEG4 = 1;//ſ
+ public const int SDK_HCNETSDK = 2;//
+
+ public const int NAME_LEN = 32;//û
+ public const int PASSWD_LEN = 16;//볤
+ public const int GUID_LEN = 16; //GUID
+ public const int DEV_TYPE_NAME_LEN = 24; //豸Ƴ
+ public const int MAX_NAMELEN = 16;//DVRص½
+ public const int MAX_RIGHT = 32;//豸ֵ֧Ȩޣ1-12ʾȨޣ13-32ʾԶȨޣ
+ public const int SERIALNO_LEN = 48;//кų
+ public const int MACADDR_LEN = 6;//macַ
+ public const int MAX_ETHERNET = 2;//豸̫
+ public const int MAX_NETWORK_CARD = 4; //豸Ŀ
+ public const int PATHNAME_LEN = 128;//·
+
+ public const int MAX_NUMBER_LEN = 32; //
+ public const int MAX_NAME_LEN = 128; //豸
+
+
+ public const int MAX_TIMESEGMENT = 4;//8000豸ʱ
+ public const int MAX_ICR_NUM = 8; //ץĻ˹ƬԤõ
+
+ public const int MAX_SHELTERNUM = 4;//8000豸ڵ
+ public const int PHONENUMBER_LEN = 32;//pppoeź
+
+ public const int MAX_DISKNUM = 16;//8000豸Ӳ
+ public const int MAX_DISKNUM_V10 = 8;//1.2汾֮ǰ汾
+
+ public const int MAX_WINDOW_V30 = 32;//9000豸ʾŴ
+ public const int MAX_WINDOW = 16;//8000豸Ӳ
+ public const int MAX_VGA_V30 = 4;//9000豸ɽVGA
+ public const int MAX_VGA = 1;//8000豸ɽVGA
+
+ public const int MAX_USERNUM_V30 = 32;//9000豸û
+ public const int MAX_USERNUM = 16;//8000豸û
+ public const int MAX_EXCEPTIONNUM_V30 = 32;//9000豸쳣
+ public const int MAX_EXCEPTIONNUM = 16;//8000豸쳣
+ public const int MAX_LINK = 6;//8000豸ͨƵ
+ public const int MAX_ITC_EXCEPTIONOUT = 32;//ץĻ
+
+ public const int MAX_DECPOOLNUM = 4;//·ÿͨѭ
+ public const int MAX_DECNUM = 4;//·ͨʵֻһ
+ public const int MAX_TRANSPARENTNUM = 2;//·ͨ
+ public const int MAX_CYCLE_CHAN = 16; //·ѭͨ
+ public const int MAX_CYCLE_CHAN_V30 = 64;//ѯͨչ
+ public const int MAX_DIRNAME_LENGTH = 80;//Ŀ¼
+
+ public const int MAX_STRINGNUM_V30 = 8;//9000豸OSDַ
+ public const int MAX_STRINGNUM = 4;//8000豸OSDַ
+ public const int MAX_STRINGNUM_EX = 8;//8000չ
+ public const int MAX_AUXOUT_V30 = 16;//9000豸
+ public const int MAX_AUXOUT = 4;//8000豸
+ public const int MAX_HD_GROUP = 16;//9000豸Ӳ
+ public const int MAX_NFS_DISK = 8; //8000豸NFSӲ
+
+ public const int IW_ESSID_MAX_SIZE = 32;//WIFISSIDų
+ public const int IW_ENCODING_TOKEN_MAX = 32;//WIFIֽ
+ public const int WIFI_WEP_MAX_KEY_COUNT = 4;
+ public const int WIFI_WEP_MAX_KEY_LENGTH = 33;
+ public const int WIFI_WPA_PSK_MAX_KEY_LENGTH = 63;
+ public const int WIFI_WPA_PSK_MIN_KEY_LENGTH = 8;
+ public const int WIFI_MAX_AP_COUNT = 20;
+ public const int MAX_SERIAL_NUM = 64;//ֵ֧ͨ·
+ public const int MAX_DDNS_NUMS = 10;//9000豸ddns
+ public const int MAX_EMAIL_ADDR_LEN = 48;//emailַ
+ public const int MAX_EMAIL_PWD_LEN = 32;//email볤
+
+ public const int MAXPROGRESS = 100;//طʱٷ
+ public const int MAX_SERIALNUM = 2;//8000豸ֵ֧Ĵ 1-232 2-485
+ public const int CARDNUM_LEN = 20;//ų
+ public const int CARDNUM_LEN_OUT = 32; //ⲿṹ忨ų
+ public const int MAX_VIDEOOUT_V30 = 4;//9000豸Ƶ
+ public const int MAX_VIDEOOUT = 2;//8000豸Ƶ
+
+ public const int MAX_PRESET_V30 = 256;// 9000豸ֵ̨֧Ԥõ
+ public const int MAX_TRACK_V30 = 256;// 9000豸ֵ֧Ļɨ
+ public const int MAX_CRUISE_V30 = 256;// 9000豸ֵ̨֧Ѳ
+ public const int MAX_PRESET = 128;// 8000豸ֵ̨֧Ԥõ
+ public const int MAX_TRACK = 128;// 8000豸ֵ֧Ļɨ
+ public const int MAX_CRUISE = 128;// 8000豸ֵ̨֧Ѳ
+
+ public const int CRUISE_MAX_PRESET_NUMS = 32;// һѲѲ
+
+ public const int MAX_SERIAL_PORT = 8;//9000豸֧232
+ public const int MAX_PREVIEW_MODE = 8;// 豸֧ԤģʽĿ 1,4,9,16....
+ public const int MAX_MATRIXOUT = 16;// ģ
+ public const int LOG_INFO_LEN = 11840; // ־Ϣ
+ public const int DESC_LEN = 16;// ַ̨
+ public const int PTZ_PROTOCOL_NUM = 200;// 9000ֵ̨֧Э
+
+ public const int MAX_AUDIO = 1;//8000Խͨ
+ public const int MAX_AUDIO_V30 = 2;//9000Խͨ
+ public const int MAX_CHANNUM = 16;//8000豸ͨ
+ public const int MAX_ALARMIN = 16;//8000豸
+ public const int MAX_ALARMOUT = 4;//8000豸
+ //9000 IPC
+ public const int MAX_ANALOG_CHANNUM = 32;//32ģͨ
+ public const int MAX_ANALOG_ALARMOUT = 32; //32·ģⱨ
+ public const int MAX_ANALOG_ALARMIN = 32;//32·ģⱨ
+
+ public const int MAX_IP_DEVICE = 32;//IP豸
+ public const int MAX_IP_DEVICE_V40 = 64;//IP豸
+ public const int MAX_IP_CHANNEL = 32;//IPͨ
+ public const int MAX_IP_ALARMIN = 128;//౨
+ public const int MAX_IP_ALARMOUT = 64;//౨
+ public const int MAX_IP_ALARMIN_V40 = 4096; //౨
+ public const int MAX_IP_ALARMOUT_V40 = 4096; //౨
+
+ public const int MAX_RECORD_FILE_NUM = 20; // ÿɾ߿¼ļ
+
+ //SDK_V31 ATM
+ public const int MAX_ATM_NUM = 1;
+ public const int MAX_ACTION_TYPE = 12;
+ public const int ATM_FRAMETYPE_NUM = 4;
+ public const int MAX_ATM_PROTOCOL_NUM = 1025;
+ public const int ATM_PROTOCOL_SORT = 4;
+ public const int ATM_DESC_LEN = 32;
+ // SDK_V31 ATM
+
+ /* ֵ֧ͨ ģIP֧ */
+ public const int MAX_CHANNUM_V30 = MAX_ANALOG_CHANNUM + MAX_IP_CHANNEL;//64
+ public const int MAX_ALARMOUT_V30 = MAX_ANALOG_ALARMOUT + MAX_IP_ALARMOUT;//96
+ public const int MAX_ALARMIN_V30 = MAX_ANALOG_ALARMIN + MAX_IP_ALARMIN;//160
+
+ public const int MAX_CHANNUM_V40 = 512;
+ public const int MAX_ALARMOUT_V40 = MAX_IP_ALARMOUT_V40 + MAX_ANALOG_ALARMOUT;//4128
+ public const int MAX_ALARMIN_V40 = MAX_IP_ALARMIN_V40 + MAX_ANALOG_ALARMOUT;//4128
+ public const int MAX_MULTI_AREA_NUM = 24;
+
+ public const int MAX_HUMAN_PICTURE_NUM = 10; //Ƭ
+ public const int MAX_HUMAN_BIRTHDATE_LEN = 10;
+
+ public const int MAX_LAYERNUMS = 32;
+
+ public const int MAX_ROIDETECT_NUM = 8; //ֵ֧ROI
+ public const int MAX_LANERECT_NUM = 5; //ʶ
+ public const int MAX_FORTIFY_NUM = 10; //
+ public const int MAX_INTERVAL_NUM = 4; //ʱ
+ public const int MAX_CHJC_NUM = 3; //ʡݼַ
+ public const int MAX_VL_NUM = 5; //Ȧ
+ public const int MAX_DRIVECHAN_NUM = 16; //
+ public const int MAX_COIL_NUM = 3; //Ȧ
+ public const int MAX_SIGNALLIGHT_NUM = 6; //źŵƸ
+ public const int LEN_32 = 32;
+ public const int LEN_31 = 31;
+ public const int MAX_CABINET_COUNT = 8; //ֻ֧
+ public const int MAX_ID_LEN = 48;
+ public const int MAX_PARKNO_LEN = 16;
+ public const int MAX_ALARMREASON_LEN = 32;
+ public const int MAX_UPGRADE_INFO_LEN= 48; //ȡļƥϢ(ģ)
+ public const int MAX_CUSTOMDIR_LEN = 32; //ԶĿ¼
+
+ public const int MAX_TRANSPARENT_CHAN_NUM = 4; //ÿͨ
+ public const int MAX_TRANSPARENT_ACCESS_NUM = 4; //ÿ˿
+
+ //ITS
+ public const int MAX_PARKING_STATUS = 8; //λ״̬ 01г2ѹ(ȼ), 3λ
+ public const int MAX_PARKING_NUM = 4; //һͨ4λ (ҳλ 03)
+
+ public const int MAX_ITS_SCENE_NUM = 16; //
+ public const int MAX_SCENE_TIMESEG_NUM = 16; //ʱ
+ public const int MAX_IVMS_IP_CHANNEL = 128; //IPͨ
+ public const int DEVICE_ID_LEN = 48; //豸ų
+ public const int MONITORSITE_ID_LEN = 48; //ʾų
+ public const int MAX_AUXAREA_NUM = 16; //Ŀ
+ public const int MAX_SLAVE_CHANNEL_NUM = 16; //ͨ
+
+ public const int MAX_SCH_TASKS_NUM = 10;
+
+ public const int MAX_SERVERID_LEN = 64; //IDij
+ public const int MAX_SERVERDOMAIN_LEN = 128; //
+ public const int MAX_AUTHENTICATEID_LEN = 64; //֤ID
+ public const int MAX_AUTHENTICATEPASSWD_LEN = 32; //֤
+ public const int MAX_SERVERNAME_LEN = 64; //û
+ public const int MAX_COMPRESSIONID_LEN = 64; //ID
+ public const int MAX_SIPSERVER_ADDRESS_LEN = 128; //SIPַ֧IPַ
+ //ѹ߱
+ public const int MAX_PlATE_NO_LEN = 32; //ƺ 2013-09-27
+ public const int UPNP_PORT_NUM = 12; //upnp˿ӳ˿Ŀ
+
+
+ public const int MAX_LOCAL_ADDR_LEN = 96; //SOCKSθ
+ public const int MAX_COUNTRY_NAME_LEN = 4; //ҼдƳ
+
+ public const int THERMOMETRY_ALARMRULE_NUM = 40; //ȳ
+
+ public const int ACS_CARD_NO_LEN = 32; //Žų
+ public const int MAX_ID_NUM_LEN = 32; //֤ų
+ public const int MAX_ID_NAME_LEN = 128; //
+ public const int MAX_ID_ADDR_LEN = 280; //סַ
+ public const int MAX_ID_ISSUING_AUTHORITY_LEN = 128; //ǩس
+
+ public const int MAX_CARD_RIGHT_PLAN_NUM = 4; //Ȩƻ
+ public const int MAX_GROUP_NUM_128 = 128; //Ⱥ
+ public const int MAX_CARD_READER_NUM = 64; //
+ public const int MAX_SNEAK_PATH_NODE = 8; //
+ public const int MAX_MULTI_DOOR_INTERLOCK_GROUP = 8; //Ż
+ public const int MAX_INTER_LOCK_DOOR_NUM = 8; //һŻ
+ public const int MAX_CASE_SENSOR_NUM = 8; //case sensor
+ public const int MAX_DOOR_NUM_256 = 256; //
+ public const int MAX_READER_ROUTE_NUM = 16; //ˢѭ·
+ public const int MAX_FINGER_PRINT_NUM = 10; //ָƸ
+ public const int MAX_CARD_READER_NUM_512 = 512; //
+ public const int NET_SDK_MULTI_CARD_GROUP_NUM_20 = 20; //ؿ
+ public const int CARD_PASSWORD_LEN = 8; //볤
+ public const int MAX_DOOR_CODE_LEN = 8; //볤
+ public const int MAX_LOCK_CODE_LEN = 8; //볤
+
+ public const int MAX_NOTICE_NUMBER_LEN = 32; //
+ public const int MAX_NOTICE_THEME_LEN = 64; //
+ public const int MAX_NOTICE_DETAIL_LEN = 1024; //
+ public const int MAX_NOTICE_PIC_NUM = 6; //ϢͼƬ
+ public const int MAX_DEV_NUMBER_LEN = 32; //豸
+ public const int LOCK_NAME_LEN = 32; //
+
+ public const int GROUP_NAME_LEN = 32; //ȺƳ
+ public const int GROUP_COMBINATION_NUM = 8; //Ⱥ
+ public const int MULTI_CARD_GROUP_NUM = 4; //ؿ
+
+ public const int NET_SDK_EMPLOYEE_NO_LEN = 32; //ų
+ public const int NET_SDK_UUID_LEN = 36; //UUID
+ public const int NET_SDK_EHOME_KEY_LEN = 32; //EHome Key
+
+ public const int NET_DEV_NAME_LEN = 64; //豸Ƴ
+ public const int NET_DEV_TYPE_NAME_LEN = 64; //豸Ƴ
+
+ public const int VCA_MAX_POLYGON_POINT_NUM = 10;//֧10Ķ
+ public const int MAX_RULE_NUM = 8;//
+ public const int MAX_TARGET_NUM = 30;//Ŀ
+ public const int MAX_CALIB_PT = 6;//궨
+ public const int MIN_CALIB_PT = 4;//С궨
+ public const int MAX_TIMESEGMENT_2 = 2;//ʱ
+ public const int MAX_LICENSE_LEN = 16;//ƺ
+ public const int MAX_PLATE_NUM = 3;//Ƹ
+ public const int MAX_MASK_REGION_NUM = 4;//ĸ
+ public const int MAX_SEGMENT_NUM = 6;//궨Ŀ
+ public const int MIN_SEGMENT_NUM = 3;//궨СĿ
+ public const int MAX_CATEGORY_LEN = 8; //ƸϢַ
+ public const int SERIAL_NO_LEN = 16; //λ
+ public const int ILLEGAL_LEN = 32; //Υ볤
+
+ //ӷʽ
+ public const int NORMALCONNECT = 1;
+ public const int MEDIACONNECT = 2;
+
+ //豸ͺ()
+ public const int HCDVR = 1;
+ public const int MEDVR = 2;
+ public const int PCDVR = 3;
+ public const int HC_9000 = 4;
+ public const int HF_I = 5;
+ public const int PCNVR = 6;
+ public const int HC_76NVR = 8;
+
+ //NVR
+ public const int DS8000HC_NVR = 0;
+ public const int DS9000HC_NVR = 1;
+ public const int DS8000ME_NVR = 2;
+
+ /*******************ȫִ begin**********************/
+ public const int NET_DVR_NOERROR = 0;//ûд
+ public const int NET_DVR_PASSWORD_ERROR = 1;//û
+ public const int NET_DVR_NOENOUGHPRI = 2;//Ȩ
+ public const int NET_DVR_NOINIT = 3;//ûгʼ
+ public const int NET_DVR_CHANNEL_ERROR = 4;//ͨŴ
+ public const int NET_DVR_OVER_MAXLINK = 5;//ӵDVRĿͻ˸
+ public const int NET_DVR_VERSIONNOMATCH = 6;//汾ƥ
+ public const int NET_DVR_NETWORK_FAIL_CONNECT = 7;//ӷʧ
+ public const int NET_DVR_NETWORK_SEND_ERROR = 8;//ʧ
+ public const int NET_DVR_NETWORK_RECV_ERROR = 9;//ӷʧ
+ public const int NET_DVR_NETWORK_RECV_TIMEOUT = 10;//ӷݳʱ
+ public const int NET_DVR_NETWORK_ERRORDATA = 11;//͵
+ public const int NET_DVR_ORDER_ERROR = 12;//ô
+ public const int NET_DVR_OPERNOPERMIT = 13;//Ȩ
+ public const int NET_DVR_COMMANDTIMEOUT = 14;//DVRִгʱ
+ public const int NET_DVR_ERRORSERIALPORT = 15;//ںŴ
+ public const int NET_DVR_ERRORALARMPORT = 16;//˿ڴ
+ public const int NET_DVR_PARAMETER_ERROR = 17;//
+ public const int NET_DVR_CHAN_EXCEPTION = 18;//ͨڴ״̬
+ public const int NET_DVR_NODISK = 19;//ûӲ
+ public const int NET_DVR_ERRORDISKNUM = 20;//Ӳ̺Ŵ
+ public const int NET_DVR_DISK_FULL = 21;//Ӳ
+ public const int NET_DVR_DISK_ERROR = 22;//Ӳ̳
+ public const int NET_DVR_NOSUPPORT = 23;//֧
+ public const int NET_DVR_BUSY = 24;//æ
+ public const int NET_DVR_MODIFY_FAIL = 25;//IJɹ
+ public const int NET_DVR_PASSWORD_FORMAT_ERROR = 26;//ʽȷ
+ public const int NET_DVR_DISK_FORMATING = 27;//Ӳڸʽ
+ public const int NET_DVR_DVRNORESOURCE = 28;//DVRԴ
+ public const int NET_DVR_DVROPRATEFAILED = 29;//DVRʧ
+ public const int NET_DVR_OPENHOSTSOUND_FAIL = 30;//PCʧ
+ public const int NET_DVR_DVRVOICEOPENED = 31;//Խռ
+ public const int NET_DVR_TIMEINPUTERROR = 32;//ʱ벻ȷ
+ public const int NET_DVR_NOSPECFILE = 33;//طʱûָļ
+ public const int NET_DVR_CREATEFILE_ERROR = 34;//ļ
+ public const int NET_DVR_FILEOPENFAIL = 35;//ļ
+ public const int NET_DVR_OPERNOTFINISH = 36; //ϴεIJû
+ public const int NET_DVR_GETPLAYTIMEFAIL = 37;//ȡǰŵʱ
+ public const int NET_DVR_PLAYFAIL = 38;//ų
+ public const int NET_DVR_FILEFORMAT_ERROR = 39;//ļʽȷ
+ public const int NET_DVR_DIR_ERROR = 40;//·
+ public const int NET_DVR_ALLOC_RESOURCE_ERROR = 41;//Դ
+ public const int NET_DVR_AUDIO_MODE_ERROR = 42;//ģʽ
+ public const int NET_DVR_NOENOUGH_BUF = 43;//̫С
+ public const int NET_DVR_CREATESOCKET_ERROR = 44;//SOCKET
+ public const int NET_DVR_SETSOCKET_ERROR = 45;//SOCKET
+ public const int NET_DVR_MAX_NUM = 46;//ﵽ
+ public const int NET_DVR_USERNOTEXIST = 47;//û
+ public const int NET_DVR_WRITEFLASHERROR = 48;//дFLASH
+ public const int NET_DVR_UPGRADEFAIL = 49;//DVRʧ
+ public const int NET_DVR_CARDHAVEINIT = 50;//뿨Ѿʼ
+ public const int NET_DVR_PLAYERFAILED = 51;//òſijʧ
+ public const int NET_DVR_MAX_USERNUM = 52;//豸ûﵽ
+ public const int NET_DVR_GETLOCALIPANDMACFAIL = 53;//ÿͻ˵IPַַʧ
+ public const int NET_DVR_NOENCODEING = 54;//ͨûб
+ public const int NET_DVR_IPMISMATCH = 55;//IPַƥ
+ public const int NET_DVR_MACMISMATCH = 56;//MACַƥ
+ public const int NET_DVR_UPGRADELANGMISMATCH = 57;//ļԲƥ
+ public const int NET_DVR_MAX_PLAYERPORT = 58;//·ﵽ
+ public const int NET_DVR_NOSPACEBACKUP = 59;//豸û㹻ռб
+ public const int NET_DVR_NODEVICEBACKUP = 60;//ûҵָı豸
+ public const int NET_DVR_PICTURE_BITS_ERROR = 61;//ͼλ24ɫ
+ public const int NET_DVR_PICTURE_DIMENSION_ERROR = 62;//ͼƬ*ޣ 128*256
+ public const int NET_DVR_PICTURE_SIZ_ERROR = 63;//ͼƬСޣ100K
+ public const int NET_DVR_LOADPLAYERSDKFAILED = 64;//뵱ǰĿ¼Player Sdk
+ public const int NET_DVR_LOADPLAYERSDKPROC_ERROR = 65;//ҲPlayer Sdkij
+ public const int NET_DVR_LOADDSSDKFAILED = 66;//뵱ǰĿ¼DSsdk
+ public const int NET_DVR_LOADDSSDKPROC_ERROR = 67;//ҲDsSdkij
+ public const int NET_DVR_DSSDK_ERROR = 68;//ӲDsSdkijʧ
+ public const int NET_DVR_VOICEMONOPOLIZE = 69;//ռ
+ public const int NET_DVR_JOINMULTICASTFAILED = 70;//ಥʧ
+ public const int NET_DVR_CREATEDIR_ERROR = 71;//־ļĿ¼ʧ
+ public const int NET_DVR_BINDSOCKET_ERROR = 72;//ʧ
+ public const int NET_DVR_SOCKETCLOSE_ERROR = 73;//socketжϣ˴ͨжϻĿĵزɴ
+ public const int NET_DVR_USERID_ISUSING = 74;//עʱûIDڽij
+ public const int NET_DVR_SOCKETLISTEN_ERROR = 75;//ʧ
+ public const int NET_DVR_PROGRAM_EXCEPTION = 76;//쳣
+ public const int NET_DVR_WRITEFILE_FAILED = 77;//дļʧ
+ public const int NET_DVR_FORMAT_READONLY = 78;//ֹʽֻӲ
+ public const int NET_DVR_WITHSAMEUSERNAME = 79;//ûýṹдͬû
+ public const int NET_DVR_DEVICETYPE_ERROR = 80;//ʱ豸ͺŲƥ
+ public const int NET_DVR_LANGUAGE_ERROR = 81;//ʱԲƥ
+ public const int NET_DVR_PARAVERSION_ERROR = 82;//ʱ汾ƥ
+ public const int NET_DVR_IPCHAN_NOTALIVE = 83; //ԤʱIPͨ
+ public const int NET_DVR_RTSP_SDK_ERROR = 84;//ظIPCͨѶStreamTransClient.dllʧ
+ public const int NET_DVR_CONVERT_SDK_ERROR = 85;//תʧ
+ public const int NET_DVR_IPC_COUNT_OVERFLOW = 86;//ipͨ
+ public const int NET_DVR_USER_LOCKED = 153;
+
+ public const int NET_PLAYM4_NOERROR = 500;//no error
+ public const int NET_PLAYM4_PARA_OVER = 501;//input parameter is invalid
+ public const int NET_PLAYM4_ORDER_ERROR = 502;//The order of the function to be called is error
+ public const int NET_PLAYM4_TIMER_ERROR = 503;//Create multimedia clock failed
+ public const int NET_PLAYM4_DEC_VIDEO_ERROR = 504;//Decode video data failed
+ public const int NET_PLAYM4_DEC_AUDIO_ERROR = 505;//Decode audio data failed
+ public const int NET_PLAYM4_ALLOC_MEMORY_ERROR = 506;//Allocate memory failed
+ public const int NET_PLAYM4_OPEN_FILE_ERROR = 507;//Open the file failed
+ public const int NET_PLAYM4_CREATE_OBJ_ERROR = 508;//Create thread or event failed
+ public const int NET_PLAYM4_CREATE_DDRAW_ERROR = 509;//Create DirectDraw object failed
+ public const int NET_PLAYM4_CREATE_OFFSCREEN_ERROR = 510;//failed when creating off-screen surface
+ public const int NET_PLAYM4_BUF_OVER = 511;//buffer is overflow
+ public const int NET_PLAYM4_CREATE_SOUND_ERROR = 512;//failed when creating audio device
+ public const int NET_PLAYM4_SET_VOLUME_ERROR = 513;//Set volume failed
+ public const int NET_PLAYM4_SUPPORT_FILE_ONLY = 514;//The function only support play file
+ public const int NET_PLAYM4_SUPPORT_STREAM_ONLY = 515;//The function only support play stream
+ public const int NET_PLAYM4_SYS_NOT_SUPPORT = 516;//System not support
+ public const int NET_PLAYM4_FILEHEADER_UNKNOWN = 517;//No file header
+ public const int NET_PLAYM4_VERSION_INCORRECT = 518;//The version of decoder and encoder is not adapted
+ public const int NET_PALYM4_INIT_DECODER_ERROR = 519;//Initialize decoder failed
+ public const int NET_PLAYM4_CHECK_FILE_ERROR = 520;//The file data is unknown
+ public const int NET_PLAYM4_INIT_TIMER_ERROR = 521;//Initialize multimedia clock failed
+ public const int NET_PLAYM4_BLT_ERROR = 522;//Blt failed
+ public const int NET_PLAYM4_UPDATE_ERROR = 523;//Update failed
+ public const int NET_PLAYM4_OPEN_FILE_ERROR_MULTI = 524;//openfile error, streamtype is multi
+ public const int NET_PLAYM4_OPEN_FILE_ERROR_VIDEO = 525;//openfile error, streamtype is video
+ public const int NET_PLAYM4_JPEG_COMPRESS_ERROR = 526;//JPEG compress error
+ public const int NET_PLAYM4_EXTRACT_NOT_SUPPORT = 527;//Don't support the version of this file
+ public const int NET_PLAYM4_EXTRACT_DATA_ERROR = 528;//extract video data failed
+ /*******************ȫִ end**********************/
+
+ /*************************************************
+ NET_DVR_IsSupport()ֵ
+ 19λֱʾϢλTRUE)ʾ֧֣
+ **************************************************/
+ public const int NET_DVR_SUPPORT_DDRAW = 1;//֧DIRECTDRAW֧֣ܹ
+ public const int NET_DVR_SUPPORT_BLT = 2;//Կ֧BLT֧֣ܹ
+ public const int NET_DVR_SUPPORT_BLTFOURCC = 4;//ԿBLT֧ɫת֧֣RGBת
+ public const int NET_DVR_SUPPORT_BLTSHRINKX = 8;//ԿBLT֧XС֧֣ϵͳת
+ public const int NET_DVR_SUPPORT_BLTSHRINKY = 16;//ԿBLT֧YС֧֣ϵͳת
+ public const int NET_DVR_SUPPORT_BLTSTRETCHX = 32;//ԿBLT֧XŴ֧֣ϵͳת
+ public const int NET_DVR_SUPPORT_BLTSTRETCHY = 64;//ԿBLT֧YŴ֧֣ϵͳת
+ public const int NET_DVR_SUPPORT_SSE = 128;//CPU֧SSEָIntel Pentium3֧SSEָ
+ public const int NET_DVR_SUPPORT_MMX = 256;//CPU֧MMXָIntel Pentium3֧SSEָ
+
+ /**********************̨ begin*************************/
+ public const int LIGHT_PWRON = 2;// ͨƹԴ
+ public const int WIPER_PWRON = 3;// ͨˢ
+ public const int FAN_PWRON = 4;// ͨȿ
+ public const int HEATER_PWRON = 5;// ͨ
+ public const int AUX_PWRON1 = 6;// ͨ豸
+ public const int AUX_PWRON2 = 7;// ͨ豸
+ public const int SET_PRESET = 8;// Ԥõ
+ public const int CLE_PRESET = 9;// Ԥõ
+
+ public const int ZOOM_IN = 11;// ٶSS(ʱ)
+ public const int ZOOM_OUT = 12;// ٶSSС(ʱС)
+ public const int FOCUS_NEAR = 13;// ٶSSǰ
+ public const int FOCUS_FAR = 14;// ٶSS
+ public const int IRIS_OPEN = 15;// ȦٶSS
+ public const int IRIS_CLOSE = 16;// ȦٶSSС
+
+ public const int TILT_UP = 21;/* ̨SSٶ */
+ public const int TILT_DOWN = 22;/* ̨SSٶ¸ */
+ public const int PAN_LEFT = 23;/* ̨SSٶת */
+ public const int PAN_RIGHT = 24;/* ̨SSٶת */
+ public const int UP_LEFT = 25;/* ̨SSٶת */
+ public const int UP_RIGHT = 26;/* ̨SSٶת */
+ public const int DOWN_LEFT = 27;/* ̨SSٶ¸ת */
+ public const int DOWN_RIGHT = 28;/* ̨SSٶ¸ת */
+ public const int PAN_AUTO = 29;/* ̨SSٶԶɨ */
+
+ public const int FILL_PRE_SEQ = 30;/* ԤõѲ */
+ public const int SET_SEQ_DWELL = 31;/* Ѳͣʱ */
+ public const int SET_SEQ_SPEED = 32;/* Ѳٶ */
+ public const int CLE_PRE_SEQ = 33;/* ԤõѲɾ */
+ public const int STA_MEM_CRUISE = 34;/* ʼ¼ */
+ public const int STO_MEM_CRUISE = 35;/* ֹͣ¼ */
+ public const int RUN_CRUISE = 36;/* ʼ */
+ public const int RUN_SEQ = 37;/* ʼѲ */
+ public const int STOP_SEQ = 38;/* ֹͣѲ */
+ public const int GOTO_PRESET = 39;/* תԤõ */
+ /**********************̨ end*************************/
+
+ /*************************************************
+ طʱſ궨
+ NET_DVR_PlayBackControl
+ NET_DVR_PlayControlLocDisplay
+ NET_DVR_DecPlayBackCtrlĺ궨
+ ֲ֧鿴˵ʹ
+ **************************************************/
+ public const int NET_DVR_PLAYSTART = 1;//ʼ
+ public const int NET_DVR_PLAYSTOP = 2;//ֹͣ
+ public const int NET_DVR_PLAYPAUSE = 3;//ͣ
+ public const int NET_DVR_PLAYRESTART = 4;//ָ
+ public const int NET_DVR_PLAYFAST = 5;//
+ public const int NET_DVR_PLAYSLOW = 6;//
+ public const int NET_DVR_PLAYNORMAL = 7;//ٶ
+ public const int NET_DVR_PLAYFRAME = 8;//֡
+ public const int NET_DVR_PLAYSTARTAUDIO = 9;//
+ public const int NET_DVR_PLAYSTOPAUDIO = 10;//ر
+ public const int NET_DVR_PLAYAUDIOVOLUME = 11;//
+ public const int NET_DVR_PLAYSETPOS = 12;//ıļطŵĽ
+ public const int NET_DVR_PLAYGETPOS = 13;//ȡļطŵĽ
+ public const int NET_DVR_PLAYGETTIME = 14;//ȡǰѾŵʱ(ļطŵʱЧ)
+ public const int NET_DVR_PLAYGETFRAME = 15;//ȡǰѾŵ֡(ļطŵʱЧ)
+ public const int NET_DVR_GETTOTALFRAMES = 16;//ȡǰļܵ֡(ļطŵʱЧ)
+ public const int NET_DVR_GETTOTALTIME = 17;//ȡǰļܵʱ(ļطŵʱЧ)
+ public const int NET_DVR_THROWBFRAME = 20;//B֡
+ public const int NET_DVR_SETSPEED = 24;//ٶ
+ public const int NET_DVR_KEEPALIVE = 25;//豸(ص2뷢һ)
+ public const int NET_DVR_PLAYSETTIME = 26;//ʱ䶨λ
+ public const int NET_DVR_PLAYGETTOTALLEN = 27;//ȡʱطŶӦʱڵļܳ
+ public const int NET_DVR_PLAY_FORWARD = 29;//лΪ
+ public const int NET_DVR_PLAY_REVERSE = 30;//лΪ
+ public const int NET_DVR_SET_TRANS_TYPE = 32;//תװ
+ public const int NET_DVR_PLAY_CONVERT = 33;//лΪ
+
+ //Զ̰£
+ /* key value send to CONFIG program */
+ public const int KEY_CODE_1 = 1;
+ public const int KEY_CODE_2 = 2;
+ public const int KEY_CODE_3 = 3;
+ public const int KEY_CODE_4 = 4;
+ public const int KEY_CODE_5 = 5;
+ public const int KEY_CODE_6 = 6;
+ public const int KEY_CODE_7 = 7;
+ public const int KEY_CODE_8 = 8;
+ public const int KEY_CODE_9 = 9;
+ public const int KEY_CODE_0 = 10;
+ public const int KEY_CODE_POWER = 11;
+ public const int KEY_CODE_MENU = 12;
+ public const int KEY_CODE_ENTER = 13;
+ public const int KEY_CODE_CANCEL = 14;
+ public const int KEY_CODE_UP = 15;
+ public const int KEY_CODE_DOWN = 16;
+ public const int KEY_CODE_LEFT = 17;
+ public const int KEY_CODE_RIGHT = 18;
+ public const int KEY_CODE_EDIT = 19;
+ public const int KEY_CODE_ADD = 20;
+ public const int KEY_CODE_MINUS = 21;
+ public const int KEY_CODE_PLAY = 22;
+ public const int KEY_CODE_REC = 23;
+ public const int KEY_CODE_PAN = 24;
+ public const int KEY_CODE_M = 25;
+ public const int KEY_CODE_A = 26;
+ public const int KEY_CODE_F1 = 27;
+ public const int KEY_CODE_F2 = 28;
+
+ /* for PTZ control */
+ public const int KEY_PTZ_UP_START = KEY_CODE_UP;
+ public const int KEY_PTZ_UP_STOP = 32;
+
+ public const int KEY_PTZ_DOWN_START = KEY_CODE_DOWN;
+ public const int KEY_PTZ_DOWN_STOP = 33;
+
+
+ public const int KEY_PTZ_LEFT_START = KEY_CODE_LEFT;
+ public const int KEY_PTZ_LEFT_STOP = 34;
+
+ public const int KEY_PTZ_RIGHT_START = KEY_CODE_RIGHT;
+ public const int KEY_PTZ_RIGHT_STOP = 35;
+
+ public const int KEY_PTZ_AP1_START = KEY_CODE_EDIT;/* Ȧ+ */
+ public const int KEY_PTZ_AP1_STOP = 36;
+
+ public const int KEY_PTZ_AP2_START = KEY_CODE_PAN;/* Ȧ- */
+ public const int KEY_PTZ_AP2_STOP = 37;
+
+ public const int KEY_PTZ_FOCUS1_START = KEY_CODE_A;/* ۽+ */
+ public const int KEY_PTZ_FOCUS1_STOP = 38;
+
+ public const int KEY_PTZ_FOCUS2_START = KEY_CODE_M;/* ۽- */
+ public const int KEY_PTZ_FOCUS2_STOP = 39;
+
+ public const int KEY_PTZ_B1_START = 40;/* 䱶+ */
+ public const int KEY_PTZ_B1_STOP = 41;
+
+ public const int KEY_PTZ_B2_START = 42;/* 䱶- */
+ public const int KEY_PTZ_B2_STOP = 43;
+
+ //9000
+ public const int KEY_CODE_11 = 44;
+ public const int KEY_CODE_12 = 45;
+ public const int KEY_CODE_13 = 46;
+ public const int KEY_CODE_14 = 47;
+ public const int KEY_CODE_15 = 48;
+ public const int KEY_CODE_16 = 49;
+
+ /************************* begin*******************************/
+ //NET_DVR_SetDVRConfigNET_DVR_GetDVRConfig,עӦýṹ
+ public const int NET_DVR_GET_DEVICECFG = 100;//ȡ豸
+ public const int NET_DVR_SET_DEVICECFG = 101;//豸
+ public const int NET_DVR_GET_NETCFG = 102;//ȡ
+ public const int NET_DVR_SET_NETCFG = 103;//
+ public const int NET_DVR_GET_PICCFG = 104;//ȡͼ
+ public const int NET_DVR_SET_PICCFG = 105;//ͼ
+ public const int NET_DVR_GET_COMPRESSCFG = 106;//ȡѹ
+ public const int NET_DVR_SET_COMPRESSCFG = 107;//ѹ
+ public const int NET_DVR_GET_RECORDCFG = 108;//ȡ¼ʱ
+ public const int NET_DVR_SET_RECORDCFG = 109;//¼ʱ
+ public const int NET_DVR_GET_DECODERCFG = 110;//ȡ
+ public const int NET_DVR_SET_DECODERCFG = 111;//ý
+ public const int NET_DVR_GET_RS232CFG = 112;//ȡ232ڲ
+ public const int NET_DVR_SET_RS232CFG = 113;//232ڲ
+ public const int NET_DVR_GET_ALARMINCFG = 114;//ȡ
+ public const int NET_DVR_SET_ALARMINCFG = 115;//ñ
+ public const int NET_DVR_GET_ALARMOUTCFG = 116;//ȡ
+ public const int NET_DVR_SET_ALARMOUTCFG = 117;//ñ
+ public const int NET_DVR_GET_TIMECFG = 118;//ȡDVRʱ
+ public const int NET_DVR_SET_TIMECFG = 119;//DVRʱ
+ public const int NET_DVR_GET_PREVIEWCFG = 120;//ȡԤ
+ public const int NET_DVR_SET_PREVIEWCFG = 121;//Ԥ
+ public const int NET_DVR_GET_VIDEOOUTCFG = 122;//ȡƵ
+ public const int NET_DVR_SET_VIDEOOUTCFG = 123;//Ƶ
+ public const int NET_DVR_GET_USERCFG = 124;//ȡû
+ public const int NET_DVR_SET_USERCFG = 125;//û
+ public const int NET_DVR_GET_EXCEPTIONCFG = 126;//ȡ쳣
+ public const int NET_DVR_SET_EXCEPTIONCFG = 127;//쳣
+ public const int NET_DVR_GET_ZONEANDDST = 128;//ȡʱʱƲ
+ public const int NET_DVR_SET_ZONEANDDST = 129;//ʱʱƲ
+ public const int NET_DVR_GET_SHOWSTRING = 130;//ȡַ
+ public const int NET_DVR_SET_SHOWSTRING = 131;//õַ
+ public const int NET_DVR_GET_EVENTCOMPCFG = 132;//ȡ¼¼
+ public const int NET_DVR_SET_EVENTCOMPCFG = 133;//¼¼
+
+ public const int NET_DVR_GET_AUXOUTCFG = 140;//ȡ(HS豸2006-02-28)
+ public const int NET_DVR_SET_AUXOUTCFG = 141;//ñ(HS豸2006-02-28)
+ public const int NET_DVR_GET_PREVIEWCFG_AUX = 142;//ȡ-sϵ˫Ԥ(-sϵ˫2006-04-13)
+ public const int NET_DVR_SET_PREVIEWCFG_AUX = 143;//-sϵ˫Ԥ(-sϵ˫2006-04-13)
+
+ public const int NET_DVR_GET_PICCFG_EX = 200;//ȡͼ(SDK_V14չ)
+ public const int NET_DVR_SET_PICCFG_EX = 201;//ͼ(SDK_V14չ)
+ public const int NET_DVR_GET_USERCFG_EX = 202;//ȡû(SDK_V15չ)
+ public const int NET_DVR_SET_USERCFG_EX = 203;//û(SDK_V15չ)
+ public const int NET_DVR_GET_COMPRESSCFG_EX = 204;//ȡѹ(SDK_V15չ2006-05-15)
+ public const int NET_DVR_SET_COMPRESSCFG_EX = 205;//ѹ(SDK_V15չ2006-05-15)
+
+ public const int NET_DVR_GET_NETAPPCFG = 222;//ȡӦò NTP/DDNS/EMAIL
+ public const int NET_DVR_SET_NETAPPCFG = 223;//Ӧò NTP/DDNS/EMAIL
+ public const int NET_DVR_GET_NTPCFG = 224;//ȡӦò NTP
+ public const int NET_DVR_SET_NTPCFG = 225;//Ӧò NTP
+ public const int NET_DVR_GET_DDNSCFG = 226;//ȡӦò DDNS
+ public const int NET_DVR_SET_DDNSCFG = 227;//Ӧò DDNS
+ //ӦNET_DVR_EMAILPARA
+ public const int NET_DVR_GET_EMAILCFG = 228;//ȡӦò EMAIL
+ public const int NET_DVR_SET_EMAILCFG = 229;//Ӧò EMAIL
+
+ public const int NET_DVR_GET_NFSCFG = 230;/* NFS disk config */
+ public const int NET_DVR_SET_NFSCFG = 231;/* NFS disk config */
+
+ public const int NET_DVR_GET_SHOWSTRING_EX = 238;//ȡַչ(֧8ַ)
+ public const int NET_DVR_SET_SHOWSTRING_EX = 239;//õַչ(֧8ַ)
+ public const int NET_DVR_GET_NETCFG_OTHER = 244;//ȡ
+ public const int NET_DVR_SET_NETCFG_OTHER = 245;//
+
+ //ӦNET_DVR_EMAILCFGṹ
+ public const int NET_DVR_GET_EMAILPARACFG = 250;//Get EMAIL parameters
+ public const int NET_DVR_SET_EMAILPARACFG = 251;//Setup EMAIL parameters
+
+ public const int NET_DVR_GET_DDNSCFG_EX = 274;//ȡչDDNS
+ public const int NET_DVR_SET_DDNSCFG_EX = 275;//չDDNS
+
+ public const int NET_DVR_SET_PTZPOS = 292;//̨PTZλ
+ public const int NET_DVR_GET_PTZPOS = 293;//̨ȡPTZλ
+ public const int NET_DVR_GET_PTZSCOPE = 294;//̨ȡPTZΧ
+
+ public const int NET_DVR_GET_AP_INFO_LIST = 305;//ȡԴ
+ public const int NET_DVR_SET_WIFI_CFG = 306;//IP豸߲
+ public const int NET_DVR_GET_WIFI_CFG = 307;//ȡIP豸߲
+ public const int NET_DVR_SET_WIFI_WORKMODE = 308;//IP豸ڹģʽ
+ public const int NET_DVR_GET_WIFI_WORKMODE = 309;//ȡIP豸ڹģʽ
+ public const int NET_DVR_GET_WIFI_STATUS = 310; //ȡ豸ǰwifi״̬
+
+ /***************************ܷ begin *****************************/
+ //豸
+ public const int DS6001_HF_B = 60;//쳣ΪʶDS6001-HF/B
+ public const int DS6001_HF_P = 61;//ʶDS6001-HF/P
+ public const int DS6002_HF_B = 62;//˫DS6002-HF/B
+ public const int DS6101_HF_B = 63;//쳣ΪʶDS6101-HF/B
+ public const int IDS52XX = 64;//ܷIVMS
+ public const int DS9000_IVS = 65;//9000ϵDVR
+ public const int DS8004_AHL_A = 66;//ATM, DS8004AHL-S/A
+ public const int DS6101_HF_P = 67;//ʶDS6101-HF/P
+
+ //ȡ
+ public const int VCA_DEV_ABILITY = 256;//豸ܷ
+ public const int VCA_CHAN_ABILITY = 272;//쳣Ϊʶ
+ public const int MATRIXDECODER_ABILITY = 512;//·ʾ
+ //ȡ/ôӿڲ
+ //ʶNET_VCA_PLATE_CFG
+ public const int NET_DVR_SET_PLATECFG = 150;//óʶ
+ public const int NET_DVR_GET_PLATECFG = 151;//ȡʶ
+ //ΪӦNET_VCA_RULECFG
+ public const int NET_DVR_SET_RULECFG = 152;//쳣Ϊʶ
+ public const int NET_DVR_GET_RULECFG = 153;//ȡ쳣Ϊʶ
+
+ //˫궨NET_DVR_LF_CFG
+ public const int NET_DVR_SET_LF_CFG = 160;//˫ò
+ public const int NET_DVR_GET_LF_CFG = 161;//ȡ˫ò
+
+ //ܷȡýṹ
+ public const int NET_DVR_SET_IVMS_STREAMCFG = 162;//ܷȡ
+ public const int NET_DVR_GET_IVMS_STREAMCFG = 163;//ȡܷȡ
+
+ //ܿƲṹ
+ public const int NET_DVR_SET_VCA_CTRLCFG = 164;//ܿƲ
+ public const int NET_DVR_GET_VCA_CTRLCFG = 165;//ȡܿƲ
+
+ //NET_VCA_MASK_REGION_LIST
+ public const int NET_DVR_SET_VCA_MASK_REGION = 166;//
+ public const int NET_DVR_GET_VCA_MASK_REGION = 167;//ȡ
+
+ //ATM NET_VCA_ENTER_REGION
+ public const int NET_DVR_SET_VCA_ENTER_REGION = 168;//ý
+ public const int NET_DVR_GET_VCA_ENTER_REGION = 169;//ȡ
+
+ //궨NET_VCA_LINE_SEGMENT_LIST
+ public const int NET_DVR_SET_VCA_LINE_SEGMENT = 170;//ñ궨
+ public const int NET_DVR_GET_VCA_LINE_SEGMENT = 171;//ȡ궨
+
+ // ivmsNET_IVMS_MASK_REGION_LIST
+ public const int NET_DVR_SET_IVMS_MASK_REGION = 172;//IVMS
+ public const int NET_DVR_GET_IVMS_MASK_REGION = 173;//ȡIVMS
+ // ivmsNET_IVMS_ENTER_REGION
+ public const int NET_DVR_SET_IVMS_ENTER_REGION = 174;//IVMS
+ public const int NET_DVR_GET_IVMS_ENTER_REGION = 175;//ȡIVMS
+
+ public const int NET_DVR_SET_IVMS_BEHAVIORCFG = 176;//ܷΪ
+ public const int NET_DVR_GET_IVMS_BEHAVIORCFG = 177;//ȡܷΪ
+
+ // IVMS طż
+ public const int NET_DVR_IVMS_SET_SEARCHCFG = 178;//IVMSطż
+ public const int NET_DVR_IVMS_GET_SEARCHCFG = 179;//ȡIVMSطż
+
+ /***************************DS9000(_V30) begin *****************************/
+ //(NET_DVR_NETCFG_V30ṹ)
+ public const int NET_DVR_GET_NETCFG_V30 = 1000;//ȡ
+ public const int NET_DVR_SET_NETCFG_V30 = 1001;//
+
+ //ͼ(NET_DVR_PICCFG_V30ṹ)
+ public const int NET_DVR_GET_PICCFG_V30 = 1002;//ȡͼ
+ public const int NET_DVR_SET_PICCFG_V30 = 1003;//ͼ
+
+ //ͼ(NET_DVR_PICCFG_V40ṹ)
+ public const int NET_DVR_GET_PICCFG_V40 = 6179;//ȡͼV40չ
+ public const int NET_DVR_SET_PICCFG_V40 = 6180;//ͼV40չ
+
+ //¼ʱ(NET_DVR_RECORD_V30ṹ)
+ public const int NET_DVR_GET_RECORDCFG_V30 = 1004;//ȡ¼
+ public const int NET_DVR_SET_RECORDCFG_V30 = 1005;//¼
+
+ public const int NET_DVR_GET_RECORDCFG_V40 = 1008; //ȡ¼(չ)
+ public const int NET_DVR_SET_RECORDCFG_V40 = 1009; //¼(չ)
+
+ //û(NET_DVR_USER_V30ṹ)
+ public const int NET_DVR_GET_USERCFG_V30 = 1006;//ȡû
+ public const int NET_DVR_SET_USERCFG_V30 = 1007;//û
+
+ //9000DDNS(NET_DVR_DDNSPARA_V30ṹ)
+ public const int NET_DVR_GET_DDNSCFG_V30 = 1010;//ȡDDNS(9000չ)
+ public const int NET_DVR_SET_DDNSCFG_V30 = 1011;//DDNS(9000չ)
+
+ //EMAIL(NET_DVR_EMAILCFG_V30ṹ)
+ public const int NET_DVR_GET_EMAILCFG_V30 = 1012;//ȡEMAIL
+ public const int NET_DVR_SET_EMAILCFG_V30 = 1013;//EMAIL
+
+ //Ѳ (NET_DVR_CRUISE_PARAṹ)
+ public const int NET_DVR_GET_CRUISE = 1020;
+ public const int NET_DVR_SET_CRUISE = 1021;
+
+ //ṹ (NET_DVR_ALARMINCFG_V30ṹ)
+ public const int NET_DVR_GET_ALARMINCFG_V30 = 1024;
+ public const int NET_DVR_SET_ALARMINCFG_V30 = 1025;
+
+ //ṹ (NET_DVR_ALARMOUTCFG_V30ṹ)
+ public const int NET_DVR_GET_ALARMOUTCFG_V30 = 1026;
+ public const int NET_DVR_SET_ALARMOUTCFG_V30 = 1027;
+
+ //Ƶṹ (NET_DVR_VIDEOOUT_V30ṹ)
+ public const int NET_DVR_GET_VIDEOOUTCFG_V30 = 1028;
+ public const int NET_DVR_SET_VIDEOOUTCFG_V30 = 1029;
+
+ //ַṹ (NET_DVR_SHOWSTRING_V30ṹ)
+ public const int NET_DVR_GET_SHOWSTRING_V30 = 1030;
+ public const int NET_DVR_SET_SHOWSTRING_V30 = 1031;
+
+ //쳣ṹ (NET_DVR_EXCEPTION_V30ṹ)
+ public const int NET_DVR_GET_EXCEPTIONCFG_V30 = 1034;
+ public const int NET_DVR_SET_EXCEPTIONCFG_V30 = 1035;
+
+ //232ṹ (NET_DVR_RS232CFG_V30ṹ)
+ public const int NET_DVR_GET_RS232CFG_V30 = 1036;
+ public const int NET_DVR_SET_RS232CFG_V30 = 1037;
+
+ //Ӳ̽ṹ (NET_DVR_NET_DISKCFGṹ)
+ public const int NET_DVR_GET_NET_DISKCFG = 1038;//Ӳ̽ȡ
+ public const int NET_DVR_SET_NET_DISKCFG = 1039;//Ӳ̽
+
+ //ѹ (NET_DVR_COMPRESSIONCFG_V30ṹ)
+ public const int NET_DVR_GET_COMPRESSCFG_V30 = 1040;
+ public const int NET_DVR_SET_COMPRESSCFG_V30 = 1041;
+
+ //ȡ485 (NET_DVR_DECODERCFG_V30ṹ)
+ public const int NET_DVR_GET_DECODERCFG_V30 = 1042;//ȡ
+ public const int NET_DVR_SET_DECODERCFG_V30 = 1043;//ý
+
+ //ȡԤ (NET_DVR_PREVIEWCFG_V30ṹ)
+ public const int NET_DVR_GET_PREVIEWCFG_V30 = 1044;//ȡԤ
+ public const int NET_DVR_SET_PREVIEWCFG_V30 = 1045;//Ԥ
+
+ //Ԥ (NET_DVR_PREVIEWCFG_AUX_V30ṹ)
+ public const int NET_DVR_GET_PREVIEWCFG_AUX_V30 = 1046;//ȡԤ
+ public const int NET_DVR_SET_PREVIEWCFG_AUX_V30 = 1047;//øԤ
+
+ //IPò NET_DVR_IPPARACFGṹ
+ public const int NET_DVR_GET_IPPARACFG = 1048; //ȡIPϢ
+ public const int NET_DVR_SET_IPPARACFG = 1049;//IPϢ
+
+ //IPò NET_DVR_IPPARACFG_V40ṹ
+ public const int NET_DVR_GET_IPPARACFG_V40 = 1062; //ȡIPϢ
+ public const int NET_DVR_SET_IPPARACFG_V40 = 1063;//IPϢ
+
+ //IPò NET_DVR_IPALARMINCFGṹ
+ public const int NET_DVR_GET_IPALARMINCFG = 1050; //ȡIPϢ
+ public const int NET_DVR_SET_IPALARMINCFG = 1051; //IPϢ
+
+ //IPò NET_DVR_IPALARMOUTCFGṹ
+ public const int NET_DVR_GET_IPALARMOUTCFG = 1052;//ȡIPϢ
+ public const int NET_DVR_SET_IPALARMOUTCFG = 1053;//IPϢ
+
+ //Ӳ̹IJȡ (NET_DVR_HDCFGṹ)
+ public const int NET_DVR_GET_HDCFG = 1054;//ȡӲ̹ò
+ public const int NET_DVR_SET_HDCFG = 1055;//Ӳ̹ò
+
+ //IJȡ (NET_DVR_HDGROUP_CFGṹ)
+ public const int NET_DVR_GET_HDGROUP_CFG = 1056;//ȡò
+ public const int NET_DVR_SET_HDGROUP_CFG = 1057;//ò
+
+ //豸(NET_DVR_COMPRESSION_AUDIOṹ)
+ public const int NET_DVR_GET_COMPRESSCFG_AUD = 1058;//ȡ豸Խ
+ public const int NET_DVR_SET_COMPRESSCFG_AUD = 1059;//豸Խ
+
+ //IPò NET_DVR_IPPARACFG_V31ṹ
+ public const int NET_DVR_GET_IPPARACFG_V31 = 1060;//ȡIPϢ
+ public const int NET_DVR_SET_IPPARACFG_V31 = 1061; //IPϢ
+
+ //豸 NET_DVR_DEVICECFG_V40ṹ
+ public const int NET_DVR_GET_DEVICECFG_V40 = 1100;//ȡ豸
+ public const int NET_DVR_SET_DEVICECFG_V40 = 1101;//豸
+
+ //(NET_DVR_NETCFG_MULTIṹ)
+ public const int NET_DVR_GET_NETCFG_MULTI = 1161;
+ public const int NET_DVR_SET_NETCFG_MULTI = 1162;
+
+ //BONDING(NET_DVR_NETWORK_BONDINGṹ)
+ public const int NET_DVR_GET_NETWORK_BONDING = 1254;
+ public const int NET_DVR_SET_NETWORK_BONDING = 1255;
+
+
+ //ȶԿ
+ public const int NET_DVR_GET_FACELIB_TRIGGER = 3962; //ȡȶԿ
+ public const int NET_DVR_SET_FACELIB_TRIGGER = 3963; //ȶԿ
+ public const int NET_DVR_GET_FACELIB_SCHEDULE = 3977; //ȡȶԿIJʱ
+ public const int NET_DVR_SET_FACELIB_SCHEDULE = 3978; //ȶԿIJʱ
+
+ //NATӳò NET_DVR_NAT_CFGṹ
+ public const int NET_DVR_GET_NAT_CFG = 6111; //ȡNATӳ
+ public const int NET_DVR_SET_NAT_CFG = 6112; //NATӳ
+
+ //ǽ
+ public const int NET_DVR_SET_WINCFG = 1202;//ڲ
+ public const int NET_DVR_MATRIX_BIGSCREENCFG_GET = 1140; //ȡƴӲ
+ public const int NET_DVR_MATRIX_BIGSCREENCFG_SET = 1141; //ôƴӲ
+
+ public const int NET_DVR_MATRIX_WALL_GET = 9002; //ȡǽĻ
+ public const int NET_DVR_MATRIX_WALL_SET = 9001; //õǽĻ
+
+ public const int NET_DVR_WALLWIN_GET = 9003; //ȡǽڲ
+ public const int NET_DVR_WALLWIN_SET = 9004; //õǽڲ
+
+ public const int NET_DVR_WALLWINPARAM_SET = 9005; //ȡǽز
+ public const int NET_DVR_WALLWINPARAM_GET = 9006; //õǽز
+
+ public const int NET_DVR_SWITCH_WIN_TOP = 9017; //ö
+ public const int NET_DVR_SWITCH_WIN_BOTTOM = 9018; //õ
+
+ public const int NET_DVR_GET_VIDEOWALLDISPLAYPOSITION = 1734;//ȡʾλò
+ public const int NET_DVR_SET_VIDEOWALLDISPLAYPOSITION = 1733;//ʾλò
+
+ public const int NET_DVR_GET_VIDEOWALLDISPLAYNO = 1732; //ȡ豸ʾ
+
+ public const int NET_DVR_GET_VIDEOWALLWINDOWPOSITION = 1735; //ȡǽڲ
+ public const int NET_DVR_SET_VIDEOWALLWINDOWPOSITION = 1736; //õǽڲ
+
+ public const int NET_DVR_GET_CHAN_RELATION = 9209; //ȡͨԴ
+ public const int NET_DVR_SET_CHAN_RELATION = 9210; //ñͨԴ
+ public const int NET_DVR_GET_ALL_CHAN_RELATION = 9211; //ȡбͨԴ
+
+ public const int NET_DVR_GET_VW_SCENE_PARAM = 1746; //ȡǽģʽ
+ public const int NET_DVR_SET_VW_SCENE_PARAM = 1747; //õǽģʽ
+
+ public const int NET_DVR_GET_OUTPUT_PIC_WIN_CFG = 9202; //ȡͼƬڲ
+ public const int NET_DVR_SET_OUTPUT_PIC_WIN_CFG = 9203; //ͼƬڲ
+
+ public const int NET_DVR_GET_OUTPUT_OSD_CFG = 9206; //ȡOSD
+ public const int NET_DVR_SET_OUTPUT_OSD_CFG = 9207; //OSD
+
+ public const int NET_DVR_SCENE_CONTROL = 1744; //
+
+
+ public const int NET_DVR_GET_CARD = 2560;
+ public const int NET_DVR_SET_CARD = 2561;
+ public const int NET_DVR_DEL_CARD = 2562;
+ public const int NET_DVR_GET_FINGERPRINT = 2563;
+ public const int NET_DVR_SET_FINGERPRINT = 2564;
+ public const int NET_DVR_DEL_FINGERPRINT = 2565;
+ public const int NET_DVR_GET_FACE = 2566;
+ public const int NET_DVR_SET_FACE = 2567;
+
+ public const int NET_DVR_DEL_FACE_PARAM_CFG = 2509; //delete face param configure
+ public const int NET_DVR_CAPTURE_FACE_INFO = 2510; //capture face information
+
+ //Ԥõƻȡ
+ public const int NET_DVR_GET_PRESET_NAME = 3383;
+ public const int NET_DVR_SET_PRESET_NAME = 3382;
+
+ public const int NET_VCA_GET_RULECFG_V41 = 5011; //ȡ쳣Ϊʶ
+ public const int NET_VCA_SET_RULECFG_V41 = 5012; //쳣Ϊʶ
+
+ public const int NET_DVR_GET_TRAVERSE_PLANE_DETECTION = 3360; //ȡԽ
+ public const int NET_DVR_SET_TRAVERSE_PLANE_DETECTION = 3361; //Խ
+
+ public const int NET_DVR_GET_THERMOMETRY_ALARMRULE = 3627; //ȡԤõ±
+ public const int NET_DVR_SET_THERMOMETRY_ALARMRULE = 3628; //Ԥõ±
+ public const int NET_DVR_GET_THERMOMETRY_TRIGGER = 3632; //ȡ
+ public const int NET_DVR_SET_THERMOMETRY_TRIGGER = 3633; //ò
+
+ public const int NET_DVR_SET_MANUALTHERM_BASICPARAM = 6716; //ֶ»
+ public const int NET_DVR_GET_MANUALTHERM_BASICPARAM = 6717; //ȡֶ»
+
+ public const int NET_DVR_SET_MANUALTHERM = 6708; //ֶ
+
+ public const int NET_DVR_GET_MULTI_STREAM_COMPRESSIONCFG = 3216; //Զ̻ȡѹ
+ public const int NET_DVR_SET_MULTI_STREAM_COMPRESSIONCFG = 3217; //Զöѹ
+
+ public const int NET_DVR_VIDEO_CALL_SIGNAL_PROCESS = 16032; //ӻԽ
+
+ public const int NET_DVR_ARM_ALARMHOST_SUBSYSTEM = 2036;//Ͷϵͳ
+
+ public const int NET_DVR_GET_MULTI_CARD_CFG_V50 = 2515; //ȡؿV50
+ public const int NET_DVR_SET_MULTI_CARD_CFG_V50 = 2516; //öؿV50
+
+ public const int NET_DVR_BARRIERGATE_CTRL = 3128; //բ
+
+ public const int NET_DVR_INQUEST_GET_CDW_STATUS = 6350; //ȡѶ¼״̬-
+
+ public const int NET_DVR_GET_REALTIME_THERMOMETRY = 3629; //ʵʱ¶ȼ
+
+ public const int NET_DVR_GET_ACS_EVENT = 2514;//豸¼ȡ
+
+ public const int NET_SDK_GET_NEXT_STATUS_SUCCESS = 1000;
+ public const int NET_SDK_GET_NEXT_STATUS_NEED_WAIT = 1001;
+ public const int NET_SDK_GET_NEXT_STATUS_FINISH = 1002;
+ public const int NET_SDK_GET_NEXT_STATUS_FAILED = 1003;
+ /************************* end*******************************/
+
+
+ /************************DVR־ begin***************************/
+ /* */
+ //
+ public const int MAJOR_ALARM = 1;
+ //
+ public const int MINOR_ALARM_IN = 1;/* */
+ public const int MINOR_ALARM_OUT = 2;/* */
+ public const int MINOR_MOTDET_START = 3; /* ƶⱨʼ */
+ public const int MINOR_MOTDET_STOP = 4; /* ƶⱨ */
+ public const int MINOR_HIDE_ALARM_START = 5;/* ڵʼ */
+ public const int MINOR_HIDE_ALARM_STOP = 6;/* ڵ */
+ public const int MINOR_VCA_ALARM_START = 7;/*ܱʼ*/
+ public const int MINOR_VCA_ALARM_STOP = 8;/*ֹܱͣ*/
+
+ /* 쳣 */
+ //
+ public const int MAJOR_EXCEPTION = 2;
+ //
+ public const int MINOR_VI_LOST = 33;/* ƵźŶʧ */
+ public const int MINOR_ILLEGAL_ACCESS = 34;/* Ƿ */
+ public const int MINOR_HD_FULL = 35;/* Ӳ */
+ public const int MINOR_HD_ERROR = 36;/* Ӳ̴ */
+ public const int MINOR_DCD_LOST = 37;/* MODEM (ʹ) */
+ public const int MINOR_IP_CONFLICT = 38;/* IPַͻ */
+ public const int MINOR_NET_BROKEN = 39;/* Ͽ*/
+ public const int MINOR_REC_ERROR = 40;/* ¼ */
+ public const int MINOR_IPC_NO_LINK = 41;/* IPC쳣 */
+ public const int MINOR_VI_EXCEPTION = 42;/* Ƶ쳣(ֻģͨ) */
+ public const int MINOR_IPC_IP_CONFLICT = 43;/*ipc ip ַ ͻ*/
+
+ //Ƶۺƽ̨
+ public const int MINOR_FANABNORMAL = 49;/* Ƶۺƽ̨״̬쳣 */
+ public const int MINOR_FANRESUME = 50;/* Ƶۺƽ̨״ָ̬ */
+ public const int MINOR_SUBSYSTEM_ABNORMALREBOOT = 51;/* Ƶۺƽ̨6467쳣 */
+ public const int MINOR_MATRIX_STARTBUZZER = 52;/* Ƶۺƽ̨dm6467쳣 */
+
+ /* */
+ //
+ public const int MAJOR_OPERATION = 3;
+ //
+ public const int MINOR_START_DVR = 65;/* */
+ public const int MINOR_STOP_DVR = 66;/* ػ */
+ public const int MINOR_STOP_ABNORMAL = 67;/* 쳣ػ */
+ public const int MINOR_REBOOT_DVR = 68;/*豸*/
+
+ public const int MINOR_LOCAL_LOGIN = 80;/* ص½ */
+ public const int MINOR_LOCAL_LOGOUT = 81;/* ע½ */
+ public const int MINOR_LOCAL_CFG_PARM = 82;/* ò */
+ public const int MINOR_LOCAL_PLAYBYFILE = 83;/* ذļطŻ */
+ public const int MINOR_LOCAL_PLAYBYTIME = 84;/* ذʱطŻ*/
+ public const int MINOR_LOCAL_START_REC = 85;/* ؿʼ¼ */
+ public const int MINOR_LOCAL_STOP_REC = 86;/* ֹͣ¼ */
+ public const int MINOR_LOCAL_PTZCTRL = 87;/* ̨ */
+ public const int MINOR_LOCAL_PREVIEW = 88;/* Ԥ (ʹ)*/
+ public const int MINOR_LOCAL_MODIFY_TIME = 89;/* ʱ(ʹ) */
+ public const int MINOR_LOCAL_UPGRADE = 90;/* */
+ public const int MINOR_LOCAL_RECFILE_OUTPUT = 91;/* ر¼ļ */
+ public const int MINOR_LOCAL_FORMAT_HDD = 92;/* سʼӲ */
+ public const int MINOR_LOCAL_CFGFILE_OUTPUT = 93;/* ļ */
+ public const int MINOR_LOCAL_CFGFILE_INPUT = 94;/* 뱾ļ */
+ public const int MINOR_LOCAL_COPYFILE = 95;/* رļ */
+ public const int MINOR_LOCAL_LOCKFILE = 96;/* ¼ļ */
+ public const int MINOR_LOCAL_UNLOCKFILE = 97;/* ؽ¼ļ */
+ public const int MINOR_LOCAL_DVR_ALARM = 98;/* ֶʹ*/
+ public const int MINOR_IPC_ADD = 99;/* IPC */
+ public const int MINOR_IPC_DEL = 100;/* ɾIPC */
+ public const int MINOR_IPC_SET = 101;/* IPC */
+ public const int MINOR_LOCAL_START_BACKUP = 102;/* ؿʼ */
+ public const int MINOR_LOCAL_STOP_BACKUP = 103;/* ֹͣ*/
+ public const int MINOR_LOCAL_COPYFILE_START_TIME = 104;/* رݿʼʱ*/
+ public const int MINOR_LOCAL_COPYFILE_END_TIME = 105;/* رݽʱ*/
+ public const int MINOR_LOCAL_ADD_NAS = 106;/*Ӳ*/
+ public const int MINOR_LOCAL_DEL_NAS = 107;/* ɾnas*/
+ public const int MINOR_LOCAL_SET_NAS = 108;/* nas*/
+
+ public const int MINOR_REMOTE_LOGIN = 112;/* Զ̵¼ */
+ public const int MINOR_REMOTE_LOGOUT = 113;/* Զע½ */
+ public const int MINOR_REMOTE_START_REC = 114;/* Զ̿ʼ¼ */
+ public const int MINOR_REMOTE_STOP_REC = 115;/* Զֹͣ¼ */
+ public const int MINOR_START_TRANS_CHAN = 116;/* ʼ */
+ public const int MINOR_STOP_TRANS_CHAN = 117;/* ֹͣ */
+ public const int MINOR_REMOTE_GET_PARM = 118;/* Զ̻ȡ */
+ public const int MINOR_REMOTE_CFG_PARM = 119;/* Զò */
+ public const int MINOR_REMOTE_GET_STATUS = 120;/* Զ̻ȡ״̬ */
+ public const int MINOR_REMOTE_ARM = 121;/* Զ̲ */
+ public const int MINOR_REMOTE_DISARM = 122;/* Զ̳ */
+ public const int MINOR_REMOTE_REBOOT = 123;/* Զ */
+ public const int MINOR_START_VT = 124;/* ʼԽ */
+ public const int MINOR_STOP_VT = 125;/* ֹͣԽ */
+ public const int MINOR_REMOTE_UPGRADE = 126;/* Զ */
+ public const int MINOR_REMOTE_PLAYBYFILE = 127;/* Զ̰ļط */
+ public const int MINOR_REMOTE_PLAYBYTIME = 128;/* Զ̰ʱط */
+ public const int MINOR_REMOTE_PTZCTRL = 129;/* Զ̨ */
+ public const int MINOR_REMOTE_FORMAT_HDD = 130;/* Զ̸ʽӲ */
+ public const int MINOR_REMOTE_STOP = 131;/* Զ̹ػ */
+ public const int MINOR_REMOTE_LOCKFILE = 132;/* Զļ */
+ public const int MINOR_REMOTE_UNLOCKFILE = 133;/* Զ̽ļ */
+ public const int MINOR_REMOTE_CFGFILE_OUTPUT = 134;/* Զ̵ļ */
+ public const int MINOR_REMOTE_CFGFILE_INTPUT = 135;/* Զ̵ļ */
+ public const int MINOR_REMOTE_RECFILE_OUTPUT = 136;/* Զ̵¼ļ */
+ public const int MINOR_REMOTE_DVR_ALARM = 137;/* Զֶʹ*/
+ public const int MINOR_REMOTE_IPC_ADD = 138;/* ԶIPC */
+ public const int MINOR_REMOTE_IPC_DEL = 139;/* ԶɾIPC */
+ public const int MINOR_REMOTE_IPC_SET = 140;/* ԶIPC */
+ public const int MINOR_REBOOT_VCA_LIB = 141;/*ܿ*/
+ public const int MINOR_REMOTE_ADD_NAS = 142;/* Զnas*/
+ public const int MINOR_REMOTE_DEL_NAS = 143;/* Զɾnas*/
+ public const int MINOR_REMOTE_SET_NAS = 144;/* Զnas*/
+
+ //2009-12-16 Ƶۺƽ̨־
+ public const int MINOR_SUBSYSTEMREBOOT = 160;/*Ƶۺƽ̨dm6467 */
+ public const int MINOR_MATRIX_STARTTRANSFERVIDEO = 161; /*Ƶۺƽ̨лʼͼ*/
+ public const int MINOR_MATRIX_STOPTRANSFERVIDEO = 162; /*Ƶۺƽ̨лֹͣͼ*/
+ public const int MINOR_REMOTE_SET_ALLSUBSYSTEM = 163; /*Ƶۺƽ̨6467ϵͳϢ*/
+ public const int MINOR_REMOTE_GET_ALLSUBSYSTEM = 164; /*Ƶۺƽ̨ȡ6467ϵͳϢ*/
+ public const int MINOR_REMOTE_SET_PLANARRAY = 165; /*Ƶۺƽ̨üƻѯ*/
+ public const int MINOR_REMOTE_GET_PLANARRAY = 166; /*Ƶۺƽ̨ȡƻѯ*/
+ public const int MINOR_MATRIX_STARTTRANSFERAUDIO = 167; /*Ƶۺƽ̨лʼƵ*/
+ public const int MINOR_MATRIX_STOPRANSFERAUDIO = 168; /*Ƶۺƽ̨лֹͣƵ*/
+ public const int MINOR_LOGON_CODESPITTER = 169; /*Ƶۺƽ̨½*/
+ public const int MINOR_LOGOFF_CODESPITTER = 170; /*Ƶۺƽ̨˳*/
+
+ //2010-12-16 ־
+ public const int MINOR_REMOTE_BYPASS = 0xd0; /* Զ·*/
+ public const int MINOR_REMOTE_UNBYPASS = 0xd1; /* Զ·ָ*/
+ public const int MINOR_REMOTE_SET_ALARMIN_CFG = 0xd2; /* Զñ*/
+ public const int MINOR_REMOTE_GET_ALARMIN_CFG = 0xd3; /* Զ̻ȡ*/
+ public const int MINOR_REMOTE_SET_ALARMOUT_CFG = 0xd4; /* Զñ*/
+ public const int MINOR_REMOTE_GET_ALARMOUT_CFG = 0xd5; /* Զ̻ȡ*/
+ public const int MINOR_REMOTE_ALARMOUT_OPEN_MAN = 0xd6; /* Զֶ*/
+ public const int MINOR_REMOTE_ALARMOUT_CLOSE_MAN = 0xd7; /* Զֶرձ*/
+ public const int MINOR_REMOTE_ALARM_ENABLE_CFG = 0xd8; /* ԶñRS485ʹ״̬*/
+ public const int MINOR_DBDATA_OUTPUT = 0xd9; /* ݿ¼ */
+ public const int MINOR_DBDATA_INPUT = 0xda; /* ݿ¼ */
+ public const int MINOR_MU_SWITCH = 0xdb; /* л */
+ public const int MINOR_MU_PTZ = 0xdc; /* PTZ */
+ public const int MINOR_DELETE_LOGO = 0xdd; /* ɾlogo */
+ public const int MINOR_REMOTE_INQUEST_DEL_FILE = 0xde; /*Զɾļ*/
+
+ /*־Ϣ*/
+ //
+ public const int MAJOR_INFORMATION = 4;/*Ϣ*/
+ //
+ public const int MINOR_HDD_INFO = 161;/*ӲϢ*/
+ public const int MINOR_SMART_INFO = 162;/*SMARTϢ*/
+ public const int MINOR_REC_START = 163;/*ʼ¼*/
+ public const int MINOR_REC_STOP = 164;/*ֹͣ¼*/
+ public const int MINOR_REC_OVERDUE = 165;/*¼ɾ*/
+ public const int MINOR_LINK_START = 166;//ǰ豸
+ public const int MINOR_LINK_STOP = 167;//Ͽǰ豸
+ public const int MINOR_NET_DISK_INFO = 168;//ӲϢ
+
+ //־ΪMAJOR_OPERATION=03ΪMINOR_LOCAL_CFG_PARM=0x52MINOR_REMOTE_GET_PARM=0x76MINOR_REMOTE_CFG_PARM=0x77ʱdwParaType:Ч京£
+ public const int PARA_VIDEOOUT = 1;
+ public const int PARA_IMAGE = 2;
+ public const int PARA_ENCODE = 4;
+ public const int PARA_NETWORK = 8;
+ public const int PARA_ALARM = 16;
+ public const int PARA_EXCEPTION = 32;
+ public const int PARA_DECODER = 64;/**/
+ public const int PARA_RS232 = 128;
+ public const int PARA_PREVIEW = 256;
+ public const int PARA_SECURITY = 512;
+ public const int PARA_DATETIME = 1024;
+ public const int PARA_FRAMETYPE = 2048;/*֡ʽ*/
+ //vca
+ public const int PARA_VCA_RULE = 4096;//Ϊ
+ /************************DVR־ End***************************/
+
+
+ /*******************ļ־ֵ*************************/
+ public const int NET_DVR_FILE_SUCCESS = 1000;//ļϢ
+ public const int NET_DVR_FILE_NOFIND = 1001;//ûļ
+ public const int NET_DVR_ISFINDING = 1002;//ڲļ
+ public const int NET_DVR_NOMOREFILE = 1003;//ļʱûиļ
+ public const int NET_DVR_FILE_EXCEPTION = 1004;//ļʱ쳣
+
+ /*********************ص begin************************/
+ public const int COMM_ALARM = 0x1100;//8000ϢϴӦNET_DVR_ALARMINFO
+ public const int COMM_ALARM_RULE = 0x1102;//쳣Ϊʶ𱨾ϢӦNET_VCA_RULE_ALARM
+ public const int COMM_ALARM_PDC = 0x1103;//ͳƱϴӦNET_DVR_PDC_ALRAM_INFO
+ public const int COMM_ALARM_ALARMHOST = 0x1105;//籨ϴӦNET_DVR_ALARMHOST_ALARMINFO
+ public const int COMM_ALARM_FACE = 0x1106;//ʶ𱨾ϢӦNET_DVR_FACEDETECT_ALARM
+ public const int COMM_RULE_INFO_UPLOAD = 0x1107; // ¼Ϣϴ
+ public const int COMM_ALARM_AID = 0x1110; //ͨ¼Ϣ
+ public const int COMM_ALARM_TPS = 0x1111; //ͨͳƱϢ
+ public const int COMM_UPLOAD_FACESNAP_RESULT = 0x1112; //ʶϴ
+ public const int COMM_ALARM_FACE_DETECTION = 0x4010; //ⱨϢ
+ public const int COMM_ALARM_TFS = 0x1113; //ͨȡ֤Ϣ
+ public const int COMM_ALARM_TPS_V41 = 0x1114; //ͨͳƱϢչ
+ public const int COMM_ALARM_AID_V41 = 0x1115; //ͨ¼Ϣչ
+ public const int COMM_ALARM_VQD_EX = 0x1116; //Ƶϱ
+ public const int COMM_SENSOR_VALUE_UPLOAD = 0x1120; //ģʵʱϴ
+ public const int COMM_SENSOR_ALARM = 0x1121; //ģϴ
+ public const int COMM_SWITCH_ALARM = 0x1122; //
+ public const int COMM_ALARMHOST_EXCEPTION = 0x1123; //ϱ
+ public const int COMM_ALARMHOST_OPERATEEVENT_ALARM = 0x1124; //¼ϴ
+ public const int COMM_ALARMHOST_SAFETYCABINSTATE = 0x1125; //״̬
+ public const int COMM_ALARMHOST_ALARMOUTSTATUS = 0x1126; ///״̬
+ public const int COMM_ALARMHOST_CID_ALARM = 0x1127; //CID汨ϴ
+ public const int COMM_ALARMHOST_EXTERNAL_DEVICE_ALARM = 0x1128; //豸ϴ
+ public const int COMM_ALARMHOST_DATA_UPLOAD = 0x1129; //ϴ
+ public const int COMM_UPLOAD_VIDEO_INTERCOM_EVENT = 0x1132; //ӶԽ¼¼ϴ
+ public const int COMM_ALARM_AUDIOEXCEPTION = 0x1150; //Ϣ
+ public const int COMM_ALARM_DEFOCUS = 0x1151; //齹Ϣ
+ public const int COMM_ALARM_BUTTON_DOWN_EXCEPTION = 0x1152; //ť±Ϣ
+ public const int COMM_ALARM_ALARMGPS = 0x1202; //GPSϢϴ
+ public const int COMM_TRADEINFO = 0x1500; //ATMDVRϴϢ
+ public const int COMM_UPLOAD_PLATE_RESULT = 0x2800; //ϴϢ
+ public const int COMM_ITC_STATUS_DETECT_RESULT = 0x2810; //ʵʱ״̬ϴ(ܸIPC)
+ public const int COMM_IPC_AUXALARM_RESULT = 0x2820; //PIR߱ȱϴ
+ public const int COMM_UPLOAD_PICTUREINFO = 0x2900; //ϴͼƬϢ
+ public const int COMM_SNAP_MATCH_ALARM = 0x2902; //ֹȶԽϴ
+ public const int COMM_ITS_PLATE_RESULT = 0x3050; //նͼƬϴ
+ public const int COMM_ITS_TRAFFIC_COLLECT = 0x3051; //նͳϴ
+ public const int COMM_ITS_GATE_VEHICLE = 0x3052; //ڳץϴ
+ public const int COMM_ITS_GATE_FACE = 0x3053; //ץϴ
+ public const int COMM_ITS_GATE_COSTITEM = 0x3054; //ڹշϸ 2013-11-19
+ public const int COMM_ITS_GATE_HANDOVER = 0x3055; //ڽӰ 2013-11-19
+ public const int COMM_ITS_PARK_VEHICLE = 0x3056; //ͣϴ
+ public const int COMM_ITS_BLOCKLIST_ALARM = 0x3057; //ֹϴ
+ public const int COMM_ALARM_TPS_REAL_TIME = 0x3081; //TPSʵʱϴ
+ public const int COMM_ALARM_TPS_STATISTICS = 0x3082; //TPSͳƹϴ
+ public const int COMM_ALARM_V30 = 0x4000; //9000Ϣϴ
+ public const int COMM_IPCCFG = 0x4001; //9000豸IPCøı䱨Ϣϴ
+ public const int COMM_IPCCFG_V31 = 0x4002; //9000豸IPCøı䱨Ϣϴչ 9000_1.1
+ public const int COMM_IPCCFG_V40 = 0x4003; // IVMS 2000 NVR IPCøıʱϢϴ
+ public const int COMM_ALARM_DEVICE = 0x4004; //豸ݣֵͨ256չ
+ public const int COMM_ALARM_CVR = 0x4005; //CVR 2.0.Xⲿ
+ public const int COMM_ALARM_HOT_SPARE = 0x4006; //ȱ쳣N+1ģʽ쳣
+ public const int COMM_ALARM_V40 = 0x4007; //ƶ⣬ƵʧڵIOźȱϢϴΪɱ䳤
+ public const int COMM_UPLOAD_HEATMAP_RESULT = 0x4008; //ȶͼϴ
+
+ public const int COMM_ITS_ROAD_EXCEPTION = 0x4500; //·豸쳣
+ public const int COMM_ITS_EXTERNAL_CONTROL_ALARM = 0x4520; //ر
+ public const int COMM_FIREDETECTION_ALARM = 0x4991; //ⱨ
+ public const int COMM_SCREEN_ALARM = 0x5000; //
+ public const int COMM_DVCS_STATE_ALARM = 0x5001; //ֲʽϴ
+ public const int COMM_ALARM_VQD = 0x6000; //VQDϴ
+ public const int COMM_PUSH_UPDATE_RECORD_INFO = 0x6001; //ģʽ¼Ϣϴ
+ public const int COMM_DIAGNOSIS_UPLOAD = 0x5100; //ϷVQDϴ
+ public const int COMM_ALARM_ACS = 0x5002; //Ž
+ public const int COMM_ID_INFO_ALARM = 0x5200; //֤Ϣϴ
+ public const int COMM_PASSNUM_INFO_ALARM = 0x5201; //ͨϱ
+ public const int COMM_ISAPI_ALARM = 0x6009;
+
+ public const int COMM_THERMOMETRY_ALARM = 0x5212; //¶ȱϢ
+
+ public const int COMM_UPLOAD_AIOP_VIDEO = 0x4021; //豸֧AIƽ̨룬ϴƵ
+ public const int COMM_UPLOAD_AIOP_PICTURE = 0x4022; //豸֧AIƽ̨룬ϴͼƬ
+ public const int COMM_UPLOAD_AIOP_POLLING_SNAP = 0x4023; //豸֧AIƽ̨룬ϴѲץͼͼƬ ӦĽṹ(NET_AIOP_POLLING_SNAP_HEAD)
+ public const int COMM_UPLOAD_AIOP_POLLING_VIDEO = 0x4024; //豸֧AIƽ̨룬ϴѲƵ ӦĽṹ(NET_AIOP_POLLING_VIDEO_HEAD)
+
+
+
+ public const int NET_DVR_JSON_CONFIG = 2550;
+ public const int NET_DVR_FACE_DATA_RECORD = 2551;
+ public const int NET_DVR_FACE_DATA_SEARCH = 2552;
+ public const int NET_DVR_FACE_DATA_MODIFY = 2553;
+
+ public const int NET_DVR_REMOTECONTROL_GATEWAY = 16009; //Զ̿
+
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_SendWithRecvRemoteConfig(int lHandle, IntPtr lpInBuff, uint dwInBuffSize, IntPtr lpOutBuff, uint dwOutBuffSize, ref uint dwOutDataLen);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_SendWithRecvRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_FACE_RECORD lpInBuff, int dwInBuffSize, ref CHCNetSDK.NET_DVR_FACE_STATUS lpOutBuff, int dwOutBuffSize, IntPtr dwOutDataLen);
+
+ [DllImport(@"..\..\..\HCNetSDK\HCNetSDK.dll")]
+ public static extern int NET_DVR_SendWithRecvRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_FINGERPRINT_RECORD lpInBuff, int dwInBuffSize, ref CHCNetSDK.NET_DVR_FINGERPRINT_STATUS lpOutBuff, int dwOutBuffSize, IntPtr dwOutDataLen);
+
+ // ûSendwithRecvӿʱӿڷص״̬
+ public enum NET_SDK_SENDWITHRECV_STATUS
+ {
+ NET_SDK_CONFIG_STATUS_SUCCESS = 1000, // ɹȡݣͻ˴걾ݺҪٴεNET_DVR_SendWithRecvRemoteConfigȡһ
+ NET_SDK_CONFIG_STATUS_NEEDWAIT, // õȴͻ˿NET_DVR_SendWithRecvRemoteConfig
+ NET_SDK_CONFIG_STATUS_FINISH, // ȫȡ꣬ʱͻ˿ɵNET_DVR_StopRemoteConfig
+ NET_SDK_CONFIG_STATUS_FAILED, // ʧܣͻ˿NET_DVR_SendWithRecvRemoteConfig
+ NET_SDK_CONFIG_STATUS_EXCEPTION, // 쳣ʱͻ˿ɵNET_DVR_StopRemoteConfig
+ }
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_STDXMLConfig(int lUserID, IntPtr lpInputParam, IntPtr lpOutputParam);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ControlGateway(int lUserID, int lGatewayIndex, uint dwStaic);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessageCallBack_V50(int iIndex, MSGCallBack fMessageCallBack, IntPtr pUser);
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_JSON_DATA_CFG
+ {
+ public uint dwSize; //size of NET_DVR_JSON_DATA_CFG
+ public IntPtr lpJsonData; //Json data
+ public uint dwJsonDataSize; //Json data size
+ public IntPtr lpPicData; //picture data
+ public uint dwPicDataSize; //picture data size
+ public uint dwInfraredFacePicSize; //infrared picture data size
+ public IntPtr lpInfraredFacePicBuffer; //infrared picture data
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 248)]
+ public byte[] byRes; //reserve
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAPTURE_FACE_COND
+ {
+ public int dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ byRes = new byte[128];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAPTURE_FACE_CFG
+ {
+ public int dwSize;
+ public int dwFaceTemplate1Size;//ģ1ݴС0ʱģ1
+ public IntPtr pFaceTemplate1Buffer;//ģ1ݻ棨2.5k
+ public int dwFaceTemplate2Size;//ģ2ݴС0ʱģ2
+ public IntPtr pFaceTemplate2Buffer; //ģ2ݻ棨2.5K
+ public int dwFacePicSize;//ͼƬݴС0ʱͼƬ;
+ public IntPtr pFacePicBuffer;//ͼƬݻ;
+ public byte byFaceQuality1;//Χ1-100
+ public byte byFaceQuality2;//Χ1-100
+ public byte byCaptureProgress; //ɼȣĿǰֵֻֽ0-δɼ100-ɼֻڽΪ100ʱŽϢ
+ public byte byRes1;
+ public int dwInfraredFacePicSize; //ͼƬݴС0ʱͼƬ
+ public IntPtr pInfraredFacePicBuffer; //ͼƬݻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 116, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ byRes = new byte[116];
+ }
+ }
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_CAPTURE_FACE_CFG lpOutBuff, int dwOutBuffSize);
+
+ public const int ERROR_MSG_LEN = 32;
+ public const int MAX_FINGER_PRINT_LEN = 768;
+ public const int NET_DVR_CAPTURE_FINGERPRINT_INFO = 2504;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINGERPRINT_STATUS
+ {
+ public int dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN)]
+ public byte[] byCardNo;
+ public byte byCardReaderRecvStatus;//ָƶ״ֽ̬ڱʾ0-ʧܣ1-ɹ2-ָģ鲻ߣ3-Իָ4-ڴ5-Ѵڸָƣ6-ѴڸָID7-ǷָID8-ָģ
+ public byte byFingerPrintID;//ָţЧֵΧΪ1-10
+ public byte byFingerType;//ָ 0-ָͨƣ1-вָ
+ public byte byRecvStatus;//״̬0-ɹ1-ָŴ2-ָʹ3-ŴŹ豸Ҫ4-ָδŻţŻֶΪգ5-Ųڣ6-ָݳΪ07-Ŵ8-Ŵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ERROR_MSG_LEN)]
+ public byte[] byErrorMsg;//·ϢbyCardReaderRecvStatusΪ5ʱʾѴָƶӦĿ
+ public int dwCardReaderNo;//byCardReaderRecvStatusΪ5ʱʾѴָƶӦָƶţ·ء0ʱʾϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20)]
+ public byte[] byRes;
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byErrorMsg = new byte[CHCNetSDK.ERROR_MSG_LEN];
+
+ byRes = new byte[20];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINGERPRINT_RECORD
+ {
+ public int dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN)]
+ public byte[] byCardNo; //ָƹĿ
+ public int dwFingerPrintLen; //ָݳ
+ public int dwEnableReaderNo;//Ҫ·ָƵĶ
+ public byte byFingerPrintID;//ָţЧֵΧΪ1-10
+ public byte byFingerType;//ָ 0-ָͨƣ1-вָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 30)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_FINGER_PRINT_LEN)]
+ public byte[] byFingerData;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 96)]
+ public byte[] byRes;
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byRes1 = new byte[30];
+ byFingerData = new byte[CHCNetSDK.MAX_FINGER_PRINT_LEN];
+ byRes = new byte[96];
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINGER_PRINT_INFO_CTRL_V50_ByCardNo
+ {
+ public int dwSize;
+ public byte byMode; //ɾʽ0-ţԱIDʽɾ1-ɾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3)]
+ public byte[] byRes1;
+ public CHCNetSDK.NET_DVR_FINGER_PRINT_BYCARD_V50 struProcessMode;//ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64)]
+ public byte[] byRes;
+ public void init()
+ {
+ byRes1 = new byte[3];
+ byRes = new byte[64];
+ struProcessMode.init();
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINGER_PRINT_BYCARD_V50
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN)]
+ public byte[] byCardNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_CARD_READER_NUM_512)]
+ public byte[] byEnableCardReader;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_FINGER_PRINT_NUM)]
+ public byte[] byFingerPrintID;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.NET_SDK_EMPLOYEE_NO_LEN)]
+ public byte[] byEmployeeNo;
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byEnableCardReader = new byte[CHCNetSDK.MAX_CARD_READER_NUM_512];
+ byFingerPrintID = new byte[CHCNetSDK.MAX_FINGER_PRINT_NUM];
+ byRes1 = new byte[2];
+ byEmployeeNo = new byte[CHCNetSDK.NET_SDK_EMPLOYEE_NO_LEN];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINGER_PRINT_INFO_STATUS_V50
+ {
+ public int dwSize;
+ public int dwCardReaderNo;
+ public byte byStatus;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 63)]
+ public byte[] byRes;
+ public void init()
+ {
+ byRes = new byte[63];
+ }
+ }
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_FINGER_PRINT_INFO_STATUS_V50 lpOutBuff, int dwOutBuffSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_ACS_EVENT_CFG lpOutBuff, int dwOutBuffSize);
+
+ [DllImport(@"..\..\..\HCNetSDK\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_FINGERPRINT_RECORD lpOutBuff, int dwOutBuffSize);
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAPTURE_FINGERPRINT_COND
+ {
+ public int dwSize;
+ public byte byFingerPrintPicType; //ͼƬͣ0-
+ public byte byFingerNo; //ָţΧ1-10
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 126)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byRes = new byte[126];
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAPTURE_FINGERPRINT_CFG
+ {
+ public int dwSize;
+ public int dwFingerPrintDataSize; //ָݴС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_FINGER_PRINT_LEN)]
+ public byte[] byFingerData; //ָ
+ public int dwFingerPrintPicSize; //ָͼƬС0ʱָͼƬ
+ public IntPtr pFingerPrintPicBuffer; //ָͼƬ
+ public byte byFingerNo; //ָţΧ1-10
+ public byte byFingerPrintQuality; //ָΧ1-100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byFingerData = new byte[CHCNetSDK.MAX_FINGER_PRINT_LEN];
+ byRes = new byte[62];
+ }
+ }
+
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_CAPTURE_FINGERPRINT_CFG lpOutBuff, int dwOutBuffSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, ref CHCNetSDK.NET_DVR_FACE_RECORD lpOutBuff, int dwOutBuffSize);
+
+ //Network Configure Structure(V50)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NETCFG_V50
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ETHERNET, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ETHERNET_V30[] struEtherNet; //Network Port
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPADDR[] struRes1; /*reserve*/
+ public NET_DVR_IPADDR struAlarmHostIpAddr; /* IP address of remote management host */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; /* reserve */
+ public ushort wAlarmHostIpPort; /* Port of remote management Host */
+ public byte byUseDhcp; /* Whether to enable the DHCP 0xff- invalid 0- enabled 1- not enabled */
+ public byte byIPv6Mode; //IPv6 allocation, 0- routing announcement, 1- manually, 2- enable DHCP allocation
+ public NET_DVR_IPADDR struDnsServer1IpAddr; /* IP address of the domain name server 1 */
+ public NET_DVR_IPADDR struDnsServer2IpAddr; /* IP address of the domain name server 2 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIpResolver; /* IP parse server domain name or IP address */
+ public ushort wIpResolverPort; /* Parsing IP server port number */
+ public ushort wHttpPortNo; /* HTTP port number */
+ public NET_DVR_IPADDR struMulticastIpAddr; /* Multicast group address */
+ public NET_DVR_IPADDR struGatewayIpAddr; /* Gateway address */
+ public NET_DVR_PPPOECFG struPPPoE;
+ public byte byEnablePrivateMulticastDiscovery; //Private multicast search, 0- default, 1- enabled, 2 - disabled
+ public byte byEnableOnvifMulticastDiscovery; //Onvif multicast search, 0- default, 1- enabled, 2 - disabled
+ public ushort wAlarmHost2IpPort; /* Alarm host 2 port */
+ public NET_DVR_IPADDR struAlarmHost2IpAddr; /* Alarm host 2 IP addresses */
+ public byte byEnableDNS; //DNS Enabled, 0-close,1-open
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 599, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void Init()
+ {
+ struEtherNet = new NET_DVR_ETHERNET_V30[MAX_ETHERNET];
+ struRes1 = new NET_DVR_IPADDR[2];
+ struAlarmHostIpAddr = new NET_DVR_IPADDR();
+ struAlarmHost2IpAddr = new NET_DVR_IPADDR();
+ struDnsServer1IpAddr = new NET_DVR_IPADDR();
+ struDnsServer2IpAddr = new NET_DVR_IPADDR();
+ byIpResolver = new byte[MAX_DOMAIN_NAME];
+ struMulticastIpAddr = new NET_DVR_IPADDR();
+ struGatewayIpAddr = new NET_DVR_IPADDR();
+ struPPPoE = new NET_DVR_PPPOECFG();
+ byRes = new byte[599];
+ }
+ }
+
+ public const int MAX_CENTERNUM = 4;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_NETCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CENTERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ALARMHOST_NETPARAM[] struNetCenter;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_ABILITY
+ {
+ public uint dwSize; // ṹС
+ public ushort wTotalAlarmInNum; // (),
+ public ushort wLocalAlarmInNum; // ر
+ public ushort wExpandAlarmInNum; // չı
+ public ushort wTotalAlarmOutNum; // 豸ֵ֧
+ public ushort wLocalAlarmOutNum; // رڸ
+ public ushort wExpandAlarmOutNum; // չı
+ public ushort wTotalRs485Num; // 豸ֵ֧
+ public ushort wLocalRs485Num; // 485
+ public ushort wExpandRs485Num; // չ485
+ public ushort wFullDuplexRs485Num; // ȫ˫485
+ public ushort wTotalSensorNum; // ģ (豸ֵ֧)
+ public ushort wLocalSensorNum; // ģ
+ public ushort wExpandSensorNum; // չģ
+ public ushort wAudioOutNum; //
+ public ushort wGatewayNum; //Ž
+ public ushort wElectroLockNum; //
+ public ushort wSirenNum; // Ŀ
+ public ushort wSubSystemNum; // ɻϵͳĿ
+ public ushort wNetUserNum; // û
+ public ushort wKeyboardNum; //
+ public ushort wOperatorUserNum; // û
+ public byte bySupportDetector;//Ƿֳ֧̽1-֧֣0-֧
+ public byte bySupportSensitivity;//Ƿַ֧ȣ1-֧֣0-֧
+ public byte bySupportArrayBypass;//Ƿ֧·1-֧֣0-֧
+ public byte bySupportAlarmInDelay;//Ƿַ֧ӳ,1-֧֣0-֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySupportAlarmInType;//ֵ֧ķ,0:ʱ,1-24Сʱ,2-ʱ ,3-ڲ4-Կ 5- 6-ܽ 7-24Сʱ 8-24Сʱ9-24Сʱ,10-Žŷ11-Žŷ15-
+ public byte byTelNum; //ֵ֧绰
+ public byte byCenterGroupNum; //
+ public byte byGPRSNum; //GPRS4
+ public byte byNetNum; //4
+ public byte byAudioNum; //Ƶ
+ public byte by3GNum; //3Gģ
+ public byte byAnalogVideoChanNum; //ģƵͨ
+ public byte byDigitalVideoChanNum; //Ƶͨ
+ public byte bySubSystemArmType; //ϵͳͣ0-ʾ֧֣1-ʾ֧֡bit0-ͨעСֻ֧ͨмֶεʱСѾСиֶΪ00ʾ֧֣1ʾ֧֡ӿSDKڲݣbit1-ʱbit2-ز
+ public byte byPublicSubSystemNum; //ϵͳ
+
+ public uint dwSupport1; //λʾ0ʾ֧֣0ʾ֧
+ public uint dwSubSystemEvent; //ϵͳ¼λʾ0ʾ֧֣0ʾ֧,bit0-ʱbit1-˳ʱbit2-bit3-bit4-bit5-
+ public uint dwOverallEvent; //ȫ¼λʾ0ʾ֧֣0ʾ֧֣bit0-磬bit1-صѹͣbit2-绰ߵߣbit3-쳣bit4-쳣bit5-Ӳ̹,bit6-3G/4Gź쳣, bit7-ģӣ,bit8-WIFIͨŹϣbit9-RFźŸŹ
+ public uint dwFaultType; //豸ֵ֧Ĺͣbit0-ϵ磬bit1-Ƿѹbit2-bit3-绰ߵߣbit4-̵ߣbit5-ϣbit6-쳣bit7-չ쳣bit8-Ӳ쳣
+
+ public byte byPublicSubsystemAssociateSubsystemNum; //ϵͳɹϵͳ
+ public byte byOverallKeyboard; //ȫ̸ּ
+ public ushort wSafetyCabinSupport; //տλʾ0ʾ֧֣0ʾ֧
+
+ public byte by485SlotNum; //485λ
+ public byte bySubSystemAttributeAbility; // ֵΪ1ֹ1ϵͳرʹ
+
+ public ushort wKeyboardAddrNum; // ̵ַ
+ public byte byAlarmLampNum; //Ŀ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 117, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ public void Init()
+ {
+ bySupportAlarmInType = new byte[16];
+ byRes = new byte[117];
+ }
+ }
+
+ public const int ALARMHOST_ABILITY = 0x500;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_NETCFG_V50
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CENTERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ALARMHOST_NETPARAM_V50[] struNetCenter;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public void Init()
+ {
+ struNetCenter = new NET_DVR_ALARMHOST_NETPARAM_V50[MAX_CENTERNUM];
+ byRes1 = new byte[128];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_NETPARAM_V50
+ {
+ public uint dwSize;
+ public NET_DVR_IPADDR struIP;
+ public ushort wPort;
+ public byte byAddressType; //0 - , 1 - ipv4/ipv6ַ2 -
+ public byte byEnable; //ʹܣ0-ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDomainName; //GPRSáʱֶξЧ
+ public byte byReportProtocol; //1-private 2-NAL2300, 3-Ehome
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACCOUNTNUM_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDevID; //ЭΪNAL2300ʱЧ
+ public byte byProtocolVersion; //EHomeЭ汾0-,1Cv2.02Cv4.03-v5.0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_EHOME_KEY_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEHomeKey; //EHome KeyEHome 5.0汾
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 28, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //GPRSڹ̶ķϽеģԲҪϢԤһЩֶ
+ public void Init()
+ {
+ struIP = new NET_DVR_IPADDR();
+ byDomainName = new byte[MAX_DOMAIN_NAME];
+ byDevID = new byte[ACCOUNTNUM_LEN_32];
+ byRes1 = new byte[3];
+ byEHomeKey = new byte[NET_SDK_EHOME_KEY_LEN];
+ byRes2 = new byte[28];
+ }
+ }
+
+ public const int NET_DVR_SET_ALARMHOST_NETCFG_V50 = 2225; //Set Net info V50
+ public const int NET_DVR_GET_ALARMHOST_NETCFG_V50 = 2224; //Get Net infoV50
+
+ public const int MAX_AUDIO_V40 = 8;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SIMPLE_DAYTIME
+ {
+ public byte byHour; //hour
+ public byte byMinute; //minute
+ public byte bySecond; //second
+ public byte byRes;
+ }
+
+
+ public const int NET_DVR_GET_NETCFG_V50 = 1015; //Get network parameter configuration (V50)
+ public const int NET_DVR_SET_NETCFG_V50 = 1016; //Set network parameter configuration (V50)
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INDEX
+ {
+ public uint iIndex;
+ public void Init()
+ {
+ iIndex = 1;
+ }
+ }
+
+ public struct NET_DVR_INBUFF
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
+ public uint[] StatusList;
+ public void Init()
+ {
+ StatusList = new uint[16];
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_REPORT_CENTER_CFG_V40
+ {
+ public uint dwSize;
+ public byte byValid;
+ public byte byDataType; //1-All alarm data 2-not alarm data 3-all data,4-zone report,5-not zone report
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.Struct)]
+ public byte[] byChanAlarmMode;//alarm channels, 1-T1,2-T2, 3-N1, 4-N2,5-G1, 6-G2 ,7-N3, 8-N4
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.Struct)]
+ public byte[] byDealFailCenter; //send to these centers while send fail 0-not choose,1-choose
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.Struct)]
+ public byte[] byZoneReport; //zone report type,0-not upload,1-upload
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.Struct)]
+ public byte[] byNonZoneReport; //not zone report, 0-not upload,1-upload byNonZoneReport[0]-soft zone report byNonZoneReport[1]-system status report byNonZoneReport[2]-cancel report byNonZoneReport[3]-test report byNonZoneReport[4]-arm report byNonZoneReport[5]-disarm report byNonZoneReport[6]-duress report byNonZoneReport[7]-alarm recovery report byNonZoneReport[8]-bypass report byNonZoneReport[9]-bypass restore report,byNonZoneReport[10]-detector connect status report(online/offline),byNonZoneReport[11]-detector power status report(normal/low);bit12-video alarm report
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.Struct)]
+ public byte[] byAlarmNetCard; //network card center,0-primary card_1,1-primary card_2,2-extend card_1,3-extend card_2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 252, ArraySubType = UnmanagedType.Struct)]
+ public byte[] byRes2;
+ public void Init()
+ {
+ byRes = new byte[2];
+ byChanAlarmMode = new byte[4];
+ byDealFailCenter = new byte[16];
+ byZoneReport = new byte[512];
+ byNonZoneReport = new byte[32];
+ byAlarmNetCard = new byte[4];
+ byRes2 = new byte[252];
+ }
+ }
+
+ public const int DOOR_NAME_LEN = 32;//door name len
+ public const int STRESS_PASSWORD_LEN = 8;//stress password len
+ public const int SUPER_PASSWORD_LEN = 8;//super password len
+ public const int UNLOCK_PASSWORD_LEN = 8;
+ public const int MAX_DOOR_NUM = 32;
+ public const int MAX_GROUP_NUM = 32;
+ public const int LOCAL_CONTROLLER_NAME_LEN = 32;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DOOR_CFG
+ {
+ public uint dwSize;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = DOOR_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDoorName;//door name
+ public byte byMagneticType;//magnetic type, 0-always close 1-always open
+ public byte byOpenButtonType;//open button type, 0-always close 1-always open
+ public byte byOpenDuration;//open duration time, 1-255s(ladder control relay action time)
+ public byte byDisabledOpenDuration;//disable open duration , 1-255s
+ public byte byMagneticAlarmTimeout;//magnetic alarm time out , 0-255s,0 means not to alarm
+ public byte byEnableDoorLock;//whether to enable door lock, 0-disable, 1-enable
+ public byte byEnableLeaderCard;//whether to enable leader card , 0-disable, 1-enable
+ public byte byLeaderCardMode;//First card mode, 0 - first card function is not enabled, and 1 - the first card normally open mode, 2 - the first card authorization mode (using this field, the byEnableLeaderCard is invalid )
+ public uint dwLeaderCardOpenDuration;//leader card open duration 1-1440min
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = STRESS_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byStressPassword;//stress ppassword
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = SUPER_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySuperPassword; //super password
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = UNLOCK_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUnlockPassword;
+ public byte byUseLocalController; //Read-only, whether the connection on the local controller, 0 - no, 1 - yes
+ public byte byRes1;
+ public ushort wLocalControllerID; //Read-only, on-site controller serial number, 1-64, 0 on behalf of unregistered
+ public ushort wLocalControllerDoorNumber; //Read-only, on-site controller door number, 1-4, 0 represents the unregistered
+ public ushort wLocalControllerStatus; //Read-only, on-site controller online status: 0 - offline, 1 - online, 2 - loop of RS485 serial port 1 on 1, 3 - loop of RS485 serial port 2 on 2, 4 - loop of RS485 serial port 1, 5 - loop of RS485 serial port 2, 6 - loop 3 of RS485 serial port 1, 7 - the loop on the RS485 serial port on the 3 4 2, 8 - loop on the RS485 serial port 1, 9 - loop 4 of RS485 serial port 2 (read-only)
+ public byte byLockInputCheck; //Whether to enable the door input detection (1 public byte, 0 is not enabled, 1 is enabled, is not enabled by default)
+ public byte byLockInputType; //Door lock input type
+ public byte byDoorTerminalMode; //Gate terminal working mode
+ public byte byOpenButton; //Whether to enable the open button
+ public byte byLadderControlDelayTime; //ladder control delay time,1-255min
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 43, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+
+ public void Init()
+ {
+ byDoorName = new byte[DOOR_NAME_LEN];
+ byStressPassword = new byte[STRESS_PASSWORD_LEN];
+ bySuperPassword = new byte[SUPER_PASSWORD_LEN];
+ byUnlockPassword = new byte[UNLOCK_PASSWORD_LEN];
+ byRes2 = new byte[43];
+ }
+ }
+
+ public const int NET_DVR_GET_DOOR_CFG = 2108; //get door parameter
+ public const int NET_DVR_SET_DOOR_CFG = 2109; //set door parameter
+
+
+ public const int NET_DVR_SET_ALARMHOST_REPORT_CENTER_V40 = 2065; // set data report mode v30
+
+
+
+
+
+
+
+
+
+
+
+
+ /*************쳣(Ϣʽ, صʽ())****************/
+ public const int EXCEPTION_EXCHANGE = 32768;//ûʱ쳣
+ public const int EXCEPTION_AUDIOEXCHANGE = 32769;//Խ쳣
+ public const int EXCEPTION_ALARM = 32770;//쳣
+ public const int EXCEPTION_PREVIEW = 32771;//Ԥ쳣
+ public const int EXCEPTION_SERIAL = 32772;//ͨ쳣
+ public const int EXCEPTION_RECONNECT = 32773;//Ԥʱ
+ public const int EXCEPTION_ALARMRECONNECT = 32774;//ʱ
+ public const int EXCEPTION_SERIALRECONNECT = 32775;//ͨ
+ public const int EXCEPTION_PLAYBACK = 32784;//ط쳣
+ public const int EXCEPTION_DISKFMT = 32785;//Ӳ̸ʽ
+
+ /********************Ԥص*********************/
+ public const int NET_DVR_SYSHEAD = 1;//ϵͳͷ
+ public const int NET_DVR_STREAMDATA = 2;//ƵݣƵֿƵݣ
+ public const int NET_DVR_AUDIOSTREAMDATA = 3;//Ƶ
+ public const int NET_DVR_STD_VIDEODATA = 4;//Ƶ
+ public const int NET_DVR_STD_AUDIODATA = 5;//Ƶ
+
+ //صԤе״̬Ϣ
+ public const int NET_DVR_REALPLAYEXCEPTION = 111;//Ԥ쳣
+ public const int NET_DVR_REALPLAYNETCLOSE = 112;//ԤʱӶϿ
+ public const int NET_DVR_REALPLAY5SNODATA = 113;//Ԥ5sûյ
+ public const int NET_DVR_REALPLAYRECONNECT = 114;//Ԥ
+
+ /********************طŻص*********************/
+ public const int NET_DVR_PLAYBACKOVER = 101;//طݲ
+ public const int NET_DVR_PLAYBACKEXCEPTION = 102;//ط쳣
+ public const int NET_DVR_PLAYBACKNETCLOSE = 103;//طʱӶϿ
+ public const int NET_DVR_PLAYBACK5SNODATA = 104;//ط5sûյ
+
+ /*********************ص end************************/
+ //豸ͺ(DVR)
+ /* 豸 */
+ public const int DVR = 1;/*δdvrͷNETRET_DVR*/
+ public const int ATMDVR = 2;/*atm dvr*/
+ public const int DVS = 3;/*DVS*/
+ public const int DEC = 4;/* 6001D */
+ public const int ENC_DEC = 5;/* 6001F */
+ public const int DVR_HC = 6;/*8000HC*/
+ public const int DVR_HT = 7;/*8000HT*/
+ public const int DVR_HF = 8;/*8000HF*/
+ public const int DVR_HS = 9;/* 8000HS DVR(no audio) */
+ public const int DVR_HTS = 10; /* 8016HTS DVR(no audio) */
+ public const int DVR_HB = 11; /* HB DVR(SATA HD) */
+ public const int DVR_HCS = 12; /* 8000HCS DVR */
+ public const int DVS_A = 13; /* ATAӲ̵DVS */
+ public const int DVR_HC_S = 14; /* 8000HC-S */
+ public const int DVR_HT_S = 15;/* 8000HT-S */
+ public const int DVR_HF_S = 16;/* 8000HF-S */
+ public const int DVR_HS_S = 17; /* 8000HS-S */
+ public const int ATMDVR_S = 18;/* ATM-S */
+ public const int LOWCOST_DVR = 19;/*7000Hϵ*/
+ public const int DEC_MAT = 20; /*·*/
+ public const int DVR_MOBILE = 21;/* mobile DVR */
+ public const int DVR_HD_S = 22; /* 8000HD-S */
+ public const int DVR_HD_SL = 23;/* 8000HD-SL */
+ public const int DVR_HC_SL = 24;/* 8000HC-SL */
+ public const int DVR_HS_ST = 25;/* 8000HS_ST */
+ public const int DVS_HW = 26; /* 6000HW */
+ public const int DS630X_D = 27; /* · */
+ public const int IPCAM = 30;/*IP */
+ public const int MEGA_IPCAM = 31;/*X52MFϵ,752MF,852MF*/
+ public const int IPCAM_X62MF = 32;/*X62MFϵпɽ9000豸,762MF,862MF*/
+ public const int IPDOME = 40; /*IP */
+ public const int IPDOME_MEGA200 = 41;/*IP 200*/
+ public const int IPDOME_MEGA130 = 42;/*IP 130*/
+ public const int IPMOD = 50;/*IP ģ*/
+ public const int DS71XX_H = 71;/* DS71XXH_S */
+ public const int DS72XX_H_S = 72;/* DS72XXH_S */
+ public const int DS73XX_H_S = 73;/* DS73XXH_S */
+ public const int DS76XX_H_S = 76;/* DS76XX_H_S */
+ public const int DS81XX_HS_S = 81;/* DS81XX_HS_S */
+ public const int DS81XX_HL_S = 82;/* DS81XX_HL_S */
+ public const int DS81XX_HC_S = 83;/* DS81XX_HC_S */
+ public const int DS81XX_HD_S = 84;/* DS81XX_HD_S */
+ public const int DS81XX_HE_S = 85;/* DS81XX_HE_S */
+ public const int DS81XX_HF_S = 86;/* DS81XX_HF_S */
+ public const int DS81XX_AH_S = 87;/* DS81XX_AH_S */
+ public const int DS81XX_AHF_S = 88;/* DS81XX_AHF_S */
+ public const int DS90XX_HF_S = 90; /*DS90XX_HF_S*/
+ public const int DS91XX_HF_S = 91; /*DS91XX_HF_S*/
+ public const int DS91XX_HD_S = 92; /*91XXHD-S(MD)*/
+ /**********************豸 end***********************/
+
+ /********************** begin***********************/
+ public const int DEVICE_SOFTHARDWARE_ABILITY = 0x001;
+ public const int DEVICE_NETWORK_ABILITY = 0x002;
+ public const int DEVICE_ENCODE_ALL_ABILITY_V20 = 0x008;
+ public const int IPC_FRONT_PARAMETER_V20 = 0x009;
+ public const int DEVICE_RAID_ABILITY = 0x007;
+ public const int DEVICE_ALARM_ABILITY = 0x00a;
+ public const int DEVICE_DYNCHAN_ABILITY = 0x00b;
+ public const int DEVICE_USER_ABILITY = 0x00c;
+ public const int DEVICE_NETAPP_ABILITY = 0x00d;
+ public const int DEVICE_VIDEOPIC_ABILITY = 0x00e;
+ public const int DEVICE_JPEG_CAP_ABILITY = 0x00f;
+ public const int DEVICE_SERIAL_ABILITY = 0x010;
+ public const int DEVICE_ABILITY_INFO = 0x011;
+ /********************** end***********************/
+
+ /*************************************************
+ ޼
+ **************************************************/
+ #region acs event upload
+
+ /* Alarm */
+ // Main Type
+ //public const int MAJOR_ALARM = 0x1;
+ // Hypo- Type
+ public const int MINOR_ALARMIN_SHORT_CIRCUIT = 0x400; // region short circuit
+ public const int MINOR_ALARMIN_BROKEN_CIRCUIT = 0x401; // region broken circuit
+ public const int MINOR_ALARMIN_EXCEPTION = 0x402; // region exception
+ public const int MINOR_ALARMIN_RESUME = 0x403; // region resume
+ public const int MINOR_HOST_DESMANTLE_ALARM = 0x404; // host desmantle alarm
+ public const int MINOR_HOST_DESMANTLE_RESUME = 0x405; // host desmantle resume
+ public const int MINOR_CARD_READER_DESMANTLE_ALARM = 0x406; // card reader desmantle alarm
+ public const int MINOR_CARD_READER_DESMANTLE_RESUME = 0x407; // card reader desmantle resume
+ public const int MINOR_CASE_SENSOR_ALARM = 0x408; // case sensor alarm
+ public const int MINOR_CASE_SENSOR_RESUME = 0x409; // case sensor resume
+ public const int MINOR_STRESS_ALARM = 0x40a; // stress alarm
+ public const int MINOR_OFFLINE_ECENT_NEARLY_FULL = 0x40b; // offline ecent nearly full
+ public const int MINOR_CARD_MAX_AUTHENTICATE_FAIL = 0x40c; // card max authenticate fall
+ public const int MINOR_SD_CARD_FULL = 0x40d; // SD card is full
+ public const int MINOR_LINKAGE_CAPTURE_PIC = 0x40e; // lingage capture picture
+ public const int MINOR_SECURITY_MODULE_DESMANTLE_ALARM = 0x40f; //Door control security module desmantle alarm
+ public const int MINOR_SECURITY_MODULE_DESMANTLE_RESUME = 0x410; //Door control security module desmantle resume
+ public const int MINOR_POS_START_ALARM = 0x411; // POS Start
+ public const int MINOR_POS_END_ALARM = 0x412; // POS end
+ public const int MINOR_FACE_IMAGE_QUALITY_LOW = 0x413; // face image quality low
+ public const int MINOR_FINGE_RPRINT_QUALITY_LOW = 0x414; // finger print quality low
+ public const int MINOR_FIRE_IMPORT_SHORT_CIRCUIT = 0x415; // Fire import short circuit
+ public const int MINOR_FIRE_IMPORT_BROKEN_CIRCUIT = 0x416; // Fire import broken circuit
+ public const int MINOR_FIRE_IMPORT_RESUME = 0x417; // Fire import resume
+ public const int MINOR_FIRE_BUTTON_TRIGGER = 0x418; // fire button trigger
+ public const int MINOR_FIRE_BUTTON_RESUME = 0x419; // fire button resume
+ public const int MINOR_MAINTENANCE_BUTTON_TRIGGER = 0x41a; // maintenance button trigger
+ public const int MINOR_MAINTENANCE_BUTTON_RESUME = 0x41b; // maintenance button resume
+ public const int MINOR_EMERGENCY_BUTTON_TRIGGER = 0x41c; // emergency button trigger
+ public const int MINOR_EMERGENCY_BUTTON_RESUME = 0x41d; // emergency button resume
+ public const int MINOR_DISTRACT_CONTROLLER_ALARM = 0x41e; // distract controller alarm
+ public const int MINOR_DISTRACT_CONTROLLER_RESUME = 0x41f; // distract controller resume
+ public const int MINOR_CHANNEL_CONTROLLER_DESMANTLE_ALARM = 0x422; //channel controller desmantle alarm
+ public const int MINOR_CHANNEL_CONTROLLER_DESMANTLE_RESUME = 0x423; //channel controller desmantle resume
+ public const int MINOR_CHANNEL_CONTROLLER_FIRE_IMPORT_ALARM = 0x424; //channel controller fire import alarm
+ public const int MINOR_CHANNEL_CONTROLLER_FIRE_IMPORT_RESUME = 0x425; //channel controller fire import resume
+ public const int MINOR_PRINTER_OUT_OF_PAPER = 0x440; //printer no paper
+ public const int MINOR_LEGAL_EVENT_NEARLY_FULL = 0x442; //Legal event nearly full
+
+ /* Exception*/
+ // Main Type
+ //public const int MAJOR_EXCEPTION = 0x2;
+ // Hypo- Type
+
+ //public const int MINOR_NET_BROKEN = 0x27; // Network disconnected
+ public const int MINOR_RS485_DEVICE_ABNORMAL = 0x3a; // RS485 connect status exception
+ public const int MINOR_RS485_DEVICE_REVERT = 0x3b; // RS485 connect status exception recovery
+
+ public const int MINOR_DEV_POWER_ON = 0x400; // device power on
+ public const int MINOR_DEV_POWER_OFF = 0x401; // device power off
+ public const int MINOR_WATCH_DOG_RESET = 0x402; // watch dog reset
+ public const int MINOR_LOW_BATTERY = 0x403; // low battery
+ public const int MINOR_BATTERY_RESUME = 0x404; // battery resume
+ public const int MINOR_AC_OFF = 0x405; // AC off
+ public const int MINOR_AC_RESUME = 0x406; // AC resume
+ public const int MINOR_NET_RESUME = 0x407; // Net resume
+ public const int MINOR_FLASH_ABNORMAL = 0x408; // FLASH abnormal
+ public const int MINOR_CARD_READER_OFFLINE = 0x409; // card reader offline
+ public const int MINOR_CARD_READER_RESUME = 0x40a; // card reader resume
+ public const int MINOR_INDICATOR_LIGHT_OFF = 0x40b; // Indicator Light Off
+ public const int MINOR_INDICATOR_LIGHT_RESUME = 0x40c; // Indicator Light Resume
+ public const int MINOR_CHANNEL_CONTROLLER_OFF = 0x40d; // channel controller off
+ public const int MINOR_CHANNEL_CONTROLLER_RESUME = 0x40e; // channel controller resume
+ public const int MINOR_SECURITY_MODULE_OFF = 0x40f; // Door control security module off
+ public const int MINOR_SECURITY_MODULE_RESUME = 0x410; // Door control security module resume
+ public const int MINOR_BATTERY_ELECTRIC_LOW = 0x411; // battery electric low
+ public const int MINOR_BATTERY_ELECTRIC_RESUME = 0x412; // battery electric resume
+ public const int MINOR_LOCAL_CONTROL_NET_BROKEN = 0x413; // Local control net broken
+ public const int MINOR_LOCAL_CONTROL_NET_RSUME = 0x414; // Local control net resume
+ public const int MINOR_MASTER_RS485_LOOPNODE_BROKEN = 0x415; // Master RS485 loop node broken
+ public const int MINOR_MASTER_RS485_LOOPNODE_RESUME = 0x416; // Master RS485 loop node resume
+ public const int MINOR_LOCAL_CONTROL_OFFLINE = 0x417; // Local control offline
+ public const int MINOR_LOCAL_CONTROL_RESUME = 0x418; // Local control resume
+ public const int MINOR_LOCAL_DOWNSIDE_RS485_LOOPNODE_BROKEN = 0x419; // Local downside RS485 loop node broken
+ public const int MINOR_LOCAL_DOWNSIDE_RS485_LOOPNODE_RESUME = 0x41a; // Local downside RS485 loop node resume
+ public const int MINOR_DISTRACT_CONTROLLER_ONLINE = 0x41b; // distract controller online
+ public const int MINOR_DISTRACT_CONTROLLER_OFFLINE = 0x41c; // distract controller offline
+ public const int MINOR_ID_CARD_READER_NOT_CONNECT = 0x41d; // Id card reader not connected(intelligent dedicated)
+ public const int MINOR_ID_CARD_READER_RESUME = 0x41e; //Id card reader connection restored(intelligent dedicated)
+ public const int MINOR_FINGER_PRINT_MODULE_NOT_CONNECT = 0x41f; // fingerprint module is not connected(intelligent dedicated)
+ public const int MINOR_FINGER_PRINT_MODULE_RESUME = 0x420; // The fingerprint module connection restored(intelligent dedicated)
+ public const int MINOR_CAMERA_NOT_CONNECT = 0x421; // Camera not connected
+ public const int MINOR_CAMERA_RESUME = 0x422; // Camera connection restored
+ public const int MINOR_COM_NOT_CONNECT = 0x423; // COM not connected
+ public const int MINOR_COM_RESUME = 0x424;// COM connection restored
+ public const int MINOR_DEVICE_NOT_AUTHORIZE = 0x425; // device are not authorized
+ public const int MINOR_PEOPLE_AND_ID_CARD_DEVICE_ONLINE = 0x426; // people and ID card device online
+ public const int MINOR_PEOPLE_AND_ID_CARD_DEVICE_OFFLINE = 0x427;// people and ID card device offline
+ public const int MINOR_LOCAL_LOGIN_LOCK = 0x428; // local login lock
+ public const int MINOR_LOCAL_LOGIN_UNLOCK = 0x429; //local login unlock
+ public const int MINOR_SUBMARINEBACK_COMM_BREAK = 0x42a; //submarineback communicate break
+ public const int MINOR_SUBMARINEBACK_COMM_RESUME = 0x42b; //submarineback communicate resume
+ public const int MINOR_MOTOR_SENSOR_EXCEPTION = 0x42c; //motor sensor exception
+ public const int MINOR_CAN_BUS_EXCEPTION = 0x42d; //can bus exception
+ public const int MINOR_CAN_BUS_RESUME = 0x42e; //can bus resume
+ public const int MINOR_GATE_TEMPERATURE_OVERRUN = 0x42f; //gate temperature over run
+ public const int MINOR_IR_EMITTER_EXCEPTION = 0x430; //IR emitter exception
+ public const int MINOR_IR_EMITTER_RESUME = 0x431; //IR emitter resume
+ public const int MINOR_LAMP_BOARD_COMM_EXCEPTION = 0x432; //lamp board communicate exception
+ public const int MINOR_LAMP_BOARD_COMM_RESUME = 0x433; //lamp board communicate resume
+ public const int MINOR_IR_ADAPTOR_COMM_EXCEPTION = 0x434; //IR adaptor communicate exception
+ public const int MINOR_IR_ADAPTOR_COMM_RESUME = 0x435; //IR adaptor communicate resume
+ public const int MINOR_PRINTER_ONLINE = 0x436; //printer online
+ public const int MINOR_PRINTER_OFFLINE = 0x437; //printer offline
+ public const int MINOR_4G_MOUDLE_ONLINE = 0x438; //4G module online
+ public const int MINOR_4G_MOUDLE_OFFLINE = 0x439; //4G module offline
+
+
+ /* Operation */
+ // Main Type
+ //public const int MAJOR_OPERATION = 0x3;
+
+ // Hypo- Type
+ //public const int MINOR_LOCAL_UPGRADE = 0x5a; // Upgrade (local)
+ //public const int MINOR_REMOTE_LOGIN = 0x70; // Login (remote)
+ //public const int MINOR_REMOTE_LOGOUT = 0x71; // Logout (remote)
+ //public const int MINOR_REMOTE_ARM = 0x79; // On guard (remote)
+ //public const int MINOR_REMOTE_DISARM = 0x7a; // Disarm (remote)
+ //public const int MINOR_REMOTE_REBOOT = 0x7b; // Reboot (remote)
+ //public const int MINOR_REMOTE_UPGRADE = 0x7e; // upgrade (remote)
+ //public const int MINOR_REMOTE_CFGFILE_OUTPUT = 0x86; // Export Configuration (remote)
+ //public const int MINOR_REMOTE_CFGFILE_INTPUT = 0x87; // Import Configuration (remote)
+ //public const int MINOR_REMOTE_ALARMOUT_OPEN_MAN = 0xd6; // remote mamual open alarmout
+ //public const int MINOR_REMOTE_ALARMOUT_CLOSE_MAN = 0xd7; // remote mamual close alarmout
+
+ public const int MINOR_REMOTE_OPEN_DOOR = 0x400; // remote open door
+ public const int MINOR_REMOTE_CLOSE_DOOR = 0x401; // remote close door (controlled)
+ public const int MINOR_REMOTE_ALWAYS_OPEN = 0x402; // remote always open door (free)
+ public const int MINOR_REMOTE_ALWAYS_CLOSE = 0x403; // remote always close door (forbiden)
+ public const int MINOR_REMOTE_CHECK_TIME = 0x404; // remote check time
+ public const int MINOR_NTP_CHECK_TIME = 0x405; // ntp check time
+ public const int MINOR_REMOTE_CLEAR_CARD = 0x406; // remote clear card
+ public const int MINOR_REMOTE_RESTORE_CFG = 0x407; // remote restore configure
+ public const int MINOR_ALARMIN_ARM = 0x408; // alarm in arm
+ public const int MINOR_ALARMIN_DISARM = 0x409; // alarm in disarm
+ public const int MINOR_LOCAL_RESTORE_CFG = 0x40a; // local configure restore
+ public const int MINOR_REMOTE_CAPTURE_PIC = 0x40b; // remote capture picture
+ public const int MINOR_MOD_NET_REPORT_CFG = 0x40c; // modify net report cfg
+ public const int MINOR_MOD_GPRS_REPORT_PARAM = 0x40d; // modify GPRS report param
+ public const int MINOR_MOD_REPORT_GROUP_PARAM = 0x40e; // modify report group param
+ public const int MINOR_UNLOCK_PASSWORD_OPEN_DOOR = 0x40f; // unlock password open door
+ public const int MINOR_AUTO_RENUMBER = 0x410; // auto renumber
+ public const int MINOR_AUTO_COMPLEMENT_NUMBER = 0x411; // auto complement number
+ public const int MINOR_NORMAL_CFGFILE_INPUT = 0x412; // normal cfg file input
+ public const int MINOR_NORMAL_CFGFILE_OUTTPUT = 0x413; // normal cfg file output
+ public const int MINOR_CARD_RIGHT_INPUT = 0x414; // card right input
+ public const int MINOR_CARD_RIGHT_OUTTPUT = 0x415; // card right output
+ public const int MINOR_LOCAL_USB_UPGRADE = 0x416; // local USB upgrade
+ public const int MINOR_REMOTE_VISITOR_CALL_LADDER = 0x417; // visitor call ladder
+ public const int MINOR_REMOTE_HOUSEHOLD_CALL_LADDER = 0x418; // household call ladder
+ public const int MINOR_REMOTE_ACTUAL_GUARD = 0x419; //remote actual guard
+ public const int MINOR_REMOTE_ACTUAL_UNGUARD = 0x41a; //remote actual unguard
+ public const int MINOR_REMOTE_CONTROL_NOT_CODE_OPER_FAILED = 0x41b; //remote control not code operate failed
+ public const int MINOR_REMOTE_CONTROL_CLOSE_DOOR = 0x41c; //remote control close door
+ public const int MINOR_REMOTE_CONTROL_OPEN_DOOR = 0x41d; //remote control open door
+ public const int MINOR_REMOTE_CONTROL_ALWAYS_OPEN_DOOR = 0x41e; //remote control always open door
+
+ /* Additional Log Info*/
+ // Main Type
+ public const int MAJOR_EVENT = 0x5;/*event*/
+ // Hypo- Type
+ public const int MINOR_LEGAL_CARD_PASS = 0x01; // legal card pass
+ public const int MINOR_CARD_AND_PSW_PASS = 0x02; // swipe and password pass
+ public const int MINOR_CARD_AND_PSW_FAIL = 0x03; // swipe and password fail
+ public const int MINOR_CARD_AND_PSW_TIMEOUT = 0x04; // swipe and password timeout
+ public const int MINOR_CARD_AND_PSW_OVER_TIME = 0x05; // swipe and password over time
+ public const int MINOR_CARD_NO_RIGHT = 0x06; // card no right
+ public const int MINOR_CARD_INVALID_PERIOD = 0x07; // invalid period
+ public const int MINOR_CARD_OUT_OF_DATE = 0x08; // card out of date
+ public const int MINOR_INVALID_CARD = 0x09; // invalid card
+ public const int MINOR_ANTI_SNEAK_FAIL = 0x0a; // anti sneak fail
+ public const int MINOR_INTERLOCK_DOOR_NOT_CLOSE = 0x0b; // interlock door doesn't close
+ public const int MINOR_NOT_BELONG_MULTI_GROUP = 0x0c; // card no belong multi group
+ public const int MINOR_INVALID_MULTI_VERIFY_PERIOD = 0x0d; // invalid multi verify period
+ public const int MINOR_MULTI_VERIFY_SUPER_RIGHT_FAIL = 0x0e; // have no super right in multi verify mode
+ public const int MINOR_MULTI_VERIFY_REMOTE_RIGHT_FAIL = 0x0f; // have no remote right in multi verify mode
+ public const int MINOR_MULTI_VERIFY_SUCCESS = 0x10; // success in multi verify mode
+ public const int MINOR_LEADER_CARD_OPEN_BEGIN = 0x11; // leader card begin to open
+ public const int MINOR_LEADER_CARD_OPEN_END = 0x12; // leader card end to open
+ public const int MINOR_ALWAYS_OPEN_BEGIN = 0x13; // always open begin
+ public const int MINOR_ALWAYS_OPEN_END = 0x14; // always open end
+ public const int MINOR_LOCK_OPEN = 0x15; // lock open
+ public const int MINOR_LOCK_CLOSE = 0x16; // lock close
+ public const int MINOR_DOOR_BUTTON_PRESS = 0x17; // press door open button
+ public const int MINOR_DOOR_BUTTON_RELEASE = 0x18; // release door open button
+ public const int MINOR_DOOR_OPEN_NORMAL = 0x19; // door open normal
+ public const int MINOR_DOOR_CLOSE_NORMAL = 0x1a; // door close normal
+ public const int MINOR_DOOR_OPEN_ABNORMAL = 0x1b; // open door abnormal
+ public const int MINOR_DOOR_OPEN_TIMEOUT = 0x1c; // open door timeout
+ public const int MINOR_ALARMOUT_ON = 0x1d; // alarm out turn on
+ public const int MINOR_ALARMOUT_OFF = 0x1e; // alarm out turn off
+ public const int MINOR_ALWAYS_CLOSE_BEGIN = 0x1f; // always close begin
+ public const int MINOR_ALWAYS_CLOSE_END = 0x20; // always close end
+ public const int MINOR_MULTI_VERIFY_NEED_REMOTE_OPEN = 0x21; // need remote open in multi verify mode
+ public const int MINOR_MULTI_VERIFY_SUPERPASSWD_VERIFY_SUCCESS = 0x22; // superpasswd verify success in multi verify mode
+ public const int MINOR_MULTI_VERIFY_REPEAT_VERIFY = 0x23; // repeat verify in multi verify mode
+ public const int MINOR_MULTI_VERIFY_TIMEOUT = 0x24; // timeout in multi verify mode
+ public const int MINOR_DOORBELL_RINGING = 0x25; // doorbell ringing
+ public const int MINOR_FINGERPRINT_COMPARE_PASS = 0x26; // fingerprint compare pass
+ public const int MINOR_FINGERPRINT_COMPARE_FAIL = 0x27; // fingerprint compare fail
+ public const int MINOR_CARD_FINGERPRINT_VERIFY_PASS = 0x28; // card and fingerprint verify pass
+ public const int MINOR_CARD_FINGERPRINT_VERIFY_FAIL = 0x29; // card and fingerprint verify fail
+ public const int MINOR_CARD_FINGERPRINT_VERIFY_TIMEOUT = 0x2a; // card and fingerprint verify timeout
+ public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_PASS = 0x2b; // card and fingerprint and passwd verify pass
+ public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_FAIL = 0x2c; // card and fingerprint and passwd verify fail
+ public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_TIMEOUT = 0x2d; // card and fingerprint and passwd verify timeout
+ public const int MINOR_FINGERPRINT_PASSWD_VERIFY_PASS = 0x2e; // fingerprint and passwd verify pass
+ public const int MINOR_FINGERPRINT_PASSWD_VERIFY_FAIL = 0x2f; // fingerprint and passwd verify fail
+ public const int MINOR_FINGERPRINT_PASSWD_VERIFY_TIMEOUT = 0x30; // fingerprint and passwd verify timeout
+ public const int MINOR_FINGERPRINT_INEXISTENCE = 0x31; // fingerprint inexistence
+ public const int MINOR_CARD_PLATFORM_VERIFY = 0x32; // card platform verify
+ public const int MINOR_CALL_CENTER = 0x33; // call center
+ public const int MINOR_FIRE_RELAY_TURN_ON_DOOR_ALWAYS_OPEN = 0x34; // fire relay turn on door always open
+ public const int MINOR_FIRE_RELAY_RECOVER_DOOR_RECOVER_NORMAL = 0x35; // fire relay recover door recover normal
+ public const int MINOR_FACE_AND_FP_VERIFY_PASS = 0x36; // face and finger print verify pass
+ public const int MINOR_FACE_AND_FP_VERIFY_FAIL = 0x37; // face and finger print verify fail
+ public const int MINOR_FACE_AND_FP_VERIFY_TIMEOUT = 0x38; // face and finger print verify timeout
+ public const int MINOR_FACE_AND_PW_VERIFY_PASS = 0x39; // face and password verify pass
+ public const int MINOR_FACE_AND_PW_VERIFY_FAIL = 0x3a; // face and password verify fail
+ public const int MINOR_FACE_AND_PW_VERIFY_TIMEOUT = 0x3b; // face and password verify timeout
+ public const int MINOR_FACE_AND_CARD_VERIFY_PASS = 0x3c; // face and card verify pass
+ public const int MINOR_FACE_AND_CARD_VERIFY_FAIL = 0x3d; // face and card verify fail
+ public const int MINOR_FACE_AND_CARD_VERIFY_TIMEOUT = 0x3e; // face and card verify timeout
+ public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_PASS = 0x3f; // face and password and finger print verify pass
+ public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_FAIL = 0x40; // face and password and finger print verify fail
+ public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_TIMEOUT = 0x41; // face and password and finger print verify timeout
+ public const int MINOR_FACE_CARD_AND_FP_VERIFY_PASS = 0x42; // face and card and finger print verify pass
+ public const int MINOR_FACE_CARD_AND_FP_VERIFY_FAIL = 0x43; // face and card and finger print verify fail
+ public const int MINOR_FACE_CARD_AND_FP_VERIFY_TIMEOUT = 0x44; // face and card and finger print verify timeout
+ public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_PASS = 0x45; // employee and finger print verify pass
+ public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_FAIL = 0x46; // employee and finger print verify fail
+ public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_TIMEOUT = 0x47; // employee and finger print verify timeout
+ public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_PASS = 0x48; // employee and finger print and password verify pass
+ public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_FAIL = 0x49; // employee and finger print and password verify fail
+ public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_TIMEOUT = 0x4a; // employee and finger print and password verify timeout
+ public const int MINOR_FACE_VERIFY_PASS = 0x4b; // face verify pass
+ public const int MINOR_FACE_VERIFY_FAIL = 0x4c; // face verify fail
+ public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_PASS = 0x4d; // employee no and face verify pass
+ public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_FAIL = 0x4e; // employee no and face verify fail
+ public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_TIMEOUT = 0x4f; // employee no and face verify time out
+ public const int MINOR_FACE_RECOGNIZE_FAIL = 0x50; // face recognize fail
+ public const int MINOR_FIRSTCARD_AUTHORIZE_BEGIN = 0x51; // first card authorize begin
+ public const int MINOR_FIRSTCARD_AUTHORIZE_END = 0x52; // first card authorize end
+ public const int MINOR_DOORLOCK_INPUT_SHORT_CIRCUIT = 0x53; // door lock input short circuit
+ public const int MINOR_DOORLOCK_INPUT_BROKEN_CIRCUIT = 0x54; // door lock input broken circuit
+ public const int MINOR_DOORLOCK_INPUT_EXCEPTION = 0x55; // door lock input exception
+ public const int MINOR_DOORCONTACT_INPUT_SHORT_CIRCUIT = 0x56; // door contact input short circuit
+ public const int MINOR_DOORCONTACT_INPUT_BROKEN_CIRCUIT = 0x57; // door contact input broken circuit
+ public const int MINOR_DOORCONTACT_INPUT_EXCEPTION = 0x58; // door contact input exception
+ public const int MINOR_OPENBUTTON_INPUT_SHORT_CIRCUIT = 0x59; // open button input short circuit
+ public const int MINOR_OPENBUTTON_INPUT_BROKEN_CIRCUIT = 0x5a; // open button input broken circuit
+ public const int MINOR_OPENBUTTON_INPUT_EXCEPTION = 0x5b; // open button input exception
+ public const int MINOR_DOORLOCK_OPEN_EXCEPTION = 0x5c; // door lock open exception
+ public const int MINOR_DOORLOCK_OPEN_TIMEOUT = 0x5d; // door lock open timeout
+ public const int MINOR_FIRSTCARD_OPEN_WITHOUT_AUTHORIZE = 0x5e; // first card open without authorize
+ public const int MINOR_CALL_LADDER_RELAY_BREAK = 0x5f; // call ladder relay break
+ public const int MINOR_CALL_LADDER_RELAY_CLOSE = 0x60; // call ladder relay close
+ public const int MINOR_AUTO_KEY_RELAY_BREAK = 0x61; // auto key relay break
+ public const int MINOR_AUTO_KEY_RELAY_CLOSE = 0x62; // auto key relay close
+ public const int MINOR_KEY_CONTROL_RELAY_BREAK = 0x63; // key control relay break
+ public const int MINOR_KEY_CONTROL_RELAY_CLOSE = 0x64; // key control relay close
+ public const int MINOR_EMPLOYEENO_AND_PW_PASS = 0x65; // minor employee no and password pass
+ public const int MINOR_EMPLOYEENO_AND_PW_FAIL = 0x66; // minor employee no and password fail
+ public const int MINOR_EMPLOYEENO_AND_PW_TIMEOUT = 0x67; // minor employee no and password timeout
+ public const int MINOR_HUMAN_DETECT_FAIL = 0x68; // human detect fail
+ public const int MINOR_PEOPLE_AND_ID_CARD_COMPARE_PASS = 0x69; // the comparison with people and id card success
+ public const int MINOR_PEOPLE_AND_ID_CARD_COMPARE_FAIL = 0x70; // the comparison with people and id card failed
+ public const int MINOR_CERTIFICATE_BLOCKLIST = 0x71; // block list
+ public const int MINOR_LEGAL_MESSAGE = 0x72; // legal message
+ public const int MINOR_ILLEGAL_MESSAGE = 0x73; // illegal messag
+ public const int MINOR_MAC_DETECT = 0x74; // mac detect
+ public const int MINOR_DOOR_OPEN_OR_DORMANT_FAIL = 0x75; //door open or dormant fail
+ public const int MINOR_AUTH_PLAN_DORMANT_FAIL = 0x76; //auth plan dormant fail
+ public const int MINOR_CARD_ENCRYPT_VERIFY_FAIL = 0x77; //card encrypt verify fail
+ public const int MINOR_SUBMARINEBACK_REPLY_FAIL = 0x78; //submarineback reply fail
+ public const int MINOR_DOOR_OPEN_OR_DORMANT_OPEN_FAIL = 0x82; //door open or dormant open fail
+ public const int MINOR_DOOR_OPEN_OR_DORMANT_LINKAGE_OPEN_FAIL = 0x84; //door open or dormant linkage open fail
+ public const int MINOR_TRAILING = 0x85; //trailing
+ public const int MINOR_HEART_BEAT = 0x83; //heart beat event
+ public const int MINOR_REVERSE_ACCESS = 0x86; //reverse access
+ public const int MINOR_FORCE_ACCESS = 0x87; //force access
+ public const int MINOR_CLIMBING_OVER_GATE = 0x88; //climbing over gate
+ public const int MINOR_PASSING_TIMEOUT = 0x89; //passing timeout
+ public const int MINOR_INTRUSION_ALARM = 0x8a; //intrusion alarm
+ public const int MINOR_FREE_GATE_PASS_NOT_AUTH = 0x8b; //free gate pass not auth
+ public const int MINOR_DROP_ARM_BLOCK = 0x8c; //drop arm block
+ public const int MINOR_DROP_ARM_BLOCK_RESUME = 0x8d; //drop arm block resume
+ public const int MINOR_LOCAL_FACE_MODELING_FAIL = 0x8e; //device upgrade with module failed
+ public const int MINOR_STAY_EVENT = 0x8f; //stay event
+ public const int MINOR_PASSWORD_MISMATCH = 0x97; //password mismatch
+ public const int MINOR_EMPLOYEE_NO_NOT_EXIST = 0x98; //employee no not exist
+ public const int MINOR_COMBINED_VERIFY_PASS = 0x99; //combined verify pass
+ public const int MINOR_COMBINED_VERIFY_TIMEOUT = 0x9a; //combined verify timeout
+ public const int MINOR_VERIFY_MODE_MISMATCH = 0x9b; //verify mode mismatch
+ #endregion
+
+ /*************************************************
+ ýṹ(_V30Ϊ9000)
+ **************************************************/
+ //Уʱṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIME
+ {
+ public int dwYear;
+ public int dwMonth;
+ public int dwDay;
+ public int dwHour;
+ public int dwMinute;
+ public int dwSecond;
+ }
+
+ //ʱ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIME_V30
+ {
+ public ushort wYear;
+ public byte byMonth;
+ public byte byDay;
+ public byte byHour;
+ public byte byMinute;
+ public byte bySecond;
+ public byte byRes;
+ public ushort wMilliSec;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIME_EX
+ {
+ public ushort wYear;
+ public byte byMonth;
+ public byte byDay;
+ public byte byHour;
+ public byte byMinute;
+ public byte bySecond;
+ public byte byRes;
+ }
+
+ //ʱ(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCHEDTIME
+ {
+ public byte byStartHour;//ʼʱ
+ public byte byStartMin;//ʼʱ
+ public byte byStopHour;//ʱ
+ public byte byStopMin;//ʱ
+ }
+
+ /*豸쳣ʽ*/
+ public const int NOACTION = 0x0;/*Ӧ*/
+ public const int WARNONMONITOR = 0x1;/*ʾϾ*/
+ public const int WARNONAUDIOOUT = 0x2;/**/
+ public const int UPTOCENTER = 0x4;/*ϴ*/
+ public const int TRIGGERALARMOUT = 0x8;/**/
+ public const int TRIGGERCATPIC = 0x10;/*ץͼϴE-mail*/
+ public const int SEND_PIC_FTP = 0x200; /*ץͼϴftp*/
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STRUCTHEAD
+ {
+ public ushort wLength; //ṹ
+ public byte byVersion; /*ߵ4λֱߵͰ汾ݰ汾ͳȽչͬİ汾ijȽ*/
+ public byte byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HANDLEEXCEPTION_V41
+ {
+ public uint dwHandleType;/*ʽ,ʽ""*/
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public uint dwMaxRelAlarmOutChanNum; //ıֻ֧ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelAlarmOut; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HANDLEEXCEPTION_V40
+ {
+ public uint dwHandleType;/*ʽ,ʽ""*/
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public uint dwMaxRelAlarmOutChanNum; //ıֻ֧ͨ
+ public uint dwRelAlarmOutChanNum; //ıͨ ʵ֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelAlarmOut; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //쳣ṹ(ӽṹ)(ദʹ)(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HANDLEEXCEPTION_V30
+ {
+ public uint dwHandleType;/*ʽ,ʽ""*/
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelAlarmOut;//ͨ,,Ϊ1ʾ
+ }
+
+ //쳣ṹ(ӽṹ)(ദʹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HANDLEEXCEPTION
+ {
+ public uint dwHandleType;/*ʽ,ʽ""*/
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JpegץͼϴEMail*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelAlarmOut;//ͨ,,Ϊ1ʾ
+ }
+
+ //DVR豸
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICECFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDVRName;//DVR
+ public uint dwDVRID;//DVR ID,ң //V1.4(0-99), V1.5(0-255)
+ public uint dwRecycleRecord;//Ƿѭ¼,0:; 1:
+ //²ɸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber;//к
+ public uint dwSoftwareVersion;//汾,16λ汾,16λǴΰ汾
+ public uint dwSoftwareBuildDate;//,0xYYYYMMDD
+ public uint dwDSPSoftwareVersion;//DSP汾,16λ汾,16λǴΰ汾
+ public uint dwDSPSoftwareBuildDate;// DSP,0xYYYYMMDD
+ public uint dwPanelVersion;// ǰ汾,16λ汾,16λǴΰ汾
+ public uint dwHardwareVersion;// Ӳ汾,16λ汾,16λǴΰ汾
+ public byte byAlarmInPortNum;//DVR
+ public byte byAlarmOutPortNum;//DVR
+ public byte byRS232Num;//DVR 232ڸ
+ public byte byRS485Num;//DVR 485ڸ
+ public byte byNetworkPortNum;//ڸ
+ public byte byDiskCtrlNum;//DVR Ӳ̿
+ public byte byDiskNum;//DVR Ӳ̸
+ public byte byDVRType;//DVR, 1:DVR 2:ATM DVR 3:DVS ......
+ public byte byChanNum;//DVR ͨ
+ public byte byStartChan;//ʼͨ,DVS-1,DVR - 1
+ public byte byDecordChans;//DVR ·
+ public byte byVGANum;//VGAڵĸ
+ public byte byUSBNum;//USBڵĸ
+ public byte byAuxoutNum;//ڵĸ
+ public byte byAudioNum;//ڵĸ
+ public byte byIPChanNum;//ͨ
+ }
+
+ /*IPַ*/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_IPADDR
+ {
+
+ /// char[16]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sIpV4;
+
+ /// BYTE[128]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIPv6;
+
+ public void Init()
+ {
+ sIpV4 = new byte[16];
+ byIPv6 = new byte[128];
+ }
+ }
+
+ /*ݽṹ(ӽṹ)(9000չ)*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ETHERNET_V30
+ {
+ public NET_DVR_IPADDR struDVRIP;//DVR IPַ
+ public NET_DVR_IPADDR struDVRIPMask;//DVR IPַ
+ public uint dwNetInterface;//ӿڣ1-10MBase-T2-10MBase-Tȫ˫3-100MBase-TX4-100Mȫ˫5-10M/100M/1000MӦ6-1000Mȫ˫
+ public ushort wDVRPort;//˿ں
+ public ushort wMTU;//MTUãĬ1500
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;// ַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_NETPARAM
+ {
+ public uint dwSize;
+ public NET_DVR_IPADDR struIP;
+ public ushort wPort;
+ public byte byAddressType; //0 - , 1 - ipv4/ipv6ַ2 -
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDomainName;
+ public byte byReportProtocol; //1-private 2-NAL2300, 3-Ehome
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACCOUNTNUM_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDevID; //ЭΪNAL2300ʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //GPRSڹ̶ķϽеģԲҪϢԤһЩֶ
+ }
+
+
+
+ /*ݽṹ(ӽṹ)*/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_ETHERNET
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDVRIP;//DVR IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDVRIPMask;//DVR IPַ
+ public uint dwNetInterface;//ӿ 1-10MBase-T 2-10MBase-Tȫ˫ 3-100MBase-TX 4-100Mȫ˫ 5-10M/100MӦ
+ public ushort wDVRPort;//˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;//ַ
+ }
+
+ //pppoeṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PPPOECFG
+ {
+ public uint dwPPPOE;//0-,1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPPPoEUser;//PPPoEû
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string sPPPoEPassword;// PPPoE
+ public NET_DVR_IPADDR struPPPoEIP;//PPPoE IPַ
+ }
+
+ //ýṹ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NETCFG_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ETHERNET, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ETHERNET_V30[] struEtherNet;//̫
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPADDR[] struRes1;/**/
+ public NET_DVR_IPADDR struAlarmHostIpAddr;/* IPַ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public ushort wAlarmHostIpPort;
+ public byte byUseDhcp;
+ public byte byRes3;
+ public NET_DVR_IPADDR struDnsServer1IpAddr;/* 1IPַ */
+ public NET_DVR_IPADDR struDnsServer2IpAddr;/* 2IPַ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIpResolver;
+ public ushort wIpResolverPort;
+ public ushort wHttpPortNo;
+ public NET_DVR_IPADDR struMulticastIpAddr;/* ಥַ */
+ public NET_DVR_IPADDR struGatewayIpAddr;/* صַ */
+ public NET_DVR_PPPOECFG struPPPoE;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Ϣṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ETHERNET_MULTI
+ {
+ public NET_DVR_IPADDR struDVRIP;
+ public NET_DVR_IPADDR struDVRIPMask;
+ public uint dwNetInterface;
+ public byte byCardType; //ͣ0-ͨ1-2-
+ public byte byRes1;
+ public ushort wMTU;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public byte byUseDhcp;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ public NET_DVR_IPADDR struGatewayIpAddr;
+ public NET_DVR_IPADDR struDnsServer1IpAddr;
+ public NET_DVR_IPADDR struDnsServer2IpAddr;
+ }
+
+ //ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NETCFG_MULTI
+ {
+ public uint dwSize;
+ public byte byDefaultRoute;
+ public byte byNetworkCardNum;
+ public byte byWorkMode; //0-ͨģʽ1-ģʽ
+ public byte byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NETWORK_CARD, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ETHERNET_MULTI[] struEtherNet;//̫
+ public NET_DVR_IPADDR struManageHost1IpAddr;
+ public NET_DVR_IPADDR struManageHost2IpAddr;
+ public NET_DVR_IPADDR struAlarmHostIpAddr;
+ public ushort wManageHost1Port;
+ public ushort wManageHost2Port;
+ public ushort wAlarmHostIpPort;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIpResolver;
+ public ushort wIpResolverPort;
+ public ushort wDvrPort;
+ public ushort wHttpPortNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_IPADDR struMulticastIpAddr;/* ಥַ */
+ public NET_DVR_PPPOECFG struPPPoE;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ //ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_NETCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ETHERNET, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ETHERNET[] struEtherNet;/* ̫ */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sManageHostIP;//Զַ̹
+ public ushort wManageHostPort;//Զ̹˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sIPServerIP;//IPServerַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sMultiCastIP;//ಥַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sGatewayIP;//صַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sNFSIP;//NFSIPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PATHNAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNFSDirectory;//NFSĿ¼
+ public uint dwPPPOE;//0-,1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPPPoEUser;//PPPoEû
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string sPPPoEPassword;// PPPoE
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sPPPoEIP;//PPPoE IPַ(ֻ)
+ public ushort wHttpPort;//HTTP˿ں
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_SIP_CFG
+ {
+ public uint dwSize;
+ public byte byEnableAutoLogin; //ʹԶעᣬ0-ʹܣ1-ʹ
+ public byte byLoginStatus; //ע״̬0-δעᣬ1-עᣬ˲ֻܻȡ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_IPADDR stuServerIP; //SIPIP
+ public ushort wServerPort; //SIP˿
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName; //עû
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassWord; //ע
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NUMBER_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDispalyName; //豸ʾ
+ public ushort wLocalPort; //ض˿
+ public byte byLoginCycle; //עڣ1-99
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 129, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //IPӶԽֻ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_IP_VIEW_DEVCFG
+ {
+ public uint dwSize;
+ public byte byDefaultRing; //ĬΧ1-6
+ public byte byRingVolume; //Χ0-9
+ public byte byInputVolume; //ֵΧ0-6
+ public byte byOutputVolume; //ֵΧ0-9
+ public ushort wRtpPort; //Rtp˿
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwPreviewDelayTime; //Ԥʱã0-30
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //IpӶԽƵز
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_IP_VIEW_AUDIO_CFG
+ {
+ public uint dwSize;
+ public byte byAudioEncPri1; //Ƶȼ10-OggVorbis1-G711_U2-G711_A 5-MPEG2,6-G7267-AAC
+ public byte byAudioEncPri2; //Ƶȼ2sip֧Ƶ1ʱʹƵ20-OggVorbis1-G711_U2-G711_A 5-MPEG2,6-G7267-AAC
+ public ushort wAudioPacketLen1; //Ƶ1ݰ
+ public ushort wAudioPacketLen2; //Ƶ2ݰ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //IPֻжԽýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_IP_VIEW_CALL_CFG
+ {
+ public uint dwSize ;
+ public byte byEnableAutoResponse; //ʹԶӦ,0-ʹܣ1-ʹ
+ public byte byAudoResponseTime; //ԶӦʱ䣬0-30
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byEnableAlarmNumber1; //10-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NUMBER_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmNumber1; //к1
+ public byte byEnableAlarmNumber2; //20-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NUMBER_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmNumber2; //к2к1ʧ᳢ܻԺк2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 72, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes4;
+ }
+
+ //ͨͼṹ
+ //ƶ(ӽṹ)(鷽ʽչ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_RECORDCHAN
+ {
+ public uint dwMaxRecordChanNum; //豸ֵ֧¼ͨ-ֻ
+ public uint dwCurRecordChanNum; //ǰʵõĹ¼ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint dwRelRecordChan; /* ʵʴ¼ֵͨʾ,ýУ±0 - MAX_CHANNUM_V30-1Чм0xffffffff,Ч*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ͨͼṹ
+ //ƶ(ӽṹ)(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MOTION_V30
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 96*64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMotionScope;/*,0-96λ,ʾ64,96*64С,Ϊ1ʾƶ,0-ʾ*/
+ public byte byMotionSensitive;/*ƶ, 0 - 5,ԽԽ,oxffر*/
+ public byte byEnableHandleMotion;/* Ƿƶ 0 1*/
+ public byte byEnableDisplay;/* ƶʾ0- 1- */
+ public byte reservedData;
+ public NET_DVR_HANDLEEXCEPTION_V30 struMotionHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;/*ʱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan;/* ¼ͨ*/
+ }
+
+ //ƶ(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MOTION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 396, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMotionScope;/*,22*18С,Ϊ1ʾĺƶ,0-ʾ*/
+ public byte byMotionSensitive;/*ƶ, 0 - 5,ԽԽ,0xffر*/
+ public byte byEnableHandleMotion;/* Ƿƶ */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 2)]
+ public string reservedData;
+ public NET_DVR_HANDLEEXCEPTION strMotionHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan;//¼ͨ,Ϊ1ʾͨ
+ }
+
+ //ڵ(ӽṹ)(9000չ) С704*576
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HIDEALARM_V30
+ {
+ public uint dwEnableHideAlarm;/* Ƿڵ ,0-,1- 2- 3-*/
+ public ushort wHideAlarmAreaTopLeftX;/* ڵx */
+ public ushort wHideAlarmAreaTopLeftY;/* ڵy */
+ public ushort wHideAlarmAreaWidth;/* ڵĿ */
+ public ushort wHideAlarmAreaHeight;/*ڵĸ*/
+ public NET_DVR_HANDLEEXCEPTION_V30 strHideAlarmHandleType; /* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ }
+
+ //ڵ(ӽṹ) С704*576
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HIDEALARM
+ {
+ public uint dwEnableHideAlarm;/* Ƿڵ ,0-,1- 2- 3-*/
+ public ushort wHideAlarmAreaTopLeftX;/* ڵx */
+ public ushort wHideAlarmAreaTopLeftY;/* ڵy */
+ public ushort wHideAlarmAreaWidth;/* ڵĿ */
+ public ushort wHideAlarmAreaHeight;/*ڵĸ*/
+ public NET_DVR_HANDLEEXCEPTION strHideAlarmHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ }
+
+ //źŶʧ(ӽṹ)(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VILOST_V30
+ {
+ public byte byEnableHandleVILost;/* ǷźŶʧ */
+ public NET_DVR_HANDLEEXCEPTION_V30 strVILostHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 56, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ }
+
+ //źŶʧ(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VILOST
+ {
+ public byte byEnableHandleVILost;/* ǷźŶʧ */
+ public NET_DVR_HANDLEEXCEPTION strVILostHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ }
+
+ //ڵ(ӽṹ)
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public struct NET_DVR_SHELTER
+ {
+ public ushort wHideAreaTopLeftX;/* ڵx */
+ public ushort wHideAreaTopLeftY;/* ڵy */
+ public ushort wHideAreaWidth;/* ڵĿ */
+ public ushort wHideAreaHeight;/*ڵĸ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COLOR
+ {
+ public byte byBrightness;/*,0-255*/
+ public byte byContrast;/*Աȶ,0-255*/
+ public byte bySaturation;/*Ͷ,0-255*/
+ public byte byHue;/*ɫ,0-255*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_RGB_COLOR
+ {
+ public byte byRed; //RGBɫеĺɫ
+ public byte byGreen; //RGBɫеɫ
+ public byte byBlue; //RGBɫеɫ
+ public byte byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DAYTIME
+ {
+ public byte byHour;//0~24
+ public byte byMinute;//0~60
+ public byte bySecond;//0~60
+ public byte byRes;
+ public ushort wMilliSecond; //0~1000
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_SCHEDULE_DAYTIME
+ {
+ public NET_DVR_DAYTIME struStartTime; //ʼʱ
+ public NET_DVR_DAYTIME struStopTime; //ʱ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DNMODE
+ {
+ public byte byObjectSize;//ռȲ(0~100)
+ public byte byMotionSensitive; /*ƶ, 0 - 5,ԽԽ,0xffر*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MOTION_MULTI_AREAPARAM
+ {
+ public byte byAreaNo;//(IPC- 1~8)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_VCA_RECT struRect;//Ϣ() size = 16;
+ public NET_DVR_DNMODE struDayNightDisable;//رģʽ
+ public NET_DVR_DNMODE struDayModeParam;//ģʽ
+ public NET_DVR_DNMODE struNightModeParam;//ҹģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MOTION_MULTI_AREA
+ {
+ public byte byDayNightCtrl;//ҹ 0~ر,1~Զл,2~ʱл(ĬϹر)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_SCHEDULE_DAYTIME struScheduleTime;//лʱ 16
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_MULTI_AREA_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MOTION_MULTI_AREAPARAM[] struMotionMultiAreaParam;//֧24
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MOTION_SINGLE_AREA
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64*96, ArraySubType = UnmanagedType.I1)]
+ public byte[]byMotionScope; /*,0-96λ,ʾ64,96*64С,ĿǰЧ22*18,Ϊ1ʾƶ,0-ʾ*/
+ public byte byMotionSensitive; /*ƶ, 0 - 5,ԽԽ,0xffر*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MOTION_MODE_PARAM
+ {
+ public NET_DVR_MOTION_SINGLE_AREA struMotionSingleArea; //ͨģʽµĵ
+ public NET_DVR_MOTION_MULTI_AREA struMotionMultiArea; //רģʽµĶ
+ }
+
+ //ƶ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MOTION_V40
+ {
+ public NET_DVR_MOTION_MODE_PARAM struMotionMode; //(5.1.0)
+ public byte byEnableHandleMotion; /* Ƿƶ 0 1*/
+ public byte byEnableDisplay; /*ƶʾ0-1-*/
+ public byte byConfigurationMode; //0~ͨ,1~ר(5.1.0)
+ public byte byRes1; //ֽ
+ /* 쳣ʽ */
+ public uint dwHandleType; //쳣,쳣ʽ""
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public uint dwMaxRelAlarmOutChanNum ; //ıֻ֧ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelAlarmOut; //ʵʴıţֵʾ,ýУ±0 - dwRelAlarmOut -1Чм0xffffffff,Ч
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS*MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime; /*ʱ*/
+ /*¼ͨ*/
+ public uint dwMaxRecordChanNum; //豸ֵ֧¼ͨ-ֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelRecordChan; /* ʵʴ¼ֵͨʾ,ýУ±0 - dwRelRecordChan -1Чм0xffffffff,Ч*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ //ڵ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_HIDEALARM_V40
+ {
+ public uint dwEnableHideAlarm; /* Ƿڵ0-1-ȣ2-ȣ3-*/
+ public ushort wHideAlarmAreaTopLeftX; /* ڵx */
+ public ushort wHideAlarmAreaTopLeftY; /* ڵy */
+ public ushort wHideAlarmAreaWidth; /* ڵĿ */
+ public ushort wHideAlarmAreaHeight; /*ڵĸ*/
+ /* źŶʧ */
+ public uint dwHandleType; //쳣,쳣ʽ""
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public uint dwMaxRelAlarmOutChanNum ; //ıֻ֧ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelAlarmOut; /*ţֵʾ,ýУ±0 - dwRelAlarmOut -1Чм0xffffffff,Ч*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS*MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime; /*ʱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //źŶʧ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_VILOST_V40
+ {
+ public uint dwEnableVILostAlarm; /* ǷźŶʧ ,0-,1-*/
+ /* źŶʧ */
+ public uint dwHandleType; //쳣,쳣ʽ""
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public uint dwMaxRelAlarmOutChanNum ; //ıֻ֧ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelAlarmOut; /*ţֵʾ,ýУ±0 - dwRelAlarmOut -1Чм0xffffffff,Ч*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS*MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime; /*ʱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_VICOLOR
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_COLOR[] struColor;/*ͼ(һЧ)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struHandleTime;/*ʱ()*/
+ }
+
+ //ͨͼṹ(V40չ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PICCFG_V40
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sChanName;
+ public uint dwVideoFormat; /* ֻ Ƶʽ 1-NTSC 2-PAL */
+ public NET_DVR_VICOLOR struViColor;// ͼʱ
+ //ʾͨ
+ public uint dwShowChanName; // ԤͼǷʾͨ,0-ʾ,1-ʾ
+ public ushort wShowNameTopLeftX; /* ͨʾλõx */
+ public ushort wShowNameTopLeftY; /* ͨʾλõy */
+ //˽ڵ
+ public uint dwEnableHide; /* Ƿڵ ,0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SHELTERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SHELTER[] struShelter;
+ //OSD
+ public uint dwShowOsd;// ԤͼǷʾOSD,0-ʾ,1-ʾ
+ public ushort wOSDTopLeftX; /* OSDx */
+ public ushort wOSDTopLeftY; /* OSDy */
+ public byte byOSDType; /* OSD(Ҫոʽ) */
+ /* 0: XXXX-XX-XX */
+ /* 1: XX-XX-XXXX */
+ /* 2: XXXXXXXX */
+ /* 3: XXXXXXXX */
+ /* 4: XX-XX-XXXX */
+ /* 5: XXXXXXXX */
+ /*6: xx/xx/xxxx(//) */
+ /*7: xxxx/xx/xx(//) */
+ /*8: xx/xx/xxxx(//)*/
+ public byte byDispWeek; /* Ƿʾ */
+ public byte byOSDAttrib; /* OSD:˸ */
+ /* 0: ʾOSD */
+ /* 1: ˸ */
+ /* 2: ˸ */
+ /* 3: ˸ */
+ /* 4: ˸ */
+ public byte byHourOSDType; /* OSDСʱ:0-24Сʱ,1-12Сʱ */
+ public byte byFontSize; //16*16()/8*16(Ӣ)1-32*32()/16*32(Ӣ)2-64*64()/32*64(Ӣ) FOR 91ϵHD-SDIDVR
+ public byte byOSDColorType; //0-Ĭϣڰף1-Զ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_VILOST_V40 struVILost; //ƵźŶʧ֧飩
+ public NET_DVR_VILOST_V40 struAULost; /*ƵźŶʧ֧飩*/
+ public NET_DVR_MOTION_V40 struMotion; //ƶⱨ֧飩
+ public NET_DVR_HIDEALARM_V40 struHideAlarm; //ڵ֧飩
+ public NET_DVR_RGB_COLOR struOsdColor;//OSDɫ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͨͼṹ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PICCFG_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sChanName;
+ public uint dwVideoFormat;/* ֻ Ƶʽ 1-NTSC 2-PAL*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byReservedData;/**/
+ //ʾͨ
+ public uint dwShowChanName;// ԤͼǷʾͨ,0-ʾ,1-ʾ С704*576
+ public ushort wShowNameTopLeftX;/* ͨʾλõx */
+ public ushort wShowNameTopLeftY;/* ͨʾλõy */
+ //ƵźŶʧ
+ public NET_DVR_VILOST_V30 struVILost;
+ public NET_DVR_VILOST_V30 struRes;/**/
+ //ƶ
+ public NET_DVR_MOTION_V30 struMotion;
+ //ڵ
+ public NET_DVR_HIDEALARM_V30 struHideAlarm;
+ //ڵ С704*576
+ public uint dwEnableHide;/* Ƿڵ ,0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SHELTERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SHELTER[] struShelter;
+ //OSD
+ public uint dwShowOsd;// ԤͼǷʾOSD,0-ʾ,1-ʾ С704*576
+ public ushort wOSDTopLeftX;/* OSDx */
+ public ushort wOSDTopLeftY;/* OSDy */
+ public byte byOSDType;/* OSD(Ҫոʽ) */
+ /* 0: XXXX-XX-XX */
+ /* 1: XX-XX-XXXX */
+ /* 2: XXXXXXXX */
+ /* 3: XXXXXXXX */
+ /* 4: XX-XX-XXXX */
+ /* 5: XXXXXXXX */
+ public byte byDispWeek;/* Ƿʾ */
+ public byte byOSDAttrib;/* OSD:˸ */
+ /* 0: ʾOSD */
+ /* 1: ,˸ */
+ /* 2: ,˸ */
+ /* 3: ˸, */
+ /* 4: ,˸ */
+ public byte byHourOSDType;/* OSDСʱ:0-24Сʱ,1-12Сʱ */
+ public byte byFontSize;//С16*16()/8*16(Ӣ)1-32*32()/16*32(Ӣ)2-64*64()/32*64(Ӣ) 3-48*48()/24*48(Ӣ) 0xff-Ӧ(adaptive)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 63, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͨͼṹSDK_V14չ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PICCFG_EX
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sChanName;
+ public uint dwVideoFormat;/* ֻ Ƶʽ 1-NTSC 2-PAL*/
+ public byte byBrightness;/*,0-255*/
+ public byte byContrast;/*Աȶ,0-255*/
+ public byte bySaturation;/*Ͷ,0-255 */
+ public byte byHue;/*ɫ,0-255*/
+ //ʾͨ
+ public uint dwShowChanName;// ԤͼǷʾͨ,0-ʾ,1-ʾ С704*576
+ public ushort wShowNameTopLeftX;/* ͨʾλõx */
+ public ushort wShowNameTopLeftY;/* ͨʾλõy */
+ //źŶʧ
+ public NET_DVR_VILOST struVILost;
+ //ƶ
+ public NET_DVR_MOTION struMotion;
+ //ڵ
+ public NET_DVR_HIDEALARM struHideAlarm;
+ //ڵ С704*576
+ public uint dwEnableHide;/* Ƿڵ ,0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SHELTERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SHELTER[] struShelter;
+ //OSD
+ public uint dwShowOsd;// ԤͼǷʾOSD,0-ʾ,1-ʾ С704*576
+ public ushort wOSDTopLeftX;/* OSDx */
+ public ushort wOSDTopLeftY;/* OSDy */
+ public byte byOSDType;/* OSD(Ҫոʽ) */
+ /* 0: XXXX-XX-XX */
+ /* 1: XX-XX-XXXX */
+ /* 2: XXXXXXXX */
+ /* 3: XXXXXXXX */
+ /* 4: XX-XX-XXXX */
+ /* 5: XXXXXXXX */
+ public byte byDispWeek;/* Ƿʾ */
+ public byte byOSDAttrib;/* OSD:˸ */
+ /* 0: ʾOSD */
+ /* 1: ,˸ */
+ /* 2: ,˸ */
+ /* 3: ˸, */
+ /* 4: ,˸ */
+ public byte byHourOsdType;/* OSDСʱ:0-24Сʱ,1-12Сʱ */
+ }
+
+ //ͨͼṹ(SDK_V13֮ǰ汾)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PICCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sChanName;
+ public uint dwVideoFormat;/* ֻ Ƶʽ 1-NTSC 2-PAL*/
+ public byte byBrightness;/*,0-255*/
+ public byte byContrast;/*Աȶ,0-255*/
+ public byte bySaturation;/*Ͷ,0-255 */
+ public byte byHue;/*ɫ,0-255*/
+ //ʾͨ
+ public uint dwShowChanName;// ԤͼǷʾͨ,0-ʾ,1-ʾ С704*576
+ public ushort wShowNameTopLeftX;/* ͨʾλõx */
+ public ushort wShowNameTopLeftY;/* ͨʾλõy */
+ //źŶʧ
+ public NET_DVR_VILOST struVILost;
+ //ƶ
+ public NET_DVR_MOTION struMotion;
+ //ڵ
+ public NET_DVR_HIDEALARM struHideAlarm;
+ //ڵ С704*576
+ public uint dwEnableHide;/* Ƿڵ ,0-,1-*/
+ public ushort wHideAreaTopLeftX;/* ڵx */
+ public ushort wHideAreaTopLeftY;/* ڵy */
+ public ushort wHideAreaWidth;/* ڵĿ */
+ public ushort wHideAreaHeight;/*ڵĸ*/
+ //OSD
+ public uint dwShowOsd;// ԤͼǷʾOSD,0-ʾ,1-ʾ С704*576
+ public ushort wOSDTopLeftX;/* OSDx */
+ public ushort wOSDTopLeftY;/* OSDy */
+ public byte byOSDType;/* OSD(Ҫոʽ) */
+ /* 0: XXXX-XX-XX */
+ /* 1: XX-XX-XXXX */
+ /* 2: XXXXXXXX */
+ /* 3: XXXXXXXX */
+ /* 4: XX-XX-XXXX */
+ /* 5: XXXXXXXX */
+ public byte byDispWeek;/* Ƿʾ */
+ public byte byOSDAttrib;/* OSD:˸ */
+ /* 0: ʾOSD */
+ /* 1: ,˸ */
+ /* 2: ,˸ */
+ /* 3: ˸, */
+ /* 4: ,˸ */
+ public byte reservedData2;
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MULTI_STREAM_COMPRESSIONCFG_COND
+ {
+ public uint dwSize;
+ public NET_DVR_STREAM_INFO struStreamInfo;
+ public uint dwStreamType; //ͣ0-1-2-¼ͣ3-3ԶͨGET /ISAPI/Streaming/channels//customStreamȡǰͨѾӵԶIDԶΪ6~10ֵ6~10
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MULTI_STREAM_COMPRESSIONCFG
+ {
+ public uint dwSize;
+ public uint dwStreamType; //ͣ0-1-2-¼ͣ3-3
+ public NET_DVR_COMPRESSION_INFO_V30 struStreamPara; //ѹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 80, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ѹ(ӽṹ)(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSION_INFO_V30
+ {
+ public byte byStreamType;// 0-Ƶ, 1-, ʾ¼ѹʱλʾǷѹ
+ public byte byResolution;//ֱ0-DCIF 1-CIF, 2-QCIF, 3-4CIF, 4-2CIF 516-VGA640*480 17-UXGA1600*1200 18-SVGA 800*60019-HD720p1280*72020-XVGA 21-HD900p
+ public byte byBitrateType;// 0:, 1:
+ public byte byPicQuality;//ͼ 0- 1-κ 2-Ϻ 3-һ 4-ϲ 5-
+ public uint dwVideoBitrate;//Ƶ 0- 1-16K 2-32K 3-48k 4-64K 5-80K 6-96K 7-128K 8-160k 9-192K 10-224K 11-256K 12-320K
+ // 13-384K 14-448K 15-512K 16-640K 17-768K 18-896K 19-1024K 20-1280K 21-1536K 22-1792K 23-2048K
+ //λ(31λ)ó1ʾԶ, 0-30λʾֵ
+ public uint dwVideoFrameRate;//֡ 0-ȫ; 1-1/16; 2-1/8; 3-1/4; 4-1/2; 5-1; 6-2; 7-4; 8-6; 9-8; 10-10; 11-12; 12-16; 13-20; V2.0汾¼14-15; 15-18; 16-22;
+ public ushort wIntervalFrameI;//I֡
+ //2006-08-11 ӵP֡ýӿڣԸʵʱʱ
+ public byte byIntervalBPFrame;//0-BBP֡; 1-BP֡; 2-P֡
+ public byte byres1; //
+ public byte byVideoEncType;//Ƶ 0 hik264;1h264; 2mpeg4;
+ public byte byAudioEncType; //Ƶ 0OggVorbis
+ public byte byVideoEncComplexity; //Ƶ븴Ӷȣ0-ͣ1-У2,0xfe:ԶԴһ
+ public byte byEnableSvc; //0 - SVCܣ1- SVC
+ public byte byFormatType; //װͣ1-2-RTPװ3-PSװ4-TSװ5-˽У6-FLV7-ASF8-3GP,9-RTP+PS꣺GB281810xff-Ч
+ public byte byAudioBitRate; //Ƶ0-Ĭϣ1-8Kbps, 2- 16Kbps, 3-32Kbps4-64Kbps5-128Kbps6-192Kbps(IPC5.1.0Ĭ4-64Kbps)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byres;//ﱣƵѹ
+ }
+
+ //ͨѹ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSIONCFG_V30
+ {
+ public uint dwSize;
+ public NET_DVR_COMPRESSION_INFO_V30 struNormHighRecordPara;//¼ Ӧ8000ͨ
+ public NET_DVR_COMPRESSION_INFO_V30 struRes;// char reserveData[28];
+ public NET_DVR_COMPRESSION_INFO_V30 struEventRecordPara;//¼ѹ
+ public NET_DVR_COMPRESSION_INFO_V30 struNetPara;//()
+ }
+
+ //ѹ(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSION_INFO
+ {
+ public byte byStreamType;//0-Ƶ,1-,ʾѹʱλʾǷѹ
+ public byte byResolution;//ֱ0-DCIF 1-CIF, 2-QCIF, 3-4CIF, 4-2CIF, 5-2QCIF(352X144)(ר)
+ public byte byBitrateType;//0:ʣ1:
+ public byte byPicQuality;//ͼ 0- 1-κ 2-Ϻ 3-һ 4-ϲ 5-
+ public uint dwVideoBitrate; //Ƶ 0- 1-16K() 2-32K 3-48k 4-64K 5-80K 6-96K 7-128K 8-160k 9-192K 10-224K 11-256K 12-320K
+ // 13-384K 14-448K 15-512K 16-640K 17-768K 18-896K 19-1024K 20-1280K 21-1536K 22-1792K 23-2048K
+ //λ(31λ)ó1ʾԶ, 0-30λʾֵ(MIN-32K MAX-8192K)
+ public uint dwVideoFrameRate;//֡ 0-ȫ; 1-1/16; 2-1/8; 3-1/4; 4-1/2; 5-1; 6-2; 7-4; 8-6; 9-8; 10-10; 11-12; 12-16; 13-20;
+ }
+
+ //ͨѹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSIONCFG
+ {
+ public uint dwSize;
+ public NET_DVR_COMPRESSION_INFO struRecordPara;//¼/¼¼
+ public NET_DVR_COMPRESSION_INFO struNetPara;///
+ }
+
+ //ѹ(ӽṹ)(չ) I֡
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSION_INFO_EX
+ {
+ public byte byStreamType;//0-Ƶ, 1-
+ public byte byResolution;//ֱ0-DCIF 1-CIF, 2-QCIF, 3-4CIF, 4-2CIF, 5-2QCIF(352X144)(ר)
+ public byte byBitrateType;//0:ʣ1:
+ public byte byPicQuality;//ͼ 0- 1-κ 2-Ϻ 3-һ 4-ϲ 5-
+ public uint dwVideoBitrate;//Ƶ 0- 1-16K() 2-32K 3-48k 4-64K 5-80K 6-96K 7-128K 8-160k 9-192K 10-224K 11-256K 12-320K
+ // 13-384K 14-448K 15-512K 16-640K 17-768K 18-896K 19-1024K 20-1280K 21-1536K 22-1792K 23-2048K
+ //λ(31λ)ó1ʾԶ, 0-30λʾֵ(MIN-32K MAX-8192K)
+ public uint dwVideoFrameRate;//֡ 0-ȫ; 1-1/16; 2-1/8; 3-1/4; 4-1/2; 5-1; 6-2; 7-4; 8-6; 9-8; 10-10; 11-12; 12-16; 13-20, //V2.014-15, 15-18, 16-22;
+ public ushort wIntervalFrameI;//I֡
+ //2006-08-11 ӵP֡ýӿڣԸʵʱʱ
+ public byte byIntervalBPFrame;//0-BBP֡; 1-BP֡; 2-P֡
+ public byte byRes;
+ }
+
+ //ͨѹ(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSIONCFG_EX
+ {
+ public uint dwSize;
+ public NET_DVR_COMPRESSION_INFO_EX struRecordPara;//¼
+ public NET_DVR_COMPRESSION_INFO_EX struNetPara;//
+ }
+
+ //ʱ¼(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_RECORDSCHED
+ {
+ public NET_DVR_SCHEDTIME struRecordTime;
+ public byte byRecordType;//0:ʱ¼1:ƶ⣬2:¼3:|4:&, 5:, 6: ¼
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 3)]
+ public string reservedData;
+ }
+
+ //ȫ¼(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORDDAY
+ {
+ public ushort wAllDayRecord;/* Ƿȫ¼ 0- 1-*/
+ public byte byRecordType;/* ¼ 0:ʱ¼1:ƶ⣬2:¼3:|4:& 5:, 6: ¼*/
+ public byte reservedData;
+ }
+
+ //ʱ¼(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORDSCHED_V40
+ {
+ public NET_DVR_SCHEDTIME struRecordTime;
+ /*¼ͣ0:ʱ¼1:ƶ⣬2:¼3:|4:& 5:,
+ 6-ܱ¼10-PIR11-߱12-ȱ13-ȫ¼,14-ܽͨ¼,
+ 15-Խ,16-,17-쳣,18-,
+ 19-(Խ|||쳣|),20,21-POS¼,
+ 22-, 23-뿪,24-ǻ,25-Աۼ,26-˶,27-ͣ,
+ 28-Ʒ,29-Ʒȡ,30-⣬31-ƻ,32-ܶʼ(˾),33-¼(˾), 34-˯¼(˾)
+ 35-ֻ, 36-Ԥ37-±38-²39-߲±,40-41-,42-ҵѯ,43-,44-ʸ,45-Ŀʱ46-ץģ47-Ƿ̯,48-Ŀץ,
+ 49-˶50ΣĿλ-ڼ⣬51-52仯 */
+ public byte byRecordType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ȫ¼(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORDDAY_V40
+ {
+ public byte byAllDayRecord; /* Ƿȫ¼ 0- 1-*/
+ /*¼ͣ0:ʱ¼1:ƶ⣬2:¼3:|4:& 5:,
+ 6-ܱ¼10-PIR11-߱12-ȱ13-ȫ¼,14-ܽͨ¼,
+ 15-Խ,16-,17-쳣,18-,
+ 19-(Խ|||쳣|),20,21-POS¼,
+ 22-, 23-뿪,24-ǻ,25-Աۼ,26-˶,27-ͣ,
+ 28-Ʒ,29-Ʒȡ,30-⣬31-ƻ,32-ܶʼ(˾),33-¼(˾), 34-˯¼(˾)
+ 35-ֻ, 36-Ԥ37-±38-²39-߲±,40-41-,42-ҵѯ,43-,44-ʸ,45-Ŀʱ,46-ץ,47-Ƿ̯,48-Ŀץ,
+ 49-˶50ΣĿλ-ڼ⣬51-52仯*/
+ public byte byRecordType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORD_V40
+ {
+ public uint dwSize;
+ public uint dwRecord; /*Ƿ¼ 0- 1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDDAY_V40[] struRecAllDay;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDSCHED_V40[] struRecordSched;
+ public uint dwRecordTime; /* ¼ʱ 0-5룬 1-10룬 2-30룬 3-1ӣ 4-2ӣ 5-5ӣ 6-10*/
+ public uint dwPreRecordTime; /* Ԥ¼ʱ 0-Ԥ¼ 1-5 2-10 3-15 4-20 5-25 6-30 7-0xffffffff(Ԥ¼) */
+ public uint dwRecorderDuration; /* ¼ʱ */
+ public byte byRedundancyRec; /*Ƿ¼,Ҫ˫ݣ0/1*/
+ public byte byAudioRec; /*¼ʱʱǷ¼Ƶݣд˷*/
+ public byte byStreamType; // 0-1-2-ͬʱ 3-
+ public byte byPassbackRecord; // 0:ش¼ 1ش¼
+ public ushort wLockDuration; // ¼ʱλСʱ 0ʾ0xffffʾ¼εʱijʱ¼
+ public byte byRecordBackup; // 0:¼浵 1¼浵
+ public byte bySVCLevel; //SVC֡ͣ0-飬1-֮һ 2-ķ֮
+ public byte byRecordManage; //¼ȣ0-ã 1-; ʱжʱ¼ʱжʱ¼¼ƻʹãƶ⣬شڰ¼ƻ
+ public byte byExtraSaveAudio;//Ƶ洢
+ /*¼ܺ㷨Զ¼㷨书Ϊ¼Ŀ֣ήʡ֡ʣĿʱָֻȫʼ֡ʣӶﵽԴĵĿ*/
+ public byte byIntelligentRecord;//Ƿ¼ 0- 1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 125, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͨ¼(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORD_V30
+ {
+ public uint dwSize;
+ public uint dwRecord;/*Ƿ¼ 0- 1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDDAY[] struRecAllDay;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDSCHED[] struRecordSched;
+ public uint dwRecordTime;/* ¼ʱ 0-5룬 1-20룬 2-30룬 3-1ӣ 4-2ӣ 5-5ӣ 6-10*/
+ public uint dwPreRecordTime;/* Ԥ¼ʱ 0-Ԥ¼ 1-5 2-10 3-15 4-20 5-25 6-30 7-0xffffffff(Ԥ¼) */
+ public uint dwRecorderDuration;/* ¼ʱ */
+ public byte byRedundancyRec;/*Ƿ¼,Ҫ˫ݣ0/1*/
+ public byte byAudioRec;/*¼ʱʱǷ¼Ƶݣд˷*/
+ public byte byStreamType; // 0: 1
+ public byte byPassbackRecord; // 0:ش¼ 1ش¼
+ public ushort wLockDuration; // ¼ʱλСʱ 0ʾ0xffffʾ¼εʱijʱ¼
+ public byte byRecordBackup; // 0:¼浵 1¼浵
+ public byte bySVCLevel; //SVC֡ͣ0-飬1-֮һ 2-ķ֮
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byReserve;
+ }
+
+ //ͨ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORD
+ {
+ public uint dwSize;
+ public uint dwRecord;/*Ƿ¼ 0- 1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDDAY[] struRecAllDay;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDSCHED[] struRecordSched;
+ public uint dwRecordTime;/* ¼ʱ䳤 */
+ public uint dwPreRecordTime;/* Ԥ¼ʱ 0-Ԥ¼ 1-5 2-10 3-15 4-20 5-25 6-30 7-0xffffffff(Ԥ¼) */
+ }
+
+ //̨Эṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZ_PROTOCOL
+ {
+ public uint dwType;/*ֵ1ʼ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDescribe;/*8000еһ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PTZ_PROTOCOL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PTZ_PROTOCOL[] struPtz;/*200PTZЭ*/
+ public uint dwPtzNum;/*ЧptzЭĿ0ʼ(ʱ1)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ /***************************̨(end)******************************/
+
+ //ͨ(̨)(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODERCFG_V30
+ {
+ public uint dwSize;
+ public uint dwBaudRate;//(bps)0501752110315043005600612007240084800996001019200 11384001257600137680014115.2k;
+ public byte byDataBit;// мλ 05λ16λ27λ38λ;
+ public byte byStopBit;// ֹͣλ 01λ12λ
+ public byte byParity;// У 0У飬1У飬2żУ;
+ public byte byFlowcontrol;// 0ޣ1,2-Ӳ
+ public ushort wDecoderType;//, 0ʼӦptzЭб
+ public ushort wDecoderAddress;/*ַ:0 - 255*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PRESET_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySetPreset;/* ԤõǷ,0-û,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CRUISE_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySetCruise;/* ѲǷ: 0-û,1- */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TRACK_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySetTrack;/* Ƿ,0-û,1-*/
+ }
+
+ //ͨ(̨)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODERCFG
+ {
+ public uint dwSize;
+ public uint dwBaudRate; //(bps)0501752110315043005600612007240084800996001019200 11384001257600137680014115.2k;
+ public byte byDataBit; // мλ 05λ16λ27λ38λ;
+ public byte byStopBit;// ֹͣλ 01λ12λ;
+ public byte byParity; // У 0У飬1У飬2żУ;
+ public byte byFlowcontrol;// 0ޣ1,2-Ӳ
+ public ushort wDecoderType;//, 0YouLi1LiLin-10162LiLin-8203Pelco-p4DM DynaColor5HD6006JC-41167Pelco-d WX8Pelco-d PICO
+ public ushort wDecoderAddress;/*ַ:0 - 255*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PRESET, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySetPreset;/* ԤõǷ,0-û,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CRUISE, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySetCruise;/* ѲǷ: 0-û,1- */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TRACK, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySetTrack;/* Ƿ,0-û,1-*/
+ }
+
+ //ppp(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PPPCFG_V30
+ {
+ public NET_DVR_IPADDR struRemoteIP;//ԶIPַ
+ public NET_DVR_IPADDR struLocalIP;//IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sLocalIPMask;//IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUsername;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public byte byPPPMode;//PPPģʽ, 01
+ public byte byRedial;//Ƿز 0-,1-
+ public byte byRedialMode;//زģʽ,0-ɲָ,1-Ԥûز
+ public byte byDataEncrypt;//ݼ,0-,1-
+ public uint dwMTU;//MTU
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PHONENUMBER_LEN)]
+ public string sTelephoneNumber;//绰
+ }
+
+ //ppp(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PPPCFG
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sRemoteIP;//ԶIPַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sLocalIP;//IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sLocalIPMask;//IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUsername;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public byte byPPPMode;//PPPģʽ, 01
+ public byte byRedial;//Ƿز 0-,1-
+ public byte byRedialMode;//زģʽ,0-ɲָ,1-Ԥûز
+ public byte byDataEncrypt;//ݼ,0-,1-
+ public uint dwMTU;//MTU
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PHONENUMBER_LEN)]
+ public string sTelephoneNumber;//绰
+ }
+
+ //RS232ڲ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLE_RS232
+ {
+ public uint dwBaudRate;/*(bps)0501752110315043005600612007240084800996001019200 11384001257600137680014115.2k;*/
+ public byte byDataBit;/* мλ 05λ16λ27λ38λ */
+ public byte byStopBit;/* ֹͣλ 01λ12λ */
+ public byte byParity;/* У 0У飬1У飬2żУ */
+ public byte byFlowcontrol;/* 0ޣ1,2-Ӳ */
+ public uint dwWorkMode; /* ģʽ0232PPPţ1232ڲƣ2ͨ */
+ }
+
+ //RS232ڲ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RS232CFG_V30
+ {
+ public uint dwSize;
+ public NET_DVR_SINGLE_RS232 struRs232;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 84, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_PPPCFG_V30 struPPPConfig;
+ }
+
+ //RS232ڲ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RS232CFG
+ {
+ public uint dwSize;
+ public uint dwBaudRate;//(bps)0501752110315043005600612007240084800996001019200 11384001257600137680014115.2k;
+ public byte byDataBit;// мλ 05λ16λ27λ38λ;
+ public byte byStopBit;// ֹͣλ 01λ12λ;
+ public byte byParity;// У 0У飬1У飬2żУ;
+ public byte byFlowcontrol;// 0ޣ1,2-Ӳ
+ public uint dwWorkMode;// ģʽ0խ(232PPP)1̨(232ڲ)2ͨ
+ public NET_DVR_PPPCFG struPPPConfig;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PRESETCHAN_INFO
+ {
+ public uint dwEnablePresetChan; /*Ԥõͨ*/
+ public uint dwPresetPointNo; /*ԤõͨӦԤõ, 0xfffffffʾԤõ㡣*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CRUISECHAN_INFO
+ {
+ public uint dwEnableCruiseChan; /*Ѳͨ*/
+ public uint dwCruiseNo; /*ѲͨӦѲ, 0xfffffffʾЧ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZTRACKCHAN_INFO
+ {
+ public uint dwEnablePtzTrackChan; /*ûɨͨ*/
+ public uint dwPtzTrackNo; /*ɨͨӦı, 0xfffffffʾЧ*/
+ }
+
+ //(256·NVRչ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINCFG_V40
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAlarmInName; /* */
+ public byte byAlarmType; //,0,1
+ public byte byAlarmInHandle; /* Ƿ 0- 1-*/
+ public byte byChannel; // 봥ʶͨ
+ public byte byRes1; //
+ public uint dwHandleType; //쳣,쳣ʽ""
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: */
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public uint dwMaxRelAlarmOutChanNum ; //ıֻ֧ͨ
+ public uint dwRelAlarmOutChanNum; //ıͨ ʵ֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelAlarmOut; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ /*¼ͨ*/
+ public uint dwMaxRecordChanNum; //豸ֵ֧¼ͨ-ֻ
+ public uint dwCurRecordChanNum; //ǰʵõĹ¼ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelRecordChan; /* ʵʴ¼ֵͨʾ,ýУ±0 - dwCurRecordChanNum -1Чм0xffffffff,Ч*/
+ public uint dwMaxEnablePtzCtrlNun; //ǫ̃(ֻ)
+ public uint dwEnablePresetChanNum; //ǰԤõĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PRESETCHAN_INFO[] struPresetChanInfo; //õԤõϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 516, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; /**/
+ public uint dwEnableCruiseChanNum; //ǰѲͨĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CRUISECHAN_INFO[] struCruiseChanInfo; //ѲͨϢ
+ public uint dwEnablePtzTrackChanNum; //ǰѲͨĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PTZTRACKCHAN_INFO[] struPtzTrackInfo; //ûɨͨϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINCFG_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAlarmInName;/* */
+ public byte byAlarmType; //,0,1
+ public byte byAlarmInHandle; /* Ƿ 0- 1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_HANDLEEXCEPTION_V30 struAlarmHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan;//¼ͨ,Ϊ1ʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnablePreset;/* ǷԤõ 0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPresetNo;/* ǫ̃Ԥõ,һԵǫ̈ͨԤõ, 0xffʾԤõ㡣*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 192, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;/**/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnableCruise;/* ǷѲ 0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCruiseNo;/* Ѳ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnablePtzTrack;/* Ƿ 0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPTZTrack;/* ǫ̃ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct STRUCT_IO_ALARM
+ {
+ public uint dwAlarmInputNo; //ıͨţһֻһ
+ public uint dwTrigerAlarmOutNum; /*ıں䳤ݲдıͨţֽڱʾһ*/
+ public uint dwTrigerRecordChanNum; /*¼ͨں䳤ݲд¼ͨţֽڱʾһ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 116, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct STRUCT_ALARM_CHANNEL
+ {
+ public uint dwAlarmChanNum; /*ͨݸں䳤ݲзıͨţֽڱʾһ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct STRUCT_ALARM_HD
+ {
+ public uint dwAlarmHardDiskNum; /*Ӳݳȣں䳤ݲзӲ̺ţĽڱʾһ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct UNION_ALARMINFO_FIXED
+ {
+ [FieldOffset(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUnionLen;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALRAM_FIXED_HEADER
+ {
+ public uint dwAlarmType; /*0-ź,1-Ӳ,2-źŶʧ3ƶ⣬4Ӳδʽ,5-дӲ̳,6-ڵ7-ʽƥ, 8-Ƿʣ9-Ƶź쳣10-¼쳣11-ܳ仯12-쳣13-ǰ/¼ֱʲƥ*/
+ public NET_DVR_TIME_EX struAlarmTime; //ʱ
+ public UNION_ALARMINFO_FIXED uStruAlarm;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINFO_V40
+ {
+ public NET_DVR_ALRAM_FIXED_HEADER struAlarmFixedHeader; //̶
+ public IntPtr pAlarmData; //ɱ䲿
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAlarmInName;/* */
+ public byte byAlarmType;//,0,1
+ public byte byAlarmInHandle;/* Ƿ 0- 1-*/
+ public byte byChannel; // 봥ʶͨ
+ public byte byRes;
+ public NET_DVR_HANDLEEXCEPTION struAlarmHandleType;/* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan;//¼ͨ,Ϊ1ʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnablePreset;/* ǷԤõ 0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPresetNo;/* ǫ̃Ԥõ,һԵǫ̈ͨԤõ, 0xffʾԤõ㡣*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnableCruise;/* ǷѲ 0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCruiseNo;/* Ѳ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnablePtzTrack;/* Ƿ 0-,1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPTZTrack;/* ǫ̃ */
+ }
+
+ //ģⱨ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ANALOG_ALARMINCFG
+ {
+ public uint dwSize;
+ public byte byEnableAlarmHandle; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmInName; //ģⱨ
+ public ushort wAlarmInUpper; //ģѹޣʵֵ10Χ0~360
+ public ushort wAlarmInLower; //ģѹޣʵֵ10Χ0~360
+ public NET_DVR_HANDLEEXCEPTION_V30 struAlarmHandleType; /* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ϴϢ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINFO_V30
+ {
+ public uint dwAlarmType;/*0-ź,1-Ӳ,2-źŶʧ,3ƶ,4Ӳδʽ,5-дӲ̳,6-ڵ,7-ʽƥ, 8-Ƿ, 0xa-GPSλϢ(ض)*/
+ public uint dwAlarmInputNumber;/*˿*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmOutputNumber;/*˿ڣΪ1ʾӦ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmRelateChannel;/*¼ͨΪ1ʾӦ¼, dwAlarmRelateChannel[0]Ӧ1ͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byChannel;/*dwAlarmTypeΪ23,6ʱʾĸͨdwChannel[0]Ӧ1ͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDiskNumber;/*dwAlarmTypeΪ1,4,5ʱ,ʾĸӲ, dwDiskNumber[0]Ӧ1Ӳ*/
+ public void Init()
+ {
+ dwAlarmType = 0;
+ dwAlarmInputNumber = 0;
+ byAlarmRelateChannel = new byte[MAX_CHANNUM_V30];
+ byChannel = new byte[MAX_CHANNUM_V30];
+ byAlarmOutputNumber = new byte[MAX_ALARMOUT_V30];
+ byDiskNumber = new byte[MAX_DISKNUM_V30];
+ for (int i = 0; i < MAX_CHANNUM_V30; i++)
+ {
+ byAlarmRelateChannel[i] = Convert.ToByte(0);
+ byChannel[i] = Convert.ToByte(0);
+ }
+ for (int i = 0; i < MAX_ALARMOUT_V30; i++)
+ {
+ byAlarmOutputNumber[i] = Convert.ToByte(0);
+ }
+ for (int i = 0; i < MAX_DISKNUM_V30; i++)
+ {
+ byDiskNumber[i] = Convert.ToByte(0);
+ }
+ }
+ public void Reset()
+ {
+ dwAlarmType = 0;
+ dwAlarmInputNumber = 0;
+
+ for (int i = 0; i < MAX_CHANNUM_V30; i++)
+ {
+ byAlarmRelateChannel[i] = Convert.ToByte(0);
+ byChannel[i] = Convert.ToByte(0);
+ }
+ for (int i = 0; i < MAX_ALARMOUT_V30; i++)
+ {
+ byAlarmOutputNumber[i] = Convert.ToByte(0);
+ }
+ for (int i = 0; i < MAX_DISKNUM_V30; i++)
+ {
+ byDiskNumber[i] = Convert.ToByte(0);
+ }
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARM_HOT_SPARE
+ {
+ public uint dwSize; //ṹ
+ public uint dwExceptionCase; //ԭ 0-쳣
+ public NET_DVR_IPADDR struDeviceIP; //쳣豸IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINFO
+ {
+ public int dwAlarmType;/*0-ź,1-Ӳ,2-źŶʧ,3ƶ,4Ӳδʽ,5-дӲ̳,6-ڵ,7-ʽƥ, 8-Ƿ, 9-״̬, 0xa-GPSλϢ(ض)*/
+ public int dwAlarmInputNumber;/*˿, Ϊ9ʱñʾ״̬0ʾ -1ʾ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT, ArraySubType = UnmanagedType.U4)]
+ public int[] dwAlarmOutputNumber;/*˿ڣһλΪ1ʾӦһ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.U4)]
+ public int[] dwAlarmRelateChannel;/*¼ͨһλΪ1ʾӦһ·¼, dwAlarmRelateChannel[0]Ӧ1ͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.U4)]
+ public int[] dwChannel;/*dwAlarmTypeΪ23,6ʱʾĸͨdwChannel[0]λӦ1ͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM, ArraySubType = UnmanagedType.U4)]
+ public int[] dwDiskNumber;/*dwAlarmTypeΪ1,4,5ʱ,ʾĸӲ, dwDiskNumber[0]λӦ1Ӳ*/
+ public void Init()
+ {
+ dwAlarmType = 0;
+ dwAlarmInputNumber = 0;
+ dwAlarmOutputNumber = new int[MAX_ALARMOUT];
+ dwAlarmRelateChannel = new int[MAX_CHANNUM];
+ dwChannel = new int[MAX_CHANNUM];
+ dwDiskNumber = new int[MAX_DISKNUM];
+ for (int i = 0; i < MAX_ALARMOUT; i++)
+ {
+ dwAlarmOutputNumber[i] = 0;
+ }
+ for (int i = 0; i < MAX_CHANNUM; i++)
+ {
+ dwAlarmRelateChannel[i] = 0;
+ dwChannel[i] = 0;
+ }
+ for (int i = 0; i < MAX_DISKNUM; i++)
+ {
+ dwDiskNumber[i] = 0;
+ }
+ }
+ public void Reset()
+ {
+ dwAlarmType = 0;
+ dwAlarmInputNumber = 0;
+
+ for (int i = 0; i < MAX_ALARMOUT; i++)
+ {
+ dwAlarmOutputNumber[i] = 0;
+ }
+ for (int i = 0; i < MAX_CHANNUM; i++)
+ {
+ dwAlarmRelateChannel[i] = 0;
+ dwChannel[i] = 0;
+ }
+ for (int i = 0; i < MAX_DISKNUM; i++)
+ {
+ dwDiskNumber[i] = 0;
+ }
+ }
+ }
+
+
+ //////////////////////////////////////////////////////////////////////////////////////
+ //IPC
+ /* IP豸ṹ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPDEVINFO
+ {
+ public uint dwEnable;/* IP豸Ƿ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /* */
+ public NET_DVR_IPADDR struIP;/* IPַ */
+ public ushort wDVRPort;/* ˿ں */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;/* */
+
+ public void Init()
+ {
+ sUserName = new byte[NAME_LEN];
+ sPassword = new byte[PASSWD_LEN];
+ byRes = new byte[34];
+ }
+ }
+
+ //ipc豸Ϣչ֧ip豸
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPDEVINFO_V31
+ {
+ public byte byEnable;//IP豸ǷЧ
+ public byte byProType;
+ public byte byEnableQuickAdd;
+ public byte byRes1;//ֶΣ0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;//û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDomain;//豸
+ public NET_DVR_IPADDR struIP;//IPַ
+ public ushort wDVRPort;// ˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//ֶΣ0
+
+ public void Init()
+ {
+ sUserName = new byte[NAME_LEN];
+ sPassword = new byte[PASSWD_LEN];
+ byDomain = new byte[MAX_DOMAIN_NAME];
+ byRes2 = new byte[34];
+ }
+ }
+
+ /* IPͨƥ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPCHANINFO
+ {
+ public byte byEnable;/* ͨǷ */
+ public byte byIPID;/* IP豸ID ȡֵ1- MAX_IP_DEVICE */
+ public byte byChannel;/* ͨ */
+ public byte byIPIDHigh; // IP豸IDĸ8λ
+ public byte byTransProtocol;//Э0-TCP/auto(豸)1-UDP 2-ಥ 3-TCP 4-auto
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//,0
+ public void Init()
+ {
+ byRes = new byte[31];
+ }
+ }
+
+ /* IPýṹ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPPARACFG
+ {
+ public uint dwSize;/* ṹС */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_DEVICE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPDEVINFO[] struIPDevInfo;/* IP豸 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnalogChanEnable; /* ģͨǷãӵ͵߱ʾ1-32ͨ0ʾЧ 1Ч */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_CHANNEL, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPCHANINFO[] struIPChanInfo;/* IPͨ */
+
+ public void Init()
+ {
+ int i = 0;
+ struIPDevInfo = new NET_DVR_IPDEVINFO[MAX_IP_DEVICE];
+
+ for (i = 0; i < MAX_IP_DEVICE; i++)
+ {
+ struIPDevInfo[i].Init();
+ }
+ byAnalogChanEnable = new byte[MAX_ANALOG_CHANNUM];
+ struIPChanInfo = new NET_DVR_IPCHANINFO[MAX_IP_CHANNEL];
+ for (i = 0; i < MAX_IP_CHANNEL; i++)
+ {
+ struIPChanInfo[i].Init();
+ }
+ }
+ }
+
+ /* չIPýṹ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPPARACFG_V31
+ {
+ public uint dwSize;/* ṹС */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_DEVICE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPDEVINFO_V31[] struIPDevInfo; /* IP豸 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnalogChanEnable; /* ģͨǷãӵ͵߱ʾ1-32ͨ0ʾЧ 1Ч */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_CHANNEL, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPCHANINFO[] struIPChanInfo;/* IPͨ */
+
+ public void Init()
+ {
+ int i = 0;
+ struIPDevInfo = new NET_DVR_IPDEVINFO_V31[MAX_IP_DEVICE];
+
+ for (i = 0; i < MAX_IP_DEVICE; i++)
+ {
+ struIPDevInfo[i].Init();
+ }
+ byAnalogChanEnable = new byte[MAX_ANALOG_CHANNUM];
+ struIPChanInfo = new NET_DVR_IPCHANINFO[MAX_IP_CHANNEL];
+ for (i = 0; i < MAX_IP_CHANNEL; i++)
+ {
+ struIPChanInfo[i].Init();
+ }
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPSERVER_STREAM
+ {
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_IPADDR struIPServer;
+ public ushort wPort;
+ public ushort wDvrNameLen;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDVRName;
+ public ushort wDVRSerialLen;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.U2)]
+ public ushort[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDVRSerialNumber;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassWord;
+ public byte byChannel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public void Init()
+ {
+ byRes = new byte[3];
+ byDVRName = new byte[NAME_LEN];
+ byRes1 = new ushort[2];
+ byDVRSerialNumber = new byte[SERIALNO_LEN];
+ byUserName = new byte[NAME_LEN];
+ byPassWord = new byte[PASSWD_LEN];
+ byRes2 = new byte[11];
+ }
+ }
+
+ /*ý*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STREAM_MEDIA_SERVER_CFG
+ {
+ public byte byValid;/*Ƿýȡ,0ʾЧ0ʾЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_IPADDR struDevIP;
+ public ushort wDevPort;/*ý˿*/
+ public byte byTransmitType;/*Э 0-TCP1-UDP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 69, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+ //豸ͨϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEV_CHAN_INFO
+ {
+ public NET_DVR_IPADDR struIP; //DVR IPַ
+ public ushort wDVRPort; //˿ں
+ public byte byChannel; //ͨ
+ public byte byTransProtocol; //Э0-TCP1-UDP
+ public byte byTransMode; //ģʽ 0 1
+ public byte byFactoryType; /*ǰ豸,ͨӿڻȡ*/
+ public byte byDeviceType; //豸(Ƶۺƽ̨ܰʹ)1-ʱƵۺƽ̨byVcaSupportChanModeֶʹýͨʾͨ2-
+ public byte byDispChan;//ʾͨ,ʹ
+ public byte bySubDispChan;//ʾͨͨţʱʹ
+ public byte byResolution; //; 1-CIF 2-4CIF 3-720P 4-1080P 5-500wʹãݸòԴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDomain; //豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; //½ʺ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PU_STREAM_CFG
+ {
+ public uint dwSize;
+ public NET_DVR_STREAM_MEDIA_SERVER_CFG struStreamMediaSvrCfg;
+ public NET_DVR_DEV_CHAN_INFO struDevChanInfo;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DDNS_STREAM_CFG
+ {
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_IPADDR struStreamServer;
+ public ushort wStreamServerPort;
+ public byte byStreamServerTransmitType;
+ public byte byRes2;
+ public NET_DVR_IPADDR struIPServer;
+ public ushort wIPServerPort;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDVRName;
+ public ushort wDVRNameLen;
+ public ushort wDVRSerialLen;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDVRSerialNumber;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassWord;
+ public ushort wDVRPort;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes4;
+ public byte byChannel;
+ public byte byTransProtocol;
+ public byte byTransMode;
+ public byte byFactoryType;
+ public void Init()
+ {
+ byRes1 = new byte[3];
+ byRes3 = new byte[2];
+ sDVRName = new byte[NAME_LEN];
+ sDVRSerialNumber = new byte[SERIALNO_LEN];
+ sUserName = new byte[NAME_LEN];
+ sPassWord = new byte[PASSWD_LEN];
+ byRes4 = new byte[2];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PU_STREAM_URL
+ {
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 240, ArraySubType = UnmanagedType.I1)]
+ public byte[] strURL;
+ public byte byTransPortocol;
+ public ushort wIPID;
+ public byte byChannel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void Init()
+ {
+ strURL = new byte[240];
+ byRes = new byte[7];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HKDDNS_STREAM
+ {
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDDNSDomain;
+ public ushort wPort;
+ public ushort wAliasLen;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlias;
+ public ushort wDVRSerialLen;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDVRSerialNumber;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassWord;
+ public byte byChannel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public void Init()
+ {
+ byRes = new byte[3];
+ byDDNSDomain = new byte[64];
+ byAlias = new byte[NAME_LEN];
+ byRes1 = new byte[2];
+ byDVRSerialNumber = new byte[SERIALNO_LEN];
+ byUserName = new byte[NAME_LEN];
+ byPassWord = new byte[PASSWD_LEN];
+ byRes2 = new byte[11];
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPCHANINFO_V40
+ {
+ public byte byEnable; /* ͨǷ */
+ public byte byRes1;
+ public ushort wIPID; //IP豸ID
+ public uint dwChannel; //ͨ
+ public byte byTransProtocol; //Э0-TCP1-UDP
+ public byte byTransMode; //ģʽ 0 1
+ public byte byFactoryType; /*ǰ豸,ͨӿڻȡ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 241, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct NET_DVR_GET_STREAM_UNION
+ {
+ [FieldOffset(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 492, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUnion;
+ public void Init()
+ {
+ byUnion = new byte[492];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STREAM_MODE
+ {
+ public byte byGetStreamType;/*ȡʽ0- ֱӴ豸ȡ1- ýȡ2- ͨIPServerIPַȡ
+ * 3- ͨIPServerҵ豸ͨýȡ豸 4- ͨýURLȥȡ
+ * 5- ͨhiDDNS豸Ȼ豸ȡ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_GET_STREAM_UNION uGetStream;
+ public void Init()
+ {
+ byGetStreamType = 0;
+ byRes = new byte[3];
+ //uGetStream.Init();
+ }
+ }
+
+ /* V40չIPýṹ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPPARACFG_V40
+ {
+ public uint dwSize;/* ṹС */
+ public uint dwGroupNum;
+ public uint dwAChanNum;
+ public uint dwDChanNum;
+ public uint dwStartDChan;
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnalogChanEnable; /* ģͨǷãӵ͵߱ʾ1-32ͨ0ʾЧ 1Ч */
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_DEVICE_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPDEVINFO_V31[] struIPDevInfo; /* IP豸 */
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_STREAM_MODE[] struStreamMode;/* IPͨ */
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; /* ģͨǷãӵ͵߱ʾ1-32ͨ0ʾЧ 1Ч */
+ }
+
+ //ΪCVRչı
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMINFO_DEV
+ {
+ public uint dwAlarmType; //0-(ͨ)ź1-˽о2- NVR˳
+ //3-״̬쳣4-ϵͳʱ쳣5-¼ʣͣ
+ //6-(ͨ)ƶⱨ7-(ͨ)ڵ
+ public NET_DVR_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public uint dwNumber; //Ŀ
+ public IntPtr pNO; //dwNumberWORD; ÿWORDʾһͨţߴ̺, ЧʱΪ0
+ }
+
+ /* */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMOUTINFO
+ {
+ public byte byIPID;/* IP豸IDȡֵ1- MAX_IP_DEVICE */
+ public byte byAlarmOut;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;/* */
+
+ public void Init()
+ {
+ byRes = new byte[18];
+ }
+ }
+
+ /* IPýṹ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMOUTCFG
+ {
+ public uint dwSize; /* ṹС */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMOUT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMOUTINFO[] struIPAlarmOutInfo;/* IP */
+
+ public void Init()
+ {
+ struIPAlarmOutInfo = new NET_DVR_IPALARMOUTINFO[MAX_IP_ALARMOUT];
+ for (int i = 0; i < MAX_IP_ALARMOUT; i++)
+ {
+ struIPAlarmOutInfo[i].Init();
+ }
+ }
+ }
+ /* IP */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMOUTINFO_V40
+ {
+ public uint dwIPID; /* IP豸ID */
+ public uint dwAlarmOut; /* IP豸IDӦı */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /* */
+ }
+
+ /*IP*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMOUTCFG_V40
+ {
+ public uint dwSize; //ṹ峤
+ public uint dwCurIPAlarmOutNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMOUT_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMOUTINFO_V40[] struIPAlarmOutInfo;/*IP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /* */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMININFO
+ {
+ public byte byIPID;/* IP豸IDȡֵ1- MAX_IP_DEVICE */
+ public byte byAlarmIn;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;/* */
+ }
+
+ /* IPýṹ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMINCFG
+ {
+ public uint dwSize;/* ṹС */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMIN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMININFO[] struIPAlarmInInfo;/* IP */
+ }
+ /* IP */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMININFO_V40
+ {
+ public uint dwIPID; /* IP豸ID */
+ public uint dwAlarmIn; /* IP豸IDӦı */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /* */
+ }
+ /*IPԴ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMINCFG_V40
+ {
+ public uint dwSize; //ṹ峤
+ public uint dwCurIPAlarmInNum; //ǰ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMIN_V40, ArraySubType = UnmanagedType.I1)]
+ public NET_DVR_IPALARMININFO_V40[] struIPAlarmInInfo;/* IP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ipc alarm info
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMINFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_DEVICE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPDEVINFO[] struIPDevInfo; /* IP豸 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnalogChanEnable; /* ģͨǷã0-δ 1- */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_CHANNEL, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPCHANINFO[] struIPChanInfo;/* IPͨ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMIN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMININFO[] struIPAlarmInInfo;/* IP */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMOUT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMOUTINFO[] struIPAlarmOutInfo;/* IP */
+ }
+
+ //ipcøı䱨Ϣչ 9000_1.1
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMINFO_V31
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_DEVICE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPDEVINFO_V31[] struIPDevInfo; /* IP豸 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnalogChanEnable;/* ģͨǷã0-δ 1- */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_CHANNEL, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPCHANINFO[] struIPChanInfo;/* IPͨ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMIN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMININFO[] struIPAlarmInInfo; /* IP */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMOUT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMOUTINFO[] struIPAlarmOutInfo;/* IP */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPALARMINFO_V40
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_DEVICE_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPDEVINFO_V31[] struIPDevInfo; // IP豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnalogChanEnable; /* ģͨǷã0-δ 1- */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPCHANINFO[] struIPChanInfo; /* IPͨ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMIN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMININFO[] struIPAlarmInInfo; /* IP */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IP_ALARMOUT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPALARMOUTINFO[] struIPAlarmOutInfo; /* IP */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ public enum HD_STAT
+ {
+ HD_STAT_OK = 0,/* */
+ HD_STAT_UNFORMATTED = 1,/* δʽ */
+ HD_STAT_ERROR = 2,/* */
+ HD_STAT_SMART_FAILED = 3,/* SMART״̬ */
+ HD_STAT_MISMATCH = 4,/* ƥ */
+ HD_STAT_IDLE = 5, /* */
+ NET_HD_STAT_OFFLINE = 6,/*̴δ״̬ */
+ HD_RIADVD_EXPAND = 7, /* ̿ */
+ HD_STAT_REPARING = 10, /* Ӳ(9000 2.0) */
+ HD_STAT_FORMATING = 11, /* Ӳڸʽ(9000 2.0) */
+ }
+
+ //ӲϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLE_HD
+ {
+ public uint dwHDNo;/*Ӳ̺, ȡֵ0~MAX_DISKNUM_V30-1*/
+ public uint dwCapacity;/*Ӳ()*/
+ public uint dwFreeSpace;/*Ӳʣռ()*/
+ public uint dwHdStatus;/*Ӳ״̬() HD_STAT*/
+ public byte byHDAttr;/*0-Ĭ, 1-; 2-ֻ*/
+ public byte byHDType;/*0-Ӳ,1-ESATAӲ,2-NASӲ*/
+ public byte byDiskDriver; // ֵ ASCIIַ
+ public byte byRes1;
+ public uint dwHdGroup; /*ĸ 1-MAX_HD_GROUP*/
+ public byte byRecycling; // Ƿѭ 0ѭã1ѭ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public uint dwStorageType; //λʾ 0-֧ 0-֧
+ // dwStorageType & 0x1 ʾǷͨ¼רô洢
+ // dwStorageType & 0x2 ʾǷdz֡¼רô洢
+ // dwStorageType & 0x4 ʾǷͼƬ¼רô洢
+
+ public uint dwPictureCapacity; //ӲͼƬ()λ:MB
+ public uint dwFreePictureSpace; //ʣͼƬռ()λ:MB
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 104, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HDCFG
+ {
+ public uint dwSize;
+ public uint dwHDCount;/*Ӳ()*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_HD[] struHDInfo;//ӲزҪЧ
+ }
+
+ //Ϣչ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLE_HDGROUP_V40
+ {
+ public uint dwHDGroupNo; /*() 1-MAX_HD_GROUP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelRecordChan; //¼ֵͨʾ0xffffffffʱΪЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /* */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HDGROUP_CFG_V40
+ {
+ public uint dwSize; //ṹС
+ public uint dwMaxHDGroupNum; //豸ֵ֧-ֻ
+ public uint dwCurHDGroupNum; /*ǰõ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HD_GROUP, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_HDGROUP_V40[] struHDGroupAttr; //ӲزҪЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLE_HDGROUP
+ {
+ public uint dwHDGroupNo;/*() 1-MAX_HD_GROUP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byHDGroupChans;/*Ӧ¼ͨ, 0-ʾͨ¼飬1-ʾ¼*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HDGROUP_CFG
+ {
+ public uint dwSize;
+ public uint dwHDGroupCount;/*()*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HD_GROUP, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_HDGROUP[] struHDGroupAttr;//ӲزҪЧ
+ }
+
+ //ŲĽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCALECFG
+ {
+ public uint dwSize;
+ public uint dwMajorScale;/* ʾ 0-ţ1-*/
+ public uint dwMinorScale;/* ʾ 0-ţ1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes;
+ }
+
+ //DVR(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMOUTCFG_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAlarmOutName;/* */
+ public uint dwAlarmOutDelay;/* ʱ(-1Ϊޣֶر) */
+ //0-5,1-10,2-30,3-1,4-2,5-5,6-10,7-ֶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmOutTime;/* ʱ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //DVR
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMOUTCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAlarmOutName;/* */
+ public uint dwAlarmOutDelay;/* ʱ(-1Ϊޣֶر) */
+ //0-5,1-10,2-30,3-1,4-2,5-5,6-10,7-ֶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmOutTime;/* ʱ */
+ }
+
+ //DVRԤ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PREVIEWCFG_V30
+ {
+ public uint dwSize;
+ public byte byPreviewNumber;//ԤĿ,0-1,1-4,2-9,3-16,0xff:
+ public byte byEnableAudio;//ǷԤ,0-Ԥ,1-Ԥ
+ public ushort wSwitchTime;//лʱ,0-л,1-5s,2-10s,3-20s,4-30s,5-60s,6-120s,7-300s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PREVIEW_MODE * MAX_WINDOW_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySwitchSeq;//л˳,lSwitchSeq[i]Ϊ 0xffʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //DVRԤ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PREVIEWCFG
+ {
+ public uint dwSize;
+ public byte byPreviewNumber;//ԤĿ,0-1,1-4,2-9,3-16,0xff:
+ public byte byEnableAudio;//ǷԤ,0-Ԥ,1-Ԥ
+ public ushort wSwitchTime;//лʱ,0-л,1-5s,2-10s,3-20s,4-30s,5-60s,6-120s,7-300s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOW, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySwitchSeq;//л˳,lSwitchSeq[i]Ϊ 0xffʾ
+ }
+
+ //DVRƵ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VGAPARA
+ {
+ public ushort wResolution;/* ֱ */
+ public ushort wFreq;/* ˢƵ */
+ public uint dwBrightness;/* */
+ }
+
+ //MATRIXṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIXPARA_V30
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_CHANNUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wOrder;/* Ԥ˳, 0xffʾӦĴڲԤ */
+ public ushort wSwitchTime;// Ԥлʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIXPARA
+ {
+ public ushort wDisplayLogo;/* ʾƵͨ */
+ public ushort wDisplayOsd;/* ʾʱ */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VOOUT
+ {
+ public byte byVideoFormat;/* ʽ,0-PAL,1-NTSC */
+ public byte byMenuAlphaValue;/* ˵뱳ͼԱȶ */
+ public ushort wScreenSaveTime;/* Ļʱ 0-Ӳ,1-1,2-2,3-5,4-10,5-20,6-30 */
+ public ushort wVOffset;/* Ƶƫ */
+ public ushort wBrightness;/* Ƶ */
+ public byte byStartMode;/* Ƶģʽ(0:˵,1:Ԥ)*/
+ public byte byEnableScaler;/* Ƿ (0-, 1-)*/
+ }
+
+ //DVRƵ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOOUT_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VIDEOOUT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_VOOUT[] struVOOut;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VGA_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_VGAPARA[] struVGAPara;/* VGA */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_MATRIXOUT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIXPARA_V30[] struMatrixPara;/* MATRIX */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //DVRƵ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOOUT
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VIDEOOUT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_VOOUT[] struVOOut;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VGA, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_VGAPARA[] struVGAPara; /* VGA */
+ public NET_DVR_MATRIXPARA struMatrixPara;/* MATRIX */
+ }
+
+ //û(ӽṹ)(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_INFO_V40
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /* ûֻ16ֽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalRight; /* Ȩ */
+ /*0: ؿ̨*/
+ /*1: ֶ¼*/
+ /*2: ػط*/
+ /*3: ò*/
+ /*4: ز鿴״̬־*/
+ /*5: ظ(ʽػ)*/
+ /*6: ز鿴 */
+ /*7: عģIP camera */
+ /*8: ر */
+ /*9: عػ/ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRemoteRight;/* ԶȨ */
+ /*0: Զ̨̿*/
+ /*1: Զֶ¼*/
+ /*2: Զ̻ط */
+ /*3: Զò*/
+ /*4: Զ̲鿴״̬־*/
+ /*5: Զ̸(ʽػ)*/
+ /*6: Զ̷Խ*/
+ /*7: ԶԤ*/
+ /*8: Զϴ*/
+ /*9: Զ̿ƣ*/
+ /*10: Զ̿ƴ*/
+ /*11: Զ̲鿴 */
+ /*12: Զ̹ģIP camera */
+ /*13: Զ̹ػ/ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetPreviewRight; /* Զ̿Ԥͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalRecordRight; /* ؿ¼ͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetRecordRight; /* Զ̿¼ͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalPlaybackRight; /* ؿԻطŵͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetPlaybackRight; /* Զ̿Իطŵͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalPTZRight; /* ؿPTZͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetPTZRight; /* Զ̿PTZͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalBackupRight; /* رȨͨǰ˳У0xffffffffΪЧ*/
+ public NET_DVR_IPADDR struUserIP; /* ûIPַ(Ϊ0ʱʾκεַ) */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr; /* ַ */
+ public byte byPriority; /* ȼ0xff-ޣ0--ͣ1--У2-- */
+ /* ޡʾ֧ȼ
+ ͡ĬȨ:غԶ̻ط,غԶ̲鿴־״̬,غԶ̹ػ/
+ СغԶ̨̿,غԶֶ¼,غԶ̻ط,ԽԶԤر,/Զ̹ػ/
+ ߡԱ */
+ public byte byAlarmOnRight; // ڲȨ 1-Ȩޣ0-Ȩ
+ public byte byAlarmOffRight; // ڳȨ 1-Ȩޣ0-Ȩ
+ public byte byBypassRight; // ·Ȩ 1-Ȩޣ0-Ȩ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 118, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //û(ӽṹ)(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_INFO_V30
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalRight;/* Ȩ */
+ /*0: ؿ̨*/
+ /*1: ֶ¼*/
+ /*2: ػط*/
+ /*3: ò*/
+ /*4: ز鿴״̬־*/
+ /*5: ظ(ʽػ)*/
+ /*6: ز鿴 */
+ /*7: عģIP camera */
+ /*8: ر */
+ /*9: عػ/ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRemoteRight;/* ԶȨ */
+ /*0: Զ̨̿*/
+ /*1: Զֶ¼*/
+ /*2: Զ̻ط */
+ /*3: Զò*/
+ /*4: Զ̲鿴״̬־*/
+ /*5: Զ̸(ʽػ)*/
+ /*6: Զ̷Խ*/
+ /*7: ԶԤ*/
+ /*8: Զϴ*/
+ /*9: Զ̿ƣ*/
+ /*10: Զ̿ƴ*/
+ /*11: Զ̲鿴 */
+ /*12: Զ̹ģIP camera */
+ /*13: Զ̹ػ/ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byNetPreviewRight;/* Զ̿Ԥͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalPlaybackRight;/* ؿԻطŵͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byNetPlaybackRight;/* Զ̿Իطŵͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalRecordRight;/* ؿ¼ͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byNetRecordRight;/* Զ̿¼ͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalPTZRight;/* ؿPTZͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byNetPTZRight;/* Զ̿PTZͨ 0-Ȩޣ1-Ȩ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalBackupRight;/* رȨͨ 0-Ȩޣ1-Ȩ*/
+ public NET_DVR_IPADDR struUserIP;/* ûIPַ(Ϊ0ʱʾκεַ) */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;/* ַ */
+ public byte byPriority;/* ȼ0xff-ޣ0--ͣ1--У2-- */
+ /*
+ ޡʾ֧ȼ
+ ͡ĬȨ:غԶ̻ط,غԶ̲鿴־״̬,غԶ̹ػ/
+ СغԶ̨̿,غԶֶ¼,غԶ̻ط,ԽԶԤ
+ ر,/Զ̹ػ/
+ ߡԱ
+ */
+ public byte byAlarmOnRight; // ڲȨ
+ public byte byAlarmOffRight; // ڳȨ
+ public byte byBypassRight; // ·Ȩ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //û(SDK_V15չ)(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_USER_INFO_EX
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalRight;/* Ȩ */
+ /*0: ؿ̨*/
+ /*1: ֶ¼*/
+ /*2: ػط*/
+ /*3: ò*/
+ /*4: ز鿴״̬־*/
+ /*5: ظ(ʽػ)*/
+ public uint dwLocalPlaybackRight;/* ؿԻطŵͨ bit0 -- channel 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRemoteRight;/* Ȩ */
+ /*0: Զ̨̿*/
+ /*1: Զֶ¼*/
+ /*2: Զ̻ط */
+ /*3: Զò*/
+ /*4: Զ̲鿴״̬־*/
+ /*5: Զ̸(ʽػ)*/
+ /*6: Զ̷Խ*/
+ /*7: ԶԤ*/
+ /*8: Զϴ*/
+ /*9: Զ̿ƣ*/
+ /*10: Զ̿ƴ*/
+ public uint dwNetPreviewRight;/* Զ̿Ԥͨ bit0 -- channel 1*/
+ public uint dwNetPlaybackRight;/* Զ̿Իطŵͨ bit0 -- channel 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sUserIP;/* ûIPַ(Ϊ0ʱʾκεַ) */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;/* ַ */
+ }
+
+ //û(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_USER_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalRight;/* Ȩ */
+ /*0: ؿ̨*/
+ /*1: ֶ¼*/
+ /*2: ػط*/
+ /*3: ò*/
+ /*4: ز鿴״̬־*/
+ /*5: ظ(ʽػ)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRemoteRight;/* Ȩ */
+ /*0: Զ̨̿*/
+ /*1: Զֶ¼*/
+ /*2: Զ̻ط */
+ /*3: Զò*/
+ /*4: Զ̲鿴״̬־*/
+ /*5: Զ̸(ʽػ)*/
+ /*6: Զ̷Խ*/
+ /*7: ԶԤ*/
+ /*8: Զϴ*/
+ /*9: Զ̿ƣ*/
+ /*10: Զ̿ƴ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sUserIP;/* ûIPַ(Ϊ0ʱʾκεַ) */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;/* ַ */
+ }
+
+ //û(ӽṹ)(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_INFO_V51
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /* ûֻ16ֽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalRight; /* Ȩ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRemoteRight;/* ԶȨ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetPreviewRight; /* Զ̿Ԥͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalRecordRight; /* ؿ¼ͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetRecordRight; /* Զ̿¼ͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalPlaybackRight; /* ؿԻطŵͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetPlaybackRight; /* Զ̿Իطŵͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalPTZRight; /* ؿPTZͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwNetPTZRight; /* Զ̿PTZͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalBackupRight; /* رȨͨǰ˳У0xffffffffΪЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLocalPreviewRight; /* ԤȨͨǰ˳У0xffffffffΪЧ*/
+ public NET_DVR_IPADDR struUserIP; /* ûIPַ(Ϊ0ʱʾκεַ) */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr; /* ַ */
+ public byte byPriority; /* ȼ0xff-ޣ0--ͣ1--У2-- */
+ public byte byAlarmOnRight; // ڲȨ 1-Ȩޣ0-Ȩ
+ public byte byAlarmOffRight; // ڳȨ 1-Ȩޣ0-Ȩ
+ public byte byBypassRight; // ·Ȩ 1-Ȩޣ0-Ȩ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //ֽڶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RIGHT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPublishRight; //ϢרȨ
+ public uint dwPasswordValidity; //Ч,Աû,λ죬0ʾЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byKeypadPassword; //
+ public byte byUserOperateType; //ûͣ1-û2-û3-û+û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 1007, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_V51
+ {
+ public uint dwSize; //ṹС
+ public uint dwMaxUserNum; //豸ֵ֧û-ֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_USERNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_USER_INFO_V51[] struUser; /* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sloginPassword; /* ½ȷ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 240, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //DVRû(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_V40
+ {
+ public uint dwSize; //ṹС
+ public uint dwMaxUserNum; //豸ֵ֧û-ֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_USERNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_USER_INFO_V40[] struUser; /* û */
+ }
+
+ //DVRû(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_USERNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_USER_INFO_V30[] struUser;
+ }
+
+ //DVRû(SDK_V15չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_EX
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_USERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_USER_INFO_EX[] struUser;
+ }
+
+ //DVRû
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_USER
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_USERNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_USER_INFO[] struUser;
+ }
+
+ //쳣չṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EXCEPTION_V40
+ {
+ public uint dwSize ; //ṹС
+ public uint dwMaxGroupNum ; //豸ֵ֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EXCEPTIONNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_HANDLEEXCEPTION_V41[] struExceptionHandle;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //DVR쳣(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EXCEPTION_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EXCEPTIONNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_HANDLEEXCEPTION_V30[] struExceptionHandleType;
+ /*0-,1- Ӳ̳,2-߶,3-IP ַͻ, 4-Ƿ, 5-/Ƶʽƥ, 6-Ƶź쳣, 7-¼쳣*/
+ }
+
+ //DVR쳣
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EXCEPTION
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EXCEPTIONNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_HANDLEEXCEPTION[] struExceptionHandleType;
+ /*0-,1- Ӳ̳,2-߶,3-IP ַͻ,4-Ƿ, 5-/Ƶʽƥ, 6-Ƶź쳣*/
+ }
+
+ //ͨ״̬(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHANNELSTATE_V30
+ {
+ public byte byRecordStatic;//ͨǷ¼,0-¼,1-¼
+ public byte bySignalStatic;//ӵź״̬,0-,1-źŶʧ
+ public byte byHardwareStatic;//ͨӲ״̬,0-,1-쳣,DSP
+ public byte byRes1;//
+ public uint dwBitRate;//ʵ
+ public uint dwLinkNum;//ͻӵĸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LINK, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPADDR[] struClientIP;//ͻ˵IPַ
+ public uint dwIPLinkNum;//ͨΪIP룬ôʾIP뵱ǰ
+ public byte byExceedMaxLink; // Ƿ˵·6· 0 - δ, 1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwChannelNo; //ǰͨţ0xffffffffʾЧ
+
+ public void Init()
+ {
+ struClientIP = new NET_DVR_IPADDR[MAX_LINK];
+
+ for (int i = 0; i < MAX_LINK; i++)
+ {
+ struClientIP[i].Init();
+ }
+ byRes = new byte[12];
+ }
+ }
+
+ //ͨ״̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHANNELSTATE
+ {
+ public byte byRecordStatic;//ͨǷ¼,0-¼,1-¼
+ public byte bySignalStatic;//ӵź״̬,0-,1-źŶʧ
+ public byte byHardwareStatic;//ͨӲ״̬,0-,1-쳣,DSP
+ public byte reservedData;//
+ public uint dwBitRate;//ʵ
+ public uint dwLinkNum;//ͻӵĸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LINK, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwClientIP;//ͻ˵IPַ
+ }
+
+ //Ӳ״̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISKSTATE
+ {
+ public uint dwVolume;//Ӳ̵
+ public uint dwFreeSpace;//Ӳ̵ʣռ
+ public uint dwHardDiskStatic;//Ӳ̵״̬,0-,1-,2-
+ }
+
+ //豸״̬չṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WORKSTATE_V40
+ {
+ public uint dwSize ; //ṹС
+ public uint dwDeviceStatic; //豸״̬,0-,1-CPUռ̫,85%,2-Ӳ,紮
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISKSTATE[] struHardDiskStatic; //Ӳ״̬,һֻܻȡ33ӲϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CHANNELSTATE_V30[] struChanStatic;//ͨ״̬ǰ˳
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwHasAlarmInStatic; //бıڣֵʾ±ֵ˳УֵΪ0xffffffffʱǰֵЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwHasAlarmOutStatic; //бıڣֵʾ±ֵ˳УֵΪ0xffffffffʱǰֵЧ
+ public uint dwLocalDisplay; //ʾ״̬,0-,1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AUDIO_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAudioInChanStatus; //λʾͨ״̬ 0-δʹã1-ʹУ0λʾ1ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 126, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GETWORKSTATE_COND
+ {
+ public uint dwSize ; //ṹ峤
+ public byte byFindHardByCond; /*0-ȫ(һֻܲ33)ʱdwFindHardStatusNumЧ*/
+ public byte byFindChanByCond ; /*0-ȫͨʱdwFindChanNumЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwFindHardStatus ; /*ҪҵӲ̺ţֵʾֵ˳У 0xffffffffΪЧ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwFindChanNo; /*Ҫҵͨţֵʾֵ˳У 0xffffffffΪЧ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //DVR״̬(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WORKSTATE_V30
+ {
+ public uint dwDeviceStatic;//豸״̬,0-,1-CPUռ̫,85%,2-Ӳ,紮
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISKSTATE[] struHardDiskStatic;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CHANNELSTATE_V30[] struChanStatic;//ͨ״̬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmInStatic;//˿ڵ״̬,0-ûб,1-б
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmOutStatic;//˿ڵ״̬,0-û,1-б
+ public uint dwLocalDisplay;//ʾ״̬,0-,1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AUDIO_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAudioChanStatus;//ʾͨ״̬ 0-δʹã1-ʹ, 0xffЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ struHardDiskStatic = new NET_DVR_DISKSTATE[MAX_DISKNUM_V30];
+ struChanStatic = new NET_DVR_CHANNELSTATE_V30[MAX_CHANNUM_V30];
+ for (int i = 0; i < MAX_CHANNUM_V30; i++)
+ {
+ struChanStatic[i].Init();
+ }
+ byAlarmInStatic = new byte[MAX_ALARMOUT_V30];
+ byAlarmOutStatic = new byte[MAX_ALARMOUT_V30];
+ byAudioChanStatus = new byte[MAX_AUDIO_V30];
+ byRes = new byte[10];
+ }
+ }
+
+ //DVR״̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WORKSTATE
+ {
+ public uint dwDeviceStatic;//豸״̬,0-,1-CPUռ̫,85%,2-Ӳ,紮
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISKSTATE[] struHardDiskStatic;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CHANNELSTATE[] struChanStatic;//ͨ״̬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmInStatic;//˿ڵ״̬,0-ûб,1-б
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmOutStatic;//˿ڵ״̬,0-û,1-б
+ public uint dwLocalDisplay;//ʾ״̬,0-,1-
+
+ public void Init()
+ {
+ struHardDiskStatic = new NET_DVR_DISKSTATE[MAX_DISKNUM];
+ struChanStatic = new NET_DVR_CHANNELSTATE[MAX_CHANNUM];
+ byAlarmInStatic = new byte[MAX_ALARMIN];
+ byAlarmOutStatic = new byte[MAX_ALARMOUT];
+ }
+ }
+
+ //־Ϣ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_LOG_V30
+ {
+ public NET_DVR_TIME strLogTime;
+ public uint dwMajorType;// 1-; 2-쳣; 3-; 0xff-ȫ
+ public uint dwMinorType;// 0-ȫ;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPanelUser;//û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNetUser;//û
+ public NET_DVR_IPADDR struRemoteHostAddr;//Զַ
+ public uint dwParaType;//
+ public uint dwChannel;//ͨ
+ public uint dwDiskNumber;//Ӳ̺
+ public uint dwAlarmInPort;//˿
+ public uint dwAlarmOutPort;//˿
+ public uint dwInfoLen;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = LOG_INFO_LEN)]
+ public string sInfo;
+ }
+
+ //־Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_LOG
+ {
+ public NET_DVR_TIME strLogTime;
+ public uint dwMajorType;// 1-; 2-쳣; 3-; 0xff-ȫ
+ public uint dwMinorType;// 0-ȫ;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPanelUser;//û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNetUser;//û
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sRemoteHostAddr;//Զַ
+ public uint dwParaType;//
+ public uint dwChannel;//ͨ
+ public uint dwDiskNumber;//Ӳ̺
+ public uint dwAlarmInPort;//˿
+ public uint dwAlarmOutPort;//˿
+ }
+
+ /************************־ begin************************************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_SEARCH_LOG_PARAM
+ {
+ public ushort wMajorType; //
+ public ushort wMinorType; //
+ public NET_DVR_TIME struStartTime; // ʼʱ
+ public NET_DVR_TIME struEndTime; // ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_LOG_RET
+ {
+ public NET_DVR_TIME struLogTime; // ־ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; // û
+ public NET_DVR_IPADDR struIPAddr; // IPַ
+ public ushort wMajorType; //
+ public ushort wMinorType; //
+ public ushort wParam; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwInfoLen; // Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = LOG_INFO_LEN)]
+ public string sInfo; // Ϣ
+ }
+ /*************************־ end***********************************************/
+
+ //״̬(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMOUTSTATUS_V30
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMOUT_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] Output;
+
+ public void Init()
+ {
+ Output = new byte[MAX_ALARMOUT_V30];
+ }
+ }
+
+ //״̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMOUTSTATUS
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] Output;
+ }
+
+ //ATMר
+ /****************************ATM(begin)***************************/
+ public const int NCR = 0;
+ public const int DIEBOLD = 1;
+ public const int WINCOR_NIXDORF = 2;
+ public const int SIEMENS = 3;
+ public const int OLIVETTI = 4;
+ public const int FUJITSU = 5;
+ public const int HITACHI = 6;
+ public const int SMI = 7;
+ public const int IBM = 8;
+ public const int BULL = 9;
+ public const int YiHua = 10;
+ public const int LiDe = 11;
+ public const int GDYT = 12;
+ public const int Mini_Banl = 13;
+ public const int GuangLi = 14;
+ public const int DongXin = 15;
+ public const int ChenTong = 16;
+ public const int NanTian = 17;
+ public const int XiaoXing = 18;
+ public const int GZYY = 19;
+ public const int QHTLT = 20;
+ public const int DRS918 = 21;
+ public const int KALATEL = 22;
+ public const int NCR_2 = 23;
+ public const int NXS = 24;
+
+ //Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_TRADEINFO
+ {
+ public ushort m_Year;
+ public ushort m_Month;
+ public ushort m_Day;
+ public ushort m_Hour;
+ public ushort m_Minute;
+ public ushort m_Second;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] DeviceName;//豸
+ public uint dwChannelNumer;//ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] CardNumber;//
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 12)]
+ public string cTradeType;//
+ public uint dwCash;//
+ }
+
+ /*֡ʽ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FRAMETYPECODE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] code;/* */
+ }
+
+ //ATM
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_FRAMEFORMAT
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sATMIP;/* ATM IPַ */
+ public uint dwATMType;/* ATM */
+ public uint dwInputMode;/* 뷽ʽ 0- 1- 2-ֱ 3-ATM*/
+ public uint dwFrameSignBeginPos;/* ı־λʼλ*/
+ public uint dwFrameSignLength;/* ı־λij */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFrameSignContent;/* ı־λ */
+ public uint dwCardLengthInfoBeginPos;/* ųϢʼλ */
+ public uint dwCardLengthInfoLength;/* ųϢij */
+ public uint dwCardNumberInfoBeginPos;/* Ϣʼλ */
+ public uint dwCardNumberInfoLength;/* Ϣij */
+ public uint dwBusinessTypeBeginPos;/* ͵ʼλ */
+ public uint dwBusinessTypeLength;/* ͵ij */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_FRAMETYPECODE[] frameTypeCode;/* */
+ }
+
+ //SDK_V31 ATM
+ /**/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FILTER
+ {
+ public byte byEnable;/*0,;1,*/
+ public byte byMode;/*0,ASCII;1,HEX*/
+ public byte byFrameBeginPos;// ı־λʼλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 1, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFilterText;/*ַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*ʼʶ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IDENTIFICAT
+ {
+ public byte byStartMode;/*0,ASCII;1,HEX*/
+ public byte byEndMode;/*0,ASCII;1,HEX*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_FRAMETYPECODE struStartCode;/*ʼַ*/
+ public NET_DVR_FRAMETYPECODE struEndCode;/*ַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ /*Ϣλ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PACKAGE_LOCATION
+ {
+ public byte byOffsetMode;/*0,token;1,fix*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwOffsetPos;/*modeΪ1ʱʹ*/
+ public NET_DVR_FRAMETYPECODE struTokenCode;/*־λ*/
+ public byte byMultiplierValue;/*־λٴγ*/
+ public byte byEternOffset;/*ӵƫ*/
+ public byte byCodeMode;/*0,ASCII;1,HEX*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*Ϣ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PACKAGE_LENGTH
+ {
+ public byte byLengthMode;/*ͣ0,variable;1,fix;2,get from package(ÿųʹ)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwFixLength;/*modeΪ1ʱʹ*/
+ public uint dwMaxLength;
+ public uint dwMinLength;
+ public byte byEndMode;/*ս0,ASCII;1,HEX*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_FRAMETYPECODE struEndCode;/*ս*/
+ public uint dwLengthPos;/*lengthModeΪ2ʱʹãųڱеλ*/
+ public uint dwLengthLen;/*lengthModeΪ2ʱʹãųȵij*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ /*OSD ӵλ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OSD_POSITION
+ {
+ public byte byPositionMode;/*ӷ2֣0ʾ1Custom*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwPos_x;/*x꣬positionmodeΪCustomʱʹ*/
+ public uint dwPos_y;/*y꣬positionmodeΪCustomʱʹ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*ʾʽ*/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DATE_FORMAT
+ {
+ public byte byItem1;/*Month,0.mm;1.mmm;2.mmmm*/
+ public byte byItem2;/*Day,0.dd;*/
+ public byte byItem3;/*Year,0.yy;1.yyyy*/
+ public byte byDateForm;/*0~53item*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string chSeprator;/*ָ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string chDisplaySeprator;/*ʾָ*/
+ public byte byDisplayForm;/*0~53item*///lili mode by lili
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 27, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ /*ʱʾʽ*/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVRT_TIME_FORMAT
+ {
+ public byte byTimeForm;/*1. HH MM SS;0. HH MM*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byHourMode;/*0,12;1,24*/ //lili mode
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string chSeprator;/*ķָʱû*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string chDisplaySeprator;/*ʾָ*/
+ public byte byDisplayForm;/*0~53item*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ public byte byDisplayHourMode;/*0,12;1,24*/ //lili mode
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 19, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes4;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OVERLAY_CHANNEL
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byChannel;/*ӵͨ*/
+ public uint dwDelayTime;/*ʱʱ*/
+ public byte byEnableDelayTime;/*Ƿõʱ˿ʱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_PACKAGE_ACTION
+ {
+ public NET_DVR_PACKAGE_LOCATION struPackageLocation;
+ public NET_DVR_OSD_POSITION struOsdPosition;
+ public NET_DVR_FRAMETYPECODE struActionCode;/*͵ȶӦ*/
+ public NET_DVR_FRAMETYPECODE struPreCode;/*ַǰַ*/
+ public byte byActionCodeMode;/*͵ȶӦ0,ASCII;1,HEX*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_PACKAGE_DATE
+ {
+ public NET_DVR_PACKAGE_LOCATION struPackageLocation;
+ public NET_DVR_DATE_FORMAT struDateForm;
+ public NET_DVR_OSD_POSITION struOsdPosition;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_PACKAGE_TIME
+ {
+ public NET_DVR_PACKAGE_LOCATION location;
+ public NET_DVRT_TIME_FORMAT struTimeForm;
+ public NET_DVR_OSD_POSITION struOsdPosition;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_PACKAGE_OTHERS
+ {
+ public NET_DVR_PACKAGE_LOCATION struPackageLocation;
+ public NET_DVR_PACKAGE_LENGTH struPackageLength;
+ public NET_DVR_OSD_POSITION struOsdPosition;
+ public NET_DVR_FRAMETYPECODE struPreCode;/*ַǰַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ //ûԶЭ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_USER_DEFINE_PROTOCOL
+ {
+ public NET_DVR_IDENTIFICAT struIdentification; //ı־
+ public NET_DVR_FILTER struFilter; //ݰ
+ public NET_DVR_ATM_PACKAGE_OTHERS struCardNoPara; //ӿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ACTION_TYPE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ATM_PACKAGE_ACTION[] struTradeActionPara; //ӽΪ 0-9 ζӦInCard OutCard OverLay SetTime GetStatus Query WithDraw Deposit ChanPass Transfer
+ public NET_DVR_ATM_PACKAGE_OTHERS struAmountPara; //ӽ
+ public NET_DVR_ATM_PACKAGE_OTHERS struSerialNoPara; //ӽ
+ public NET_DVR_OVERLAY_CHANNEL struOverlayChan; //ͨ
+ public NET_DVR_ATM_PACKAGE_DATE struRes1; //ڣ
+ public NET_DVR_ATM_PACKAGE_TIME struRes2; //ʱ䣬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_FRAMEFORMAT_V30
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; /*Ƿ0,;1,*/
+ public byte byInputMode; /**뷽ʽ:0-1Э顢2-ڼ3-Э*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //ֽ
+ public NET_DVR_IPADDR struAtmIp; /*ATM IP ʱʹ */
+ public ushort wAtmPort; /* Э鷽ʽʱʹ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ public uint dwAtmType; /*ATMЭͣNET_DVR_ATM_PROTOCOLṹлȡΪԶʱʹûԶЭ*/
+ public NET_DVR_ATM_USER_DEFINE_PROTOCOL struAtmUserDefineProtocol; //ûԶЭ飬ATMΪԶʱҪʹøö
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ //ЭϢݽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_PROTO_TYPE
+ {
+ public uint dwAtmType; //ATMЭͣͬʱΪ ATM еdwAtmType ԶʱΪ1025
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = ATM_DESC_LEN)]
+ public string chDesc; //ATMЭ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_ATM_PROTO_LIST
+ {
+ public uint dwAtmProtoNum;/*Эбĸ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ATM_PROTOCOL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ATM_PROTO_TYPE[] struAtmProtoType;/*ЭбϢ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATM_PROTOCOL
+ {
+ public uint dwSize;
+ public NET_DVR_ATM_PROTO_LIST struNetListenList; // Э
+ public NET_DVR_ATM_PROTO_LIST struSerialListenList; //ڼЭ
+ public NET_DVR_ATM_PROTO_LIST struNetProtoList; //Э
+ public NET_DVR_ATM_PROTO_LIST struSerialProtoList; //Э
+ public NET_DVR_ATM_PROTO_TYPE struCustomProto; //ԶЭ
+ }
+
+ /*****************************DS-6001D/F(begin)***************************/
+ //DS-6001D Decoder
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODERINFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEncoderIP;//豸ӵķIP
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEncoderUser;//豸ӵķû
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEncoderPasswd;//豸ӵķ
+ public byte bySendMode;//豸ӷģʽ
+ public byte byEncoderChannel;//豸ӵķͨ
+ public ushort wEncoderPort;//豸ӵķĶ˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] reservedData;//
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODERSTATE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEncoderIP;//豸ӵķIP
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEncoderUser;//豸ӵķû
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEncoderPasswd;//豸ӵķ
+ public byte byEncoderChannel;//豸ӵķͨ
+ public byte bySendMode;//豸ӵķģʽ
+ public ushort wEncoderPort;//豸ӵķĶ˿ں
+ public uint dwConnectState;//豸ӷ״̬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] reservedData;//
+ }
+
+ /*豸붨*/
+ public const int NET_DEC_STARTDEC = 1;
+ public const int NET_DEC_STOPDEC = 2;
+ public const int NET_DEC_STOPCYCLE = 3;
+ public const int NET_DEC_CONTINUECYCLE = 4;
+
+ /*ӵͨ*/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DECCHANINFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDVRIP;/* DVR IPַ */
+ public ushort wDVRPort;/* ˿ں */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public byte byChannel;/* ͨ */
+ public byte byLinkMode;/* ģʽ */
+ public byte byLinkType;/* 0 1 */
+ }
+
+ /*ÿͨ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECINFO
+ {
+ public byte byPoolChans;/*ÿ·ͨϵѭͨ, 4ͨ 0ʾûн*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DECPOOLNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DECCHANINFO[] struchanConInfo;
+ public byte byEnablePoll;/*ǷѲ 0- 1-*/
+ public byte byPoolTime;/*Ѳʱ 0- 1-10 2-15 3-20 4-30 5-45 6-1 7-2 8-5 */
+ }
+
+ /*豸*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECCFG
+ {
+ public uint dwSize;
+ public uint dwDecChanNum;/*ͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DECNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DECINFO[] struDecInfo;
+ }
+
+ //2005-08-01
+ /* 豸ͨ */
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PORTINFO
+ {
+ public uint dwEnableTransPort;/* Ƿͨ 0 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDecoderIP;/* DVR IPַ */
+ public ushort wDecoderPort;/* ˿ں */
+ public ushort wDVRTransPort;/* ǰDVRǴ485/2321ʾ232,2ʾ485 */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 4)]
+ public string cReserve;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PORTCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TRANSPARENTNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PORTINFO[] struTransPortInfo;/* 0ʾ232 1ʾ485 */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct bytime
+ {
+ public uint dwChannel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/*Ƶû*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public NET_DVR_TIME struStartTime;/* ʱطŵĿʼʱ */
+ public NET_DVR_TIME struStopTime;/* ʱطŵĽʱ */
+ }
+
+ /* ļط */
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_PLAYREMOTEFILE
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDecoderIP;/* DVR IPַ */
+ public ushort wDecoderPort;/* ˿ں */
+ public ushort wLoadMode;/* طģʽ 1 2ʱ */
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct mode_size
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ /*[FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFile;/* طŵļ */
+ /*[FieldOffsetAttribute(0)]
+ public bytime bytime;
+ * */
+ }
+ }
+
+
+
+ /*ǰ豸״̬*/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DECCHANSTATUS
+ {
+ public uint dwWorkType;/*ʽ1Ѳ2̬ӽ롢3ļط 4ʱط*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDVRIP;/*ӵ豸ip*/
+ public ushort wDVRPort;/*Ӷ˿ں*/
+ public byte byChannel;/* ͨ */
+ public byte byLinkMode;/* ģʽ */
+ public uint dwLinkType;/* 0 1*/
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct objectInfo
+ {
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct userInfo
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/*Ƶû*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 52)]
+ public string cReserve;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct fileInfo
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] fileName;
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct timeInfo
+ {
+ public uint dwChannel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/*Ƶû*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public NET_DVR_TIME struStartTime;/* ʱطŵĿʼʱ */
+ public NET_DVR_TIME struStopTime;/* ʱطŵĽʱ */
+ }
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECSTATUS
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DECNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DECCHANSTATUS[] struTransPortInfo;
+ }
+ /*****************************DS-6001D/F(end)***************************/
+
+ //ַ(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_SHOWSTRINGINFO
+ {
+ public ushort wShowString;// ԤͼǷʾַ,0-ʾ,1-ʾ С704*576,ַĴСΪ32*32
+ public ushort wStringSize;/* ַijȣܴ44ַ */
+ public ushort wShowStringTopLeftX;/* ַʾλõx */
+ public ushort wShowStringTopLeftY;/* ַʾλõy */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 44)]
+ public string sString;/* Ҫʾַ */
+ }
+
+ //ַ(9000չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SHOWSTRING_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_STRINGNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SHOWSTRINGINFO[] struStringInfo;/* Ҫʾַ */
+ }
+
+ //ַչ(8ַ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SHOWSTRING_EX
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_STRINGNUM_EX, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SHOWSTRINGINFO[] struStringInfo;/* Ҫʾַ */
+ }
+
+ //ַ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SHOWSTRING
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_STRINGNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SHOWSTRINGINFO[] struStringInfo;/* Ҫʾַ */
+ }
+
+ /****************************DS9000ṹ(begin)******************************/
+ /*EMAILṹ*/
+ //ԭṹв
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struReceiver
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sName;/* ռ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EMAIL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAddress;/* ռ˵ַ */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EMAILCFG_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAccount;/* ˺*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EMAIL_PWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struSender
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sName;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EMAIL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAddress;/* ˵ַ */
+ }
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EMAIL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSmtpServer;/* smtp */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EMAIL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPop3Server;/* pop3 */
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.Struct)]
+ public struReceiver[] struStringInfo;/* 3ռ */
+
+ public byte byAttachment;/* Ƿ */
+ public byte bySmtpServerVerify;/* ͷҪ֤ */
+ public byte byMailInterval;/* mail interval */
+ public byte byEnableSSL;//sslǷ9000_1.1
+ public ushort wSmtpPort;//gmail465ͨΪ25
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 74, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ /*DVRʵѲݽṹ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CRUISE_PARA
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CRUISE_MAX_PRESET_NUMS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPresetNo;/* Ԥõ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CRUISE_MAX_PRESET_NUMS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCruiseSpeed;/* Ѳٶ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CRUISE_MAX_PRESET_NUMS, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wDwellTime;/* ͣʱ */
+ public byte byEnableThisCruise;/* Ƿ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+ /****************************DS9000ṹ(end)******************************/
+ //ʱ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIMEPOINT
+ {
+ public uint dwMonth;// 0-11ʾ1-12
+ public uint dwWeekNo;//ڼ 01 12 23 34 4һ
+ public uint dwWeekDate;//ڼ 0 1һ 2ڶ 3 4 5 6
+ public uint dwHour;//Сʱ ʼʱ023 ʱ123
+ public uint dwMin;// 059
+ }
+
+ //ʱ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ZONEANDDST
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ public uint dwEnableDST;//Ƿʱ 0 1
+ public byte byDSTBias;//ʱƫֵ30min, 60min, 90min, 120min, ԷӼƣԭʼֵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_TIMEPOINT struBeginPoint;//ʱƿʼʱ
+ public NET_DVR_TIMEPOINT struEndPoint;//ʱֹͣʱ
+ }
+
+ //ͼƬ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_JPEGPARA
+ {
+ /*ע⣺ͼѹֱΪVGAʱ֧0=CIF, 1=QCIF, 2=D1ץͼ
+ ֱΪ3=UXGA(1600x1200), 4=SVGA(800x600), 5=HD720p(1280x720),6=VGA,7=XVGA, 8=HD900p
+ ֵ֧ǰֱʵץͼ*/
+ public ushort wPicSize;/* 0=CIF, 1=QCIF, 2=D1 3=UXGA(1600x1200), 4=SVGA(800x600), 5=HD720p(1280x720),6=VGA*/
+ public ushort wPicQuality;/* ͼƬϵ 0- 1-Ϻ 2-һ */
+ }
+
+ /* aux video out parameter */
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUXOUTCFG
+ {
+ public uint dwSize;
+ public uint dwAlarmOutChan;/* ѡͨлʱ䣺1ͨ: 0:/1:1/2:2/3:3/4:4 */
+ public uint dwAlarmChanSwitchTime;/* :1 - 10:10 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AUXOUT, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwAuxSwitchTime;/* лʱ: 0-л,1-5s,2-10s,3-20s,4-30s,5-60s,6-120s,7-300s */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AUXOUT * MAX_WINDOW, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAuxOrder;/* Ԥ˳, 0xffʾӦĴڲԤ */
+ }
+
+ //ntp
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NTPPARA
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNTPServer;/* Domain Name or IP addr of NTP server */
+ public ushort wInterval;/* adjust time interval(hours) */
+ public byte byEnableNTP;/* enable NPT client 0-no1-yes*/
+ public byte cTimeDifferenceH;/* ʱʱ Сʱƫ-12 ... +13 */
+ public byte cTimeDifferenceM;/* ʱʱ ƫ0, 30, 45*/
+ public byte res1;
+ public ushort wNtpPort; /* ntp server port 9000 豸ĬΪ123*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] res2;
+ }
+
+ //ddns
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DDNSPARA
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUsername;/* DDNS˺û/ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDomainName; /* */
+ public byte byEnableDDNS;/*ǷӦ 0-1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DDNSPARA_EX
+ {
+ public byte byHostIndex;/* 0-Hikvision DNS 1Dyndns 2PeanutHull()*/
+ public byte byEnableDDNS;/*ǷӦDDNS 0-1-*/
+ public ushort wDDNSPort;/* DDNS˿ں */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUsername;/* DDNSû*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* DDNS */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDomainName;/* 豸䱸ַ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] sServerName;/* DDNS ӦķַIPַ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //9000չ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struDDNS
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUsername;/* DDNS˺û*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDomainName;/* 豸䱸ַ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] sServerName;/* DDNSЭӦķַIPַ */
+ public ushort wDDNSPort;/* ˿ں */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DDNSPARA_V30
+ {
+ public byte byEnableDDNS;
+ public byte byHostIndex;/* 0-Hikvision DNS() 1Dyndns 2PeanutHull()*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DDNS_NUMS, ArraySubType = UnmanagedType.Struct)]
+ public struDDNS[] struDDNS;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //email
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EMAILPARA
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUsername;/* ʼ˺/ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSmtpServer;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPop3Server;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sMailAddr;/* email */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sEventMailAddr1;/* ϴ/쳣ȵemail */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sEventMailAddr2;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_NETAPPCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDNSIp; /* DNSַ */
+ public NET_DVR_NTPPARA struNtpClientParam;/* NTP */
+ public NET_DVR_DDNSPARA struDDNSClientParam;/* DDNS */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 464, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;/* */
+ }
+
+ //nfsṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_SINGLE_NFS
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sNfsHostIPAddr;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PATHNAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNfsDirectory;
+
+ public void Init()
+ {
+ this.sNfsDirectory = new byte[PATHNAME_LEN];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NFSCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NFS_DISK, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_NFS[] struNfsDiskParam;
+
+ public void Init()
+ {
+ this.struNfsDiskParam = new NET_DVR_SINGLE_NFS[MAX_NFS_DISK];
+
+ for (int i = 0; i < MAX_NFS_DISK; i++)
+ {
+ struNfsDiskParam[i].Init();
+ }
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ISCSI_CFG
+ {
+ public uint dwSize; // ṹС
+ public ushort wVrmPort; // VRM ˿
+ public byte byEnable; // Ƿ ISCSI洢
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 69, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ public NET_DVR_IPADDR struVrmAddr; // VRM ipַ 16λ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 64)]
+ public string chNvtIndexCode; //nvt index Code
+ }
+
+ //Ѳ(HIK IPר)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CRUISE_POINT
+ {
+ public byte PresetNum;//Ԥõ
+ public byte Dwell;//ͣʱ
+ public byte Speed;//ٶ
+ public byte Reserve;//
+
+ public void Init()
+ {
+ PresetNum = 0;
+ Dwell = 0;
+ Speed = 0;
+ Reserve = 0;
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CRUISE_RET
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CRUISE_POINT[] struCruisePoint;//֧32Ѳ
+
+ public void Init()
+ {
+ struCruisePoint = new NET_DVR_CRUISE_POINT[32];
+ for (int i = 0; i < 32; i++)
+ {
+ struCruisePoint[i].Init();
+ }
+ }
+ }
+
+ /************************************·(begin)***************************************/
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_NETCFG_OTHER
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sFirstDNSIP;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sSecondDNSIP;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_DECINFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDVRIP;/* DVR IPַ */
+ public ushort wDVRPort;/* ˿ں */
+ public byte byChannel;/* ͨ */
+ public byte byTransProtocol;/* Э 0-TCP, 1-UDP */
+ public byte byTransMode;/* ģʽ 0 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* ½ʺ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ }
+
+ ///ֹ̬ͣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_DYNAMIC_DEC
+ {
+ public uint dwSize;
+ public NET_DVR_MATRIX_DECINFO struDecChanInfo;/* ̬ͨϢ */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_DEC_CHAN_STATUS
+ {
+ public uint dwSize;
+ public uint dwIsLinked;/* ͨ״̬ 0 1 2 3-ڽ */
+ public uint dwStreamCpRate;/* Stream copy rate, X kbits/second */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 64)]
+ public string cRes;/* */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_DEC_CHAN_INFO
+ {
+ public uint dwSize;
+ public NET_DVR_MATRIX_DECINFO struDecChanInfo;/* ͨϢ */
+ public uint dwDecState;/* 0-̬ 1ѭ 2ʱط 3ļط */
+ public NET_DVR_TIME StartTime;/* ʱطſʼʱ */
+ public NET_DVR_TIME StopTime;/* ʱطֹͣʱ */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string sFileName;/* ļطļ */
+ }
+
+ //ӵͨ 2007-11-05
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_DECCHANINFO
+ {
+ public uint dwEnable;/* Ƿ 0 1*/
+ public NET_DVR_MATRIX_DECINFO struDecChanInfo;/* ѭͨϢ */
+ }
+
+ //2007-11-05 ÿͨ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_LOOP_DECINFO
+ {
+ public uint dwSize;
+ public uint dwPoolTime;/*Ѳʱ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CYCLE_CHAN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_DECCHANINFO[] struchanConInfo;
+ }
+
+ //2007-12-22
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct TTY_CONFIG
+ {
+ public byte baudrate;/* */
+ public byte databits;/* λ */
+ public byte stopbits;/* ֹͣλ */
+ public byte parity;/* żУλ */
+ public byte flowcontrol;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_TRAN_CHAN_INFO
+ {
+ public byte byTranChanEnable;/* ǰͨǷ 0ر 1 */
+ /*
+ * ·1485ڣ1232ڶΪͨ,豸ŷ£
+ * 0 RS485
+ * 1 RS232 Console
+ */
+ public byte byLocalSerialDevice;/* Local serial device */
+ /*
+ * Զ̴,һRS232һRS485
+ * 1ʾ232
+ * 2ʾ485
+ */
+ public byte byRemoteSerialDevice;/* Remote output serial device */
+ public byte res1;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sRemoteDevIP;/* Remote Device IP */
+ public ushort wRemoteDevPort;/* Remote Net Communication Port */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] res2;/* */
+ public TTY_CONFIG RemoteSerialDevCfg;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_TRAN_CHAN_CONFIG
+ {
+ public uint dwSize;
+ public byte by232IsDualChan;/* ·232ͨȫ˫ ȡֵ1MAX_SERIAL_NUM */
+ public byte by485IsDualChan;/* ·485ͨȫ˫ ȡֵ1MAX_SERIAL_NUM */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SERIAL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_TRAN_CHAN_INFO[] struTranInfo;/*ͬʱֽ֧MAX_SERIAL_NUMͨ*/
+ }
+
+ //2007-12-24 Merry Christmas Eve...
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_DEC_REMOTE_PLAY
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sDVRIP;/* DVR IPַ */
+ public ushort wDVRPort;/* ˿ں */
+ public byte byChannel;/* ͨ */
+ public byte byReserve;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public uint dwPlayMode;/* 0ļ 1ʱ*/
+ public NET_DVR_TIME StartTime;
+ public NET_DVR_TIME StopTime;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string sFileName;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_DEC_REMOTE_PLAY_CONTROL
+ {
+ public uint dwSize;
+ public uint dwPlayCmd;/* ļ*/
+ public uint dwCmdParam;/* */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_DEC_REMOTE_PLAY_STATUS
+ {
+ public uint dwSize;
+ public uint dwCurMediaFileLen;/* ǰŵýļ */
+ public uint dwCurMediaFilePosition;/* ǰļIJλ */
+ public uint dwCurMediaFileDuration;/* ǰļʱ */
+ public uint dwCurPlayTime;/* ǰѾŵʱ */
+ public uint dwCurMediaFIleFrames;/* ǰļ֡ */
+ public uint dwCurDataType;/* ǰͣ19-ļͷ20-ݣ 21-Ž־ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 72, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ //2009-4-11 added by likui ·new
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_PASSIVEMODE
+ {
+ public ushort wTransProtol;//Э飬0-TCP, 1-UDP, 2-MCAST
+ public ushort wPassivePort;//UDP˿, TCPʱĬ
+ public NET_DVR_IPADDR struMcastIP;
+ public byte byStreamType;/* ݲģʽ:REAL_TIME_STREAM(1)ʵʱ,RECORD_STREAM(2)ļ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_TRAN_CHAN_INFO_V30
+ {
+ public byte byTranChanEnable;/* ǰͨǷ 0ر 1 */
+ /*
+ * ·1485ڣ1232ڶΪͨ,豸ŷ£
+ * 0 RS485
+ * 1 RS232 Console
+ */
+ public byte byLocalSerialDevice;/* Local serial device */
+ /*
+ * Զ̴,һRS232һRS485
+ * 1ʾ232
+ * 2ʾ485
+ */
+ public byte byRemoteSerialDevice;/* Remote output serial device */
+ public byte byRes1;/* */
+ public NET_DVR_IPADDR struRemoteDevIP;/* Remote Device IP */
+ public ushort wRemoteDevPort;/* Remote Net Communication Port */
+ public byte byIsEstablished;/* ͨɹ־0-ûгɹ1-ɹ */
+ public byte byRes2;/* */
+ public TTY_CONFIG RemoteSerialDevCfg;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUsername;/* 32BYTES */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassword;/* 16BYTES */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_TRAN_CHAN_CONFIG_V30
+ {
+ public uint dwSize;
+ public byte by232IsDualChan;/* ·232ͨȫ˫ ȡֵ1MAX_SERIAL_NUM */
+ public byte by485IsDualChan;/* ·485ͨȫ˫ ȡֵ1MAX_SERIAL_NUM */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] vyRes;/* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SERIAL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_TRAN_CHAN_INFO[] struTranInfo;/*ͬʱֽ֧MAX_SERIAL_NUMͨ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_CHAN_INFO_V30
+ {
+ public uint dwEnable;/* Ƿ 0 1*/
+ public NET_DVR_STREAM_MEDIA_SERVER_CFG streamMediaServerCfg;
+ public NET_DVR_DEV_CHAN_INFO struDevChanInfo;/* ѭͨϢ */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_LOOP_DECINFO_V30
+ {
+ public uint dwSize;
+ public uint dwPoolTime;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CYCLE_CHAN_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_CHAN_INFO_V30[] struchanConInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_DEC_CHAN_INFO_V30
+ {
+ public uint dwSize;
+ public NET_DVR_STREAM_MEDIA_SERVER_CFG streamMediaServerCfg;/*ý*/
+ public NET_DVR_DEV_CHAN_INFO struDevChanInfo;/* ͨϢ */
+ public uint dwDecState;/* 0-̬ 1ѭ 2ʱط 3ļط */
+ public NET_DVR_TIME StartTime;/* ʱطſʼʱ */
+ public NET_DVR_TIME StopTime;/* ʱطֹͣʱ */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string sFileName;/* ļطļ */
+ public uint dwGetStreamMode;/*ȡģʽ:1-2-*/
+ public NET_DVR_MATRIX_PASSIVEMODE struPassiveMode;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*ý*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STREAM_MEDIA_SERVER
+ {
+ public byte byValid;/*Ƿýȡ,0ʾЧ0ʾЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_DOMAIN_NAME)]
+ public string byAddress;/* 豸IPַ */
+ public ushort wDevPort;/*ý˿*/
+ public byte byTransmitType;/*Э 0-TCP1-UDP*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //豸ͨϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEV_CHAN_INFO_EX
+ {
+ public byte byChanType; //ͨͣ0-ͨͨ1-ͨ2-ID3-Դ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = STREAM_ID_LEN)]
+ public string byStreamId;/* IDͨ byChanType Ϊ 2 ʱЧ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwChannel;//ͨ byChanTypeΪ 013 ʱЧͨΪԴòֵʾԴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_DOMAIN_NAME)]
+ public string byAddress;/* 豸IPַ */
+ public ushort wDVRPort; //˿ں
+ public byte byChannel; //òЧͨżdwChannel
+ public byte byTransProtocol; //Э0-TCP1-UDP
+ public byte byTransMode; //ģʽ 0 1
+ public byte byFactoryType; /*ǰ豸,ͨӿڻȡ*/
+ public byte byDeviceType; //豸(Ƶۺƽ̨ܰʹ)1-ʱƵۺƽ̨byVcaSupportChanModeֶʹýͨʾͨ2-
+ public byte byDispChan;//ʾͨ,ʹ
+ public byte bySubDispChan;//ʾͨͨţʱʹ
+ public byte byResolution; //; 1-CIF 2-4CIF 3-720P 4-1080P 5-500wʹãݸòԴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)]
+ public string sUserName; //½ʺ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string sPassword; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DEC_STREAM_DEV_EX
+ {
+ public NET_DVR_STREAM_MEDIA_SERVER struStreamMediaSvrCfg;/*ý*/
+ public NET_DVR_DEV_CHAN_INFO_EX struDevChanInfo;/* ͨϢ */
+ }
+
+ //̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEV_DDNS_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_DOMAIN_NAME)]
+ public string byDevAddress; //豸(IPServerhiDDNSʱ豸кŻ߱)
+ public byte byTransProtocol; //Эͣ0- TCP1- UDP2- ಥ
+ public byte byTransMode; //ģʽ 0 1
+ public byte byDdnsType; //ͣ0- IPServer1- Dyndns2- PeanutHull()3- NO-IP4- hiDDNS
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_DOMAIN_NAME)]
+ public string byDdnsAddress; //DDNSַ
+ public ushort wDdnsPort; //DDNS˿ں
+ public byte byChanType; //ͨͣ0-ͨͨ1-ͨ2-ID
+ public byte byFactoryType; //ǰ豸,ͨӿNET_DVR_GetIPCProtoListȡ
+ public uint dwChannel; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = STREAM_ID_LEN)]
+ public string byStreamId; // IDͨ byChanType Ϊ 2 ʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)]
+ public string sUserName; //½ʺ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string sPassword; //
+ public ushort wDevPort; //豸˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //̬ȡ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_DEC_DDNS_DEV
+ {
+ public NET_DVR_DEV_DDNS_INFO struDdnsInfo;/*ý*/
+ public NET_DVR_STREAM_MEDIA_SERVER struMediaServer;/* ͨϢ */
+ }
+
+ //ȡģʽ
+ [StructLayout(LayoutKind.Explicit)]
+ public struct NET_DVR_DEC_STREAM_MODE
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 300, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //С
+ public void Init()
+ {
+ byRes = new byte[300];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MATRIX_DEC_CHAN_INFO_V41
+ {
+ public uint dwSize;
+ public byte byStreamMode;/*ȡģʽ0- Ч1- ͨIPȡ2- ͨURLȡ3- ̬ͨ豸ȡ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_DEC_STREAM_MODE uDecStreamMode;/*ȡϢ*/
+ public uint dwPlayMode;/*״̬0-̬룬1ѭ룬2ʱطţ3ļط*/
+ public NET_DVR_TIME StartTime;/* ʱطſʼʱ */
+ public NET_DVR_TIME StopTime;/* ʱطֹͣʱ */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string sFileName;/* ļطļ */
+ public uint dwGetStreamMode;/*ȡģʽ:1-2-*/
+ public NET_DVR_MATRIX_PASSIVEMODE struPassiveMode;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int MAX_RESOLUTIONNUM = 64; //ֱֵ֧Ŀ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_ABILITY
+ {
+ public uint dwSize;
+ public byte byDecNums;
+ public byte byStartChan;
+ public byte byVGANums;
+ public byte byBNCNums;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8*12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byVGAWindowMode;/*VGAֵ֧Ĵģʽ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byBNCWindowMode;/*BNCֵ֧Ĵģʽ*/
+ public byte byDspNums;
+ public byte byHDMINums;//HDMIʾͨ25ʼ
+ public byte byDVINums;//DVIʾͨ29ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 13, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RESOLUTIONNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySupportResolution;//öٶ,һֽڴһֱ//֧֣1֧֣0֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4*8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byHDMIWindowMode;//HDMIֵ֧Ĵģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4*8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDVIWindowMode;//DVIֵ֧Ĵģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ϴlogoṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISP_LOGOCFG
+ {
+ public uint dwCorordinateX;//ͼƬʾX
+ public uint dwCorordinateY;//ͼƬʾY
+ public ushort wPicWidth; //ͼƬ
+ public ushort wPicHeight; //ͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byFlash;//Ƿ˸1-˸0-˸
+ public byte byTranslucent;//Ƿ1-0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//
+ public uint dwLogoSize;//LOGOСBMPļͷ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PICTURECFG
+ {
+ public uint dwSize; //С
+ public byte byUseType; //1-ͼ2-GIFͼƬ3-CADͼƬ 4-ͼƬ
+ public byte bySequence;//
+ public byte byOverlayEnabled; //ͼƬʹܣǷϴͼƬͼƬӲ 1-Ӳ0-
+ public byte byRes;
+ public NET_DVR_BASEMAP_CFG struBasemapCfg;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPicName;//ͼƬ
+ public uint dwVideoWall; //ǽţ1ֽǽ+1ֽͨ+2ֽڴںţ
+ public byte byFlash; //ͼƬ˸ʹܣ1-˸0-˸
+ public byte byTranslucent; //ͼƬʹܣ1-0-
+ public byte byShowEnabled; //ͼƬʾʹܣ1-ʾ0-
+ public byte byPictureType; //ͼƬͣ1-bmp2-jpg3-png
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OUTPUT_PIC_CFG
+ {
+ public uint dwSize;
+ public uint dwOutputPicNo; //ͼƬ
+ public byte byEnable; //logoǷʾ1-ʾ0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_RECTCFG_EX struRect;//logoλãڷΧܴСΪ1920*1920
+ public byte byFlash; //Ƿ˸1-˸0-˸
+ public byte byTranslucent; //Ƿ1-0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ public uint dwOutputPicWinNo; //ͼƬںţ1ֽ豸+1ֽں+2ֽͼƬںţ,ȡȫʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 28, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ public const int MAX_OSD_LEN = 64; //OSD
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OUTPUT_OSD_CFG
+ {
+ public uint dwSize;
+ public byte byEnable; //OSDǷʾ0-ʾ1-ʾ
+ public byte byFontSize; //С1-2-У3-С
+ public byte byOSDColor; //OSDɫã0-Ĭϣ 1-ڣ2-ף3-죬4-̣5-
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_OSD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byOsdContent; //OSD
+ public NET_DVR_RECTCFG_EX struRect;//OSDλãڷΧܴСΪ1920*1920
+ public uint dwOsdWinNo; //OSDںţ1ֽ豸+1ֽں+2ֽOSDںţȡʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ /**/
+ public const int NET_DVR_ENCODER_UNKOWN = 0;/*δ֪ʽ*/
+ public const int NET_DVR_ENCODER_H264 = 1;/*HIK 264*/
+ public const int NET_DVR_ENCODER_S264 = 2;/*Standard H264*/
+ public const int NET_DVR_ENCODER_MPEG4 = 3;/*MPEG4*/
+ public const int NET_DVR_ORIGINALSTREAM = 4;/*Original Stream*/
+ public const int NET_DVR_PICTURE = 5;//*Picture*/
+ public const int NET_DVR_ENCODER_MJPEG = 6;
+ public const int NET_DVR_ECONDER_MPEG2 = 7;
+ /* ʽ */
+ public const int NET_DVR_STREAM_TYPE_UNKOWN = 0;/*δ֪ʽ*/
+ public const int NET_DVR_STREAM_TYPE_HIKPRIVT = 1; /*Զʽ*/
+ public const int NET_DVR_STREAM_TYPE_TS = 7;/* TS */
+ public const int NET_DVR_STREAM_TYPE_PS = 8;/* PS */
+ public const int NET_DVR_STREAM_TYPE_RTP = 9;/* RTP */
+
+ /*ͨ״̬*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_CHAN_STATUS
+ {
+ public byte byDecodeStatus;/*ǰ״̬:0:δ1*/
+ public byte byStreamType;/**/
+ public byte byPacketType;/*ʽ*/
+ public byte byRecvBufUsage;/*ջʹ*/
+ public byte byDecBufUsage;/*뻺ʹ*/
+ public byte byFpsDecV;/*Ƶ֡*/
+ public byte byFpsDecA;/*Ƶ֡*/
+ public byte byCpuLoad;/*DSP CPUʹ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwDecodedV;/*Ƶ֡*/
+ public uint dwDecodedA;/*Ƶ֡*/
+ public ushort wImgW;/*ǰͼС,*/
+ public ushort wImgH; //
+ public byte byVideoFormat;/*Ƶʽ:0-NON,NTSC--1,PAL--2*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public uint dwDecChan; /*ȡȫͨ״̬ʱЧʱ0*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ /*ʾͨ״̬*/
+ public const int NET_DVR_MAX_DISPREGION = 16; /*ÿʾͨʾĴ*/
+ //VGAֱʣĿǰõǣVGA_THS8200_MODE_XGA_60HZVGA_THS8200_MODE_SXGA_60HZ
+ //
+ public enum VGA_MODE
+ {
+ /*VGA*/
+ VGA_NOT_AVALIABLE,
+ VGA_THS8200_MODE_SVGA_60HZ, //(800*600)
+ VGA_THS8200_MODE_SVGA_75HZ, //(800*600)
+ VGA_THS8200_MODE_XGA_60HZ, //(1024*768)
+ VGA_THS8200_MODE_XGA_75HZ, //(1024*768)
+ VGA_THS8200_MODE_SXGA_60HZ, //(1280*1024)
+ VGA_THS8200_MODE_720P_60HZ, //(1280*720)
+ VGA_THS8200_MODE_1080I_60HZ, //(1920*1080)
+ VGA_THS8200_MODE_1080P_30HZ, //(1920*1080)
+ VGA_THS8200_MODE_UXGA_30HZ, //(1600*1200)
+ /*HDMI*/
+ HDMI_SII9134_MODE_XGA_60HZ, //(1024*768)
+ HDMI_SII9134_MODE_SXGA_60HZ, //(1280*1024)
+ HDMI_SII9134_MODE_SXGA2_60HZ, //(1280*960)
+ HDMI_SII9134_MODE_720P_60HZ, //(1280*720)
+ HDMI_SII9134_MODE_720P_50HZ, //(1280*720)
+ HDMI_SII9134_MODE_1080I_60HZ, //(1920*1080)
+ HDMI_SII9134_MODE_1080I_50HZ, //(1920*1080)
+ HDMI_SII9134_MODE_1080P_25HZ, //(1920*1080)
+ HDMI_SII9134_MODE_1080P_30HZ, //(1920*1080)
+ HDMI_SII9134_MODE_1080P_50HZ, //(1920*1080)
+ HDMI_SII9134_MODE_1080P_60HZ, //(1920*1080)
+ HDMI_SII9134_MODE_UXGA_60HZ, //(1600*1200)
+ /*DVI*/
+ DVI_SII9134_MODE_XGA_60HZ, //(1024*768)
+ DVI_SII9134_MODE_SXGA_60HZ, //(1280*1024)
+ DVI_SII9134_MODE_SXGA2_60HZ, //(1280*960)
+ DVI_SII9134_MODE_720P_60HZ, //(1280*720)
+ DVI_SII9134_MODE_720P_50HZ, //(1280*720)
+ DVI_SII9134_MODE_1080I_60HZ, //(1920*1080)
+ DVI_SII9134_MODE_1080I_50HZ, //(1920*1080)
+ DVI_SII9134_MODE_1080P_25HZ, //(1920*1080)
+ DVI_SII9134_MODE_1080P_30HZ, //(1920*1080)
+ DVI_SII9134_MODE_1080P_50HZ, //(1920*1080)
+ DVI_SII9134_MODE_1080P_60HZ, //(1920*1080)
+ DVI_SII9134_MODE_UXGA_60HZ, //(1600*1200)
+ VGA_DECSVR_MODE_SXGA2_60HZ,
+ HDMI_DECSVR_MODE_1080P_24HZ,
+ DVI_DECSVR_MODE_1080P_24HZ,
+ YPbPr_DECSVR_MODE_720P_60HZ,
+ YPbPr_DECSVR_MODE_1080I_60HZ
+ }
+
+ //֡ʶ
+ public const int LOW_DEC_FPS_1_2 = 51;
+ public const int LOW_DEC_FPS_1_4 = 52;
+ public const int LOW_DEC_FPS_1_8 = 53;
+ public const int LOW_DEC_FPS_1_16 = 54;
+
+ /*Ƶʽ*/
+ public enum VIDEO_STANDARD
+ {
+ VS_NON = 0,
+ VS_NTSC = 1,
+ VS_PAL = 2,
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_VIDEOPLATFORM
+ {
+ /*ӴڶӦͨӦĽϵͳIJλ(Ƶۺƽ̨нϵͳЧ)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecoderId;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_NOTVIDEOPLATFORM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VGA_DISP_CHAN_CFG
+ {
+ public uint dwSize;
+ public byte byAudio;/*ƵǷ,0-1-*/
+ public byte byAudioWindowIdx;/*ƵӴ*/
+ public byte byVgaResolution;/*VGAķֱ*/
+ public byte byVedioFormat;/*Ƶʽ1:NTSC,2:PAL,0-NON*/
+ public uint dwWindowMode;/*ģʽȡĿǰ֧1,2,4,9,16*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecChan;/*ӴڹĽͨ*/
+ public byte byEnlargeStatus; /*ǷڷŴ״̬0Ŵ1Ŵ*/
+ public byte byEnlargeSubWindowIndex;//ŴӴں
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct struDiff
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ public byte byUnionType;/*ֹ壬0-Ƶۺƽ̨ڲʾͨã1-ʾͨ*/
+ public byte byScale; /*ʾģʽ0---ʵʾ1---ʾ( BNC )*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISP_CHAN_STATUS
+ {
+ public byte byDispStatus;/*ʾ״̬0δʾ1ʾ*/
+ public byte byBVGA; /*VGA/BNC*/
+ public byte byVideoFormat;/*Ƶʽ:1:NTSC,2:PAL,0-NON*/
+ public byte byWindowMode;/*ǰģʽ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecChan;/*ӴڹĽͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_MAX_DISPREGION, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFpsDisp;/*ÿӻʾ֡*/
+ public byte byScreenMode; //Ļģʽ0-ͨ 1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int MAX_DECODECHANNUM = 32;//·ͨ
+ public const int MAX_DISPCHANNUM = 24;//·ʾͨ
+
+ /*豸״̬*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODER_WORK_STATUS
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DECODECHANNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_CHAN_STATUS[] struDecChanStatus;/*ͨ״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISPCHANNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISP_CHAN_STATUS[] struDispChanStatus;/*ʾͨ״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_ALARMIN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmInStatus;/*״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ANALOG_ALARMOUT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAalarmOutStatus;/*״̬*/
+ public byte byAudioInChanStatus;/*Խ״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 127, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //2009-12-1 ӱ벥ſ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PASSIVEDECODE_CONTROL
+ {
+ public uint dwSize;
+ public uint dwPlayCmd; /* ļ*/
+ public uint dwCmdParam; /* */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//Reverse
+ }
+
+ public const int PASSIVE_DEC_PAUSE = 1; /*ͣ(ļЧ)*/
+ public const int PASSIVE_DEC_RESUME = 2; /*ָ(ļЧ)*/
+ public const int PASSIVE_DEC_FAST = 3; /*ٱ(ļЧ)*/
+ public const int PASSIVE_DEC_SLOW = 4; /*ٱ(ļЧ)*/
+ public const int PASSIVE_DEC_NORMAL = 5; /*(ļЧ)*/
+ public const int PASSIVE_DEC_ONEBYONE = 6; /*뵥֡()*/
+ public const int PASSIVE_DEC_AUDIO_ON = 7; /*Ƶ*/
+ public const int PASSIVE_DEC_AUDIO_OFF = 8; /*Ƶر*/
+ public const int PASSIVE_DEC_RESETBUFFER = 9; /*ջ*/
+
+ //2009-12-16 ӿƽͨ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_DECCHAN_CONTROL
+ {
+ public uint dwSize;
+ public byte byDecChanScaleStatus;/*ͨʾſ,1ʾʾ0ʾʵʾ*/
+ public byte byDecodeDelay;//ʱ0-Ĭϣ1-ʵʱԺã2-ʵʱԽϺã3-ʵʱУУ4-ԽϺã5-Ժã0xff-Զ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 66, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ /************************************·(end)***************************************/
+
+ /************************************Ƶۺƽ̨(begin)***************************************/
+ public const int MAX_SUBSYSTEM_NUM = 80; //һϵͳϵͳ
+ public const int MAX_SUBSYSTEM_NUM_V40 = 120; //һϵͳϵͳ
+ public const int MAX_SERIALLEN = 36; //кų
+ public const int MAX_LOOPPLANNUM = 16; //ƻл
+ public const int DECODE_TIMESEGMENT = 4; //ƻÿʱ
+
+ public const int MAX_DOMAIN_NAME = 64; /* */
+ public const int MAX_DISKNUM_V30 = 33; //9000豸Ӳ/* 33Ӳ(16SATAӲ̡1eSATAӲ̺16NFS) */
+ public const int MAX_DAYS = 7; //ÿ
+ public const int MAX_DISPNUM_V41 = 32;
+ public const int MAX_WINDOWS_NUM = 12;
+ public const int MAX_VOUTNUM = 32;
+ public const int MAX_SUPPORT_RES = 32;
+ public const int MAX_BIGSCREENNUM = 100;
+
+ public const int VIDEOPLATFORM_ABILITY = 0x210; //Ƶۺƽ̨
+ public const int MATRIXDECODER_ABILITY_V41 = 0x260; //
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SUBSYSTEMINFO
+ {
+ public byte bySubSystemType;//ϵͳͣ1-ϵͳ2-ϵͳ0-NULL˲ֻܻȡ
+ public byte byChan;//ϵͳͨ˲ֻܻȡ
+ public byte byLoginType;//עͣ1-ֱ2-DNS3-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_IPADDR struSubSystemIP;/*IPַģ*/
+ public ushort wSubSystemPort;//ϵͳ˿ںţģ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_IPADDR struSubSystemIPMask;//
+ public NET_DVR_IPADDR struGatewayIpAddr; /* صַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û ˲ֻܻȡ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/*루˲ֻܻȡ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_DOMAIN_NAME)]
+ public string sDomainName;//()
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_DOMAIN_NAME)]
+ public string sDnsAddress;/*DNSIPַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber;//кţ˲ֻܻȡ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALLSUBSYSTEMINFO
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SUBSYSTEM_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SUBSYSTEMINFO[] struSubSystemInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LOOPPLAN_SUBCFG
+ {
+ public uint dwSize;
+ public uint dwPoolTime; /*ѯλ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CYCLE_CHAN_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_CHAN_INFO_V30[] struChanConInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMMODECFG
+ {
+ public uint dwSize;
+ public byte byAlarmMode;//ͣ1-ѯ2-
+ public ushort wLoopTime;//ѯʱ, λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CODESPLITTERINFO
+ {
+ public uint dwSize;
+ public NET_DVR_IPADDR struIP;/*IPַ*/
+ public ushort wPort;//˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;/* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;/* */
+ public byte byChan;//485
+ public byte by485Port;//485ڵַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ASSOCIATECFG
+ {
+ public byte byAssociateType;//ͣ1-
+ public ushort wAlarmDelay;//ʱ05룻110룻230룻31ӣ42ӣ55ӣ610ӣ
+ public byte byAlarmNum;//ţֵӦøͬıֵͬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DYNAMICDECODE
+ {
+ public uint dwSize;
+ public NET_DVR_ASSOCIATECFG struAssociateCfg;//̬ṹ
+ public NET_DVR_PU_STREAM_CFG struPuStreamCfg;//̬ṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODESCHED
+ {
+ public NET_DVR_SCHEDTIME struSchedTime;
+ public byte byDecodeType;/*0-ޣ1-ѯ룬2-̬*/
+ public byte byLoopGroup;//ѯ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_PU_STREAM_CFG struDynamicDec;//̬
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLANDECODE
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * DECODE_TIMESEGMENT, ArraySubType = UnmanagedType.I1)]
+ public NET_DVR_DECODESCHED[] struDecodeSched;//һΪʼ9000һ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byres;
+ }
+ /************************************Ƶۺƽ̨(end)***************************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOPLATFORM_ABILITY
+ {
+ public uint dwSize;
+ public byte byCodeSubSystemNums;//ϵͳ
+ public byte byDecodeSubSystemNums;//ϵͳ
+ [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = System.Runtime.InteropServices.UnmanagedType.I1)]
+ public byte[] byWindowMode; /*ʾֵ֧ͨĴģʽ*/
+ [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = System.Runtime.InteropServices.UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SUBSYSTEM_ABILITY
+ {
+ /*ϵͳͣ1-ϵͳ2-ϵͳ3-ϵͳ4-ϵͳ5-ϵͳ6-ϵͳ7-ϵͳ8-V6ϵͳ9-V6ϵͳ0-NULL˲ֻܻȡ*/
+ public byte bySubSystemType;
+ public byte byChanNum;//ϵͳͨ
+ public byte byStartChan;//ϵͳʼͨ
+ public byte bySlotNum;//λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public struDecoderSystemAbility _struAbility;
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struDecoderSystemAbility
+ {
+ public byte byVGANums;//VGAʾͨ1ʼ
+ public byte byBNCNums;//BNCʾͨ9ʼ
+ public byte byHDMINums;//HDMIʾͨ25ʼ
+ public byte byDVINums;//DVIʾͨ29ʼ
+
+ public byte byLayerNums;//ƴУʱ֧ͼ
+ public byte bySpartan;//Թܣ0-֧֣1-֧
+ public byte byDecType; //ϵͳͣ0-ͨ,1-ǿ(ͨͷʱǰ4ʹԴǿƣǿɱϵͳ16·D1Դ
+ //ǿͱΪԴɱãܱͨ)
+ public byte byOutputSwitch;//Ƿ֧HDMI/DVIл0-֧֣1-֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 39, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byDecoderType; // 0-ͨ 1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 152, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struAbility
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 200, ArraySubType = UnmanagedType.I1)]
+ // [FieldOffsetAttribute(0)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOPLATFORM_ABILITY_V40
+ {
+ public uint dwSize;
+ public byte byCodeSubSystemNums;
+ public byte byDecodeSubSystemNums;//ϵͳ
+ public byte bySupportNat;//Ƿ֧NAT0-֧֣1-֧
+ public byte byInputSubSystemNums;//ϵͳ
+ public byte byOutputSubSystemNums;//ϵͳ
+ public byte byCodeSpitterSubSystemNums;//ϵͳ
+ public byte byAlarmHostSubSystemNums;//ϵͳ
+ public byte bySupportBigScreenNum;//֧ɴĸ
+ public byte byVCASubSystemNums;//ϵͳ
+ public byte byV6SubSystemNums;//V6ϵͳ
+ public byte byV6DecoderSubSystemNums;//V6ϵͳ
+ public byte bySupportBigScreenX;/*ƴӵģʽmn*/
+ public byte bySupportBigScreenY;
+ public byte bySupportSceneNums;//ֳ֧ģʽĸ
+ public byte byVcaSupportChanMode;//ֵ֧ͨʹģʽ0-ʹýͨ1-ʹʾͨͨ
+ public byte bySupportScreenNums;//ֵ֧ĴĻ
+ public byte bySupportLayerNums;//ֵ֧ͼ0xff-Ч
+ public byte byNotSupportPreview;//Ƿ֧Ԥ,1-֧֣0-֧
+ public byte byNotSupportStorage;//Ƿִ֧洢,1-֧֣0-֧
+ public byte byUploadLogoMode;//ϴlogoģʽ0-ϴͨ1-ϴʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SUBSYSTEM_NUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SUBSYSTEM_ABILITY[] struSubSystemAbility;
+ public byte by485Nums;//485ڸ
+ public byte by232Nums;//232ڸ
+ public byte bySerieStartChan;//ʼͨ
+ public byte byScreenMode;//ģʽ0-ɿͻ˷䣬1-豸˷
+ public byte byDevVersion;//豸汾0-B10/B11/B121-B20
+ public byte bySupportBaseMapNums;//ֵ֧ĵͼͼŴ1ʼ
+ public ushort wBaseLengthX;//ÿСĻֵB20ʹ
+ public ushort wBaseLengthY;
+ public byte bySupportPictureTrans; //Ƿ֧ͼƬԣ0-֧֣1-֧
+ public byte bySupportPreAllocDec; //Ƿ֧ܽԴԤ䣬0-֧֣1-֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 628, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLESCREENCFG
+ {
+ public byte byScreenSeq;//Ļţ0xffʾô,64-Tһʾ
+ public byte bySubSystemNum;//ϵͳλ,ֵû
+ public byte byDispNum;//ϵͳ϶Ӧʾͨţ64-Tиֵʾʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BIGSCREENCFG
+ {
+ public uint dwSize;
+ public byte byEnable;//ƴʹܣ0-ʹܣ1-ʹ
+ public byte byModeX;/*ƴģʽ*/
+ public byte byModeY;
+ public byte byMainDecodeSystem;//ۺƽ̨Ľиֵʾλţ64-Tиֵʾͨ
+ public byte byMainDecoderDispChan;//ʾͨţ1.1netra汾netraʾܹͨΪ64-TиֵЧ
+ public byte byVideoStandard; //ÿʽͬ 1:NTSC,2:PAL
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwResolution; //ÿֱͬ
+ //ƴӴĻϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_BIGSCREENNUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLESCREENCFG[] struFollowSingleScreen;
+ //ʼΪ
+ public ushort wBigScreenX; //ڵǽʼX
+ public ushort wBigScreenY; //ڵǽʼY
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+
+ public void Init()
+ {
+ byRes1 = new byte[2];
+ struFollowSingleScreen = new NET_DVR_SINGLESCREENCFG[MAX_BIGSCREENNUM];
+ byRes2 = new byte[12];
+ }
+ }
+
+ /************************************Ƶۺƽ̨(end)***************************************/
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_EMAILCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sUserName;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sPassWord;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sFromName;/* Sender *///ַеĵһַһַ"@",ַҪ"@"ַ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 48)]
+ public string sFromAddr;/* Sender address */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sToName1;/* Receiver1 */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sToName2;/* Receiver2 */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 48)]
+ public string sToAddr1;/* Receiver address1 */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 48)]
+ public string sToAddr2;/* Receiver address2 */
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sEmailServer;/* Email server address */
+ public byte byServerType;/* Email server type: 0-SMTP, 1-POP, 2-IMTP*/
+ public byte byUseAuthen;/* Email server authentication method: 1-enable, 0-disable */
+ public byte byAttachment;/* enable attachment */
+ public byte byMailinterval;/* mail interval 0-2s, 1-3s, 2-4s. 3-5s*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSIONCFG_NEW
+ {
+ public uint dwSize;
+ public NET_DVR_COMPRESSION_INFO_EX struLowCompression;//ʱ¼
+ public NET_DVR_COMPRESSION_INFO_EX struEventCompression;//¼¼
+ }
+
+ //̨ԤõϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PRESET_NAME
+ {
+ public uint dwSize;
+ public ushort wPresetNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName;
+ public ushort wPanPos;
+ public ushort wTiltPos;
+ public ushort wZoomPos;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 58, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //λϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZPOS
+ {
+ public ushort wAction;//ȡʱֶЧ
+ public ushort wPanPos;//ˮƽ
+ public ushort wTiltPos;//ֱ
+ public ushort wZoomPos;//䱶
+ }
+
+ //ΧϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZSCOPE
+ {
+ public ushort wPanPosMin;//ˮƽmin
+ public ushort wPanPosMax;//ˮƽmax
+ public ushort wTiltPosMin;//ֱmin
+ public ushort wTiltPosMax;//ֱmax
+ public ushort wZoomPosMin;//䱶min
+ public ushort wZoomPosMax;//䱶max
+ }
+
+ //rtsp ipcameraר
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RTSPCFG
+ {
+ public uint dwSize;//
+ public ushort wPort;//rtsp˿
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 54, ArraySubType = UnmanagedType.I1)]
+ public byte[] byReserve;//Ԥ
+ }
+
+ /********************************ӿڲṹ(begin)*********************************/
+
+ //NET_DVR_Login()ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICEINFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber;//к
+ public byte byAlarmInPortNum;//DVR
+ public byte byAlarmOutPortNum;//DVR
+ public byte byDiskNum;//DVRӲ̸
+ public byte byDVRType;//DVR, 1:DVR 2:ATM DVR 3:DVS ......
+ public byte byChanNum;//DVR ͨ
+ public byte byStartChan;//ʼͨ,DVS-1,DVR - 1
+ }
+
+ //NET_DVR_Login_V30()ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICEINFO_V30
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber; //к
+ public byte byAlarmInPortNum; //
+ public byte byAlarmOutPortNum; //
+ public byte byDiskNum; //Ӳ̸
+ public byte byDVRType; //豸, 1:DVR 2:ATM DVR 3:DVS ......
+ public byte byChanNum; //ģͨ
+ public byte byStartChan; //ʼͨ,DVS-1,DVR - 1
+ public byte byAudioChanNum; //ͨ
+ public byte byIPChanNum; //ͨλ
+ public byte byZeroChanNum; //ͨ //2010-01-16
+ public byte byMainProto; //Э 0-private, 1-rtsp,2-ͬʱ֧privatertsp
+ public byte bySubProto; //Э0-private, 1-rtsp,2-ͬʱ֧privatertsp
+ public byte bySupport; //λΪ0ʾ֧֣1ʾ֧֣
+ //bySupport & 0x1, ʾǷ֧
+ //bySupport & 0x2, ʾǷֱ֧
+ //bySupport & 0x4, ʾǷ֧ѹȡ
+ //bySupport & 0x8, ʾǷֶ֧
+ //bySupport & 0x10, ʾ֧ԶSADP
+ //bySupport & 0x20, ʾ֧Raid
+ //bySupport & 0x40, ʾ֧IPSAN Ŀ¼
+ //bySupport & 0x80, ʾ֧rtp over rtsp
+ public byte bySupport1; // 䣬λΪ0ʾ֧֣1ʾ֧
+ //bySupport1 & 0x1, ʾǷ֧snmp v30
+ //bySupport1 & 0x2, ֻ֧طź
+ //bySupport1 & 0x4, Ƿֲ֧ȼ
+ //bySupport1 & 0x8, 豸Ƿֲ֧ʱչ
+ //bySupport1 & 0x10, ʾǷֶ֧33
+ //bySupport1 & 0x20, ʾǷ֧rtsp over http
+ //bySupport1 & 0x80, ʾǷֳ֧±Ϣ2012-9-28, һʾǷ֧NET_DVR_IPPARACFG_V40ṹ
+ public byte bySupport2; /*λΪ0ʾ֧֣0ʾ֧
+ bySupport2 & 0x1, ʾǷ֧ͨURLȡ
+ bySupport2 & 0x2, ʾ֧FTPV40
+ bySupport2 & 0x4, ʾ֧ANR
+ bySupport2 & 0x8, ʾ֧CCDͨ
+ bySupport2 & 0x10, ʾֲ֧شϢ֧ץĻ ϱṹ
+ bySupport2 & 0x20, ʾǷֵ֧ȡ豸״̬
+ bySupport2 & 0x40, ʾǷ豸*/
+ public ushort wDevType; //豸ͺ
+ public byte bySupport3; //չλΪ0ʾ֧֣1ʾ֧
+ //bySupport3 & 0x1, ʾǷ
+ // bySupport3 & 0x4 ʾְ֧ã ͨͼIP롢
+ // û豸״̬JPEGץͼʱʱץͼӲ
+ //bySupport3 & 0x8Ϊ1 ʾ֧ʹTCPԤUDPԤಥԤе"ʱԤ"ֶʱԤʹַʽʱԤbySupport3 & 0x8Ϊ0ʱʹ "˽ʱԤ"Э顣
+ //bySupport3 & 0x10 ʾ֧"ȡҪ״̬V40"
+ //bySupport3 & 0x20 ʾǷ֧ͨDDNSȡ
+
+ public byte byMultiStreamProto;//Ƿֶ֧,λʾ,0-֧,1-֧,bit1-3,bit2-4,bit7-bit-8
+ public byte byStartDChan; //ʼͨ,0ʾЧ
+ public byte byStartDTalkChan; //ʼֶԽͨţģԽͨţ0ʾЧ
+ public byte byHighDChanNum; //ͨλ
+ public byte bySupport4;
+ public byte byLanguageType;// ֧,λʾ,ÿһλ0-֧,1-֧
+ // byLanguageType 0 ʾ 豸
+ // byLanguageType & 0x1ʾ֧
+ // byLanguageType & 0x2ʾ֧Ӣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICEINFO_V40
+ {
+ public NET_DVR_DEVICEINFO_V30 struDeviceV30;
+ public byte bySupportLock; //豸֧ܣֶSDK豸ֵֵġbySupportLockΪ1ʱdwSurplusLockTimebyRetryLoginTimeЧ
+ public byte byRetryLoginTime; //ʣɳԵ½Ĵûʱ˲Ч
+ public byte byPasswordLevel; //admin밲ȫȼ0-Ч1-Ĭ룬2-Ч,3-սϸߵ롣ûΪĬ루12345߷սϸߵʱϲͻҪʾû롣
+ public byte byProxyType;//ͣ0-ʹô, 1-ʹsocks5, 2-ʹEHome
+ public uint dwSurplusLockTime; //ʣʱ䣬λ룬ûʱ˲Ч
+ public byte byCharEncodeType; //ַͣSDKнӿڷصַͣӿڳ⣩0- ַϢ(豸)1- GB2312()2- GBK3- BIG5()4- Shift_JIS()5- EUC-KR()6- UTF-87- ISO8859-18- ISO8859-29- ISO8859-3ƣ21- ISO8859-15(ŷ)
+ public byte bySupportDev5;//֧v50汾豸ȡ豸ƺ豸ƳչΪ64ֽ
+ public byte bySupport; //չλ0- ֧֣1- ֧
+ // bySupport & 0x1:
+ // bySupport & 0x2: 0-ֱ֧仯ϱ 1-ֱ֧仯ϱ
+ public byte byLoginMode; //¼ģʽ 0-Private¼ 1-ISAPI¼
+ public int dwOEMCode;
+ public int iResidualValidity; //ûʣЧλ죬ظֵʾѾʹã硰-3ʾѾʹ3족
+ public byte byResidualValidity; // iResidualValidityֶǷЧ0-Ч1-Ч
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 243, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int NET_DVR_DEV_ADDRESS_MAX_LEN = 129;
+ public const int NET_DVR_LOGIN_USERNAME_MAX_LEN = 64;
+ public const int NET_DVR_LOGIN_PASSWD_MAX_LEN = 64;
+
+ public delegate void LOGINRESULTCALLBACK(int lUserID, int dwResult, IntPtr lpDeviceInfo, IntPtr pUser);
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct NET_DVR_USER_LOGIN_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_DEV_ADDRESS_MAX_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDeviceAddress;
+ public byte byUseTransport;
+ public ushort wPort;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_LOGIN_USERNAME_MAX_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DVR_LOGIN_PASSWD_MAX_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;
+ public LOGINRESULTCALLBACK cbLoginResult;
+ public IntPtr pUser;
+ public bool bUseAsynLogin;
+ public byte byProxyType; //0:ʹô1ʹñ2ʹEHome
+ public byte byUseUTCTime; //0-תĬ,1-ӿȫʹUTCʱ,SDKUTCʱ豸ʱת,2-ӿȫʹƽ̨ʱ䣬SDKƽ̨ʱ豸ʱת
+ public byte byLoginMode; //0-Private, 1-ISAPI, 2-Ӧ
+ public byte byHttps; //0-tls1-ʹtls 2-Ӧ
+ public int iProxyID; //ţӴϢʱӦķ±ֵ
+ public byte byVerifyMode; //֤ʽ0-֤1-˫֤2-֤֤ʹTLSʱЧ;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 119, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ //sdk绷öٱԶ
+ public enum SDK_NETWORK_ENVIRONMENT
+ {
+ LOCAL_AREA_NETWORK = 0,
+ WIDE_AREA_NETWORK,
+ }
+
+ //ʾģʽ
+ public enum DISPLAY_MODE
+ {
+ NORMALMODE = 0,
+ OVERLAYMODE
+ }
+
+ //ģʽ
+ public enum SEND_MODE
+ {
+ PTOPTCPMODE = 0,
+ PTOPUDPMODE,
+ MULTIMODE,
+ RTPMODE,
+ RESERVEDMODE
+ }
+
+ //ץͼģʽ
+ public enum CAPTURE_MODE
+ {
+ BMP_MODE = 0, //BMPģʽ
+ JPEG_MODE = 1 //JPEGģʽ
+ }
+
+ //ʵʱģʽ
+ public enum REALSOUND_MODE
+ {
+ MONOPOLIZE_MODE = 1,//ռģʽ
+ SHARE_MODE = 2 //ģʽ
+ }
+
+ public struct NET_DVR_CLIENTINFO
+ {
+ public Int32 lChannel;//ͨ
+ public Int32 lLinkMode;//λ(31)Ϊ0ʾΪ1ʾ030λʾӷʽ: 0TCPʽ,1UDPʽ,2ಥʽ,3 - RTPʽ4-Ƶֿ(TCP)
+ public IntPtr hPlayWnd;//Ŵڵľ,ΪNULLʾͼ
+ public string sMultiCastIP;//ಥַ
+ }
+
+ //SDK״̬Ϣ(9000)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SDKSTATE
+ {
+ public uint dwTotalLoginNum;//ǰloginû
+ public uint dwTotalRealPlayNum;//ǰrealplay·
+ public uint dwTotalPlayBackNum;//ǰطŻ·
+ public uint dwTotalAlarmChanNum;//ǰͨ·
+ public uint dwTotalFormatNum;//ǰӲ̸ʽ·
+ public uint dwTotalFileSearchNum;//ǰ־ļ·
+ public uint dwTotalLogSearchNum;//ǰ־ļ·
+ public uint dwTotalSerialNum;//ǰͨ·
+ public uint dwTotalUpgradeNum;//ǰ·
+ public uint dwTotalVoiceComNum;//ǰת·
+ public uint dwTotalBroadCastNum;//ǰ㲥·
+ public uint dwTotalListenNum; //ǰ·
+ public uint dwEmailTestNum; //ǰʼ·
+ public uint dwBackupNum; // ǰļ·
+ public uint dwTotalInquestUploadNum; //ǰѶϴ·
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes;
+ }
+
+ //SDK֧Ϣ(9000)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SDKABL
+ {
+ public uint dwMaxLoginNum;//loginû MAX_LOGIN_USERS
+ public uint dwMaxRealPlayNum;//realplay· WATCH_NUM
+ public uint dwMaxPlayBackNum;//طŻ· WATCH_NUM
+ public uint dwMaxAlarmChanNum;//ͨ· ALARM_NUM
+ public uint dwMaxFormatNum;//Ӳ̸ʽ· SERVER_NUM
+ public uint dwMaxFileSearchNum;//ļ· SERVER_NUM
+ public uint dwMaxLogSearchNum;//־· SERVER_NUM
+ public uint dwMaxSerialNum;//ͨ· SERVER_NUM
+ public uint dwMaxUpgradeNum;//· SERVER_NUM
+ public uint dwMaxVoiceComNum;//ת· SERVER_NUM
+ public uint dwMaxBroadCastNum;//㲥· MAX_CASTNUM
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes;
+ }
+
+ //豸Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_ALARMER
+ {
+ public byte byUserIDValid;/* useridǷЧ 0-Ч1-Ч */
+ public byte bySerialValid;/* кǷЧ 0-Ч1-Ч */
+ public byte byVersionValid;/* 汾ǷЧ 0-Ч1-Ч */
+ public byte byDeviceNameValid;/* 豸ǷЧ 0-Ч1-Ч */
+ public byte byMacAddrValid; /* MACַǷЧ 0-Ч1-Ч */
+ public byte byLinkPortValid;/* login˿ǷЧ 0-Ч1-Ч */
+ public byte byDeviceIPValid;/* 豸IPǷЧ 0-Ч1-Ч */
+ public byte bySocketIPValid;/* socket ipǷЧ 0-Ч1-Ч */
+ public int lUserID; /* NET_DVR_Login()ֵ, ʱЧ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber;/* к */
+ public uint dwDeviceVersion;/* 汾Ϣ 16λʾ汾16λʾΰ汾*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDeviceName;/* 豸 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMacAddr;/* MACַ */
+ public ushort wLinkPort; /* link port */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDeviceIP;/* IPַ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSocketIP;/* ϴʱsocket IPַ */
+ public byte byIpProtocol; /* IpЭ 0-IPV4, 1-IPV6 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //Ӳʾ(ӽṹ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPLAY_PARA
+ {
+ public int bToScreen;
+ public int bToVideoOut;
+ public int nLeft;
+ public int nTop;
+ public int nWidth;
+ public int nHeight;
+ public int nReserved;
+ }
+
+ //ӲԤ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CARDINFO
+ {
+ public int lChannel;//ͨ
+ public int lLinkMode;//λ(31)Ϊ0ʾΪ1ʾӣ030λʾӷʽ:0TCPʽ,1UDPʽ,2ಥʽ,3 - RTPʽ4-绰ߣ5128k6256k7384k8512k
+ [MarshalAsAttribute(UnmanagedType.LPStr)]
+ public string sMultiCastIP;
+ public NET_DVR_DISPLAY_PARA struDisplayPara;
+ }
+
+ //¼ļ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_FIND_DATA
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 100)]
+ public string sFileName;//ļ
+ public NET_DVR_TIME struStartTime;//ļĿʼʱ
+ public NET_DVR_TIME struStopTime;//ļĽʱ
+ public uint dwFileSize;//ļĴС
+ }
+
+ //¼ļ(9000)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_FINDDATA_V30
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 100)]
+ public string sFileName;//ļ
+ public NET_DVR_TIME struStartTime;//ļĿʼʱ
+ public NET_DVR_TIME struStopTime;//ļĽʱ
+ public uint dwFileSize;//ļĴС
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sCardNum;
+ public byte byLocked;//9000豸֧,1ʾļѾ,0ʾļ
+ public byte byFileType; //ļ:0ʱ¼,1-ƶ 2
+ //3-|ƶ 4-&ƶ 5- 6-ֶ¼,78-9-ܱ10-PIR11-߱12-ȱ,14-ܽͨ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //¼ļ(cvr)
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_FINDDATA_V40
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 100)]
+ public string sFileName;//ļ
+ public NET_DVR_TIME struStartTime;//ļĿʼʱ
+ public NET_DVR_TIME struStopTime;//ļĽʱ
+ public uint dwFileSize;//ļĴС
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sCardNum;
+ public byte byLocked;//9000豸֧,1ʾļѾ,0ʾļ
+ public byte byFileType; //ļ:0ʱ¼,1-ƶ 2
+ //3-|ƶ 4-&ƶ 5- 6-ֶ¼,78-9-ܱ10-PIR11-߱12-ȱ,14-ܽͨ¼
+ public byte byQuickSearch; //0:ͨѯ1٣ѯ
+ public byte byRes;
+ public uint dwFileIndex; //ļ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ //¼ļ()
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_FINDDATA_CARD
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 100)]
+ public string sFileName;//ļ
+ public NET_DVR_TIME struStartTime;//ļĿʼʱ
+ public NET_DVR_TIME struStopTime;//ļĽʱ
+ public uint dwFileSize;//ļĴС
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sCardNum;
+ }
+
+ //¼ļṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FILECOND
+ {
+ public int lChannel;//ͨ
+ public uint dwFileType;//¼ļ0xffȫ0ʱ¼,1-ƶ 2
+ //3-|ƶ 4-&ƶ 5- 6-ֶ¼
+ public uint dwIsLocked;//Ƿ 0-ļ,1-ļ, 0xffʾļ
+ public uint dwUseCardNo;//Ƿʹÿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCardNumber;//
+ public NET_DVR_TIME struStartTime;//ʼʱ
+ public NET_DVR_TIME struStopTime;//ʱ
+ }
+
+ //̨ѡŴС(HIK ר)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POINT_FRAME
+ {
+ public int xTop;//ʼx
+ public int yTop;//y
+ public int xBottom;//x
+ public int yBottom;//y
+ public int bCounter;//
+ }
+
+ //Խ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSION_AUDIO
+ {
+ public byte byAudioEncType;//Ƶ 0-G722; 1-G711
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byres;//ﱣƵѹ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUDIOENC_INFO
+ {
+ public uint in_frame_size; /* һ֡ݴС(BYTES)GetInfoParam */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
+ public int[] reserved; /* */
+ }
+
+ // Ƶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUDIOENC_PROCESS_PARAM
+ {
+ public IntPtr in_buf; /* buf */
+ public IntPtr out_buf; /* buf */
+ public uint out_frame_size; /* һ֡BYTE */
+ public int g726enc_reset; /* ÿ */
+ public int g711_type; /* g711,0 - U law, 1- A law */
+ public int enc_mode; /* ƵģʽAMR */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
+ public int[] reserved; /* */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_AP_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = IW_ESSID_MAX_SIZE)]
+ public string sSsid;
+ public uint dwMode;/* 0 mange ģʽ;1 ad-hocģʽμNICMODE */
+ public uint dwSecurity; /*0 ܣ1 wepܣ2 wpa-psk;3 wpa-EnterpriseμWIFISECURITY*/
+ public uint dwChannel;/*1-11ʾ11ͨ*/
+ public uint dwSignalStrength;/*0-100źΪǿ*/
+ public uint dwSpeed;/*,λ0.01mbps*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AP_INFO_LIST
+ {
+ public uint dwSize;
+ public uint dwCount;/*AP20*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = WIFI_MAX_AP_COUNT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_AP_INFO[] struApInfo;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_WIFIETHERNET
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sIpAddress;/*IPַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sIpMask;/**/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr;/*ַֻʾ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] bRes;
+ public uint dwEnableDhcp;/*Ƿdhcp 0 1*/
+ public uint dwAutoDns;/*dhcpǷԶȡdns,0Զȡ 1ԶȡdhcpĿǰԶȡdns*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sFirstDns; /*һdns*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sSecondDns;/*ڶdns*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sGatewayIpAddr;/* صַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] bRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_EAP_TTLS
+ {
+ public byte byEapolVersion; //EAPOL汾0-汾11-汾2
+ public byte byAuthType; //ڲ֤ʽ0-PAP1-MSCHAPV2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnonyIdentity; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName; //û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassword; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ } //WPA-enterprise/WPA2-enterprisģʽ
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_EAP_PEAP
+ {
+ public byte byEapolVersion; //EAPOL汾0-汾11-汾2
+ public byte byAuthType; //ڲ֤ʽ0-GTC1-MD52-MSCHAPV2
+ public byte byPeapVersion; //PEAP汾0-汾01-汾1
+ public byte byPeapLabel; //PEAPǩ0-ϱǩ1-±ǩ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAnonyIdentity; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName; //û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassword; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ } //WPA-enterprise/WPA2-enterprisģʽ
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_EAP_TLS
+ {
+ public byte byEapolVersion; //EAPOL汾0-汾11-汾2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIdentity; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPrivateKeyPswd; //˽Կ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 76, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct WIFI_AUTH_PARAM
+ {
+ [FieldOffsetAttribute(0)]
+ public UNION_EAP_TTLS EAP_TTLS;//WPA-enterprise/WPA2-enterprisģʽ
+
+ [FieldOffsetAttribute(0)]
+ public UNION_EAP_PEAP EAP_PEAP; //WPA-enterprise/WPA2-enterprisģʽ
+
+ [FieldOffsetAttribute(0)]
+ public UNION_EAP_TLS EAP_TLS;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_WEP
+ {
+ public uint dwAuthentication;/*0 -ʽ 1-ʽ*/
+ public uint dwKeyLength;/* 0 -64λ1- 128λ2-152λ*/
+ public uint dwKeyType;/*0 16;1 ASCI */
+ public uint dwActive;/*0 0---3ʾһԿ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = WIFI_WEP_MAX_KEY_COUNT * WIFI_WEP_MAX_KEY_LENGTH)]
+ public string sKeyInfo;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_WPA_PSK
+ {
+ public uint dwKeyLength;/*8-63ASCIIַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = WIFI_WPA_PSK_MAX_KEY_LENGTH)]
+ public string sKeyInfo;
+ public byte byEncryptType;/*WPA/WPA2ģʽ¼,0-AES, 1-TKIP*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_WPA_WPA2
+ {
+ public byte byEncryptType; /*,0-AES, 1-TKIP*/
+ public byte byAuthType; //֤ͣ0-EAP_TTLS,1-EAP_PEAP,2-EAP_TLS
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public WIFI_AUTH_PARAM auth_param;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_WIFI_CFG_EX
+ {
+ public NET_DVR_WIFIETHERNET struEtherNet;/*wifi*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = IW_ESSID_MAX_SIZE)]
+ public string sEssid;/*SSID*/
+ public uint dwMode;/* 0 mange ģʽ;1 ad-hocģʽμ*/
+ public uint dwSecurity;/*0 ܣ1 wepܣ2 wpa-psk; */
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct key
+ {
+ [FieldOffsetAttribute(0)]
+ public UNION_WEP wep;
+
+ [FieldOffsetAttribute(0)]
+ public UNION_WPA_PSK wpa_psk;
+
+ [FieldOffsetAttribute(0)]
+ public UNION_WPA_WPA2 wpa_wpa2;//WPA-enterprise/WPA2-enterprisģʽ
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WIFI_CFG
+ {
+ public uint dwSize;
+ public NET_DVR_WIFI_CFG_EX struWifiCfg;
+ }
+
+ //wifi״̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WIFI_CONNECT_STATUS
+ {
+ public uint dwSize;
+ public byte byCurStatus; //1-ӣ2-δӣ3-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwErrorCode; // byCurStatus = 2ʱЧ,1-û,2-·,3-δ֪
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 244, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WIFI_WORKMODE
+ {
+ public uint dwSize;
+ public uint dwNetworkInterfaceMode;/*0 Զлģʽ1 ģʽ*/
+ }
+
+ //ܿϢ
+ public const int MAX_VCA_CHAN = 16;//ͨ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_CTRLINFO
+ {
+ public byte byVCAEnable;//Ƿ
+ public byte byVCAType;//ͣVCA_CHAN_ABILITY_TYPE
+ public byte byStreamWithVCA;//ǷϢ
+ public byte byMode;//ģʽVCA_CHAN_MODE_TYPE ,atmʱҪ
+ public byte byControlType; //ͣλʾ0-1-
+ // byControlType &1 ǷץĹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//Ϊ0
+ }
+
+ //ܿϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_CTRLCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VCA_CHAN, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_CTRLINFO[] struCtrlInfo;//Ϣ,0Ӧ豸ʼͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //豸
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_DEV_ABILITY
+ {
+ public uint dwSize;//ṹ
+ public byte byVCAChanNum;//ͨ
+ public byte byPlateChanNum;//ͨ
+ public byte byBBaseChanNum;//Ϊ
+ public byte byBAdvanceChanNum;//Ϊ
+ public byte byBFullChanNum;//Ϊ
+ public byte byATMChanNum;//ATM
+ public byte byPDCChanNum; //ͳͨ
+ public byte byITSChanNum; //ͨ¼ͨ
+ public byte byBPrisonChanNum; //Ϊ()ͨ
+ public byte byFSnapChanNum; //ץͨ
+ public byte byFSnapRecogChanNum; //ץĺʶͨ
+ public byte byFRetrievalChanNum; //
+ public byte bySupport; //λΪ0ʾ֧֣1ʾ֧
+ //bySupport & 0x1ʾǷ֧ 2012-3-22
+ //bySupport & 0x2ʾǷ֧128·ȡչ2012-12-27
+ public byte byFRecogChanNum; //ʶͨ
+ public byte byBPPerimeterChanNum; //Ϊ(ܽ)ͨ
+ public byte byTPSChanNum; //ͨյͨ
+ public byte byTFSChanNum; //·Υȡ֤ͨ
+ public byte byFSnapBFullChanNum; //ץĺ쳣Ϊʶͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 22, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //쳣Ϊʶ
+ public enum VCA_ABILITY_TYPE:uint
+ {
+ TRAVERSE_PLANE_ABILITY = 0x01, //Խ
+ ENTER_AREA_ABILITY = 0x02, //
+ EXIT_AREA_ABILITY = 0x04, //뿪
+ INTRUSION_ABILITY = 0x08, //
+ LOITER_ABILITY = 0x10, //ǻ
+ LEFT_TAKE_ABILITY = 0x20, //Ʒȡ
+ PARKING_ABILITY = 0x40, //ͣ
+ RUN_ABILITY = 0x80, //ƶ
+ HIGH_DENSITY_ABILITY = 0x100, //Աۼ
+ LF_TRACK_ABILITY = 0x200, //
+ VIOLENT_MOTION_ABILITY = 0x400, //˶
+ REACH_HIGHT_ABILITY = 0x800, //ʸ
+ GET_UP_ABILITY = 0x1000, //
+ LEFT_ABILITY = 0x2000, //Ʒ
+ TAKE_ABILITY = 0x4000, //Ʒȡ
+ LEAVE_POSITION = 0x8000, //ΣĿλ-
+ TRAIL_ABILITY = 0x10000, //β
+ KEY_PERSON_GET_UP_ABILITY = 0x20000, //صĿ
+ FALL_DOWN_ABILITY = 0x80000, //
+ AUDIO_ABNORMAL_ABILITY = 0x100000, //ǿͻ
+ ADV_REACH_HEIGHT_ABILITY = 0x200000, //ʸ
+ TOILET_TARRY_ABILITY = 0x400000, //Ŀʱ
+ YARD_TARRY_ABILITY = 0x800000, //ŷ糡
+ ADV_TRAVERSE_PLANE_ABILITY = 0x1000000, //߾
+ HUMAN_ENTER_ABILITY = 0x10000000, //˿ATM ,ֻATM_PANELģʽ֧
+ OVER_TIME_ABILITY = 0x20000000, //ʱ,ֻATM_PANELģʽ֧
+ STICK_UP_ABILITY = 0x40000000, //ֽ
+ INSTALL_SCANNER_ABILITY = 0x80000000 //װ
+ }
+
+ //ͨ
+ public enum VCA_CHAN_ABILITY_TYPE
+ {
+ VCA_BEHAVIOR_BASE = 1, //쳣Ϊʶ
+ VCA_BEHAVIOR_ADVANCE = 2, //쳣Ϊʶ
+ VCA_BEHAVIOR_FULL = 3, //쳣Ϊʶ
+ VCA_PLATE = 4, //
+ VCA_ATM = 5, //ATM
+ VCA_PDC = 6, //ͳ
+ VCA_ITS = 7, // ͨ¼
+ VCA_BEHAVIOR_PRISON = 8, //쳣Ϊʶ()
+ VCA_FACE_SNAP = 9, //ץ
+ VCA_FACE_SNAPRECOG = 10, //ץĺʶ
+ VCA_FACE_RETRIEVAL = 11, //
+ VCA_FACE_RECOG = 12, //ʶ
+ VCA_BEHAVIOR_PRISON_PERIMETER = 13, // 쳣Ϊʶ (ܽ)
+ VCA_TPS = 14, //ͨյ
+ VCA_TFS = 15, //·Υȡ֤
+ VCA_BEHAVIOR_FACESNAP = 16 //ץĺ쳣Ϊʶ
+ }
+
+ //ATMģʽ(ATM)
+ public enum VCA_CHAN_MODE_TYPE
+ {
+ VCA_ATM_PANEL = 0,//ATM
+ VCA_ATM_SURROUND = 1,//ATM
+ VCA_ATM_FACE = 2 //ATM
+ }
+ public enum TFS_CHAN_MODE_TYPE
+ {
+ TFS_CITYROAD = 0, //TFS е·
+ TFS_FREEWAY = 1 //TFS ٵ·
+ }
+
+ //쳣Ϊʶģʽ
+ public enum BEHAVIOR_SCENE_MODE_TYPE
+ {
+ BEHAVIOR_SCENE_DEFAULT = 0, //ϵͳĬ
+ BEHAVIOR_SCENE_WALL = 1, //Χǽ
+ BEHAVIOR_SCENE_INDOOR = 2 //
+ }
+
+ //ͨ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_CHAN_IN_PARAM
+ {
+ public byte byVCAType;//VCA_CHAN_ABILITY_TYPEöֵ
+ public byte byMode;//ģʽVCA_CHAN_MODE_TYPE ,atmʱҪ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//Ϊ0
+ }
+
+ //Ϊṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BEHAVIOR_ABILITY
+ {
+ public uint dwSize;//ṹ
+ public uint dwAbilityType;//ֵ֧ͣλʾVCA_ABILITY_TYPE
+ public byte byMaxRuleNum;//
+ public byte byMaxTargetNum;//Ŀ
+ public byte bySupport; // ֵ֧Ĺ λʾ
+ // bySupport & 0x01 ֱ֧궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //Ϊ0
+ }
+
+ // ͨṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ITS_ABILITY
+ {
+ public uint dwSize; // ṹС
+ public uint dwAbilityType; // ֵ֧б ITS_ABILITY_TYPE
+ public byte byMaxRuleNum; //
+ public byte byMaxTargetNum; //Ŀ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+ /***********************************end*******************************************/
+
+ /************************************ܲṹ*********************************/
+ //ܹýṹ
+ //ֵһ,ֵΪǰİٷֱȴС, ΪСλ
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_POINT
+ {
+ public float fX;// X, 0.001~1
+ public float fY;//Y, 0.001~1
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RECT
+ {
+ public float fX;//߽ϽǵX, 0.001~1
+ public float fY;//߽ϽǵY, 0.001~1
+ public float fWidth;//߽Ŀ, 0.001~1
+ public float fHeight;//߽ĸ߶, 0.001~1
+ }
+
+ //쳣Ϊʶ¼
+ public enum VCA_EVENT_TYPE : uint
+ {
+ VCA_TRAVERSE_PLANE = 0x1, //Խ
+ VCA_ENTER_AREA = 0x2, //Ŀ,֧
+ VCA_EXIT_AREA = 0x4, //Ŀ뿪,֧
+ VCA_INTRUSION = 0x8, //ܽ,֧
+ VCA_LOITER = 0x10, //ǻ,֧
+ VCA_LEFT_TAKE = 0x20, //Ʒȡ,֧
+ VCA_PARKING = 0x40, //ͣ,֧
+ VCA_RUN = 0x80, //ƶ,֧
+ VCA_HIGH_DENSITY = 0x100, //Աۼ,֧
+ VCA_VIOLENT_MOTION = 0x200, //˶
+ VCA_REACH_HIGHT = 0x400, //ʸ
+ VCA_GET_UP = 0x800, //
+ VCA_LEFT = 0x1000, //Ʒ
+ VCA_TAKE = 0x2000, //Ʒȡ
+ VCA_LEAVE_POSITION = 0x4000, //ΣĿλ-
+ VCA_TRAIL = 0x8000, //β
+ VCA_KEY_PERSON_GET_UP = 0x10000, //صĿ
+ VCA_FALL_DOWN = 0x80000, //ؼ
+ VCA_AUDIO_ABNORMAL = 0x100000, //ǿͻ
+ VCA_ADV_REACH_HEIGHT = 0x200000, //ʸ
+ VCA_TOILET_TARRY = 0x400000, //Ŀʱ
+ VCA_YARD_TARRY = 0x800000, //ŷ糡
+ VCA_ADV_TRAVERSE_PLANE = 0x1000000, //߾
+ VCA_HUMAN_ENTER = 0x10000000, //˿ATM ֻATM_PANELģʽ֧
+ VCA_OVER_TIME = 0x20000000, //ʱ ֻATM_PANELģʽ֧
+ VCA_STICK_UP = 0x40000000, //ֽ,֧
+ VCA_INSTALL_SCANNER = 0x80000000 //װ,֧
+ }
+
+ //쳣Ϊʶ¼չ
+ public enum VCA_RULE_EVENT_TYPE_EX : ushort
+ {
+ ENUM_VCA_EVENT_TRAVERSE_PLANE = 1, //Խ
+ ENUM_VCA_EVENT_ENTER_AREA = 2, //Ŀ,֧
+ ENUM_VCA_EVENT_EXIT_AREA = 3, //Ŀ뿪,֧
+ ENUM_VCA_EVENT_INTRUSION = 4, //ܽ,֧
+ ENUM_VCA_EVENT_LOITER = 5, //ǻ,֧
+ ENUM_VCA_EVENT_LEFT_TAKE = 6, //Ʒȡ,֧
+ ENUM_VCA_EVENT_PARKING = 7, //ͣ,֧
+ ENUM_VCA_EVENT_RUN = 8, //ƶ,֧
+ ENUM_VCA_EVENT_HIGH_DENSITY = 9, //Աۼ,֧
+ ENUM_VCA_EVENT_VIOLENT_MOTION = 10, //˶
+ ENUM_VCA_EVENT_REACH_HIGHT = 11, //ʸ
+ ENUM_VCA_EVENT_GET_UP = 12, //
+ ENUM_VCA_EVENT_LEFT = 13, //Ʒ
+ ENUM_VCA_EVENT_TAKE = 14, //Ʒȡ
+ ENUM_VCA_EVENT_LEAVE_POSITION = 15, //ΣĿλ-
+ ENUM_VCA_EVENT_TRAIL = 16, //β
+ ENUM_VCA_EVENT_KEY_PERSON_GET_UP = 17, //صĿ
+ ENUM_VCA_EVENT_FALL_DOWN = 20, //ؼ
+ ENUM_VCA_EVENT_AUDIO_ABNORMAL = 21, //ǿͻ
+ ENUM_VCA_EVENT_ADV_REACH_HEIGHT = 22, //ʸ
+ ENUM_VCA_EVENT_TOILET_TARRY = 23, //Ŀʱ
+ ENUM_VCA_EVENT_YARD_TARRY = 24, //ŷ糡
+ ENUM_VCA_EVENT_ADV_TRAVERSE_PLANE = 25, //߾
+ ENUM_VCA_EVENT_HUMAN_ENTER = 29, //˿ATM,ֻATM_PANELģʽ֧
+ ENUM_VCA_EVENT_OVER_TIME = 30, //ʱ,ֻATM_PANELģʽ֧
+ ENUM_VCA_EVENT_STICK_UP = 31, //ֽ,֧
+ ENUM_VCA_EVENT_INSTALL_SCANNER = 32 //װ,֧
+ }
+
+ //洩Խ
+ public enum VCA_CROSS_DIRECTION
+ {
+ VCA_BOTH_DIRECTION,// ˫
+ VCA_LEFT_GO_RIGHT,//
+ VCA_RIGHT_GO_LEFT,//
+ }
+
+ //߽ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_LINE
+ {
+ public NET_VCA_POINT struStart;//
+ public NET_VCA_POINT struEnd; //յ
+
+ // public void init()
+ // {
+ // struStart = new NET_VCA_POINT();
+ // struEnd = new NET_VCA_POINT();
+ // }
+ }
+
+ //ýṹᵼxamlʱûҵ
+ //ʱνṹ
+ //ͽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_POLYGON
+ {
+ /// DWORD->unsigned int
+ public uint dwPointNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = VCA_MAX_POLYGON_POINT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_POINT[] struPos;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TRAVERSE_PLANE
+ {
+ public NET_VCA_LINE struPlaneBottom;//ױ
+ public uint dwCrossDirection;//Խ: 0-˫1-ң2-ҵ
+ public byte bySensitivity;//ȣȡֵΧ[1,5] Smart IPCȡֵΧΪ[1,100]
+ public byte byPlaneHeight;//߶
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 38, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+
+ // public void init()
+ // {
+ // struPlaneBottom = new NET_VCA_LINE();
+ // struPlaneBottom.init();
+ // byRes2 = new byte[38];
+ // }
+ }
+
+ ///뿪
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_AREA
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ݱӳʱʶдͼƬIOһ£1뷢һ
+ //ֲ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_INTRUSION
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration;//ӳʱ: 1-120룬5룬жЧʱ
+ public byte bySensitivity; //ȲΧ[1-100]
+ public byte byRate; //ռȣδĿߴĿռıأһΪ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ǻ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_LOITER
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration;//ǻijʱ䣺1-120룬10
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ ///
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TAKE_LEFT
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration;///ijʱ䣺1-120룬10
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_PARKING
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration;//ͣʱ䣺1-120룬10
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ܲ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RUN
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public float fRunDistance;//˱, Χ: [0.1, 1.00]
+ public byte byRes1; // ֽ
+ public byte byMode; // 0 ģʽ 1 ʵģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Աۼ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_HIGH_DENSITY
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public float fDensity;//ܶȱ, Χ: [0.1, 1.0]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public ushort wDuration; // Աۼֵ 20-360s
+ }
+
+ //˶
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_VIOLENT_MOTION
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration; //˶ֵ1-50
+ public byte bySensitivity; //ȲΧ[1,5]
+ public byte byMode; //0-Ƶģʽ1-Ƶģʽ2-Ƶģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ʸ߲
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_REACH_HIGHT
+ {
+ public NET_VCA_LINE struVcaLine; //ʸ߾
+ public ushort wDuration; //ʸֵ߱1-120
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_GET_UP
+ {
+ public NET_VCA_POLYGON struRegion; //Χ
+ public ushort wDuration; //ֵ1-100
+ public byte byMode; //ģʽ,0-ͨģʽ,1-ߵģʽ,2-ͨģʽ
+ public byte bySensitivity; //ȲΧ[1,10]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ //Ʒ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_LEFT
+ {
+ public NET_VCA_POLYGON struRegion; // Χ
+ public ushort wDuration; // Ʒֵ 10-100
+ public byte bySensitivity; // ȲΧ[1,5]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ // Ʒȡ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TAKE
+ {
+ public NET_VCA_POLYGON struRegion; // Χ
+ public ushort wDuration; // Ʒȡֵ10-100
+ public byte bySensitivity; // ȲΧ[1,5]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_OVER_TIME
+ {
+ public NET_VCA_POLYGON struRegion; // Χ
+ public ushort wDuration; // ʱֵ 4s-60000s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_HUMAN_ENTER
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes; //ֽ
+ }
+
+ //ֽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_STICK_UP
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration;//ʱ䣺10-60룬10
+ public byte bySensitivity;//ȲΧ[1,5]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SCANNER
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration;//ʱ䣺10-60
+ public byte bySensitivity;//ȲΧ[1,5]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ΣĿλ-¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_LEAVE_POSITION
+ {
+ public NET_VCA_POLYGON struRegion; //Χ
+ public ushort wLeaveDelay; //˱ʱ䣬λsȡֵ1-1800
+ public ushort wStaticDelay; //˯ʱ䣬λsȡֵ1-1800
+ public byte byMode; //ģʽ0-ΣĿλ-¼1-ΣĿλ-˯¼2-ΣĿλ-˯¼
+ public byte byPersonType; //ֵͣ0-ֵڣ1-˫ֵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //β
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TRAIL
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wRes; /* */
+ public byte bySensitivity; /* ȲΧ[1,5] */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ز
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FALL_DOWN
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDuration; /* ¼ֵ 1-60s*/
+ public byte bySensitivity; /* ȲΧ[1,5] */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ǿͻ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_AUDIO_ABNORMAL
+ {
+ public ushort wDecibel; //ǿ
+ public byte bySensitivity; //ȲΧ[1,5]
+ public byte byAudioMode; //ģʽ0-ȼ⣬1-ֱֵ⣬2-ֱֵ
+ public byte byEnable; //ʹܣǷ
+ public byte byThreshold; //ֵ[0,100]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 54, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUDIO_EXCEPTION
+ {
+ public uint dwSize;
+ public byte byEnableAudioInException; //ʹܣǷ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_VCA_AUDIO_ABNORMAL struAudioAbnormal;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmSched; //ʱ
+ public NET_DVR_HANDLEEXCEPTION_V40 struHandleException; //쳣ʽ
+ public uint dwMaxRelRecordChanNum; //¼ͨ ֻ֧
+ public uint dwRelRecordChanNum; //¼ͨ ʵֵ֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[] byRelRecordChan;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TOILET_TARRY
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDelay; //Ŀʱʱ[1,3600]λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_YARD_TARRY
+ {
+ public NET_VCA_POLYGON struRegion;//Χ
+ public ushort wDelay; //ŷ糡ʱ[1,120]λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_ADV_REACH_HEIGHT
+ {
+ public NET_VCA_POLYGON struRegion; //ʸ
+ public uint dwCrossDirection; //Խ(VCA_CROSS_DIRECTION): 0-˫1-2-ҵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_ADV_TRAVERSE_PLANE
+ {
+ public NET_VCA_POLYGON struRegion; //
+ public uint dwCrossDirection; //Խ(VCA_CROSS_DIRECTION): 0-˫1-2-ҵ
+ public byte bySensitivity; //ȲΧ[1,5]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ //¼
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_VCA_EVENT_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.U4)]
+ public uint[] uLen;//
+
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_TRAVERSE_PLANE struTraversePlane;//Խ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_AREA struArea;///뿪
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_INTRUSION struIntrusion;//ֲ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_LOITER struLoiter;//ǻ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_TAKE_LEFT struTakeTeft;///
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_PARKING struParking;//ͣ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_RUN struRun;//ܲ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_HIGH_DENSITY struHighDensity;//Աۼ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_VIOLENT_MOTION struViolentMotion; //˶
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_REACH_HIGHT struReachHight; //ʸ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_GET_UP struGetUp; //
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_LEFT struLeft; //Ʒ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_TAKE struTake; // Ʒȡ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_HUMAN_ENTER struHumanEnter; //Ա
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_OVER_TIME struOvertime; //ʱ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_STICK_UP struStickUp;//ֽ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_SCANNER struScanner;//
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_LEAVE_POSITION struLeavePos; //ΣĿλ-ڲ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_TRAIL struTrail; //β
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_FALL_DOWN struFallDown; //ز
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_AUDIO_ABNORMAL struAudioAbnormal; //ǿͻ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_ADV_REACH_HEIGHT struReachHeight; //ʸ߲
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_TOILET_TARRY struToiletTarry; //Ŀʱ
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_YARD_TARRY struYardTarry; //ŷ糡
+ //[FieldOffsetAttribute(0)]
+ //public NET_VCA_ADV_TRAVERSE_PLANE struAdvTraversePlane;//߾
+ }
+
+ // ߴ
+ public enum SIZE_FILTER_MODE
+ {
+ IMAGE_PIX_MODE,//شС
+ REAL_WORLD_MODE,//ʵʴС
+ DEFAULT_MODE // Ĭģʽ
+ }
+
+ //ߴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SIZE_FILTER
+ {
+ public byte byActive;//Ƿߴ 0- 0-
+ public byte byMode;//ģʽSIZE_FILTER_MODE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//0
+ public NET_VCA_RECT struMiniRect;//СĿ,ȫ0ʾ
+ public NET_VCA_RECT struMaxRect;//Ŀ,ȫ0ʾ
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_ONE_RULE
+ {
+ public byte byActive;//Ƿ,0-,0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//Ϊ0ֶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName;//
+ public VCA_EVENT_TYPE dwEventType;//쳣Ϊʶ¼
+ public NET_VCA_EVENT_UNION uEventParam;//쳣Ϊʶ¼
+ public NET_VCA_SIZE_FILTER struSizeFilter;//ߴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType;//ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan;//¼ͨ,Ϊ1ʾͨ
+ }
+
+ //쳣Ϊʶýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RULECFG
+ {
+ public uint dwSize;//ṹ
+ public byte byPicProType;//ʱͼƬʽ 0- 0-ϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_JPEGPARA struPictureParam;//ͼƬṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RULE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_ONE_RULE[] struRule;//
+ }
+
+ //ߴ˲
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FILTER_STRATEGY
+ {
+ public byte byStrategy; //ߴ˲ 0 - 1-߶ȺͿȹ,2-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RULE_TRIGGER_PARAM
+ {
+ public byte byTriggerMode; //Ĵʽ0- ã1- 2- Ŀ
+ public byte byTriggerPoint; //㣬ʽΪʱЧ 0- ,1-,2-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public float fTriggerArea; //Ŀٷֱ [0,100]ʽΪĿʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_ONE_RULE_V41
+ {
+ public byte byActive; //Ƿ,0-,0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //Ϊ0ֶ
+ public ushort wEventTypeEx; //Ϊ¼չڴֶdwEventTypeοVCA_RULE_EVENT_TYPE_EX
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public uint dwEventType; //Ϊ¼ͣΪ˼ݣʹwEventTypeExȡ¼
+ public NET_VCA_EVENT_UNION uEventParam; //쳣Ϊʶ¼
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ,Ϊ1ʾͨ
+ public ushort wAlarmDelay; //ܱʱ0-5s,1-10,2-30s,3-60s,4-120s,5-300s,6-600s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ public NET_VCA_FILTER_STRATEGY struFilterStrategy; //ߴ˲
+ public NET_VCA_RULE_TRIGGER_PARAM struTriggerParam; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //쳣Ϊʶýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RULECFG_V41
+ {
+ public uint dwSize; //ṹ
+ public byte byPicProType; //ʱͼƬʽ 0- 0-ϴ
+ public byte byUpLastAlarm; //2011-04-06 Ƿϴһεı
+ public byte byPicRecordEnable; /*2012-3-1ǷͼƬ洢, 0-, 1-*/
+ public byte byRes1;
+ public NET_DVR_JPEGPARA struPictureParam; //ͼƬṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RULE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_ONE_RULE_V41[] struRule; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Ŀṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TARGET_INFO
+ {
+ public uint dwID;//ĿID ,Աܶȹ߱ʱΪ0
+ public NET_VCA_RECT struRect; //Ŀ߽
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ //ĹϢ, ĻϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RULE_INFO
+ {
+ public byte byRuleID;//ID,0-7
+ public byte byRes;//
+ public ushort wEventTypeEx; //Ϊ¼չڴֶdwEventTypeοVCA_RULE_EVENT_TYPE_EX
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName;//
+ public VCA_EVENT_TYPE dwEventType;//¼
+ public NET_VCA_EVENT_UNION uEventParam;//¼
+ }
+
+ //ǰ豸ַϢܷDZʾǰ豸ĵַϢ豸ʾĵַ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_DEV_INFO
+ {
+ public NET_DVR_IPADDR struDevIP;//ǰ豸ַ
+ public ushort wPort;//ǰ豸˿ںţ
+ public byte byChannel;//ǰ豸ͨ
+ public byte byIvmsChannel;// ֽ
+ }
+
+ //쳣Ϊʶϱṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_RULE_ALARM
+ {
+ public uint dwSize;//ṹ
+ public uint dwRelativeTime;//ʱ
+ public uint dwAbsTime;//ʱ
+ public NET_VCA_RULE_INFO struRuleInfo;//¼Ϣ
+ public NET_VCA_TARGET_INFO struTargetInfo;//ĿϢ
+ public NET_VCA_DEV_INFO struDevInfo;//ǰ豸Ϣ
+ public uint dwPicDataLen;//ͼƬij Ϊ0ʾûͼƬ0ʾýṹͼƬ*/
+ public byte byPicType; //0-ͨͼƬ 1-ԱͼƬ
+ public byte byRelAlarmPicNum; //ͨͼƬ
+ public byte bySmart;//IDS豸0(Ĭֵ)Smart Functiom Return 1
+ public byte byPicTransType; //ͼƬݴ䷽ʽ: 0-ƣ1-url
+ public uint dwAlarmID; //IDԱʶͨϱ0ʾЧ
+ public ushort wDevInfoIvmsChannelEx; //NET_VCA_DEV_INFObyIvmsChannelܱͬʾֵϿͻbyIvmsChannelܼݣ255¿ͻ˰汾ʹwDevInfoIvmsChannelEx
+ public byte byRelativeTimeFlag; //dwRelativeTimeֶǷЧ 0-Ч 1-ЧdwRelativeTimeʾUTCʱ
+ public byte byAppendInfoUploadEnabled; //Ϣϴʹ 0-ϴ 1-ϴ
+ public IntPtr pAppendInfo; //ָϢNET_VCA_APPEND_INFOָ룬byAppendInfoUploadEnabledΪ1ʱbyTimeDiffFlagΪ1ʱЧ
+ public IntPtr pImage;//ָͼƬָ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SYSTEM_TIME
+ {
+ public ushort wYear; //
+ public ushort wMonth; //
+ public ushort wDay; //
+ public ushort wHour; //ʱ
+ public ushort wMinute; //
+ public ushort wSecond; //
+ public ushort wMilliSec; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //豸֧AIƽ̨룬ϴƵ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_AIOP_VIDEO_HEAD
+ {
+ public uint dwSize; //dwSize = sizeof(NET_AIOP_VIDEO_HEAD)
+ public uint dwChannel; //豸ͨͨţ
+ public NET_DVR_SYSTEM_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szTaskID; //ƵIDƵɷ
+ public uint dwAIOPDataSize; //ӦAIOPDdataݳ
+ public uint dwPictureSize; //ӦͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szMPID; //ģͰIDƥAIOPļݽͨURI(GET /ISAPI/Intelligent/AIOpenPlatform/algorithmModel/management?format=json)ȡǰ豸صģͰlabel descriptionϢ
+ public IntPtr pBufferAIOPData; //AIOPDdata
+ public IntPtr pBufferPicture;//ӦͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 184, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //豸֧AIƽ̨룬ϴͼƬ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_AIOP_PICTURE_HEAD
+ {
+ public uint dwSize; //dwSize = sizeof(NET_AIOP_PICTURE_HEAD)
+ public NET_DVR_SYSTEM_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szPID; //·ͼƬIDͼƬɷ
+ public uint dwAIOPDataSize; //ӦAIOPDdataݳ
+ public byte byStatus; //״ֵ̬0-ɹ1-ͼƬС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szMPID; //ģͰIDƥAIOPļݽ
+ public IntPtr pBufferAIOPData;//AIOPDdata
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 184, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_AIOP_POLLING_VIDEO_HEAD
+ {
+ public uint dwSize; //dwSize = sizeof(NET_AIOP_POLLING_VIDEO_HEAD)
+ public uint dwChannel; //豸ͨͨ(SDKЭ)
+ public NET_DVR_SYSTEM_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szTaskID; //ѯץͼIDѯץͼɷ
+ public uint dwAIOPDataSize; //ӦAIOPDdataݳ
+ public uint dwPictureSize; //ӦͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szMPID; //ģͰIDƥAIOPļݽ
+ public IntPtr pBufferAIOPData;//AIOPDdata
+ public IntPtr pBufferPicture;//ӦͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 184, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_AIOP_POLLING_SNAP_HEAD
+ {
+ public uint dwSize; //dwSize = sizeof(NET_AIOP_POLLING_SNAP_HEAD)
+ public uint dwChannel; //豸ͨͨ(SDKЭ)
+ public NET_DVR_SYSTEM_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szTaskID; //ѯץͼIDѯץͼɷ
+ public uint dwAIOPDataSize; //ӦAIOPDdataݳ
+ public uint dwPictureSize; //ӦͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] szMPID; //ģͰIDƥAIOPļݽ
+ public IntPtr pBufferAIOPData;//AIOPDdata
+ public IntPtr pBufferPicture;//ͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 184, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //쳣ΪʶDSPϢӽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_DRAW_MODE
+ {
+ public uint dwSize;
+ public byte byDspAddTarget;//ǷĿ
+ public byte byDspAddRule;//Ƿӹ
+ public byte byDspPicAddTarget;//ץͼǷĿ
+ public byte byDspPicAddRule;//ץͼǷӹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //
+ public enum OBJECT_TYPE_ENUM
+ {
+ ENUM_OBJECT_TYPE_COAT = 1 //
+ }
+
+ //ɫṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OBJECT_COLOR_COND
+ {
+ public uint dwChannel; //ͨ
+ public uint dwObjType; //ͣμOBJECT_TYPE_ENUM
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ͼƬ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PIC
+ {
+ public byte byPicType; //ͼƬͣ1-jpg
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwPicWidth; //ͼƬ
+ public uint dwPicHeight; //ͼƬ߶
+ public uint dwPicDataLen; //ͼƬʵʴС
+ public uint dwPicDataBuffLen; //ͼƬݻС
+ public IntPtr byPicDataBuff; //ͼƬݻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ɫ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OBJECT_COLOR_UNION
+ {
+ public NET_DVR_COLOR struColor; //ɫֵ
+ public NET_DVR_PIC struPicture; //ͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ɫṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OBJECT_COLOR
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; //0-ã1-
+ public byte byColorMode; //ȡɫʽ1-ɫֵ2-ͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_OBJECT_COLOR_UNION uObjColor; //ɫ壬ȡֵȡɫʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //
+ public enum AREA_TYPE_ENUM
+ {
+ ENUM_OVERLAP_REGION = 1,//ͬ
+ ENUM_BED_LOCATION = 2 //λ
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUXAREA
+ {
+ public uint dwAreaType; //ͣμAREA_TYPE_ENUM
+ public byte byEnable; //0-ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_VCA_POLYGON struPolygon; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //б
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUXAREA_LIST
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AUXAREA_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_AUXAREA[] struArea; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ͨģʽ
+ public enum CHAN_WORKMODE_ENUM
+ {
+ ENUM_CHAN_WORKMODE_INDEPENDENT = 1, //ģʽ
+ ENUM_CHAN_WORKMODE_MASTER = 2, //ģʽ
+ ENUM_CHAN_WORKMODE_SLAVE = 3 //ģʽ
+ }
+
+ //ͨģʽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHANNEL_WORKMODE
+ {
+ public uint dwSize; //ṹС
+ public byte byWorkMode; //ģʽμCHAN_WORKMODE_ENUM
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 63, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //豸ͨṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHANNEL
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAddress; //豸IP
+ public ushort wDVRPort; //˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; //û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; //
+ public uint dwChannel; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ͨϢ
+ [StructLayout(LayoutKind.Explicit)]
+ public struct NET_DVR_SLAVE_CHANNEL_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 152, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //С
+ }
+
+ //ͨṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SLAVE_CHANNEL_PARAM
+ {
+ public byte byChanType; //ͨͣ1-ͨ2-Զͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_SLAVE_CHANNEL_UNION uSlaveChannel; //ͨ壬ȡֵbyChanType
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+
+ //ͨýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SLAVE_CHANNEL_CFG
+ {
+ public uint dwSize; //ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SLAVE_CHANNEL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SLAVE_CHANNEL_PARAM[] struChanParam;//ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Ƶϼ¼
+ public enum VQD_EVENT_ENUM
+ {
+ ENUM_VQD_EVENT_BLUR = 1, //ͼģ
+ ENUM_VQD_EVENT_LUMA = 2, //쳣
+ ENUM_VQD_EVENT_CHROMA = 3, //ͼƫɫ
+ ENUM_VQD_EVENT_SNOW = 4, //ѩ
+ ENUM_VQD_EVENT_STREAK = 5, //Ƹ
+ ENUM_VQD_EVENT_FREEZE = 6, //涳
+ ENUM_VQD_EVENT_SIGNAL_LOSS = 7, //źŶʧ
+ ENUM_VQD_EVENT_PTZ = 8, //̨ʧ
+ ENUM_VQD_EVENT_SCNENE_CHANGE = 9, //ͻ
+ ENUM_VQD_EVENT_VIDEO_ABNORMAL = 10, //Ƶ쳣
+ ENUM_VQD_EVENT_VIDEO_BLOCK = 11, //Ƶڵ
+ }
+
+ //Ƶ¼ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VQD_EVENT_COND
+ {
+ public uint dwChannel; //ͨ
+ public uint dwEventType; //¼ͣμVQD_EVENT_ENUM
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Ƶ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VQD_EVENT_PARAM
+ {
+ public byte byThreshold; //ֵΧ[0,100]
+ public byte byTriggerMode; //1-2-δ
+ public byte byUploadPic; //0-ϴͼƬ1-ϴͼƬǷϴͼƬºԴ豸ȡ¼ӦµһűͼƬμӿNET_DVR_StartDownload
+ public byte byRes1; //
+ public uint dwTimeInterval; //ʱΧ[0,3600] λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //Ƶ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VQD_EVENT_RULE
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; //0-ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_VQD_EVENT_PARAM struEventParam; //Ƶ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IVMS_IP_CHANNEL, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ1ʾͨ0ʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BASELINE_SCENE
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; //0-ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 63, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CONTROL_BASELINE_SCENE_PARAM
+ {
+ public uint dwSize; //ṹС
+ public uint dwChannel; //ͨ
+ public byte byCommand; //ͣ1-ֶαݲʹã2-»
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 127, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Ƶϱṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VQD_ALARM
+ {
+ public uint dwSize; //ṹС
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public uint dwEventType; //¼ͣοVQD_EVENT_ENUM
+ public float fThreshold; //ֵ[0.000,1.000]
+ public uint dwPicDataLen; //ͼƬȣΪ0ʾûͼƬ
+ public IntPtr pImage; //ָͼƬָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //궨ӽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CB_POINT
+ {
+ public NET_VCA_POINT struPoint; //궨㣬ǹ
+ public NET_DVR_PTZPOS struPtzPos; //PTZ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //궨ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRACK_CALIBRATION_PARAM
+ {
+ public byte byPointNum; //Ч궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CALIB_PT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CB_POINT[] struCBPoint; //궨
+ }
+
+ //ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRACK_CFG
+ {
+ public uint dwSize; //ṹ
+ public byte byEnable; //궨ʹ
+ public byte byFollowChan; // ƵĴͨ
+ public byte byDomeCalibrate; //궨1 0
+ public byte byRes; // ֽ
+ public NET_DVR_TRACK_CALIBRATION_PARAM struCalParam; //궨
+ }
+
+ //ģʽ
+ public enum TRACK_MODE
+ {
+ MANUAL_CTRL = 0, //ֶ
+ ALARM_TRACK //
+ }
+
+ //ֶƽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MANUAL_CTRL_INFO
+ {
+ public NET_VCA_POINT struCtrlPoint;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ģʽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRACK_MODE
+ {
+ public uint dwSize; //ṹ
+ public byte byTrackMode; //ģʽ
+ public byte byRuleConfMode; //ģʽ0-ã1-Զ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //0
+ [StructLayout(LayoutKind.Explicit)]
+ public struct uModeParam
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwULen;
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARM_JPEG
+ {
+ public byte byPicProType; /*ʱͼƬʽ 0- 1-ϴ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ public NET_DVR_JPEGPARA struPicParam; /*ͼƬṹ*/
+ }
+
+ //쳣Ϊʶṹ
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_ONE_RULE
+ {
+ public byte byActive;/* Ƿ,0-, 0- */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//Ϊ0ֶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName;//
+ public VCA_EVENT_TYPE dwEventType;//쳣Ϊʶ¼
+ public NET_VCA_EVENT_UNION uEventParam;//쳣Ϊʶ¼
+ public NET_VCA_SIZE_FILTER struSizeFilter;//ߴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 68, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;/*Ϊ0*/
+ }
+
+ // ǹṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_RULECFG
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RULE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_IVMS_ONE_RULE[] struRule; //
+ }
+
+ // IVMS쳣Ϊʶýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_BEHAVIORCFG
+ {
+ public uint dwSize;
+ public byte byPicProType;//ʱͼƬʽ 0- 0-ϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_JPEGPARA struPicParam;//ͼƬṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_IVMS_RULECFG[] struRuleCfg;//ÿʱζӦ
+ }
+
+ //ܷȡƻӽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_DEVSCHED
+ {
+ public NET_DVR_SCHEDTIME struTime;//ʱ
+ public NET_DVR_PU_STREAM_CFG struPUStream;//ǰȡ
+ }
+
+ //ܷDzýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_STREAMCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_IVMS_DEVSCHED[] struDevSched;//ʱǰȡԼϢ
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_MASK_REGION
+ {
+ public byte byEnable;//Ƿ, 0-0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//0
+ public NET_VCA_POLYGON struPolygon;//ζ
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_MASK_REGION_LIST
+ {
+ public uint dwSize;//ṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_MASK_REGION_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_MASK_REGION[] struMask;//
+ }
+
+ //ATM
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_ENTER_REGION
+ {
+ public uint dwSize;
+ public byte byEnable;//Ƿ0-0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_VCA_POLYGON struPolygon;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //IVMS
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_MASK_REGION_LIST
+ {
+ public uint dwSize;//ṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_MASK_REGION_LIST[] struList;
+ }
+
+ //IVMSATM
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_ENTER_REGION
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_ENTER_REGION[] struEnter;//
+ }
+
+ // ivms ͼƬϴṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_ALARM_JPEG
+ {
+ public byte byPicProType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_JPEGPARA struPicParam;
+ }
+
+ // IVMS
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_IVMS_SEARCHCFG
+ {
+ public uint dwSize;
+ public NET_DVR_MATRIX_DEC_REMOTE_PLAY struRemotePlay;// Զ̻ط
+ public NET_IVMS_ALARM_JPEG struAlarmJpeg;// ϴͼƬ
+ public NET_IVMS_RULECFG struRuleCfg;//IVMS Ϊ
+ }
+
+ /************************************end******************************************/
+ //NAS֤
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IDENTIFICATION_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /* û 32*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /* 16*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_MOUNT_PARAM_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 52, ArraySubType = UnmanagedType.I1)]
+ public byte[] uLen; //ṹС
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NAS_MOUNT_PARAM
+ {
+ public byte byMountType; //0,1~NFS, 2~ SMB/CIFS
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_MOUNT_PARAM_UNION uMountParam;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_MOUNTMETHOD_PARAM_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 56, ArraySubType = UnmanagedType.I1)]
+ public byte[] uLen; //ṹС
+ }
+
+ //Ӳ̽ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLE_NET_DISK_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ public NET_DVR_IPADDR struNetDiskAddr;//Ӳ̵ַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PATHNAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDirectory;// PATHNAME_LEN = 128
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 68, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//
+ }
+
+ public const int MAX_NET_DISK = 16;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NET_DISKCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NET_DISK, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_NET_DISK_INFO[] struNetDiskParam;
+ }
+
+ //¼
+ //
+ public enum MAIN_EVENT_TYPE
+ {
+ EVENT_MOT_DET = 0,//ƶ
+ EVENT_ALARM_IN = 1,//
+ EVENT_VCA_BEHAVIOR = 2,//쳣Ϊʶ
+ EVENT_INQUEST = 3, //Ѷ¼
+ EVENT_VCA_DETECTION = 4, //
+ EVENT_STREAM_INFO = 100 //IDϢ
+ }
+
+ public const int INQUEST_START_INFO = 0x1001; /*ѶʿʼϢ*/
+ public const int INQUEST_STOP_INFO = 0x1002; /*ѶֹͣϢ*/
+ public const int INQUEST_TAG_INFO = 0x1003; /*صϢ*/
+ public const int INQUEST_SEGMENT_INFO = 0x1004; /*ѶƬ״̬Ϣ*/
+
+ public enum VCA_DETECTION_MINOR_TYPE:uint
+ {
+ EVENT_VCA_TRAVERSE_PLANE = 1, //Խ
+ EVENT_FIELD_DETECTION, //
+ EVENT_AUDIO_INPUT_ALARM, //Ƶ쳣
+ EVENT_SOUND_INTENSITY_ALARM, //ǿͻ
+ EVENT_FACE_DETECTION, //
+ EVENT_VIRTUAL_FOCUS_ALARM, /*齹*/
+ EVENT_SCENE_CHANGE_ALARM, /**/
+ EVENT_ALL = 0xffffffff //ʾȫ
+ }
+
+ //쳣ΪʶͶӦĴͣ 0xffffʾȫ
+ public enum BEHAVIOR_MINOR_TYPE
+ {
+ EVENT_TRAVERSE_PLANE = 0,// Խ,
+ EVENT_ENTER_AREA,//Ŀ,֧
+ EVENT_EXIT_AREA,//Ŀ뿪,֧
+ EVENT_INTRUSION,// ܽ,֧
+ EVENT_LOITER,//ǻ,֧
+ EVENT_LEFT_TAKE,//,֧
+ EVENT_PARKING,//ͣ,֧
+ EVENT_RUN,//,֧
+ EVENT_HIGH_DENSITY,//Աܶ,֧
+ EVENT_STICK_UP,//ֽ,֧
+ EVENT_INSTALL_SCANNER,//װ,֧
+ EVENT_OPERATE_OVER_TIME, // ʱ
+ EVENT_FACE_DETECT, // 쳣
+ EVENT_LEFT, // Ʒ
+ EVENT_TAKE, // Ʒȡ
+ EVENT_LEAVE_POSITION, //ΣĿλ-¼
+ EVENT_TRAIL_INFO = 16, //β
+ EVENT_FALL_DOWN_INFO = 19, //
+ EVENT_OBJECT_PASTE = 20, // ճ
+ EVENT_FACE_CAPTURE_INFO = 21, //
+ EVENT_MULTI_FACES_INFO = 22, //
+ EVENT_AUDIO_ABNORMAL_INFO = 23, //ǿͻ
+ EVENT_DETECT = 24 //
+ }
+
+ // 100ӦС
+ public enum STREAM_INFO_MINOR_TYPE
+ {
+ EVENT_STREAM_ID = 0, // ID
+ EVENT_TIMING = 1, // ʱ¼
+ EVENT_MOTION_DETECT = 2, // ƶ
+ EVENT_ALARM = 3, // ¼
+ EVENT_ALARM_OR_MOTION_DETECT = 4, // ƶ
+ EVENT_ALARM_AND_MOTION_DETECT = 5, // ƶ
+ EVENT_COMMAND_TRIGGER = 6, //
+ EVENT_MANNUAL = 7, // ֶ¼
+ EVENT_BACKUP_VOLUME = 8 // 浵¼
+ }
+
+ //ŵCVR
+ public const int MAX_ID_COUNT = 256;
+ public const int MAX_STREAM_ID_COUNT = 1024;
+ public const int STREAM_ID_LEN = 32;
+ public const int PLAN_ID_LEN = 32;
+
+ // Ϣ - 72ֽڳ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STREAM_INFO
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = STREAM_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byID; //ID
+ public uint dwChannel; //豸ͨ0xffffffffʱʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public void Init()
+ {
+ byID = new byte[STREAM_ID_LEN];
+ byRes = new byte[32];
+ }
+ }
+
+ //¼ 200-04-07 9000_1.1
+ public const int SEARCH_EVENT_INFO_LEN = 300;
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_ALARM_BYBIT
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmInNo;//ţbyAlarmInNo[0]1ʾɱ1¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SEARCH_EVENT_INFO_LEN - MAX_ALARMIN_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byAlarmInNo = new byte[MAX_ALARMIN_V30];
+ byRes = new byte[SEARCH_EVENT_INFO_LEN - MAX_CHANNUM_V30];
+ }
+ }
+
+ // ֵʾ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_ALARM_BYVALUE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wAlarmInNo;//ţbyAlarmInNo[0]1ʾɱ1¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ wAlarmInNo = new ushort[128];
+ byRes = new byte[44];
+ }
+ }
+
+ //ƶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_MOTION_BYBIT
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMotDetChanNo;//ƶͨbyMotDetChanNo[0]1ʾͨ1ƶⴥ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SEARCH_EVENT_INFO_LEN - MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byMotDetChanNo = new byte[MAX_CHANNUM_V30];
+ byRes = new byte[SEARCH_EVENT_INFO_LEN - MAX_CHANNUM_V30];
+ }
+ }
+
+ //ƶ--ֵ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_MOTION_BYVALUE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wMotDetChanNo;//ţbyAlarmInNo[0]1ʾɱ1¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 172, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ wMotDetChanNo = new ushort[64];
+ byRes = new byte[172];
+ }
+ }
+
+ //쳣Ϊʶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_VCA_BYBIT
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byChanNo;//¼ͨ
+ public byte byRuleID;//ID0xffʾȫ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 235, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+
+ public void init()
+ {
+ byChanNo = new byte[MAX_CHANNUM_V30];
+ byRes1 = new byte[235];
+ }
+ }
+
+ //쳣Ϊʶ--ֵʽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_VCA_BYVALUE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wChanNo; //¼ͨ
+ public byte byRuleID; //쳣Ϊʶͣ0xffʾȫ0ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 171, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /**/
+ public void init()
+ {
+ wChanNo = new ushort[64];
+ byRes = new byte[171];
+ }
+ }
+
+ //Ѷ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_INQUEST_PARAM
+ {
+ public byte byRoomIndex; //Ѷұ,1ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 299, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public void init()
+ {
+ byRes = new byte[299];
+ }
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_VCADETECT_BYBIT
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byChan;//ͨţ±ʾbyChan[0]1ʾͨ1ƶⴥ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public void init()
+ {
+ byChan = new byte[256];
+ byRes = new byte[44];
+ }
+ }
+
+ // ͨŰֵʾ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_VCADETECT_BYVALUE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30-1, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwChanNo;// ͨ,ֵʾ0xffffffffЧҺҲʾЧֵ
+ public byte byAll;//0-ʾȫ1-ʾȫ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 47, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ dwChanNo = new uint[MAX_CHANNUM_V30 - 1];
+ byRes = new byte[47];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_STREAMID_PARAM
+ {
+ public NET_DVR_STREAM_INFO struIDInfo; // idϢ72ֽڳ
+ public uint dwCmdType; // ⲿͣNVRƴ洢ʹ
+ public byte byBackupVolumeNum; //浵ţCVRʹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 223, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ struIDInfo.Init();
+ byRes = new byte[223];
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct SEARCH_EVENT_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SEARCH_EVENT_INFO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLen;
+ /* [FieldOffsetAttribute(0)]
+ public EVENT_ALARM_BYBIT struAlarmParam;
+ [FieldOffsetAttribute(0)]
+ public EVENT_ALARM_BYVALUE struAlarmParamByValue;
+ [FieldOffsetAttribute(0)]
+ public EVENT_MOTION_BYBIT struMotionParam;
+ [FieldOffsetAttribute(0)]
+ public EVENT_MOTION_BYVALUE struMotionParamByValue;
+ [FieldOffsetAttribute(0)]
+ public EVENT_VCA_BYBIT struVcaParam;
+ [FieldOffsetAttribute(0)]
+ public EVENT_VCA_BYVALUE struVcaParamByValue;
+ [FieldOffsetAttribute(0)]
+ public EVENT_INQUEST_PARAM struInquestParam;
+ [FieldOffsetAttribute(0)]
+ public EVENT_VCADETECT_BYBIT struVCADetectByBit;
+ [FieldOffsetAttribute(0)]
+ public EVENT_VCADETECT_BYVALUE struVCADetectByValue;
+ [FieldOffsetAttribute(0)]
+ public EVENT_STREAMID_PARAM struStreamIDParam;
+ * */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SEARCH_EVENT_PARAM
+ {
+ public ushort wMajorType;//0-ƶ⣬1-, 2-¼
+ public ushort wMinorType;//- ͱ仯0xffffʾȫ
+ public NET_DVR_TIME struStartTime;//Ŀʼʱ䣬ֹͣʱ: ͬʱΪ(0, 0) ʾʱ俪ʼǰ4000¼
+ public NET_DVR_TIME struEndTime;
+ public byte byLockType; // 0xff-ȫ0-δ1-
+ public byte byValue; //0-λʾ1-ֵʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 130, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ public SEARCH_EVENT_UNION uSeniorPara;
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_ALARM_RET
+ {
+ public uint dwAlarmInNo;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SEARCH_EVENT_INFO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byRes = new byte[SEARCH_EVENT_INFO_LEN];
+ }
+ }
+ //ƶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_MOTION_RET
+ {
+ public uint dwMotDetNo;//ƶͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SEARCH_EVENT_INFO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byRes = new byte[SEARCH_EVENT_INFO_LEN];
+ }
+ }
+ //쳣Ϊʶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_VCA_RET
+ {
+ public uint dwChanNo;//¼ͨ
+ public byte byRuleID;//ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName;//
+ public NET_VCA_EVENT_UNION uEvent;//Ϊ¼wMinorType = VCA_EVENT_TYPE¼
+
+ public void init()
+ {
+ byRes1 = new byte[3];
+ byRuleName = new byte[NAME_LEN];
+ }
+ }
+
+ //Ѷ¼ѯ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_INQUEST_RET
+ {
+ public byte byRoomIndex; //Ѷұ,1ʼ
+ public byte byDriveIndex; //¼,1ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwSegmentNo; //ƬڱѶе,1ʼ
+ public ushort wSegmetSize; //ƬϵĴС, λM
+ public ushort wSegmentState; //Ƭ״̬ 0 ¼1 ¼쳣2 ¼Ѷ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 288, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+
+ public void init()
+ {
+ byRes1 = new byte[6];
+ byRes2 = new byte[288];
+ }
+ }
+
+ //id¼ѯ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct EVENT_STREAMID_RET
+ {
+ public uint dwRecordType; //¼ 0-ʱ¼ 1-ƶ 2-¼ 3-|ƶ 4-&ƶ 5- 6-ֶ¼ 7- 8- 9-ܱ 10-ش¼
+ public uint dwRecordLength; //¼С
+ public byte byLockFlag; // ־ 0û 1
+ public byte byDrawFrameType; // 0dz֡¼ 1֡¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFileName; //ļ
+ public uint dwFileIndex; // 浵ϵļ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byRes1 = new byte[2];
+ byFileName = new byte[NAME_LEN];
+ byRes = new byte[256];
+ }
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct SEARCH_EVENT_RET
+ {
+ [FieldOffset(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 304, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEventRetUnion;
+ /*
+ [FieldOffset(0)]
+ public EVENT_ALARM_RET struAlarmRet;
+ [FieldOffset(0)]
+ public EVENT_MOTION_RET struMotionRet;
+ [FieldOffset(0)]
+ public EVENT_VCA_RET struVcaRet;
+ [FieldOffset(0)]
+ public EVENT_INQUEST_RET struInquestRet;
+ [FieldOffset(0)]
+ public EVENT_STREAMID_RET struStreamIDRet;
+ * */
+ }
+ //ҷؽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SEARCH_EVENT_RET
+ {
+ public ushort wMajorType;//MA
+ public ushort wMinorType;//
+ public NET_DVR_TIME struStartTime;//¼ʼʱ
+ public NET_DVR_TIME struEndTime;//¼ֹͣʱ䣬¼ʱͿʼʱһ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byChan;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public SEARCH_EVENT_RET uSeniorRet;
+
+ public void init()
+ {
+ byChan = new byte[MAX_CHANNUM_V30];
+ byRes = new byte[36];
+ }
+ }
+
+ //SDK_V35 2009-10-26
+
+ // 궨
+ public enum tagCALIBRATE_TYPE
+ {
+ PDC_CALIBRATE = 0x01, // PDC 궨
+ BEHAVIOR_OUT_CALIBRATE = 0x02, //Ϊⳡ궨
+ BEHAVIOR_IN_CALIBRATE = 0x03, // Ϊڳ궨
+ ITS_CALBIRETE = 0x04 // ͨ¼궨
+ }
+
+ public const int MAX_RECT_NUM = 6;
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECT_LIST
+ {
+ public byte byRectNum; // οĸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RECT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_RECT[] struVcaRect; // Ϊ6Rect
+ }
+
+ // PDC 궨
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_CALIBRATION
+ {
+ public NET_DVR_RECT_LIST struRectList; // 궨οб
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 120, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ // 궨ߵʾǰ궨ʵʱʾǸ߶dzߡ
+ public enum LINE_MODE
+ {
+ HEIGHT_LINE, //߶
+ LENGTH_LINE //
+ }
+ /*ñ궨ϢʱӦλʹܣزûʹܣ궨Իȡص*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAMERA_PARAM
+ {
+ public byte byEnableHeight; // Ƿʹ߶
+ public byte byEnableAngle; // ǷʹǶ
+ public byte byEnableHorizon; // Ƿʹƽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ public float fCameraHeight; // ߶
+ public float fCameraAngle; // Ƕ
+ public float fHorizon; // еĵƽ
+ }
+
+ /*fValueʾĿ߶ȵʱstruStartPointstruEndPointֱʾĿͷͽŲ㡣
+ * fValueʾ߶γȵʱstruStartPointstruEndPointֱʾ߶ʼյ㣬
+ * modeʾǰ߱ʾ߶dzߡ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LINE_SEGMENT
+ {
+ public byte byLineMode; // LINE_MODE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ public NET_VCA_POINT struStartPoint;
+ public NET_VCA_POINT struEndPoint;
+ public float fValue;
+ }
+
+ public const int MAX_LINE_SEG_NUM = 8;
+
+ /*궨ĿǰҪ4-8ߣԻȡز*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BEHAVIOR_OUT_CALIBRATION
+ {
+ public uint dwLineSegNum; // ߸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LINE_SEG_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_LINE_SEGMENT[] struLineSegment; //
+ public NET_DVR_CAMERA_PARAM struCameraParam; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*ýṹʾIASܿ궨аһĿһӦĸ߶ȱ궨ߣ
+ * ĿΪվӾο߶ʶͷ㵽ŵı궨ߣùһʾ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IN_CAL_SAMPLE
+ {
+ public NET_VCA_RECT struVcaRect; // Ŀ
+ public NET_DVR_LINE_SEGMENT struLineSegment; // ߶ȱ궨
+ }
+
+ public const int MAX_SAMPLE_NUM = 5;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BEHAVIOR_IN_CALIBRATION
+ {
+ public uint dwCalSampleNum; // 궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SAMPLE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IN_CAL_SAMPLE[] struCalSample; // 궨
+ public NET_DVR_CAMERA_PARAM struCameraParam; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int CALIB_PT_NUM = 4;
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ITS_CALIBRATION
+ {
+ public uint dwPointNum; //궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CALIB_PT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_POINT[] struPoint; //ͼ
+ public float fWidth;
+ public float fHeight;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ }
+
+ // 궨
+ // ر궨Էڸýṹ
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_CALIBRATION_PRARM_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 240, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ṹС
+ /*[FieldOffsetAttribute(0)]
+ public NET_DVR_PDC_CALIBRATION struPDCCalibration; //PDC 궨
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_BEHAVIOR_OUT_CALIBRATION struBehaviorOutCalibration; // Ϊⳡ궨 ҪӦIVS
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_BEHAVIOR_IN_CALIBRATION struBehaviorInCalibration; // Ϊڳ궨ҪӦIAS
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_ITS_CALIBRATION struITSCalibration;
+ * */
+ }
+
+ // 궨ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CALIBRATION_CFG
+ {
+ public uint dwSize; //궨ṹС
+ public byte byEnable; // Ƿñ궨
+ public byte byCalibrationType; // 궨 ݲͬѡͬı궨 οCALIBRATE_TYPE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_CALIBRATION_PRARM_UNION uCalibrateParam; // 궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ͳƷṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_ENTER_DIRECTION
+ {
+ public NET_VCA_POINT struStartPoint; //ͳƷʼ
+ public NET_VCA_POINT struEndPoint; // ͳƷ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_RULE_CFG
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; // Ƿ;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_VCA_POLYGON struPolygon; //
+ public NET_DVR_PDC_ENTER_DIRECTION struEnterDirection; // 뷽
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_RULE_CFG_V41
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; // Ƿ;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_VCA_POLYGON struPolygon; //
+ public NET_DVR_PDC_ENTER_DIRECTION struEnterDirection; // 뷽
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME struAlarmTime;//ʱ
+ public NET_DVR_TIME_EX struDayStartTime; //쿪ʼʱ䣬ʱЧ
+ public NET_DVR_TIME_EX struNightStartTime; //ҹʼʱ䣬ʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ðϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRIAL_VERSION_CFG
+ {
+ public uint dwSize;
+ public ushort wReserveTime; //ʣʱ䣬0xffffʾЧλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SYN_CHANNEL_NAME_PARAM
+ {
+ public uint dwSize;
+ public uint dwChannel; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIME_SEGMENT
+ {
+ public NET_DVR_SIMPLE_DAYTIME struBeginTime; //begin time
+ public NET_DVR_SIMPLE_DAYTIME struEndTime; //end time
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLE_PLAN_SEGMENT
+ {
+ public byte byEnable; //whether to enable, 1-enable, 0-disable
+ public byte byDoorStatus; //door status(control ladder status),0-invaild, 1-always open(free), 2-always close(forbidden), 3-ordinary status(used by door plan)
+ public byte byVerifyMode; //verify method, 0-invaild, 1-swipe card, 2-swipe card +password(used by card verify ) 3-swipe card(used by card verify) 4-swipe card or password(used by card verify)
+ //5-fingerprint, 6-fingerprint and passwd, 7-fingerprint or swipe card, 8-fingerprint and swipe card, 9-fingerprint and passwd and swipe card,
+ //10-face or finger print or swipe card or password,11-face and finger print,12-face and password,13-face and swipe card,14-face,15-employee no and password,
+ //16-finger print or password,17-employee no and finger print,18-employee no and finger print and password,
+ //19-face and finger print and swipe card,20-face and password and finger print,21-employee no and face,22-face or face and swipe card
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_TIME_SEGMENT struTimeSegment; //time segment parameter
+
+ public void Init()
+ {
+ byRes = new byte[5];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WEEK_PLAN_CFG
+ {
+ public uint dwSize;
+ public byte byEnable; //whether to enable, 1-enable, 0-disable
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_PLAN_SEGMENT[] struPlanCfg; //week plan parameter
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+
+ public void Init()
+ {
+ struPlanCfg = new NET_DVR_SINGLE_PLAN_SEGMENT[MAX_DAYS * MAX_TIMESEGMENT_V30];
+ foreach (NET_DVR_SINGLE_PLAN_SEGMENT singlStruPlanCfg in struPlanCfg)
+ {
+ singlStruPlanCfg.Init();
+ }
+ byRes1 = new byte[3];
+ byRes2 = new byte[16];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_PLAN_CFG
+ {
+ public uint dwSize;
+ public byte byEnable; //whether to enable, 1-enable, 0-disable
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_DATE struBeginDate; //holiday begin date
+ public NET_DVR_DATE struEndDate; //holiday end date
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SINGLE_PLAN_SEGMENT[] struPlanCfg; //time segment parameter
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
+ public byte[] byRes2;
+
+ public void Init()
+ {
+ struPlanCfg = new NET_DVR_SINGLE_PLAN_SEGMENT[MAX_TIMESEGMENT_V30];
+ foreach (NET_DVR_SINGLE_PLAN_SEGMENT singlStruPlanCfg in struPlanCfg)
+ {
+ singlStruPlanCfg.Init();
+ }
+ byRes1 = new byte[3];
+ byRes2 = new byte[16];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_GROUP_CFG
+ {
+ public uint dwSize;
+ public byte byEnable; //whether to enable, 1-enable, 0-disable
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = HOLIDAY_GROUP_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byGroupName; //holiday group name
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_HOLIDAY_PLAN_NUM, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwHolidayPlanNo; //holiday plan No. fill in from the front side, invalid when meet zero.
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+
+ public void Init()
+ {
+ byGroupName = new byte[HOLIDAY_GROUP_NAME_LEN];
+ dwHolidayPlanNo = new uint[MAX_HOLIDAY_PLAN_NUM];
+ byRes1 = new byte[3];
+ byRes2 = new byte[32];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLAN_TEMPLATE
+ {
+ public uint dwSize;
+ public byte byEnable; //whether to enable, 1-enable, 0-disable
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = TEMPLATE_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTemplateName; //template name
+ public uint dwWeekPlanNo; //week plan no. 0 invalid
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_HOLIDAY_GROUP_NUM, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwHolidayGroupNo; //holiday group. fill in from the front side, invalid when meet zero.
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+
+ public void Init()
+ {
+ byTemplateName = new byte[TEMPLATE_NAME_LEN];
+ dwHolidayGroupNo = new uint[MAX_HOLIDAY_GROUP_NUM];
+ byRes1 = new byte[3];
+ byRes2 = new byte[32];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_PLAN_COND
+ {
+ public uint dwSize;
+ public uint dwHolidayPlanNumber; //Holiday plan number
+ public ushort wLocalControllerID; //On the controller serial number [1, 64]
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void Init()
+ {
+ byRes = new byte[106];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WEEK_PLAN_COND
+ {
+ public uint dwSize;
+ public uint dwWeekPlanNumber; //Week plan number
+ public ushort wLocalControllerID; //On the controller serial number [1, 64]
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes = new byte[106];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_GROUP_COND
+ {
+ public uint dwSize;
+ public uint dwHolidayGroupNumber; //Holiday group number
+ public ushort wLocalControllerID; //On the controller serial number [1, 64]
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes = new byte[106];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLAN_TEMPLATE_COND
+ {
+ public uint dwSize;
+ public uint dwPlanTemplateNumber; //Plan template number, starting from 1, the maximum value from the entrance guard capability sets
+ public ushort wLocalControllerID; //On the controller serial number[1,64], 0 is invalid
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 106, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes = new byte[106];
+ }
+ }
+
+
+ public const int MAX_TIMESEGMENT_V30 = 8; //Maximum number of time segments in 9000 DVR's guard schedule
+ public const int HOLIDAY_GROUP_NAME_LEN = 32; //holiday group name len
+ public const int MAX_HOLIDAY_PLAN_NUM = 16; //holiday max plan number
+ public const int TEMPLATE_NAME_LEN = 32; //plan template name len
+ public const int MAX_HOLIDAY_GROUP_NUM = 16; //plan template max group number
+
+ public const int NET_DVR_GET_WEEK_PLAN_CFG = 2100; //get door status week plan config
+ public const int NET_DVR_SET_WEEK_PLAN_CFG = 2101; //set door status week plan config
+ public const int NET_DVR_GET_DOOR_STATUS_HOLIDAY_PLAN = 2102; //get door status holiday week plan config
+ public const int NET_DVR_SET_DOOR_STATUS_HOLIDAY_PLAN = 2103; //set door status holiday week plan config
+ public const int NET_DVR_GET_DOOR_STATUS_HOLIDAY_GROUP = 2104; //get door holiday group parameter
+ public const int NET_DVR_SET_DOOR_STATUS_HOLIDAY_GROUP = 2105; //set door holiday group parameter
+ public const int NET_DVR_GET_DOOR_STATUS_PLAN_TEMPLATE = 2106; //get door status plan template parameter
+ public const int NET_DVR_SET_DOOR_STATUS_PLAN_TEMPLATE = 2107; //set door status plan template parameter
+ public const int NET_DVR_GET_VERIFY_WEEK_PLAN = 2124; //get reader card verfy week plan
+ public const int NET_DVR_SET_VERIFY_WEEK_PLAN = 2125; //set reader card verfy week plan
+ public const int NET_DVR_GET_CARD_RIGHT_WEEK_PLAN = 2126; //get card right week plan
+ public const int NET_DVR_SET_CARD_RIGHT_WEEK_PLAN = 2127; //set card right week plan
+ public const int NET_DVR_GET_VERIFY_HOLIDAY_PLAN = 2128; //get card reader verify holiday plan
+ public const int NET_DVR_SET_VERIFY_HOLIDAY_PLAN = 2129; //set card reader verify holiday plan
+ public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_PLAN = 2130; //get card right holiday plan
+ public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_PLAN = 2131; //set card right holiday plan
+ public const int NET_DVR_GET_VERIFY_HOLIDAY_GROUP = 2132; //get card reader verify holiday group
+ public const int NET_DVR_SET_VERIFY_HOLIDAY_GROUP = 2133; //set card reader verify holiday group
+ public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_GROUP = 2134; //get card right holiday group
+ public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_GROUP = 2135; //set card right holiday group
+ public const int NET_DVR_GET_VERIFY_PLAN_TEMPLATE = 2136; //get card reader verify plan template
+ public const int NET_DVR_SET_VERIFY_PLAN_TEMPLATE = 2137; //set card reader verify plan template
+ public const int NET_DVR_GET_CARD_RIGHT_PLAN_TEMPLATE = 2138; //get card right plan template
+ public const int NET_DVR_SET_CARD_RIGHT_PLAN_TEMPLATE = 2139; //set card right plan template
+ // V50
+ public const int NET_DVR_GET_CARD_RIGHT_WEEK_PLAN_V50 = 2304; //Access card right V50 weeks plan parameters
+ public const int NET_DVR_SET_CARD_RIGHT_WEEK_PLAN_V50 = 2305; //Set card right V50 weeks plan parameters
+ public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_PLAN_V50 = 2310; //Access card right parameters V50 holiday plan
+ public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_PLAN_V50 = 2311; //Set card right parameters V50 holiday plan
+ public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_GROUP_V50 = 2316; //Access card right parameters V50 holiday group
+ public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_GROUP_V50 = 2317; //Set card right parameters V50 holiday group
+ public const int NET_DVR_GET_CARD_RIGHT_PLAN_TEMPLATE_V50 = 2322; //Access card right parameters V50 plan template
+ public const int NET_DVR_SET_CARD_RIGHT_PLAN_TEMPLATE_V50 = 2323; //Set card right parameters V50 plan template
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RESET_COUNTER_CFG
+ {
+ public uint dwSize;
+ public byte byEnable; //Ƿã0-ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_TIME_EX[] struTime;//ʱ䣬ʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VCA_CTRLINFO_COND
+ {
+ public uint dwSize;
+ public NET_DVR_STREAM_INFO struStreamInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VCA_CTRLINFO_CFG
+ {
+ public uint dwSize;
+ public byte byVCAEnable; //Ƿ
+ public byte byVCAType; //ͣVCA_CHAN_ABILITY_TYPE
+ public byte byStreamWithVCA; //ǷϢ
+ public byte byMode; //ģʽATM ʱVCA_CHAN_MODE_TYPE ,TFS ʱ TFS_CHAN_MODE_TYPE쳣ΪʶʱBEHAVIOR_SCENE_MODE_TYPE
+ public byte byControlType; //ͣλʾ0-1-
+ //byControlType &1 ǷץĹ
+ //byControlType &2 Ƿǰ豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 83, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //Ϊ0
+ }
+
+ /*ͳƲ Ϊڲؼֲ
+ * HUMAN_GENERATE_RATE
+ * ĿٶȲPDCĿٶȡٶԽ죬ĿԽɡ
+ * ƵϲԱȶȽϵʱõĹСʱӦӿĿٶȣ Ŀ©죻
+ * ƵжԱȶȽϸʱ߹ϴʱӦýĿٶȣԼ졣
+ * ĿٶȲ51ٶ5죬ĬϲΪ3
+ *
+ * DETECT_SENSITIVE
+ * ĿȿƲPDCһΪĿȡ
+ * ԽߣԽױΪĿ꣬ԽԽѼΪĿꡣ
+ * ƵϲԱȶȽϵʱӦȣ Ŀ©죻
+ * ƵжԱȶȽϸʱӦýͼȣԼ졣
+ * Ӧ51ͣ5ߣĬϼΪ3
+ *
+ * TRAJECTORY_LEN
+ * ɳȿƲʾʱҪĿλء
+ * Ӧ51ɳ5ɳ̣죬ĬϼΪ3
+ *
+ * TRAJECT_CNT_LEN
+ * ȿƲʾʱҪĿλء
+ * Ӧ51Ҫ5Ҫ̣죬ĬϼΪ3
+ *
+ * PREPROCESS
+ * ͼԤƲ0 - 1 - ĬΪ0
+ *
+ * CAMERA_ANGLE
+ * Ƕ 0 - б 1 - ֱĬΪ0
+ */
+
+ public enum PDC_PARAM_KEY
+ {
+ HUMAN_GENERATE_RATE = 50, // Ŀٶ 50ʼ
+ DETECT_SENSITIVE = 51, //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_TARGET_INFO
+ {
+ public uint dwTargetID; // Ŀid
+ public NET_VCA_RECT struTargetRect; // Ŀ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_TARGET_IN_FRAME
+ {
+ public byte byTargetNum; //Ŀ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] yRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TARGET_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PDC_TARGET_INFO[] struTargetInfo; //ĿϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //֡ͳƽʱʹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_STATFRAME
+ {
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 92, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_STATTIME
+ {
+ public NET_DVR_TIME tmStart; // ͳʼʱ
+ public NET_DVR_TIME tmEnd; // ͳƽʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 92, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_PDCPARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 140, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_ALRAM_INFO
+ {
+ public uint dwSize; // PDCϴṹС
+ public byte byMode; // 0 ֡ͳƽ 1Сʱͳƽ
+ public byte byChannel; // ϴͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public UNION_PDCPARAM uStatModeParam;
+ public uint dwLeaveNum; // 뿪
+ public uint dwEnterNum; //
+ public byte byBrokenNetHttp; //־λ0-شݣ1-ش
+ public byte byRes3;
+ public ushort wDevInfoIvmsChannelEx; //NET_VCA_DEV_INFObyIvmsChannelܱͬʾֵϿͻbyIvmsChannelܼݣ255¿ͻ˰汾ʹwDevInfoIvmsChannelEx
+ public uint dwPassingNum; // ǻûд롢뿪
+ public uint dwChildLeaveNum; // С뿪
+ public uint dwChildEnterNum; // С
+ public uint dwDuplicatePeople; // ظ
+ public uint dwXmlLen;//XMLݳ, EventNotificationAlert XML Blockݳ
+ public IntPtr pXmlBuf; // XMLϢָ,XMLӦEventNotificationAlert XML Block
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //Ϣѯ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PDC_QUERY
+ {
+ public NET_DVR_TIME tmStart;
+ public NET_DVR_TIME tmEnd;
+ public uint dwLeaveNum;
+ public uint dwEnterNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZ_POSITION
+ {
+ // ǷóóΪʱֶЧóλϢʱΪʹλ
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPtzPositionName; //λ
+ public NET_DVR_PTZPOS struPtzPos; //ptz
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POSITION_RULE_CFG
+ {
+ public uint dwSize; // ṹС
+ public NET_DVR_PTZ_POSITION struPtzPosition; // λϢ
+ public NET_VCA_RULECFG struVcaRuleCfg; //Ϊ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 80, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POSITION_RULE_CFG_V41
+ {
+ public uint dwSize; // ṹС
+ public NET_DVR_PTZ_POSITION struPtzPosition; // λϢ
+ public NET_VCA_RULECFG_V41 struVcaRuleCfg; //Ϊ
+ public byte byTrackEnable; //Ƿ
+ public byte byRes1;
+ public ushort wTrackDuration; //ʱ䣬λs
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 76, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LIMIT_ANGLE
+ {
+ public byte byEnable; // Ƿóλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_PTZPOS struUp; // λ
+ public NET_DVR_PTZPOS struDown; // λ
+ public NET_DVR_PTZPOS struLeft; // λ
+ public NET_DVR_PTZPOS struRight; // λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POSITION_INDEX
+ {
+ public byte byIndex; //
+ public byte byRes1;
+ public ushort wDwell; // ͣʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ public const int MAX_POSITION_NUM = 10;
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POSITION_TRACK_CFG
+ {
+ public uint dwSize;
+ public byte byNum; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_POSITION_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_POSITION_INDEX[] struPositionIndex;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //Ѳ·Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PATROL_SCENE_INFO
+ {
+ public ushort wDwell; // ͣʱ 30-300
+ public byte byPositionID; // 1-10Ĭ0ʾѲ㲻ӳ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ѲϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PATROL_TRACKCFG
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PATROL_SCENE_INFO[] struPatrolSceneInfo; // Ѳ·
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ع˵ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRACK_PARAMCFG
+ {
+ public uint dwSize; // ṹС
+ public ushort wAlarmDelayTime; // ʱʱ䣬Ŀǰֻ֧ȫ Χ1-120
+ public ushort wTrackHoldTime; // ʱ Χ0-300
+ public byte byTrackMode; // IPDOME_TRACK_MODE
+ public byte byPreDirection; // Ԥ 0- 1-
+ public byte byTrackSmooth; // 0- 1-
+ public byte byZoomAdjust; // ϵ μ±
+ public byte byMaxTrackZoom; //ϵ,0-ʾĬϱϵ,ȼ6-궨ֵ*1.0(Ĭ),1-5ΪС궨ֵֵԽССıԽ,7-15ΪŴֵԽŴıԽ
+ public byte byStopTrackWhenFindFace; //Ƿֹͣ 0- 1-
+ public byte byStopTrackThreshold; //ֵֹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //о
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DOME_MOVEMENT_PARAM
+ {
+ public ushort wMaxZoom; // ϵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 42, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ /********************************ܽͨ¼ begin****************************************/
+ public const int MAX_REGION_NUM = 8; // бĿ
+ public const int MAX_TPS_RULE = 8; // Ŀ
+ public const int MAX_AID_RULE = 8; // ¼Ŀ
+ public const int MAX_LANE_NUM = 8; // Ŀ
+
+ //ͨ¼
+ public enum TRAFFIC_AID_TYPE
+ {
+ CONGESTION = 0x01, //ӵ
+ PARKING = 0x02, //ͣ
+ INVERSE = 0x04, //
+ PEDESTRIAN = 0x08, //
+ DEBRIS = 0x10, // Ƭ
+ SMOKE = 0x20, //
+ OVERLINE = 0x40, //ѹ
+ VEHICLE_CONTROL_LIST = 0x80, //ֹ
+ SPEED = 0x100 //
+ }
+
+ public enum TRAFFIC_SCENE_MODE
+ {
+ FREEWAY = 0, // ٻⳡ
+ TUNNEL, //
+ BRIDGE //
+ }
+
+ public enum ITS_ABILITY_TYPE
+ {
+ ITS_CONGESTION_ABILITY = 0x01, //ӵ
+ ITS_PARKING_ABILITY = 0x02, //ͣ
+ ITS_INVERSE_ABILITY = 0x04, //
+ ITS_PEDESTRIAN_ABILITY = 0x08, //
+ ITS_DEBRIS_ABILITY = 0x10, // Ƭ
+ ITS_SMOKE_ABILITY = 0x20, //-
+ ITS_OVERLINE_ABILITY = 0x40, //ѹ
+ ITS_VEHICLE_CONTROL_LIST_ABILITY = 0x80, //ֹ
+ ITS_SPEED_ABILITY = 0x100, //
+ ITS_LANE_VOLUME_ABILITY = 0x010000, //
+ ITS_LANE_VELOCITY_ABILITY = 0x020000, //ƽٶ
+ ITS_TIME_HEADWAY_ABILITY = 0x040000, //ͷʱ
+ ITS_SPACE_HEADWAY_ABILITY = 0x080000, //ͷ
+ ITS_TIME_OCCUPANCY_RATIO_ABILITY = 0x100000, //ռʣʱ)
+ ITS_SPACE_OCCUPANCY_RATIO_ABILITY = 0x200000, //ռʣٷֱȼ㣨ռ)
+ ITS_LANE_QUEUE_ABILITY = 0x400000, //Ŷӳ
+ ITS_VEHICLE_TYPE_ABILITY = 0x800000, //
+ ITS_TRAFFIC_STATE_ABILITY = 0x1000000 //ͨ״̬
+ }
+
+ // ͨͳƲ
+ public enum ITS_TPS_TYPE
+ {
+ LANE_VOLUME = 0x01, //
+ LANE_VELOCITY = 0x02, //ٶ
+ TIME_HEADWAY = 0x04, //ͷʱ
+ SPACE_HEADWAY = 0x08, //ͷ
+ TIME_OCCUPANCY_RATIO = 0x10, //ռ (ʱ)
+ SPACE_OCCUPANCY_RATIO = 0x20, //ռʣٷֱȼ(ռ)
+ QUEUE = 0x40, //Ŷӳ
+ VEHICLE_TYPE = 0x80, //
+ TRAFFIC_STATE = 0x100 //ͨ״̬
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_REGION_LIST
+ {
+ public uint dwSize; // ṹС
+ public byte byNum; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_REGION_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_POLYGON[] struPolygon; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DIRECTION
+ {
+ public NET_VCA_POINT struStartPoint; // ʼ
+ public NET_VCA_POINT struEndPoint; //
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_LANE
+ {
+ public byte byEnable; //Ƿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLaneName; //
+ public NET_DVR_DIRECTION struFlowDirection;// ڳ
+ public NET_VCA_POLYGON struPolygon; //
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LANE_CFG
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LANE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_LANE[] struLane; // ±ΪID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ }
+
+ //ͨ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AID_PARAM
+ {
+ public ushort wParkingDuration; // Υͣ 10-120s
+ public ushort wPedestrianDuration; // ˳ʱ 1-120s
+ public ushort wDebrisDuration; // ʱ 10-120s
+ public ushort wCongestionLength; // ӵ³ֵ 5-200ף
+ public ushort wCongestionDuration; // ӵ³ 10-120s
+ public ushort wInverseDuration; // гʱ 1-10s
+ public ushort wInverseDistance; // оֵ λm Χ[2-100] Ĭ 10
+ public ushort wInverseAngleTolerance; // Ƕƫ 90-180,ļн
+ public ushort wIllegalParkingTime; // Υͣʱ[4,60]λ ,TFS(ͨΥȡ֤) ģʽ
+ public ushort wIllegalParkingPicNum; // ΥͣͼƬ[1,6], TFS(ͨΥȡ֤) ģʽ
+ public byte byMergePic; // ͼƬƴ,TFS ģʽ 0- ƴ 1- ƴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ }
+
+ //ͨ¼ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_AID_RULE
+ {
+ public byte byEnable; // Ƿ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public uint dwEventType; // ͨ¼ TRAFFIC_AID_TYPE
+ public NET_VCA_SIZE_FILTER struSizeFilter; // ߴ
+ public NET_VCA_POLYGON struPolygon; //
+ public NET_DVR_AID_PARAM struAIDParam; // ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ,Ϊ1ʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ͨ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AID_RULECFG
+ {
+ public uint dwSize; // ṹС
+ public byte byPicProType; //ʱͼƬʽ 0- 0-ϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_DVR_JPEGPARA struPictureParam; //ͼƬṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AID_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_AID_RULE[] struOneAIDRule;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ͨ¼ṹ(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_AID_RULE_V41
+ {
+ public byte byEnable; // Ƿ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public uint dwEventType; // ͨ¼ TRAFFIC_AID_TYPE
+ public NET_VCA_SIZE_FILTER struSizeFilter; // ߴ
+ public NET_VCA_POLYGON struPolygon; //
+ public NET_DVR_AID_PARAM struAIDParam; // ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;// ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IVMS_IP_CHANNEL, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ1ʾͨ0ʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ͨ¼(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AID_RULECFG_V41
+ {
+ public uint dwSize; // ṹС
+ public byte byPicProType; // ʱͼƬʽ 0- 0-ϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_DVR_JPEGPARA struPictureParam; // ͼƬṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_AID_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_AID_RULE_V41[] struAIDRule; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ͨͳƲṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_TPS_RULE
+ {
+ public byte byEnable; //Ƿʹܳͨ
+ public byte byLaneID; //ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwCalcType; //ͳƲITS_TPS_TYPE
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ public NET_VCA_POLYGON struVitrualLoop; //Ȧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ,һΪǷϴģܲҪ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //ֽ
+ }
+
+ //ͨͳƹýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_RULECFG
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TPS_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_TPS_RULE[] struOneTpsRule; // ±ӦͨID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //ͨͳƲṹ(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_TPS_RULE_V41
+ {
+ public byte byEnable; //Ƿʹܳͨ
+ public byte byLaneID; //ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwCalcType; // ͳƲITS_TPS_TYPE
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ public NET_VCA_POLYGON struVitrualLoop; //Ȧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //ͨͳƹýṹ(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_RULECFG_V41
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TPS_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_TPS_RULE_V41[] struOneTpsRule; // ±ӦͨID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ʵʱϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_PARAM
+ {
+ public byte byStart; // ʼ
+ public byte byCMD; // ţ01-ָ02-뿪ָ03-ӵ״ָ̬(Ϊ03ʱֻbyLaneStatebyQueueLenЧ)04-Ȧ״̬Ϊ04ʱwLoopStatewStateMaskЧʾbyLane϶ȦĹ״̬
+ public ushort wSpaceHeadway; //ͷ࣬
+ public ushort wDeviceID; // 豸ID
+ public ushort wDataLen; // ݳ
+ public byte byLane; // Ӧ
+ public byte bySpeed; // Ӧ٣KM/H
+ public byte byLaneState; // ״̬0-״̬1-ͨ2-ӵ3-
+ public byte byQueueLen; // ״̬Ŷӳȣ50ף
+ public ushort wLoopState; //Ȧ״̬ڼλʾȦ״̬ȦŴӾͷɽԶ״̬1-0-뿪
+ public ushort wStateMask; //Ȧ״̬룬λΪ1ӦwLoopState״̬λЧΪ0ʾЧ
+ public uint dwDownwardFlow; //ǰ ϵ³
+ public uint dwUpwardFlow; //ǰ µϳ
+ public byte byJamLevel; //ӵµȼbyLaneStateΪ3ʱЧ1-ȣ2-жȣ3-ض
+ public byte byVehicleDirection; //0-δ֪1-϶£2-¶
+ public byte byJamFlow; //ӵÿһϱһۼƳϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public ushort wTimeHeadway; // ͷʱ࣬
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LLI_PARAM
+ {
+ public float fSec;//[0.000000,60.000000]
+ public byte byDegree;//:γ[0,90] [0,180]
+ public byte byMinute;//[0,59]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LLPOS_PARAM
+ {
+ public byte byLatitudeType;//γͣ0-γ1-γ
+ public byte byLongitudeType;//ͣ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_LLI_PARAM struLatitude; /*γ*/
+ public NET_DVR_LLI_PARAM struLongitude; /**/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //TPSϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_ADDINFO
+ {
+ public NET_DVR_LLPOS_PARAM struLLPos;//һľγλϢ(byLaneState=3byQueueLen>0ʱŷ)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 1024, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //TPSʵʱϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_REAL_TIME_INFO
+ {
+ public uint dwSize; // ṹС
+ public uint dwChan;//ͨ
+ public NET_DVR_TIME_V30 struTime; //ʱ
+ public NET_DVR_TPS_PARAM struTPSRealTimeInfo;// ͨͳϢ
+ public IntPtr pAddInfoBuffer;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ /*ϢʶǷNET_DVR_TPS_ADDINFOṹ壩,0-Ϣ, 1-иϢ*/
+ public byte byAddInfoFlag;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ͳϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_LANE_PARAM
+ {
+ public byte byLane; // Ӧ
+ public byte bySpeed; // ƽٶ
+ public ushort wArrivalFlow; //
+ public uint dwLightVehicle; // Сͳ
+ public uint dwMidVehicle; // ͳ
+ public uint dwHeavyVehicle; // ͳ
+ public uint dwTimeHeadway; // ͷʱ࣬
+ public uint dwSpaceHeadway; // ͷ࣬
+ public float fSpaceOccupyRation; // ռռʣٷֱȼ,*1000
+ public float fTimeOccupyRation; // ʱռʣٷֱȼ,*1000
+ public byte byStoppingTimes; //ƽͣ
+ public byte byQueueLen; // ״̬Ŷӳȣ50ף
+ public byte byFlag; //ϴʶ0-ʾT1ʱͳƽ,1-ʾT2ʱͳ
+ public byte byVehicelNum; //
+ public ushort wDelay; //ƽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwNonMotor; // ǻ
+ }
+
+ // ͨͳϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_STATISTICS_PARAM
+ {
+ public byte byStart; // ʼ
+ public byte byCMD; // ţ 08-ʱָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // Ԥֽ
+ public ushort wDeviceID; // 豸ID
+ public ushort wDataLen; // ݳ
+ public byte byTotalLaneNum; // Ч
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_TIME_V30 struStartTime; //ͳƿʼʱ
+ public uint dwSamplePeriod; //ͳʱ,λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TPS_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_TPS_LANE_PARAM[] struLaneParam;
+ }
+
+ //TPSͳƹϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_STATISTICS_INFO
+ {
+ public uint dwSize; // ṹС
+ public uint dwChan;//ͨ
+ public NET_DVR_TPS_STATISTICS_PARAM struTPSStatisticsInfo;// ͨͳϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ͨ¼Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AID_INFO
+ {
+ public byte byRuleID; // ţΪýṹ±꣬0-16
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public uint dwAIDType; // ¼
+ public NET_DVR_DIRECTION struDirect; // ָ
+ public byte bySpeedLimit; //ֵλkm/h[0,255]
+ public byte byCurrentSpeed; //ǰٶֵλkm/h[0,255]
+ public byte byVehicleEnterState;//״̬ 0-Ч 1-ʻ 2-ʻ
+ public byte byState; //0-仯ϴ1-Ѳϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byParkingID; //ͣλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //ͨ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AID_ALARM
+ {
+ public uint dwSize; // ṹ
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ public NET_VCA_DEV_INFO struDevInfo; // ǰ豸Ϣ
+ public NET_DVR_AID_INFO struAIDInfo; // ͨ¼Ϣ
+ public uint dwPicDataLen; // ͼƬij Ϊ0ʾûͼƬ0ʾýṹͼƬ
+ public IntPtr pImage; // ָͼƬָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ͨȡ֤
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TFS_ALARM
+ {
+ public uint dwSize; //ṹС
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public uint dwIllegalType; //Υͣù궨壬dwIllegalTypeֵΪ0xffffffffʱʹbyIllegalCode
+ public uint dwIllegalDuration; //Υʱ䣨λ룩 = ץһͼƬʱ - ץĵһͼƬʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MONITORSITE_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitoringSiteID;//ʾţ·ڱšڲţ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DEVICE_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDeviceID; //豸
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public NET_DVR_SCENE_INFO struSceneInfo; //Ϣ
+ public NET_DVR_TIME_EX struBeginRecTime; //¼ʼʱ
+ public NET_DVR_TIME_EX struEndRecTime; //¼ʱ
+ public NET_DVR_AID_INFO struAIDInfo; //ͨ¼Ϣ
+ public NET_DVR_PLATE_INFO struPlateInfo; //Ϣ
+ public NET_DVR_VEHICLE_INFO struVehicleInfo; //Ϣ
+ public uint dwPicNum; //ͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITS_PICTURE_INFO[] struPicInfo; //ͼƬϢ8
+ public byte bySpecificVehicleType; //峵 οʶVTR_RESULT
+ public byte byLaneNo; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_TIME_V30 struTime;//ֶλǰʱ䡣
+ public uint dwSerialNo;//ţ
+ public byte byVehicleAttribute;//ԣλʾ0- (ͨ)bit1- Ʊ공(ı־)bit2- ΣƷֵ0- 1-
+ public byte byPilotSafebelt;//0-ʾδ֪,1-ϵȫ,2-ϵȫ
+ public byte byCopilotSafebelt;//0-ʾδ֪,1-ϵȫ,2-ϵȫ
+ public byte byPilotSunVisor;//0-ʾδ֪,1-,2-
+ public byte byCopilotSunVisor;//0-ʾδ֪, 1-,2-
+ public byte byPilotCall;// 0-ʾδ֪, 1-绰,2-绰
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ILLEGAL_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIllegalCode;//ΥչdwIllegalTypeֵΪ0xffffffffʹֵ
+ public ushort wCountry; // ֵ,öCOUNTRY_INDEX
+ public byte byRegion; //ֵ,0-1-ŷ(Europe Region)2-(Russian Region)3-ŷ&˹(EU&CIS) , 4-жMiddle East0xff-
+ public byte byCrossLine;//Ƿѹͣͣ0-ʾδ֪1-ѹߣ2-ѹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIAL_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byParkingSerialNO;//λ
+ public byte byCrossSpaces;//Ƿ粴λͣͣ0-ʾδ֪1-δ粴λͣ2-粴λͣ
+ public byte byAngledParking;//Ƿбͣͣ, 0-ʾδ֪1-δбͣ2-бͣ
+ public byte byAlarmValidity;//ŶȣʻʻŶȣΧ0-100ŶԽߣ¼ʵԽ
+ public byte byDoorsStatus;//״̬ 0-Źر 1-ſ
+ public uint dwXmlLen;//XMLϢ
+ public IntPtr pXmlBuf; // XMLϢָ,XMLӦEventNotificationAlert XML Block
+ //[MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ //public byte[] byRes3; //32λSDKҪֽڶ
+ public byte byVehicleHeadTailStatus;//ͷβ״̬ 0- 1-ͷ 2-β
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //нṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LANE_QUEUE
+ {
+ public NET_VCA_POINT struHead; //ͷ
+ public NET_VCA_POINT struTail; //β
+ public uint dwLength; //ʵʶг λΪ [0-500]
+ }
+
+ public enum TRAFFIC_DATA_VARY_TYPE
+ {
+ NO_VARY, //ޱ仯
+ VEHICLE_ENTER, //Ȧ
+ VEHICLE_LEAVE, //뿪Ȧ
+ UEUE_VARY //б仯
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LANE_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public byte byRuleID; //ţΪýṹ±꣬0-7
+ public byte byVaryType; //ͨ仯 TRAFFIC_DATA_VARY_TYPE
+ public byte byLaneType; //л
+ public byte byRes1;
+ public uint dwLaneVolume; // ͳжٳͨ
+ public uint dwLaneVelocity; //ٶȣ
+ public uint dwTimeHeadway; //ͷʱ࣬
+ public uint dwSpaceHeadway; //ͷ࣬
+ public float fSpaceOccupyRation; //ռʣٷֱȼ㣨ռ)
+ public NET_DVR_LANE_QUEUE struLaneQueue; //г
+ public NET_VCA_POINT struRuleLocation; //Ȧĵλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_INFO
+ {
+ public uint dwLanNum; // ͨijĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TPS_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_LANE_PARAM[] struLaneParam;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_ALARM
+ {
+ public uint dwSize; //ṹС
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public NET_DVR_TPS_INFO struTPSInfo; //ͨ¼Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //ֽ
+ }
+
+ public enum TRAFFIC_DATA_VARY_TYPE_EX_ENUM
+ {
+ ENUM_TRAFFIC_VARY_NO = 0x00, //ޱ仯
+ ENUM_TRAFFIC_VARY_VEHICLE_ENTER = 0x01, //Ȧ
+ ENUM_TRAFFIC_VARY_VEHICLE_LEAVE = 0x02, //뿪Ȧ
+ ENUM_TRAFFIC_VARY_QUEUE = 0x04, //б仯
+ ENUM_TRAFFIC_VARY_STATISTIC = 0x08, //ͳݱ仯ÿӱ仯һΰƽٶȣռ/ʱռʣͨ״̬
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LANE_PARAM_V41
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public byte byRuleID; // ţΪýṹ±꣬0-7
+ public byte byLaneType; // л
+ public byte byTrafficState; // Ľͨ״̬0-Ч1-ͨ2-ӵ3-
+ public byte byRes1; //
+ public uint dwVaryType; // ͨ仯Ͳ TRAFFIC_DATA_VARY_TYPE_EX_ENUMλ
+ public uint dwTpsType; // ݱ仯ͱ־ʾǰϴͳƲУЩЧITS_TPS_TYPE,λ
+ public uint dwLaneVolume; // ͳжٳͨ
+ public uint dwLaneVelocity; // ٶȣ
+ public uint dwTimeHeadway ; // ͷʱ࣬
+ public uint dwSpaceHeadway; // ͷ࣬
+ public float fSpaceOccupyRation; // ռʣٷֱȼ㣨ռ)
+ public float fTimeOccupyRation; // ʱռʣٷֱȼ
+ public uint dwLightVehicle; // Сͳ
+ public uint dwMidVehicle; // ͳ
+ public uint dwHeavyVehicle; // ͳ
+ public NET_DVR_LANE_QUEUE struLaneQueue; // г
+ public NET_VCA_POINT struRuleLocation; // λȦ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_INFO_V41
+ {
+ public uint dwLanNum; // ͨijĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TPS_RULE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_LANE_PARAM_V41[] struLaneParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACEDETECT_RULECFG
+ {
+ public uint dwSize; // ṹС
+ public byte byEnable; // Ƿ
+ public byte byEventType; //¼ͣ 0-쳣; 1-;2-쳣&;
+ public byte byUpLastAlarm; //2011-04-06 Ƿϴһεı
+ public byte byUpFacePic; //Ƿϴͼ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName;
+ public NET_VCA_POLYGON struVcaPolygon; //
+ public byte byPicProType; //ʱͼƬʽ 0- 0-ϴ
+ public byte bySensitivity; //
+ public ushort wDuration; // ʱֵ
+ public NET_DVR_JPEGPARA struPictureParam; //ͼƬṹ
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ,Ϊ1ʾͨ
+ public byte byPicRecordEnable; /*2012-3-1ǷͼƬ洢, 0-, 1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 39, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_PIPCFG
+ {
+ public byte byEnable; //Ƿл
+ public byte byBackChannel; //ͨţͨ
+ public byte byPosition; //λã0-,1-,2-,3-
+ public byte byPIPDiv; //ϵ(:廭)0-1:4,1-1:9,2-1:16
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACEDETECT_RULECFG_V41
+ {
+ public uint dwSize; // ṹС
+ public byte byEnable; // Ƿ
+ public byte byEventType; //¼ͣ 0-쳣; 1-;2-쳣&;
+ public byte byUpLastAlarm; //2011-04-06 Ƿϴһεı
+ public byte byUpFacePic; //Ƿϴͼ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName;
+ public NET_VCA_POLYGON struVcaPolygon; //
+ public byte byPicProType; //ʱͼƬʽ 0- 0-ϴ
+ public byte bySensitivity; //
+ public ushort wDuration; // ʱֵ
+ public NET_DVR_JPEGPARA struPictureParam; //ͼƬṹ
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType; //ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ,Ϊ1ʾͨ
+ public byte byPicRecordEnable; /*2012-10-22ǷͼƬ洢, 0-, 1-*/
+ public byte byRes1;
+ public ushort wAlarmDelay; //2012-10-22ܱʱ0-5s,1-10,2-30s,3-60s,4-120s,5-300s,6-600s
+ public NET_DVR_FACE_PIPCFG struFacePIP; //2012-11-7л
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 28, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACEDETECT_ALARM
+ {
+ public uint dwSize; // ṹС
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public NET_VCA_TARGET_INFO struTargetInfo; //ĿϢ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public uint dwPicDataLen; //ͼƬij Ϊ0ʾûͼƬ0ʾýṹͼƬ*/
+ public byte byAlarmPicType; // 0-쳣ͼƬ 1- ͼƬ,2-
+ public byte byPanelChan; /*2012-3-1ͨͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwFacePicDataLen; //ͼƬij Ϊ0ʾûͼƬ0ʾýṹͼƬ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 48, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ public IntPtr pFaceImage; //ָͼָ
+ public IntPtr pImage; //ָͼƬָ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EVENT_PARAM_UNION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.U4)]
+ public uint[] uLen; // СΪ12ֽ
+ public uint dwHumanIn; //˽ӽ 0 - 1-
+ public float fCrowdDensity; // Աۼֵ
+ }
+
+ //Ŀǰֻ¼Աۼ¼ʵʱϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EVENT_INFO
+ {
+ public byte byRuleID; // Rule ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRuleName; //
+ public uint dwEventType; // VCA_EVENT_TYPE
+ public NET_DVR_EVENT_PARAM_UNION uEventParam; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EVENT_INFO_LIST
+ {
+ public byte byNum; // ¼ʵʱϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RULE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_EVENT_INFO[] struEventInfo; // ¼ʵʱϢ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RULE_INFO_ALARM
+ {
+ public uint dwSize; // ṹС
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ public NET_VCA_DEV_INFO struDevInfo; // ǰ豸Ϣ
+ public NET_DVR_EVENT_INFO_LIST struEventInfoList; //¼Ϣб
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ //ʱ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_SCENE_TIME
+ {
+ public byte byActive; //0 -Ч,1CЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwSceneID; //ID
+ public NET_DVR_SCHEDTIME struEffectiveTime; //Чʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //Чʱ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCENE_TIME_CFG
+ {
+ public uint dwSize; //ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SCENE_TIMESEG_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_SCENE_TIME[] struSceneTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_SCENE_CFG
+ {
+ public byte byEnable; //Ƿøó,0- 1-
+ public byte byDirection; //ʾ 1-У2-У3-˫4-ɶ5-6-7-ɱϣ8-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwSceneID; //ID(ֻ), 0 - ʾóЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySceneName; //
+ public NET_DVR_PTZPOS struPtzPos; //ptz
+ public uint dwTrackTime; //ʱ[5,300] 룬TFS(ͨȡ֤)ģʽЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCENE_CFG
+ {
+ public uint dwSize; //ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ITS_SCENE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_SCENE_CFG[] struSceneCfg; //Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ೡ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCENE_COND
+ {
+ public uint dwSize; //ṹС
+ public Int32 lChannel; //ͨ
+ public uint dwSceneID; //ID, 0-ʾóЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 48, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ȡ֤ʽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FORENSICS_MODE
+ {
+ public uint dwSize; //ṹС
+ public byte byMode; // 0-ֶȡ֤ ,1-Զȡ֤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCENE_INFO
+ {
+ public uint dwSceneID; //ID, 0 - ʾóЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySceneName; //
+ public byte byDirection; //ʾ 1-У2-У3-˫4-ɶ5-6-7-ɱϣ8-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_PTZPOS struPtzPos; //Ptz
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2 ; //
+ }
+
+ //ͨ¼(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AID_ALARM_V41
+ {
+ public uint dwSize; //ṹ
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public NET_DVR_AID_INFO struAIDInfo; //ͨ¼Ϣ
+ public NET_DVR_SCENE_INFO struSceneInfo; //Ϣ
+ public uint dwPicDataLen; //ͼƬ
+ public IntPtr pImage; //ָͼƬָ
+ // 0-ֱϴ; 1-ƴ洢URL(3.7Ver)ԭȵͼƬݱURLݣͼƬȱURL
+ public byte byDataType;
+ public byte byLaneNo; //
+ public ushort wMilliSecond; //ʱ
+ //ʾţ·ڱšڲţ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MONITORSITE_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitoringSiteID;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DEVICE_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDeviceID;//豸
+ public uint dwXmlLen;//XMLϢ
+ public IntPtr pXmlBuf;// XMLϢָ,XMLӦEventNotificationAlert XML Block
+ public byte byTargetType;// Ŀͣ0~δ֪1~ˡ2~ֳ3~ֳ(˼з)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 19, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ͨͳϢ(չ)
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TPS_ALARM_V41
+ {
+ public uint dwSize; // ṹС
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ public NET_VCA_DEV_INFO struDevInfo; // ǰ豸Ϣ
+ public NET_DVR_TPS_INFO_V41 struTPSInfo; // ͨͳϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VCA_VERSION
+ {
+ public ushort wMajorVersion; // 汾
+ public ushort wMinorVersion; // ΰ汾
+ public ushort wRevisionNumber; //
+ public ushort wBuildNumber; //
+ public ushort wVersionYear; // 汾-
+ public byte byVersionMonth; // 汾-
+ public byte byVersionDay; // 汾-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+ /*******************************ܽͨ¼ end*****************************************/
+
+ /******************************ʶ begin******************************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLATE_PARAM
+ {
+ public byte byPlateRecoMode; //ʶģʽ,ĬΪ1(Ƶģʽ)
+ public byte byBelive; /*Ŷֵ, ֻƵʶʽ, ݱӳ̶, ʸ߾, ©ʸ߾,
+ * 80-90Χ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 22, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLATECFG
+ {
+ public uint dwSize;
+ public uint dwEnable; /* ǷƵʶ 0 1 */
+ public byte byPicProType; //ʱͼƬʽ 0- 0-ϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_DVR_JPEGPARA struPictureParam; //ͼƬṹ
+ public NET_DVR_PLATE_PARAM struPlateParam; // ʶ
+ public NET_DVR_HANDLEEXCEPTION struHandleType; /* ʽ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan; //¼ͨ,Ϊ1ʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ʶӽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLATE_INFO
+ {
+ public byte byPlateType; //
+ public byte byColor; //ɫ
+ public byte byBright; //
+ public byte byLicenseLen; //ַ
+ public byte byEntireBelieve;//ƵŶȣ0-100
+ public byte byRegion; // ֵ 0-1-ŷ(EU)2-(ER)3-ŷ&˹(EU&CIS) ,4-ж(ME),0xff-
+ public byte byCountry; // ֵöCOUNTRY_INDEX֧"COUNTRY_ALL = 0xff, //ALL ȫ"
+ public byte byArea; //ʡݣڲö٣ EMI_AREA
+ public byte byPlateSize; //Ƴߴ磬0~δ֪1~long, 2~short(жʹ)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CATEGORY_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPlateCategory;//ƸϢ, жгƺԱߵСϢ(Ŀǰֻж֧)
+ public uint dwXmlLen; //XMLϢ
+ public IntPtr pXmlBuf; // XMLϢָ,Ϊ COMM_ITS_PLATE_RESULʱЧXMLӦEventNotificationAlert XML Block
+ public NET_VCA_RECT struPlateRect; //λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LICENSE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLicense; //ƺ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LICENSE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byBelieve; //ʶַŶȣ"A12345", ŶΪ,20,30,40,50,60,70ʾ""ȷĿֻ%"A"ֵȷĿ%
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLATERECO_RESULE
+ {
+ public uint dwSize;
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public NET_VCA_DEV_INFO struDevInfo; // ǰ豸Ϣ
+ public NET_DVR_PLATE_INFO struPlateInfo;
+ public uint dwPicDataLen; //ͼƬij Ϊ0ʾûͼƬ0ʾýṹͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes; //Ϊ0
+ public IntPtr pImage; //ָͼƬָ
+ }
+ /******************************ʶ end******************************************/
+
+ /******************************ץĻ*******************************************/
+ //IO
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IO_INCFG
+ {
+ public uint dwSize;
+ public byte byIoInStatus;//IO״̬0-½أ1-أ2-غ½أ3-ߵƽ4-͵ƽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//ֽ
+ }
+
+ //IO
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IO_OUTCFG
+ {
+ public uint dwSize;
+ public byte byDefaultStatus;//IOĬ״̬0-͵ƽ1-ߵƽ
+ public byte byIoOutStatus;//IOЧʱ״̬0-͵ƽ1-ߵƽ2-
+ public ushort wAheadTime;//IOǰʱ䣬λus
+ public uint dwTimePluse;//ʱ䣬λus
+ public uint dwTimeDelay;//IOЧʱ䣬λus
+ public byte byFreqMulti; //ƵֵΧ[1,15]
+ public byte byDutyRate; //ռձȣ[0,40%]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FLASH_OUTCFG
+ {
+ public uint dwSize;
+ public byte byMode;//˸ģʽ0-1-2-3-
+ public byte byRelatedIoIn;//ƹIOţʱ˲Ч
+ public byte byRecognizedLane; /*IOţλʾbit0ʾIO1Ƿ0-1-*/
+ public byte byDetectBrightness;/*Զʹ0-⣻1-*/
+ public byte byBrightnessThreld;/*ʹֵΧ[0,100],ֵ*/
+ public byte byStartHour; //ʼʱ-Сʱ,ȡֵΧ0-23
+ public byte byStartMinute; //ʼʱ-,ȡֵΧ0-59
+ public byte byEndHour; //ʱ-Сʱ,ȡֵΧ0-23
+ public byte byEndMinute; //ʱ-,ȡֵΧ0-59
+ public byte byFlashLightEnable; //ʱʹ:0-;1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //̵ƹܣ2IOһ飩
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LIGHTSNAPCFG
+ {
+ public uint dwSize;
+ public byte byLightIoIn;//̵ƵIO
+ public byte byTrigIoIn;//IO
+ public byte byRelatedDriveWay;//IOij
+ public byte byTrafficLight; //0-ߵƽƣ͵ƽ̵ƣ1-ߵƽ̵ƣ͵ƽ
+ public byte bySnapTimes1; //ץĴ10-ץģ0-Ĵ5
+ public byte bySnapTimes2; //̵ץĴ20-ץģ0-Ĵ5
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTERVAL_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wIntervalTime1;//ļʱ䣬ms
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTERVAL_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wIntervalTime2;//̵ļʱ䣬ms
+ public byte byRecord;//¼־0-¼1-¼
+ public byte bySessionTimeout;//¼ʱʱ䣨룩
+ public byte byPreRecordTime;//¼ƬԤ¼ʱ()
+ public byte byVideoDelay;//¼Ƭʱʱ䣨룩
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//ֽ
+ }
+
+ //ٹ(2IOһ飩
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MEASURESPEEDCFG
+ {
+ public uint dwSize;
+ public byte byTrigIo1; //ٵ1Ȧ
+ public byte byTrigIo2; //ٵ2Ȧ
+ public byte byRelatedDriveWay;//IOij
+ public byte byTestSpeedTimeOut;//ģʽʱʱ䣬λs
+ public uint dwDistance;//Ȧ,cm
+ public byte byCapSpeed;//ģʽٶȣλkm/h
+ public byte bySpeedLimit;//ֵλkm/h
+ public byte bySnapTimes1; //Ȧ1ץĴ0-ץģ0-Ĵ5
+ public byte bySnapTimes2; //Ȧ2ץĴ0-ץģ0-Ĵ5
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTERVAL_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wIntervalTime1;//Ȧ1ļʱ䣬ms
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTERVAL_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wIntervalTime2;//Ȧ2ļʱ䣬ms
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//ֽ
+ }
+
+ //Ƶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOEFFECT
+ {
+ public byte byBrightnessLevel; /*0-100*/
+ public byte byContrastLevel; /*0-100*/
+ public byte bySharpnessLevel; /*0-100*/
+ public byte bySaturationLevel; /*0-100*/
+ public byte byHueLevel; /*0-100,*/
+ public byte byEnableFunc; //ʹܣλʾbit0-SMART IR()bit1-ն,bit2-ǿʹܣ0-1-
+ public byte byLightInhibitLevel; //ǿƵȼ[1-3]ʾȼ
+ public byte byGrayLevel; //Ҷֵ0-[0-255]1-[16-235]
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GAIN
+ {
+ public byte byGainLevel; /*棺0-100*/
+ public byte byGainUserSet; /*ûԶ棻0-100ץĻCCDģʽµץ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwMaxGainValue;/*ֵλdB*/
+ }
+
+ //ƽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WHITEBALANCE
+ {
+ public byte byWhiteBalanceMode; /*0-ֶƽ⣨MWB,1-Զƽ1AWB1,2-Զƽ2 (AWB2),3-ԶƸΪƽ(Locked WB)
+ 4-(Indoor)5-(Outdoor)6-չ(Fluorescent Lamp)7-Ƶ(Sodium Lamp)
+ 8-Զ(Auto-Track)9-һΰƽ(One Push)10-Զ(Auto-Outdoor)
+ 11-ƵԶ (Auto-Sodiumlight)12-ˮ(Mercury Lamp)13-Զƽ(Auto)
+ 14-׳ (IncandescentLamp)15-ů(Warm Light Lamp)16-Ȼ(Natural Light) */
+ public byte byWhiteBalanceModeRGain; /*ֶƽʱЧֶƽ R*/
+ public byte byWhiteBalanceModeBGain; /*ֶƽʱЧֶƽ B*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ع
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EXPOSURE
+ {
+ public byte byExposureMode; /*0 ֶع 1Զع*/
+ public byte byAutoApertureLevel; /* ԶȦ, 0-10 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwVideoExposureSet; /* ԶƵعʱ䣨λus*//*ע:ԶعʱֵΪعֵ 20-1s(1000000us)*/
+ public uint dwExposureUserSet; /* Զعʱ,ץĻӦʱCCDģʽʱץĿٶ*/
+ public uint dwRes;
+ }
+
+ //̬
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WDR
+ {
+ public byte byWDREnabled; /*̬0 dsibale 1 enable 2 auto*/
+ public byte byWDRLevel1; /*0-F*/
+ public byte byWDRLevel2; /*0-F*/
+ public byte byWDRContrastLevel; /*0-100*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ҹת
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DAYNIGHT
+ {
+ public byte byDayNightFilterType; /*ҹл0-죬1-ҹ2-Զ3-ʱ4-봥*/
+ public byte bySwitchScheduleEnabled; /*0 dsibale 1 enable,()*/
+ //ʱģʽ
+ public byte byBeginTime; /*ʼʱ䣨Сʱ0-23*/
+ public byte byEndTime; /*ʱ䣨Сʱ0-23*/
+ //ģʽ2
+ public byte byDayToNightFilterLevel; //0-7
+ public byte byNightToDayFilterLevel; //0-7
+ public byte byDayNightFilterTime;//(60)
+ //ʱģʽ
+ public byte byBeginTimeMin; //ʼʱ䣨֣0-59
+ public byte byBeginTimeSec; //ʼʱ䣨룩0-59
+ public byte byEndTimeMin; //ʱ䣨֣0-59
+ public byte byEndTimeSec; //ʱ䣨룩0-59
+ //봥ģʽ
+ public byte byAlarmTrigState; //봥״̬0-죬1-ҹ
+ }
+
+ //GammaУ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GAMMACORRECT
+ {
+ public byte byGammaCorrectionEnabled; /*0 dsibale 1 enable*/
+ public byte byGammaCorrectionLevel; /*0-100*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ⲹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BACKLIGHT
+ {
+ public byte byBacklightMode; /*ⲹ:0 off 1 UP2 DOWN3 LEFT4 RIGHT5MIDDLE6Զ*/
+ public byte byBacklightLevel; /*0x0-0xF*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwPositionX1; //X1
+ public uint dwPositionY1; //Y1
+ public uint dwPositionX2; //X2
+ public uint dwPositionY2; //Y2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ֽ빦
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NOISEREMOVE
+ {
+ public byte byDigitalNoiseRemoveEnable; /*0-ã1-ͨģʽֽ룬2-רģʽֽ*/
+ public byte byDigitalNoiseRemoveLevel; /*ͨģʽֽ뼶0x0-0xF*/
+ public byte bySpectralLevel; /*רģʽ¿ǿȣ0-100*/
+ public byte byTemporalLevel; /*רģʽʱǿȣ0-100*/
+ public byte byDigitalNoiseRemove2DEnable; /* ץ֡2D룬0-ã1- */
+ public byte byDigitalNoiseRemove2DLevel; /* ץ֡2D뼶0-100 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //CMOSģʽǰ˾ͷ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CMOSMODECFG
+ {
+ public byte byCaptureMod; //ץģʽ0-ץģʽ11-ץģʽ2
+ public byte byBrightnessGate;//ֵ
+ public byte byCaptureGain1; //ץ1,0-100
+ public byte byCaptureGain2; //ץ2,0-100
+ public uint dwCaptureShutterSpeed1;//ץĿٶ1
+ public uint dwCaptureShutterSpeed2;//ץĿٶ2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ǰ˲
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAMERAPARAMCFG
+ {
+ public uint dwSize;
+ public NET_DVR_VIDEOEFFECT struVideoEffect;/*ȡԱȶȡͶȡȡɫ*/
+ public NET_DVR_GAIN struGain;/*Զ*/
+ public NET_DVR_WHITEBALANCE struWhiteBalance;/*ƽ*/
+ public NET_DVR_EXPOSURE struExposure; /*ع*/
+ public NET_DVR_GAMMACORRECT struGammaCorrect;/*GammaУ*/
+ public NET_DVR_WDR struWdr;/*̬*/
+ public NET_DVR_DAYNIGHT struDayNight;/*ҹת*/
+ public NET_DVR_BACKLIGHT struBackLight;/*ⲹ*/
+ public NET_DVR_NOISEREMOVE struNoiseRemove;/*ֽ*/
+ public byte byPowerLineFrequencyMode; /*0-50HZ; 1-60HZ*/
+ public byte byIrisMode; /*0 ԶȦ 1ֶȦ*/
+ public byte byMirror ; /* 0 off1- leftright2- updown3-center */
+ public byte byDigitalZoom; /*:0 dsibale 1 enable*/
+ public byte byDeadPixelDetect; /*,0 dsibale 1 enable*/
+ public byte byBlackPwl;/*ڵƽ , 0-255*/
+ public byte byEptzGate;// EPTZر:0-ǫ̃1-ǫ̃
+ public byte byLocalOutputGate;//ر0-ر1-BNC 2-HDMIر
+ //20-HDMI_720P50
+ //21-HDMI_720P60
+ //22-HDMI_1080I60
+ //23-HDMI_1080I50
+ //24-HDMI_1080P24
+ //25-HDMI_1080P25
+ //26-HDMI_1080P30
+ //27-HDMI_1080P50
+ //28-HDMI_1080P60
+ //40-SDI_720P50,
+ //41-SDI_720P60,
+ //42-SDI_1080I50,
+ //43-SDI_1080I60,
+ //44-SDI_1080P24,
+ //45-SDI_1080P25,
+ //46-SDI_1080P30,
+ //47-SDI_1080P50,
+ //48-SDI_1080P60
+ public byte byCoderOutputMode;//fpgaģʽ0ֱͨ3ذ
+ public byte byLineCoding; //Ƿб룺0-1-
+ public byte byDimmerMode; //ģʽ0-Զ1-Զ
+ public byte byPaletteMode; //ɫ壺0-ȣ1-ȣ2-ɫ28-ɫ8
+ public byte byEnhancedMode; //ǿʽܱ̽ߣ0-ǿ1-12-23-34-4
+ public byte byDynamicContrastEN; //̬Աȶǿ 0-1
+ public byte byDynamicContrast; //̬Աȶ 0-100
+ public byte byJPEGQuality; //JPEGͼ 0-100
+ public NET_DVR_CMOSMODECFG struCmosModeCfg;//CMOSģʽǰ˲ãͷģʽȡ
+ public byte byFilterSwitch; //˲أ0-ã1-
+ public byte byFocusSpeed; //ͷٶȣ0-10
+ public byte byAutoCompensationInterval; //ʱԶŲ1-120λ
+ public byte bySceneMode; //ģʽ0-⣬1-ڣ2-Ĭϣ3-
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEFOGCFG
+ {
+ public byte byMode; //ģʽ0-ã1-Զģʽ2-ģʽ
+ public byte byLevel; //ȼ0-100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ӷ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ELECTRONICSTABILIZATION
+ {
+ public byte byEnable;//ʹ 0- ã1-
+ public byte byLevel; //ȼ0-100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ģʽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CORRIDOR_MODE_CCD
+ {
+ public byte byEnableCorridorMode; //Ƿģʽ 0ã 1
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //SMART IR()ò
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SMARTIR_PARAM
+ {
+ public byte byMode;//0ֶ1Զ
+ public byte byIRDistance;//ȼ(ȼ)level:1~100 Ĭ:50ֶģʽӣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //byIrisMode ΪP-Iris1ʱЧúȦСȼģʽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PIRIS_PARAM
+ {
+ public byte byMode;//0-Զ1-ֶ
+ public byte byPIrisAperture;//ȦСȼ(ȼ,ȦС)level:1~100 Ĭ:50ֶģʽӣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ǰ˲
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAMERAPARAMCFG_EX
+ {
+ public uint dwSize;
+ public NET_DVR_VIDEOEFFECT struVideoEffect;/*ȡԱȶȡͶȡȡɫ*/
+ public NET_DVR_GAIN struGain;/*Զ*/
+ public NET_DVR_WHITEBALANCE struWhiteBalance;/*ƽ*/
+ public NET_DVR_EXPOSURE struExposure; /*ع*/
+ public NET_DVR_GAMMACORRECT struGammaCorrect;/*GammaУ*/
+ public NET_DVR_WDR struWdr;/*̬*/
+ public NET_DVR_DAYNIGHT struDayNight;/*ҹת*/
+ public NET_DVR_BACKLIGHT struBackLight;/*ⲹ*/
+ public NET_DVR_NOISEREMOVE struNoiseRemove;/*ֽ*/
+ public byte byPowerLineFrequencyMode; /*0-50HZ; 1-60HZ*/
+ public byte byIrisMode; /*0-ԶȦ 1-ֶȦ, 2-P-Iris1*/
+ public byte byMirror ; /* 0 off1- leftright2- updown3-center */
+ public byte byDigitalZoom; /*:0 dsibale 1 enable*/
+ public byte byDeadPixelDetect; /*,0 dsibale 1 enable*/
+ public byte byBlackPwl;/*ڵƽ , 0-255*/
+ public byte byEptzGate;// EPTZر:0-ǫ̃1-ǫ̃
+ public byte byLocalOutputGate;//ر0-ر1-BNC 2-HDMIر
+ //20-HDMI_720P50
+ //21-HDMI_720P60
+ //22-HDMI_1080I60
+ //23-HDMI_1080I50
+ //24-HDMI_1080P24
+ //25-HDMI_1080P25
+ //26-HDMI_1080P30
+ //27-HDMI_1080P50
+ //28-HDMI_1080P60
+ public byte byCoderOutputMode;//fpgaģʽ0ֱͨ3ذ
+ public byte byLineCoding; //Ƿб룺0-1-
+ public byte byDimmerMode; //ģʽ0-Զ1-Զ
+ public byte byPaletteMode; //ɫ壺0-ȣ1-ȣ2-ɫ28-ɫ8
+ public byte byEnhancedMode; //ǿʽܱ̽ߣ0-ǿ1-12-23-34-4
+ public byte byDynamicContrastEN; //̬Աȶǿ 0-1
+ public byte byDynamicContrast; //̬Աȶ 0-100
+ public byte byJPEGQuality; //JPEGͼ 0-100
+ public NET_DVR_CMOSMODECFG struCmosModeCfg;//CMOSģʽǰ˲ãͷģʽȡ
+ public byte byFilterSwitch; //˲أ0-ã1-
+ public byte byFocusSpeed; //ͷٶȣ0-10
+ public byte byAutoCompensationInterval; //ʱԶŲ1-120λ
+ public byte bySceneMode; //ģʽ0-⣬1-ڣ2-Ĭϣ3-
+ public NET_DVR_DEFOGCFG struDefogCfg;//
+ public NET_DVR_ELECTRONICSTABILIZATION struElectronicStabilization;//ӷ
+ public NET_DVR_CORRIDOR_MODE_CCD struCorridorMode;//ģʽ
+ public byte byExposureSegmentEnable; //0~,1~ عʱʽ״عϵʱعʱ䵽мֵȻ浽мֵعֵ浽ֵ
+ public byte byBrightCompensate;//ǿ [0~100]
+
+ /*0-رա1-640*480@25fps2-640*480@30ps3-704*576@25fps4-704*480@30fps5-1280*720@25fps6-1280*720@30fps
+ * 7-1280*720@50fps8-1280*720@60fps9-1280*960@15fps10-1280*960@25fps11-1280*960@30fps
+ * 12-1280*1024@25fps13--1280*1024@30fps14-1600*900@15fps15-1600*1200@15fps16-1920*1080@15fps
+ * 17-1920*1080@25fps18-1920*1080@30fps19-1920*1080@50fps20-1920*1080@60fps21-2048*1536@15fps22-2048*1536@20fps
+ * 23-2048*1536@24fps24-2048*1536@25fps25-2048*1536@30fps26-2560*2048@25fps27-2560*2048@30fps
+ * 28-2560*1920@7.5fps29-3072*2048@25fps30-3072*2048@30fps31-2048*1536@12.532-2560*1920@6.25
+ * 33-1600*1200@2534-1600*1200@3035-1600*1200@12.536-1600*900@12.537-1600@900@1538-800*600@2539-800*600@30*/
+ public byte byCaptureModeN; //ƵģʽNƣ
+ public byte byCaptureModeP; //ƵģʽPƣ
+ public NET_DVR_SMARTIR_PARAM struSmartIRParam; //ŹϢ
+ public NET_DVR_PIRIS_PARAM struPIrisParam;//PIrisϢӦbyIrisModeֶδ2-PIris1ʼЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 296, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ //ɫ
+ public enum VCA_PLATE_COLOR
+ {
+ VCA_BLUE_PLATE = 0,//ɫ
+ VCA_YELLOW_PLATE,//ɫ
+ VCA_WHITE_PLATE,//ɫ
+ VCA_BLACK_PLATE,//ɫ
+ VCA_GREEN_PLATE //ɫ
+ }
+
+ //
+ public enum VCA_PLATE_TYPE
+ {
+ VCA_STANDARD92_PLATE = 0,//óֳ
+ VCA_STANDARD02_PLATE,//02ʽó
+ VCA_WJPOLICE_PLATE,//侯
+ VCA_JINGCHE_PLATE,//
+ STANDARD92_BACK_PLATE,//ó˫β
+ VCA_SHIGUAN_PLATE, //ʹݳ
+ VCA_NONGYONG_PLATE, //ũó
+ VCA_MOTO_PLATE //Ħг
+ }
+
+ public enum VLR_VEHICLE_CLASS
+ {
+ VLR_OTHER = 0, //
+ VLR_VOLKSWAGEN = 1, //
+ VLR_BUICK = 2, //
+ VLR_BMW = 3, //
+ VLR_HONDA = 4, //
+ VLR_PEUGEOT = 5, //
+ VLR_TOYOTA = 6, //
+ VLR_FORD = 7, //
+ VLR_NISSAN = 8, //ղ
+ VLR_AUDI = 9, //µ
+ VLR_MAZDA = 10, //Դ
+ VLR_CHEVROLET = 11, //ѩ
+ VLR_CITROEN = 12, //ѩ
+ VLR_HYUNDAI = 13, //ִ
+ VLR_CHERY = 14 //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VEHICLE_INFO
+ {
+ public uint dwIndex;
+ public byte byVehicleType;
+ public byte byColorDepth;
+ public byte byColor;
+ public byte byRadarState;
+ public ushort wSpeed;
+ public ushort wLength;
+ public byte byIllegalType;
+ public byte byVehicleLogoRecog; //οö VLR_VEHICLE_CLASS
+ public byte byVehicleSubLogoRecog; //Ʒʶ𣻲οVSB_VOLKSWAGEN_CLASSö١
+ public byte byVehicleModel; //Ʒ0-δ֪ο"Ʒ.xlsx"
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCustomInfo; //ԶϢ
+ public ushort wVehicleLogoRecog; //Ʒƣο"Ʒ.xlsx" (ֶμbyVehicleLogoRecog);
+ public byte byIsParking;//Ƿͣ 0-Ч1-ͣ2-δͣ
+ public byte byRes;//ֽ
+ public uint dwParkingTime; //ͣʱ䣬λs
+ public byte byBelieve; //byIllegalTypeŶȣ1-100
+ public byte byCurrentWorkerNumber;//ǰҵ
+ public byte byCurrentGoodsLoadingRate;//ǰװ 0- 1- 2- 3- 4-
+ public byte byDoorsStatus;//״̬ 0-Źر 1-ſ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+
+ public void Init()
+ {
+ byCustomInfo = new byte[16];
+ byRes3 = new byte[4];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLATE_RESULT
+ {
+ public uint dwSize;
+ public byte byResultType;
+ public byte byChanIndex;
+ public ushort wAlarmRecordID; //¼ID(ڲѯ¼byResultTypeΪ2ʱЧ)
+ public uint dwRelativeTime;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAbsTime;
+ public uint dwPicLen;
+ public uint dwPicPlateLen;
+ public uint dwVideoLen;
+ public byte byTrafficLight;
+ public byte byPicNum;
+ public byte byDriveChan;
+ public byte byVehicleType; //0- δ֪1- ͳ2- 3- γ4- 5- С
+ public uint dwBinPicLen;
+ public uint dwCarPicLen;
+ public uint dwFarCarPicLen;
+ public IntPtr pBuffer3;
+ public IntPtr pBuffer4;
+ public IntPtr pBuffer5;
+ public byte byRelaLaneDirectionType;
+ public byte byCarDirectionType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ public NET_DVR_PLATE_INFO struPlateInfo;
+ public NET_DVR_VEHICLE_INFO struVehicleInfo;
+ public IntPtr pBuffer1;
+ public IntPtr pBuffer2;
+
+ public void Init()
+ {
+ byAbsTime = new byte[32];
+ byRes3 = new byte[6];
+ }
+ }
+
+ //ͼϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IMAGEOVERLAYCFG
+ {
+ public uint dwSize;
+ public byte byOverlayInfo;//ʹܿأ0-ӣ1-
+ public byte byOverlayMonitorInfo;//ǷʾϢ0-ӣ1-
+ public byte byOverlayTime;//Ƿʱ䣬0-ӣ1-
+ public byte byOverlaySpeed;//Ƿٶȣ0-ӣ1-
+ public byte byOverlaySpeeding;//Ƿӳٱ0-ӣ1-
+ public byte byOverlayLimitFlag;//Ƿٱ־0-ӣ1-
+ public byte byOverlayPlate;//Ƿӳƺţ0-ӣ1-
+ public byte byOverlayColor;//Ƿӳɫ0-ӣ1-
+ public byte byOverlayLength;//Ƿӳ0-ӣ1-
+ public byte byOverlayType;//Ƿӳͣ0-ӣ1-
+ public byte byOverlayColorDepth;//Ƿӳɫdz0-ӣ1-
+ public byte byOverlayDriveChan;//Ƿӳ0-ӣ1-
+ public byte byOverlayMilliSec; //ӺϢ 0-ӣ1-
+ public byte byOverlayIllegalInfo; //ΥϢ 0-ӣ1-
+ public byte byOverlayRedOnTime; //Ӻʱ 0-ӣ1-
+ public byte byFarAddPlateJpeg; //ԶͼǷӳƽͼ,0-,1-
+ public byte byNearAddPlateJpeg; //ͼǷӳƽͼ,0-,1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitorInfo1; //ʾϢ1
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitorInfo2; //Ϣ2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 52, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+
+
+ public struct NET_DVR_FACELIB_GUARD_COND
+ {
+ public uint dwSize;
+ public uint dwChannel; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 68, ArraySubType = UnmanagedType.I1)]
+ public byte[] szFDID;//ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ public struct NET_DVR_EVENT_SCHEDULE
+ {
+ public uint dwSize;//ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime; /*ʱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struHolidayAlarmTime; /*ղʱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySceneID;//,Ŀǰ֧1~40ΪЧó벼ʱÿʱһһӦ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 72, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SNAPCFG
+ {
+ public uint dwSize;
+ public byte byRelatedDriveWay;
+ public byte bySnapTimes;
+ public ushort wSnapWaitTime;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTERVAL_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wIntervalTime;
+ public uint dwSnapVehicleNum; //ץijš
+ public NET_DVR_JPEGPARA struJpegPara;//ץͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public enum ITC_MAINMODE_ABILITY
+ {
+ ITC_MODE_UNKNOW = 0x0, //
+ ITC_POST_MODE = 0x1, //ģʽ
+ ITC_EPOLICE_MODE = 0x2, //羯ģʽ
+ ITC_POSTEPOLICE_MODE = 0x4 //ʽ羯ģʽ
+ }
+
+ public enum ITC_RECOG_REGION_TYPE
+ {
+ ITC_REGION_RECT = 0x0, //
+ ITC_REGION_POLYGON = 0x1, //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SNAP_ABILITY
+ {
+ public uint dwSize;
+ public byte byIoInNum;//IO
+ public byte byIoOutNum;//IO
+ public byte bySingleSnapNum;//IO
+ public byte byLightModeArrayNum;//̵ģʽ
+ public byte byMeasureModeArrayNum;//ģʽ
+ public byte byPlateEnable; //ʶ
+ public byte byLensMode;//ͷģʽ0-CCD,1-CMOS
+ public byte byPreTriggerSupport; //Ƿ֧ԭģʽ0-֧֣1-֧
+ public uint dwAbilityType; //ֵ֧ĴģʽλʾITC_MAINMODE_ABILITY
+ public byte byIoSpeedGroup; //ֵ֧IO
+ public byte byIoLightGroup; //ֵ֧IO̵
+ public byte byRecogRegionType; //ʶֵ֧ͣITC_RECOG_REGION_TYPE
+ public byte bySupport; //豸λʾ0-֧֣1-֧
+ // bySupport&0x1ʾǷ֧չַ
+ // bySupport&0x2ʾǷ֧չУʱýṹ
+ // bySupport&0x4, ʾǷֶ֧()
+ // bySupport&0x8, ʾǷ֧bonding(ݴ)
+ // bySupport&0x10, ʾǷ֧Խ
+ //2013-07-09
+ public ushort wSupportMultiRadar;// 豸λʾ0-֧֣1-֧
+ // wSupportMultiRadar&0x1ʾ RS485״ ֳ֧״ﴦ
+ // wSupportMultiRadar&0x2ʾ Ȧ ֳ֧״ﴦ
+ // wSupportMultiRadar&0x4ʾ п ֳ֧״ﴦ
+ // wSupportMultiRadar&0x8ʾ Ƶ ֳ֧״ﴦ
+ public byte byICRPresetNum;
+ // ʾֵ֧ICRԤõ㣨˹ƬƫƵ㣩
+ public byte byICRTimeSlot;//ʾֵ֧ICRʱ18
+ public byte bySupportRS485Num;//ʾֵ֧RS485ڵ
+ public byte byExpandRs485SupportSensor;// 豸λʾ0-֧֣1-֧
+ // byExpandRs485SupportSensor &0x1ʾ羯ֳ֧
+ // byExpandRs485SupportSensor &0x2ʾʽ羯ֳ֧
+ public byte byExpandRs485SupportSignalLampDet;// 豸λʾ0-֧֣1-֧
+ // byExpandRs485SupportSignalLampDet &0x1ʾ羯֧źŵƼ
+ // byExpandRs485SupportSignalLampDet &0x2ʾʽ羯֧źŵƼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 13, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_ICRTIMECFG
+ {
+ public NET_DVR_SCHEDTIME struTime;
+ public byte byAssociateRresetNo;//Ԥõ18 , 0
+ public byte bySubSwitchMode;//1~죬2~ (Ԥõ0 ʱЧ)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_ICR_TIMESWITCH_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_ICRTIMECFG[] struAutoCtrlTime;//Զлʱ (Զл ʱЧ ֧4飬Ԥ4)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ICR_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byICRPreset; //ʵЧ̬ʾ [0~100] ±ʾԤõ18 07 Ӧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_ICR_MANUALSWITCH_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ICR_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byICRPreset; //ʵЧ̬ʾ [0~100]
+ public byte bySubSwitchMode;//1~죬2~
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 147, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_ICR_AOTOSWITCH_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ICR_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byICRPreset; //ʵЧ̬ʾ [0~100] ±ʾԤõ18 07 Ӧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 148, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_ICR_PARAM_UNION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 156, ArraySubType = UnmanagedType.I1)]
+ public byte[] uLen;
+ public NET_ITC_ICR_AOTOSWITCH_PARAM struICRAutoSwitch;
+ public NET_ITC_ICR_MANUALSWITCH_PARAM struICRManualSwitch;
+ public NET_ITC_ICR_TIMESWITCH_PARAM struICRTimeSwitch;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_ICRCFG
+ {
+ public uint dwSize;
+ public byte bySwitchType;//1~Զл2~ֶл ,3~ʱл
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_ITC_ICR_PARAM_UNION uICRParam;
+ }
+
+ //2013-07-09 쳣
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_HANDLEEXCEPTION
+ {
+ public uint dwHandleType; //쳣,쳣ʽ""
+ /*0x00: Ӧ*/
+ /*0x01: ʾϾ*/
+ /*0x02: */
+ /*0x04: ϴ*/
+ /*0x08: ̵*/
+ /*0x10: JPRGץͼϴEmail*/
+ /*0x20: ⱨ*/
+ /*0x40: ӵͼ(ĿǰֻPCNVR֧)*/
+ /*0x200: ץͼϴFTP*/
+ public byte byEnable; //0ã1
+ public byte byRes;
+ public ushort wDuration;//ʱ(λ/s)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ITC_EXCEPTIONOUT, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmOutTriggered;//ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITC_EXCEPTION
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_EXCEPTIONNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_HANDLEEXCEPTION[] struSnapExceptionType;
+ //ÿԪضʾһ쳣0- Ӳ̳,1-߶,2-IP ַͻ, 3-쳣, 4-źŵƼ쳣
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRIGCOORDINATE
+ {
+ public ushort wTopLeftX; /*ȦϽǺ꣨2ֽڣ*/
+ public ushort wTopLeftY; /*ȦϽ꣨2ֽڣ*/
+ public ushort wWdith; /*Ȧȣ2ֽڣ*/
+ public ushort wHeight; /*Ȧ߶ȣ2ֽڣ*/
+ }
+
+ public enum PROVINCE_CITY_IDX
+ {
+ ANHUI_PROVINCE = 0, //
+ AOMEN_CHINA_PROVINCE = 1, //ţй
+ BEIJING_PROVINCE = 2, //
+ CHONGQING_PROVINCE = 3, //
+ FUJIAN_PROVINCE = 4, //
+ GANSU_PROVINCE = 5, //
+ GUANGDONG_PROVINCE = 6, //㶫
+ GUANGXI_PROVINCE = 7, //
+ GUIZHOU_PROVINCE = 8, //
+ HAINAN_PROVINCE = 9, //
+ HEBEI_PROVINCE = 10, //ӱ
+ HENAN_PROVINCE = 11, //
+ HEILONGJIANG_PROVINCE = 12, //
+ HUBEI_PROVINCE = 13, //
+ HUNAN_PROVINCE = 14, //
+ JILIN_PROVINCE = 15, //
+ JIANGSU_PROVINCE = 16, //
+ JIANGXI_PROVINCE = 17, //
+ LIAONING_PROVINCE = 18, //
+ NEIMENGGU_PROVINCE = 19, //ɹ
+ NINGXIA_PROVINCE = 20, //
+ QINGHAI_PROVINCE = 21, //ຣ
+ SHANDONG_PROVINCE = 22, //ɽ
+ SHANXI_JIN_PROVINCE = 23, //ɽ
+ SHANXI_SHAN_PROVINCE = 24, //
+ SHANGHAI_PROVINCE = 25, //Ϻ
+ SICHUAN_PROVINCE = 26, //Ĵ
+ TAIWAN_CHINA_PROVINCE = 27, //̨壨й
+ TIANJIN_PROVINCE = 28, //
+ XIZANG_PROVINCE = 29, //
+ XIANGGANG_CHINA_PROVINCE = 30, //ۣй
+ XINJIANG_PROVINCE = 31, //½
+ YUNNAN_PROVINCE = 32, //
+ ZHEJIANG_PROVINCE = 33 //㽭
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GEOGLOCATION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.U4)]
+ public int[] iRes; /**/
+ public uint dwCity; /*УPROVINCE_CITY_IDX */
+ }
+
+ //ģʽ
+ public enum SCENE_MODE
+ {
+ UNKOWN_SCENE_MODE = 0, //δ֪ģʽ
+ HIGHWAY_SCENE_MODE = 1, //ٳģʽ
+ SUBURBAN_SCENE_MODE = 2, //ģʽ()
+ URBAN_SCENE_MODE = 3, //ģʽ
+ TUNNEL_SCENE_MODE = 4 //ģʽ()
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VTPARAM
+ {
+ public uint dwSize;
+ public byte byEnable; /* ǷʹȦ0-ʹã1-ʹ*/
+ public byte byIsDisplay; /* ǷʾȦ0-ʾ1-ʾ*/
+ public byte byLoopPos; //䴥Ȧƫ0-ϣ1-
+ public byte bySnapGain; /*ץ*/
+ public uint dwSnapShutter; /*ץĿٶ*/
+ public NET_DVR_TRIGCOORDINATE struTrigCoordinate; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_TRIGCOORDINATE[] struRes;
+ public byte byTotalLaneNum;/*Ƶij1*/
+ public byte byPolarLenType; /*ƫͣ0ƫ1ʩ͵ƫ*/
+ public byte byDayAuxLightMode; /*츨ģʽ01LED2*/
+ public byte byLoopToCalRoadBright; /*Լ·ȵij(Ȧ)*/
+ public byte byRoadGrayLowTh; /*·ȵֵʼֵ1*/
+ public byte byRoadGrayHighTh; /*·ȸֵʼֵ140*/
+ public ushort wLoopPosBias; /*䴥Ȧλ30*/
+ public uint dwHfrShtterInitValue; /*ͼعʱijʼֵ2000*/
+ public uint dwSnapShtterInitValue; /*ץͼعʱijʼֵ500*/
+ public uint dwHfrShtterMaxValue; /*ͼعʱֵ20000*/
+ public uint dwSnapShtterMaxValue; /*ץͼعʱֵ1500*/
+ public uint dwHfrShtterNightValue; /*ͼعʱֵ3000*/
+ public uint dwSnapShtterNightMinValue; /*ץͼعʱСֵ3000*/
+ public uint dwSnapShtterNightMaxValue; /*ץͼعʱֵ5000*/
+ public uint dwInitAfe; /*ijʼֵ200*/
+ public uint dwMaxAfe; /*ֵ400*/
+ public ushort wResolutionX;/* 豸ǰֱʿ*/
+ public ushort wResolutionY;/* 豸ǰֱʸ*/
+ public uint dwGainNightValue; /*棬Ĭֵ70*/
+ public uint dwSceneMode; /*ģʽ SCENE_MODE */
+ public uint dwRecordMode; /*¼־0-¼1-¼*/
+ public NET_DVR_GEOGLOCATION struGeogLocation; /*ַλ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VL_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTrigFlag; /*־0-ͷ1-β2-ͷ/β*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VL_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTrigSensitive; /*ȣ1-100*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SNAPENABLECFG
+ {
+ public uint dwSize;
+ public byte byPlateEnable;//Ƿֳ֧ʶ0-֧֣1-֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public byte byFrameFlip; //ͼǷת 0-ת1-ת
+ public ushort wFlipAngle; //ͼתǶ 0,90,180,270
+ public ushort wLightPhase; //λȡֵΧ[0, 360]
+ public byte byLightSyncPower; //ǷźŵƵԴͬ0-ͬ1-ͬ
+ public byte byFrequency; //źƵ
+ public byte byUploadSDEnable; //ǷԶϴSDͼƬ0-1-
+ public byte byPlateMode; //ʶģʽ:0-Ƶ,1-ⲿ
+ public byte byUploadInfoFTP; //ǷϴץĸϢFTP0-1-
+ public byte byAutoFormatSD; //ǷԶʽSD0-1-
+ public ushort wJpegPicSize; //JpegͼƬС[64-8196]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 56, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+
+
+ /*ftpϴ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FTPCFG
+ {
+ public uint dwSize;
+ public uint dwEnableFTP; /*Ƿftpϴ*/
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string sFTPIP; /*ftp */
+ public uint dwFTPPort; /*ftp˿*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /*û*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /**/
+ public uint dwDirLevel; /*0 = ʹĿ¼ṹֱӱڸĿ¼,1 = ʹ1Ŀ¼,2=ʹ2Ŀ¼*/
+ public ushort wTopDirMode; /* һĿ¼0x1 = ʹ豸,0x2 = ʹ豸,0x3 = ʹ豸ipַ0x4=ʹʾ,0x5=ʹʱ(),0x=6Զ,0x7=Υ,0x8=,0x9=ص*/
+ public ushort wSubDirMode; /* Ŀ¼0x1 = ʹͨ,0x2 = ʹͨţ,0x3=ʹʱ(),0x4=ʹó,0x=5Զ,0x6=Υ,0x7=,0x8=ص*/
+ public byte byEnableAnony; //0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*ͼƬԪ */
+ public const int PICNAME_ITEM_DEV_NAME = 1; /*豸*/
+ public const int PICNAME_ITEM_DEV_NO = 2; /*豸*/
+ public const int PICNAME_ITEM_DEV_IP = 3; /*豸IP*/
+ public const int PICNAME_ITEM_CHAN_NAME = 4; /*ͨ*/
+ public const int PICNAME_ITEM_CHAN_NO = 5; /*ͨ*/
+ public const int PICNAME_ITEM_TIME = 6; /*ʱ*/
+ public const int PICNAME_ITEM_CARDNO = 7; /**/
+ public const int PICNAME_ITEM_PLATE_NO = 8; /*ƺ*/
+ public const int PICNAME_ITEM_PLATE_COLOR = 9; /*ɫ*/
+ public const int PICNAME_ITEM_CAR_CHAN = 10; /**/
+ public const int PICNAME_ITEM_CAR_SPEED = 11; /*ٶ*/
+ public const int PICNAME_ITEM_CARCHAN = 12; /*ʾ*/
+ public const int PICNAME_ITEM_PIC_NUMBER = 13; //ͼƬ
+ public const int PICNAME_ITEM_CAR_NUMBER = 14; //
+
+ public const int PICNAME_ITEM_SPEED_LIMIT_VALUES = 15; //ֵ
+ public const int PICNAME_ITEM_ILLEGAL_CODE = 16; //Υ
+ public const int PICNAME_ITEM_CROSS_NUMBER = 17; //·ڱ
+ public const int PICNAME_ITEM_DIRECTION_NUMBER = 18; //
+
+ public const int PICNAME_MAXITEM = 15;
+ //ͼƬ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PICTURE_NAME
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PICNAME_MAXITEM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byItemOrder; /* 鶨ļĹ */
+ public byte byDelimiter; /*ָһΪ'_'*/
+ }
+
+
+ //2013-09-27
+ public const int PICNAME_ITEM_PARK_DEV_IP = 1; /*豸IP*/
+ public const int PICNAME_ITEM_PARK_PLATE_NO = 2;/*ƺ*/
+ public const int PICNAME_ITEM_PARK_TIME = 3; /*ʱ*/
+ public const int PICNAME_ITEM_PARK_INDEX = 4; /*λ*/
+ public const int PICNAME_ITEM_PARK_STATUS = 5; /*λ״̬*/
+
+ //ͼƬչ 2013-09-27
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PICTURE_NAME_EX
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PICNAME_MAXITEM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byItemOrder; /* 鶨ļĹ */
+ public byte byDelimiter; /*ָһΪ'_'*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /**/
+ }
+
+ /* ץͼ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SERIAL_CATCHPIC_PARA
+ {
+ public byte byStrFlag; /*ݿʼ*/
+ public byte byEndFlag; /**/
+ public ushort wCardIdx; /*ʼλ*/
+ public uint dwCardLen; /*ų*/
+ public uint dwTriggerPicChans; /*ͨţλӵ1λʼƣ0x2ʾһͨ*/
+ }
+
+ //DVRץͼãߣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_JPEGCFG_V30
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_JPEGPARA[] struJpegPara; /*ÿͨͼ*/
+ public ushort wBurstMode; /*ץͼʽ,λ.0x1=봥0x2=ƶⴥ 0x4=2320x8=4850x10=紥*/
+ public ushort wUploadInterval; /*ͼƬϴ()[0,65535]*/
+ public NET_DVR_PICTURE_NAME struPicNameRule; /* ͼƬ */
+ public byte bySaveToHD; /*Ƿ浽Ӳ*/
+ public byte byRes1;
+ public ushort wCatchInterval; /*ץͼ()[0,65535]*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_SERIAL_CATCHPIC_PARA struRs232Cfg;
+ public NET_DVR_SERIAL_CATCHPIC_PARA struRs485Cfg;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwTriggerPicTimes; /* ÿͨһδմ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwAlarmInPicChanTriggered; /*ץͨ,λãӵ1λʼ*/
+ }
+
+ //ֶ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_MANUALSNAP
+ {
+ public byte byOSDEnable;
+ public byte byLaneNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 22, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int NET_ITC_GET_TRIGGERCFG = 3003; //ȡ
+ public const int NET_ITC_SET_TRIGGERCFG = 3004; //ô
+ public const int NET_DVR_GET_CURTRIGGERMODE = 3130; //ȡ豸ǰģʽ
+ public const int NET_ITC_GET_VIDEO_TRIGGERCFG = 3017; //ȡƵ羯
+ public const int NET_ITC_SET_VIDEO_TRIGGERCFG = 3018; //Ƶ羯
+
+ public const int MAX_ITC_LANE_NUM = 6;
+ public const int MAX_IOOUT_NUM = 4;
+ public const int MAX_LANEAREA_NUM = 2;
+ public const int MAX_IOIN_NUMEX = 10;
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_SERIAL_INFO
+ {
+ public byte bySerialProtocol;
+ public byte byIntervalType;
+ public ushort wInterval;
+ public byte byNormalPassProtocol;
+ public byte byInverseProtocol;
+ public byte bySpeedProtocol;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_EPOLICE_LANE_PARAM
+ {
+ public byte byEnable;
+ public byte byRelatedDriveWay;
+ public ushort wDistance;
+ public byte byRecordEnable;
+ public byte byRecordType;
+ public byte byPreRecordTime;
+ public byte byRecordDelayTime;
+ public byte byRecordTimeOut;
+ public byte bySignSpeed;
+ public byte bySpeedLimit;
+ public byte byOverlayDriveWay;
+ public NET_ITC_SERIAL_INFO struSerialInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IOOUT_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelatedIOOut;
+ public byte byFlashMode;
+ public byte bySerialType;
+ public byte byRelatedIOOutEx;
+ public byte bySnapPicPreRecord;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LANEAREA_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_PLATE_RECOG_REGION_PARAM[] struPlateRecog;
+ public byte byBigCarSignSpeed;
+ public byte byBigCarSpeedLimit;
+ public byte byRedTrafficLightChan;
+ public byte byYellowTrafficLightChan;
+ public byte byRelaLaneDirectionType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_EPOLICE_RS485_PARAM
+ {
+ public byte byRelatedLaneNum;
+ public byte byTrafficLightSignalSrc;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_ITC_PLATE_RECOG_PARAM struPlateRecog;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ITC_LANE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_EPOLICE_LANE_PARAM[] struLane;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_SINGLEIO_PARAM
+ {
+ public byte byDefaultStatus;
+ public byte byRelatedDriveWay;
+ public byte bySnapTimes;
+ public byte byRelatedIOOutEx;
+ public NET_ITC_INTERVAL_PARAM struInterval;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IOOUT_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelatedIOOut;
+ public byte byFlashMode;
+ public byte byEnable;
+ public byte byUseageType;
+ public byte byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LANEAREA_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_PLATE_RECOG_REGION_PARAM[] struPlateRecog;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_POST_SINGLEIO_PARAM
+ {
+ public NET_ITC_PLATE_RECOG_PARAM struPlateRecog;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IOIN_NUMEX, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_SINGLEIO_PARAM[] struSingleIO;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_CURTRIGGERMODE
+ {
+ public uint dwSize;
+ public uint dwTriggerType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_PLATE_RECOG_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 3)]
+ public string byDefaultCHN;
+ public byte byEnable;
+ public uint dwRecogMode;
+ public byte byVehicleLogoRecog;
+ public byte byProvince;
+ public byte byRegion;
+ public byte byRes1;
+ public ushort wPlatePixelWidthMin;
+ public ushort wPlatePixelWidthMax;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_INTERVAL_PARAM
+ {
+ public byte byIntervalType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTERVAL_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wInterval;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct UNION_REGION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 164, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_PLATE_RECOG_REGION_PARAM
+ {
+ public byte byMode;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public UNION_REGION uRegion;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_LANE_PARAM
+ {
+ public byte byEnable;
+ public byte byRelatedDriveWay;
+ public ushort wDistance;
+ public ushort wTrigDelayTime;
+ public byte byTrigDelayDistance;
+ public byte bySpeedCapEn;
+ public byte bySignSpeed;
+ public byte bySpeedLimit;
+ public byte bySnapTimes;
+ public byte byOverlayDriveWay;
+ public NET_ITC_INTERVAL_PARAM struInterval;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IOOUT_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelatedIOOut;
+ public byte byFlashMode;
+ public byte byCartSignSpeed;
+ public byte byCartSpeedLimit;
+ public byte byRelatedIOOutEx;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LANEAREA_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_PLATE_RECOG_REGION_PARAM[] struPlateRecog;
+ public byte byLaneType;
+ public byte byUseageType;
+ public byte byRelaLaneDirectionType;
+ public byte byLowSpeedLimit;
+ public byte byBigCarLowSpeedLimit;
+ public byte byLowSpeedCapEn;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_RADAR_PARAM
+ {
+ public byte byRadarType;
+ public byte byLevelAngle;
+ public ushort wRadarSensitivity;
+ public ushort wRadarSpeedValidTime;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public float fLineCorrectParam;
+ public int iConstCorrectParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_POST_RS485_RADAR_PARAM
+ {
+ public byte byRelatedLaneNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_ITC_PLATE_RECOG_PARAM struPlateRecog;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ITC_LANE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_LANE_PARAM[] struLane;
+ public NET_ITC_RADAR_PARAM struRadar;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_TRIGGER_PARAM_UNION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4280, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_SINGLE_TRIGGERCFG
+ {
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwTriggerType;
+ public NET_ITC_TRIGGER_PARAM_UNION uTriggerParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_TRIGGERCFG
+ {
+ public uint dwSize;
+ public NET_ITC_SINGLE_TRIGGERCFG struTriggerParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_VIDEO_TRIGGER_COND
+ {
+ public uint dwSize;
+ public uint dwChannel;
+ public uint dwTriggerMode;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_VIDEO_TRIGGER_PARAM_UNION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 1150, ArraySubType = UnmanagedType.U4)]
+ public uint[] uLen;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_LIGHT_ACCESSPARAM_UNION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 122, ArraySubType = UnmanagedType.U4)]
+ public uint[] uLen;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_TRAFFIC_LIGHT_PARAM
+ {
+ public byte bySource; //ͨźŵƽԴ0-IO룬1-RS485
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_ITC_LIGHT_ACCESSPARAM_UNION struLightAccess;//źŵƽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Բṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_LANE_LOGIC_PARAM
+ {
+ public byte byUseageType; //;ͣITC_LANE_USEAGE_TYPE
+ public byte byDirectionType; //ͣITC_LANE_DIRECTION_TYPE
+ public byte byCarDriveDirect; //ʻITC_LANE_CAR_DRIVE_DIRECT
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 33, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //Υṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_VIOLATION_DETECT_PARAM
+ {
+ public uint dwVioDetectType; //Υ, λʾ, ITC_VIOLATION_DETECT_TYPE ,0-,1-
+ public byte byDriveLineSnapTimes; //ѹץ,2-3
+ public byte byReverseSnapTimes; //ץ,2-3
+ public ushort wStayTime; //ռͣʱ䣨ʱץģλs
+ public byte byNonDriveSnapTimes;//ռץ2-3
+ public byte byChangeLaneTimes;//Υץ 2-3
+ public byte bybanTimes;//Υץ2-3
+ public byte byDriveLineSnapSen;// ѹ(0~100)(3.7Ver)
+ public ushort wSnapPosFixPixel; //2,3ץλСƫ(ΥźŵʱЧ)λأ Ľ
+ public byte bySpeedTimes;//Υץ2-3(3.8Ver)
+ public byte byTurnAroundEnable;//Υµͷʹ 0~ر 1~
+ public byte byThirdPlateRecogTime;//ʶʱ 0~180s
+ public byte byPostSnapTimes;//ץ,1-2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public ushort wStopLineDis; //羯2ΥͼƬֹͣߵ̾룬[0,300]λ()
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_VIDEO_TRIGGER_PARAM
+ {
+ public uint dwSize;
+ public uint dwMode;
+ public NET_ITC_VIDEO_TRIGGER_PARAM_UNION uVideoTrigger;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_LAMP_EXTERNAL_CFG
+ {
+ public uint dwSize;
+ public byte byEnable; //ʹ 0 1
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_LAMP_STATE struLampStateCtrl;//ָʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ָʾ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_LAMP_STATE
+ {
+ public byte byFlicker;//0~˸ 1 ˸
+ public byte byParkingIndex;//λ13
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwIONo;//1~IO1;2~IO2;4~IO3;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int MAX_LED_INFO_LEN = 512;
+ public const int MAX_VOICE_INFO_LEN = 128;
+
+ public const int NET_DVR_GET_LEDDISPLAY_CFG = 3673;
+ public const int NET_DVR_SET_LEDDISPLAY_CFG = 3672;
+ public const int NET_DVR_SET_VOICEBROADCAST_CFG = 3675;
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LEDDISPLAY_CFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LED_INFO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDisplayInfo;
+ public byte byDisplayMode;
+ public byte bySpeedType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwShowTime;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VOICEBROADCAST_CFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VOICE_INFO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sInfo; //
+ public byte byBroadcastNum;// 1~10
+ public byte byIntervalTime;// ʱ,1~5s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 126, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_VIDEO_EPOLICE_PARAM
+ {
+ public byte byEnable; //Ƿã0-ã1-
+ public byte byLaneNum; //ʶij
+ public byte byLogicJudge;//ΥжֵΪ0-1-
+ public byte byRes1;
+ public NET_ITC_PLATE_RECOG_PARAM struPlateRecog; //ʶ
+ public NET_ITC_TRAFFIC_LIGHT_PARAM struTrafficLight; //ͨźŵƲ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ITC_LANE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_LANE_VIDEO_EPOLICE_PARAM[] struLaneParam; //
+ public NET_ITC_LINE struLaneBoundaryLine; //߽ߣұ߳ı߽ߣ
+ public NET_ITC_LINE struLeftLine; //תֽ
+ public NET_ITC_LINE struRightLine; //תֽ
+ public NET_ITC_LINE struTopZebraLine; //ϲ
+ public NET_ITC_LINE struBotZebraLine; //²
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Ƶ羯߽ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_LINE
+ {
+ public NET_VCA_LINE struLine; //߲
+ public byte byLineType; //ͣITC_LINE_TYPE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_POLYGON
+ {
+ public uint dwPointNum; //Ч ڵ33һΪЧ߽ΪЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_POINT[] struPos; //α߽,20
+ }
+
+ //Υ߲ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_VIOLATION_DETECT_LINE
+ {
+ public NET_ITC_LINE struLaneLine; //߲
+ public NET_ITC_LINE struStopLine; //ֹ߲ͣ
+ public NET_ITC_LINE struRedLightLine; //ƴ߲
+ public NET_ITC_LINE struCancelLine; //ֱдλȡ
+ public NET_ITC_LINE struWaitLine; //ֹ߲ͣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITC_LINE[] struRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_ITC_LANE_VIDEO_EPOLICE_PARAM
+ {
+ public byte byLaneNO; //ij
+ public byte bySensitivity; //Ȧȣ[1,100]
+ public byte byEnableRadar;//״0-ã1-
+ //ͣοITC_RELA_LANE_DIRECTION_TYPE
+ //òΪŶӦȷΨһԡ
+ public byte byRelaLaneDirectionType;
+ public NET_ITC_LANE_LOGIC_PARAM struLane; //
+ public NET_ITC_VIOLATION_DETECT_PARAM struVioDetect; //Υ
+ public NET_ITC_VIOLATION_DETECT_LINE struLine; //Υ
+ public NET_ITC_POLYGON struPlateRecog; //ʶ
+ public byte byRecordEnable;//¼־0-¼1-¼
+ public byte byRecordType;//¼ͣ0-Ԥ¼1-ʱ¼
+ public byte byPreRecordTime;//¼ƬԤ¼ʱ䣨Ĭ0λ
+ public byte byRecordDelayTime;//¼Ƭʱʱ䣨Ĭ0λ
+ public byte byRecordTimeOut;//¼ʱʱ䣨룩
+ public byte byCarSpeedLimit; //ֵλkm/h
+ public byte byCarSignSpeed;//־٣λkm/h
+ public byte bySnapPicPreRecord; //ץͼƬԤ¼ʱ㣻0-ĬֵڶͼƬ1-һͼƬ2-ڶͼƬ3-ͼƬ
+ public NET_ITC_INTERVAL_PARAM struInterval;//ץļ20byte
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SPRCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHJC_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDefaultCHN; /*豸ʡݵĺּд*/
+ public byte byPlateOSD; /*0:ͳƲɫͼ,1:ͳƲɫͼ*/
+ public byte bySendJPEG1; /*0-ͽJPEGͼ,1-ͽJPEGͼ*/
+ public byte bySendJPEG2; /*0-ԶJPEGͼ,1-ԶJPEGͼ*/
+ public ushort wDesignedPlateWidth; /*ƿ*/
+ public byte byTotalLaneNum; /*ʶij*/
+ public byte byRes1; /**/
+ public ushort wRecognizedLane; /*ʶijţλʾbit0ʾ1Ƿʶ0-ʶ1-ʶ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LANERECT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_RECT[] struLaneRect; /*ʶ*/
+ public uint dwRecogMode; /*ʶͣ
+ bit0-ʶ0-ʶ1-ʶ(βʶ)
+ bit1-ʶСʶ0-Сʶ1-ʶ
+ bit2-ɫʶ0-óɫʶڱʶСʶʱֹã1-ɫʶ
+ bit3-ũóʶ0-ũóʶ1-ũóʶ
+ bit4-ģʶ0-ģʶ1-ģʶ
+ bit5-֡λλ0-֡λ1-λ
+ bit6-֡ʶʶ0-֡ʶ1-ʶ
+ bit7-ϻ죺0-죬1- */
+ public byte bySendPRRaw; //Ƿԭͼ0-ͣ1-
+ public byte bySendBinImage; //Ƿͳƶֵͼ0-ͣ1-
+ public byte byDelayCapture; //ʱץĿ,λ֡
+ public byte byUseLED; //ʹLEDƣ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 68, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLCCFG
+ {
+ public uint dwSize;
+ public byte byPlcEnable; //ǷóȲĬã0-رգ1-
+ public byte byPlateExpectedBright; //ƵԤȣĬֵ50, Χ[0, 100]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public byte byTradeoffFlash; //ǷƵӰ: 0 - ; 1 - (Ĭ);
+ //ʹƲʱ, ǼƵǿЧӦ, ҪΪ1;Ϊ0
+ public byte byCorrectFactor; //ϵ, Χ[0, 100], Ĭֵ50 (tradeoff_flashлʱ,ָĬֵ
+ public ushort wLoopStatsEn; //ǷȦȣλʾ0-ͳƣ1-ͳ
+ public byte byPlcBrightOffset;// Ȳ(ȦģʽЧ)ȡֵΧ1~100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 19, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICESTATECFG
+ {
+ public uint dwSize;
+ public ushort wPreviewNum; //ԤӸ
+ public ushort wFortifyLinkNum; //Ӹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LINK, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPADDR[] struPreviewIP; //ԤûIPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_FORTIFY_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_IPADDR[] struFortifyIP; //ӵûIPַ
+ public uint dwVideoFrameRate; //֡ʣ0-ȫ; 1-1/16; 2-1/8; 3-1/4; 4-1/2; 5-1; 6-2; 7-4; 8-6; 9-8; 10-10; 11-12; 12-16; 13-20; 14-15; 15-18; 16-22;
+ public byte byResolution; //ֱ0-DCIF 1-CIF, 2-QCIF, 3-4CIF, 4-2CIF 5,16-VGA640*480, 17-UXGA1600*1200, 18-SVGA 800*600,19-HD720p1280*720,20-XVGA, 21-HD900p, 27-HD1080i, 28-2560*1920, 29-1600*304, 30-2048*1536, 31-2448*2048
+ public byte bySnapResolution; //ץķֱ0-DCIF 1-CIF, 2-QCIF, 3-4CIF, 4-2CIF 5,16-VGA640*480, 17-UXGA1600*1200, 18-SVGA 800*600,19-HD720p1280*720,20-XVGA, 21-HD900p, 27-HD1080i, 28-2560*1920, 29-1600*304, 30-2048*1536, 31-2448*2048
+ public byte byStreamType; //ͣ0-1-
+ public byte byTriggerType; //ģʽ0-Ƶ1-ͨ
+ public uint dwSDVolume; //SD
+ public uint dwSDFreeSpace; //SDʣռ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DRIVECHAN_NUM * MAX_COIL_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDetectorState; //״̬0-δʹã1-2-쳣
+ public byte byDetectorLinkState; //״̬0-δӣ1-
+ public byte bySDStatus; //SD״̬ 01ߣ2쳣3-sd
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_FORTIFY_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFortifyLevel; //ȼ0-ޣ1-һȼߣ2-ȼУ3-ȼͣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 116, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POSTEPOLICECFG
+ {
+ public uint dwSize;
+ public uint dwDistance;//Ȧ,λcmȡֵΧ[0,20000]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SIGNALLIGHT_NUM, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwLightChan; //źŵͨ
+ public byte byCapSpeed;//־٣λkm/hȡֵΧ[0,255]
+ public byte bySpeedLimit;//ֵλkm/hȡֵΧ[0,255]
+ public byte byTrafficDirection;//0-ɶ1-2-3-ɱ
+ public byte byRes1; //
+ public ushort wLoopPreDist; /*ӳپ λ*/
+ public ushort wTrigDelay; /*Ӳʱʱ λ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//ֽ
+ }
+ /***************************** end *********************************************/
+ public const int IPC_PROTOCOL_NUM = 50; //ipc Э
+
+ //Э
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PROTO_TYPE
+ {
+ public uint dwType; /*ipcЭֵ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDescribe; /*Эֶ*/
+ }
+
+ //Эб
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPC_PROTO_LIST
+ {
+ public uint dwSize;
+ public uint dwProtoNum; /*ЧipcЭĿ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = IPC_PROTOCOL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PROTO_TYPE[] struProto; /*ЧipcЭ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ЭбV41
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPC_PROTO_LIST_V41
+ {
+ public uint dwSize;
+ public uint dwProtoNum; //ЧipcЭĿ
+ public IntPtr pBuffer; //Эб, dwProtoNum NET_DVR_PROTO_TYPEṹ
+ public uint dwBufferLen; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ public const int MAX_ALERTLINE_NUM = 8; //
+
+ //Խѯ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TRAVERSE_PLANE_SEARCHCOND
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALERTLINE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_TRAVERSE_PLANE[] struVcaTraversePlane; //Խ
+ public uint dwPreTime; /*ܱǰʱ λ:*/
+ public uint dwDelayTime; /*ܱӳʱ λ:*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5656, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ public const int MAX_INTRUSIONREGION_NUM = 8; //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INTRUSION_SEARCHCOND
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INTRUSIONREGION_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_INTRUSION[] struVcaIntrusion; //
+ public uint dwPreTime; /*ܱǰʱ λ:*/
+ public uint dwDelayTime; /*ܱӳʱ λ:*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5400, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_AREA_SMARTSEARCH_COND_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6144, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLen; //ṹ峤
+ /*[FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64 * 96, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMotionScope; // 0-96λʾ64У96*64С飬1-ƶ0-ƶ
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_TRAVERSE_PLANE_SEARCHCOND struTraversPlaneCond; //Խ
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_INTRUSION_SEARCHCOND struIntrusionCond; //
+ * */
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SMART_SEARCH_PARAM
+ {
+ public byte byChan; //ͨ
+ public byte bySearchCondType; //ܲNET_DVR_AREA_SMARTSEARCH_COND_UNION
+ /*0-ƶ 1-Խ⣬ 2-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_TIME struStartTime; //¼ʼʱ
+ public NET_DVR_TIME struEndTime; //¼ֹͣʱ
+ public NET_DVR_AREA_SMARTSEARCH_COND_UNION uSmartSearchCond; //ܲ
+ public byte bySensitivity; //ƶ,1 >80% 2 40%~80% 3 1%~40%
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SMART_SEARCH_RET
+ {
+ public NET_DVR_TIME struStartTime; //ƶⱨʼʱ
+ public NET_DVR_TIME struEndTime; //¼ֹͣʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //IPSAN ļĿ¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPSAN_SERACH_PARAM
+ {
+ public NET_DVR_IPADDR struIP; // IPSAN IPַ
+ public ushort wPort; // IPSAN ˿
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPSAN_SERACH_RET
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDirectory; // صļĿ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //DVR豸
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICECFG_V40
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDVRName; //DVR
+ public uint dwDVRID; //DVR ID,ң //V1.4(0-99), V1.5(0-255)
+ public uint dwRecycleRecord; //Ƿѭ¼,0:; 1:
+ //²ɸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber; //к
+ public uint dwSoftwareVersion; //汾,16λ汾,16λǴΰ汾
+ public uint dwSoftwareBuildDate; //,0xYYYYMMDD
+ public uint dwDSPSoftwareVersion; //DSP汾,16λ汾,16λǴΰ汾
+ public uint dwDSPSoftwareBuildDate; // DSP,0xYYYYMMDD
+ public uint dwPanelVersion; // ǰ汾,16λ汾,16λǴΰ汾
+ public uint dwHardwareVersion; // Ӳ汾,16λ汾,16λǴΰ汾
+ public byte byAlarmInPortNum; //DVR
+ public byte byAlarmOutPortNum; //DVR
+ public byte byRS232Num; //DVR 232ڸ
+ public byte byRS485Num; //DVR 485ڸ
+ public byte byNetworkPortNum; //ڸ
+ public byte byDiskCtrlNum; //DVR Ӳ̿
+ public byte byDiskNum; //DVR Ӳ̸
+ public byte byDVRType; //DVR, 1:DVR 2:ATM DVR 3:DVS ......
+ public byte byChanNum; //DVR ͨ
+ public byte byStartChan; //ʼͨ,DVS-1,DVR - 1
+ public byte byDecordChans; //DVR ·
+ public byte byVGANum; //VGAڵĸ
+ public byte byUSBNum; //USBڵĸ
+ public byte byAuxoutNum; //ڵĸ
+ public byte byAudioNum; //ڵĸ
+ public byte byIPChanNum; //ͨ 8λ8λbyHighIPChanNum
+ public byte byZeroChanNum; //ͨ
+ public byte bySupport; //λΪ0ʾ֧֣1ʾ֧֣
+ //bySupport & 0x1, ʾǷ֧
+ //bySupport & 0x2, ʾǷֱ֧
+ //bySupport & 0x4, ʾǷ֧ѹȡ
+ //bySupport & 0x8, ʾǷֶ֧
+ //bySupport & 0x10, ʾ֧ԶSADP
+ //bySupport & 0x20, ʾ֧Raid
+ //bySupport & 0x40, ʾ֧IPSAN
+ //bySupport & 0x80, ʾ֧rtp over rtsp
+ public byte byEsataUseage; //EsataĬ;0-Ĭϱݣ1-Ĭ¼
+ public byte byIPCPlug; //0-رռ弴ã1-弴
+ public byte byStorageMode; //0-ģʽ,1-, 2֡ģʽ
+ public byte bySupport1; //λΪ0ʾ֧֣1ʾ֧
+ //bySupport1 & 0x1, ʾǷ֧snmp v30
+ //bySupport1 & 0x2, ֻ֧طź
+ //bySupport1 & 0x4, Ƿֲ֧ȼ
+ //bySupport1 & 0x8, 豸Ƿֲ֧ʱչ
+ //bySupport1 & 0x10, ʾǷֶ֧33
+ //bySupport1 & 0x20, ʾǷ֧rtsp over http
+ public ushort wDevType;//豸ͺ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DEV_TYPE_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDevTypeName;//豸ͺ
+ public byte bySupport2; //չλΪ0ʾ֧֣1ʾ֧
+ //bySupport2 & 0x1, ʾǷ֧չOSDַ(ն˺ץĻչ)
+ public byte byAnalogAlarmInPortNum; //ģⱨ
+ public byte byStartAlarmInNo; //ģⱨʼ
+ public byte byStartAlarmOutNo; //ģⱨʼ
+ public byte byStartIPAlarmInNo; //IPʼ 0-Ч
+ public byte byStartIPAlarmOutNo; //IPʼ 0-Ч
+ public byte byHighIPChanNum; //ͨ8λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ public const int MAX_ZEROCHAN_NUM = 16;
+ //ͨѹò
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ZEROCHANCFG
+ {
+ public uint dwSize; //ṹ
+ public byte byEnable; //0-ֹͣͨ룬1-ʾͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwVideoBitrate; /*Ƶ 0- 1-16K() 2-32K 3-48k 4-64K 5-80K 6-96K 7-128K 8-160k 9-192K 10-224K 11-256K
+ * 12-320K 13-384K 14-448K 15-512K 16-640K 17-768K 18-896K 19-1024K 20-1280K 21-1536K 22-1792K
+ * 23-2048K
+ * λ(31λ)ó1ʾԶ, 0-30λʾֵ(MIN-32K MAX-8192K) */
+ public uint dwVideoFrameRate; //֡ 0-ȫ; 1-1/16; 2-1/8; 3-1/4; 4-1/2; 5-1; 6-2; 7-4; 8-6; 9-8; 10-10; 11-12; 12-16; 13-20,
+ //V2.014-15, 15-18, 16-22;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ͨŲ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ZERO_ZOOMCFG
+ {
+ public uint dwSize; //ṹ
+ public NET_VCA_POINT struPoint; //е
+ public byte byState; //ڵ״̬0-С1-Ŵ
+ public byte byPreviewNumber; //ԤĿ,0-1,1-4,2-9,3-16 òֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOW_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPreviewSeq;//ͨϢ òֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ public const int DESC_LEN_64 = 64;
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SNMPCFG
+ {
+ public uint dwSize; //ṹ
+ public byte byEnable; //0-SNMP1-ʾSNMP
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public ushort wVersion; //snmp 汾 v1 = 1, v2 =2, v3 =3豸Ŀǰ֧ v3
+ public ushort wServerPort; //snmpϢն˿ڣĬ 161
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byReadCommunity; //ͬ壬31,Ĭ"public"
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byWriteCommunity;//дͬ,31 ֽ,Ĭ "private"
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN_64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTrapHostIP; //ipַ֧IPV4 IPV6
+ public ushort wTrapHostPort; //trap˿
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTrapName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 70, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SNMPv3_USER
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName; // û
+ public byte bySecLevel; //ȫ 1-У 2-ȨУ 3-ȨУ
+ public byte byAuthtype; //֤ 0-MD5֤ 1-SHA֤ 2: none
+ public byte byPrivtype; //0: DES; 1: AES; 2: none;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAuthpass; //֤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPrivpass; //
+ }
+
+ //snmpv30
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SNMPCFG_V30
+ {
+ public uint dwSize; //ṹ
+ public byte byEnableV1; //0-SNMP V11-ʾSNMP V1
+ public byte byEnableV2; //0-SNMP V21-ʾSNMP V2
+ public byte byEnableV3; //0-SNMP V31-ʾSNMP V3
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public ushort wServerPort; //snmpϢն˿ڣĬ 161
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byReadCommunity; //ͬ壬31,Ĭ"public"
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byWriteCommunity; //дͬ,31 ֽ,Ĭ "private"
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN_64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTrapHostIP; //ipַ֧IPV4 IPV6
+ public ushort wTrapHostPort; // trap˿
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_SNMPv3_USER struRWUser; // дû
+ public NET_DVR_SNMPv3_USER struROUser; // ֻû
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTrapName;
+ }
+
+ public const int PROCESSING = 0; //ڴ
+ public const int PROCESS_SUCCESS = 100; //
+ public const int PROCESS_EXCEPTION = 400; //쳣
+ public const int PROCESS_FAILED = 500; //ʧ
+ public const int PROCESS_QUICK_SETUP_PD_COUNT = 501; //һ3Ӳ
+
+ public const int SOFTWARE_VERSION_LEN = 48;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SADPINFO
+ {
+ public NET_DVR_IPADDR struIP; // 豸IPַ
+ public ushort wPort; // 豸˿ں
+ public ushort wFactoryType; // 豸
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = SOFTWARE_VERSION_LEN)]
+ public string chSoftwareVersion;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 16)]
+ public string chSerialNo; // к
+ public ushort wEncCnt; // ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr; // MAC ַ
+ public NET_DVR_IPADDR struSubDVRIPMask; // DVR IPַ
+ public NET_DVR_IPADDR struGatewayIpAddr; //
+ public NET_DVR_IPADDR struDnsServer1IpAddr; /* 1IPַ */
+ public NET_DVR_IPADDR struDnsServer2IpAddr; /* 2IPַ */
+ public byte byDns;
+ public byte byDhcp;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 158, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ public const int MAX_SADP_NUM = 256; //豸Ŀ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SADPINFO_LIST
+ {
+ public uint dwSize; // ṹС
+ public ushort wSadpNum; // 豸Ŀ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SADP_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SADPINFO[] struSadpInfo; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SADP_VERIFY
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string chPassword;
+ public NET_DVR_IPADDR struOldIP;
+ public ushort wOldPort;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEO_CALL_COND
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEO_CALL_PARAM
+ {
+ public uint dwSize;
+ public uint dwCmdType; // 0-У1-ȡκУ2-κ 3-ܾ 4-峬ʱ 5-ͨ6-豸ͨУ7-ͻͨУ8ڻ
+ public ushort wPeriod; //ں, Χ[0,9]
+ public ushort wBuildingNumber; //¥
+ public ushort wUnitNumber; //Ԫ
+ public ushort wFloorNumber; //
+ public ushort wRoomNumber; //
+ public ushort wDevIndex; //豸
+ public byte byUnitType; //豸ͣ1-ſڻ2-3-ڻ4-Χǽ5-ſڻ6-ȷϻ7-8700ͻˣ8-4200ͻˣ9-APP
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 115, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_UNLOCK_RECORD_INFO
+ {
+ public byte byUnlockType; //ʽοUNLOCK_TYPE_ENUM
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byControlSrc; //ԴϢˢʱΪţʱΪөʯAPP˺ţά뿪ʱΪÿ͵ֻţΪ豸
+ public uint dwPicDataLen; //ͼƬݳ
+ public IntPtr pImage; //ͼƬָ
+ public uint dwCardUserID; //ֿID
+ public ushort nFloorNumber;//ˢʱЧΪ¥
+ public ushort wRoomNumber; //ԴϢˢʱЧΪţ
+ public ushort wLockID; //ſڻ0-ʾϽӵ1-ʾӿϽӵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = LOCK_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLockName; //ˢʱЧƣӦŲ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEmployeeNo; //ţԱID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 136, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ϢĶִ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NOTICEDATA_RECEIPT_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NOTICE_NUMBER_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byNoticeNumber; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 224, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //֤¼豸δʵ֣
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUTH_INFO
+ {
+ public byte byAuthResult; //֤0-Ч1-֤ɹ2-֤ʧ
+ public byte byAuthType; //֤ʽ0-Ч1-ָƣ2-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //
+ public uint dwPicDataLen; //ͼƬݳȣ֤ʽbyAuthTypeΪʱЧ
+ public IntPtr pImage; //ͼƬָ루֤ʽbyAuthTypeΪʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 212, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_VIDEO_INTERCOM_EVENT_INFO_UINON
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLen;
+ }
+
+ //ӶԽ¼¼
+ public struct NET_DVR_VIDEO_INTERCOM_EVENT
+ {
+ public uint dwSize; //ṹС
+ public NET_DVR_TIME_EX struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DEV_NUMBER_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDevNumber; //豸
+ public byte byEventType; //¼Ϣͣ1-¼2-ϢĶִ3-֤¼4-Ϣϴ5Ƿˢ¼6-ſڻ¼(ҪſڻܣˢʱŻϴ¼)
+ public byte byPicTransType; //ͼƬݴ䷽ʽ: 0-ƣ1-url
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_VIDEO_INTERCOM_EVENT_INFO_UINON uEventInfo; //¼ϢݲοbyEventTypeȡֵ
+ public uint dwIOTChannelNo; //IOTͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 252, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ public struct NET_DVR_CONTROL_GATEWAY
+ {
+ public uint dwSize; //ṹС
+ public uint dwGatewayIndex; //Žţ1ʼ
+ public byte byCommand; //0-رգ1-2-ͨ״̬3-ָͨ״̬
+ public byte byLockType; //ͣ0-ͨǰĬ϶Ϊ0,1-
+ public ushort wLockID; //ID1ʼԶ̿ſڻʱ0ʾſڻϽӵ1ʾӿϽӵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byControlSrc; //ԴϢ
+ public byte byControlType; //ͣ1-ʾ2-ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassword; //룬byLockTypeΪʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 108, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //XMLӿ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_XML_CONFIG_INPUT
+ {
+ public uint dwSize;//ṹС
+ public IntPtr lpRequestUrl;//ַʽ
+ public uint dwRequestUrlLen;
+ public IntPtr lpInBuffer;//XMLʽ
+ public uint dwInBufferSize;
+ public uint dwRecvTimeOut;//ճʱʱ䣬λms0ʹĬϳʱ5s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_XML_CONFIG_OUTPUT
+ {
+ public uint dwSize;//ṹС
+ public IntPtr lpOutBuffer;//XMLʽ
+ public uint dwOutBufferSize;
+ public uint dwReturnedXMLSize;//ʵXMLݴС
+ public IntPtr lpStatusBuffer;//ص״̬(XMLʽResponseStatus)ȡɹʱḳֵҪNULL
+ public uint dwStatusSize;//״̬С(ڴС)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHANNEL_GROUP
+ {
+ public uint dwSize;//ṹС
+ public uint dwChannel;//ͨ
+ public uint dwGroup; //ţ0ʼ0ʾ1飬1ʾ2飬
+ public byte byID;//豸ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwPositionNo;//λţIPCΪ0IPD1ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 56, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_TRAVERSE_PLANE_DETECTION
+ {
+ public uint dwSize;//ṹС
+ public byte byEnable;//ʹԽܣ0- 1-
+ public byte byEnableDualVca; //֧ܺ0- ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALERTLINE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_TRAVERSE_PLANE[] struAlertParam;//߲
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmSched;//ʱ䣬ÿ7죬ÿ8ʱ
+
+ public NET_DVR_HANDLEEXCEPTION_V40 struHandleException;//쳣ʽ
+
+ public uint dwMaxRelRecordChanNum;
+ public uint dwRelRecordChanNum;
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[] byRelRecordChan;
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struHolidayTime; //ղʱ䣬8ʱ
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STD_CONFIG
+ {
+ public IntPtr lpCondBuffer;
+ public uint dwCondSize;
+ public IntPtr lpInBuffer;
+ public uint dwInSize;
+ public IntPtr lpOutBuffer;
+ public uint dwOutSize;
+ public IntPtr lpStatusBuffer;
+ public uint dwStatusSize;
+ public IntPtr lpXmlBuffer;
+ public uint dwXmlSize;
+ public byte byDataType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_THERMOMETRY_COND
+ {
+ public uint dwSize;
+ public uint dwChannel;
+ public ushort wPresetNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 62, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_THERMOMETRY_TRIGGER_COND
+ {
+ public uint dwSize;
+ public uint dwChan;
+ public uint dwPreset;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EVENT_TRIGGER
+ {
+ public uint dwSize;
+ public NET_DVR_HANDLEEXCEPTION_V41 struHandleException;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRelRecordChan;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PRESETCHAN_INFO[] struPresetChanInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CRUISECHAN_INFO[] struCruiseChanInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PTZTRACKCHAN_INFO[] struPtzTrackInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_THERMOMETRY_ALARMRULE
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = THERMOMETRY_ALARMRULE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_THERMOMETRY_ALARMRULE_PARAM[] struThermometryAlarmRuleParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_THERMOMETRY_ALARMRULE_PARAM
+ {
+ public byte byEnabled;
+ public byte byRuleID;
+ public byte byRule;
+ public byte byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)]
+ public string szRuleName;
+ public float fAlert;
+ public float fAlarm;
+ public float fThreshold;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_THERMOMETRY_ALARM
+ {
+ public uint dwSize;
+ public uint dwChannel;//ͨ
+ public byte byRuleID;//ID
+ public byte byThermometryUnit;//µλ: 0-϶ȣ棩1-϶ȣH2-(K)
+ public ushort wPresetNo; //Ԥõ
+ public NET_PTZ_INFO struPtzInfo;//ptzϢ
+ public byte byAlarmLevel;//0-Ԥ 1-
+ public byte byAlarmType;/* 0-¶ 1-¶ 2-ƽ¶ 3-² 4-¶ͻ 5-¶ͻ*/
+ public byte byAlarmRule;//0-ڣ1-С
+ public byte byRuleCalibType;//궨 0-㣬1-2
+ public NET_VCA_POINT struPoint;//꣨궨ΪʱЧ
+ public NET_VCA_POLYGON struRegion;//궨ΪʱЧ
+ public float fRuleTemperature;/*ù¶,ȷСһλ(-40-1000),+100 */
+ public float fCurrTemperature;/*ǰ¶,ȷСһλ(-40-1000),+100 */
+ public uint dwPicLen;//ɼͼƬ
+ public uint dwThermalPicLen;//ȳͼƬ
+ public uint dwThermalInfoLen;//ȳϢ
+ public IntPtr pPicBuff; ///ɼͼƬָ
+ public IntPtr pThermalPicBuff;// ȳͼƬָ
+ public IntPtr pThermalInfoBuff; //ȳϢָ
+ public NET_VCA_POINT struHighestPoint;//ߡ¶λ꣨궨ΪߡʱЧ
+ public float fToleranceTemperature;/* ݲ¶,ȷСһλ(-40-1000),+100 */
+ public uint dwAlertFilteringTime;//¶Ԥȴʱ λ ΧΪ0-200룬ĬΪ0
+ public uint dwAlarmFilteringTime;//¶ȱȴʱ λ ΧΪ0-200룬ĬΪ0
+ public uint dwTemperatureSuddenChangeCycle;//¶ͻ¼ڣλ
+ public float fTemperatureSuddenChangeValue;//¶ͻֵ,ȷСһλ(0)
+ public byte byPicTransType; //ͼƬݴ䷽ʽ: 0-ƣ1-url
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwVisibleChannel; //ɼͨͨ
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ public float fAlarmRuleTemperature;/* TMAù¶,ȷСһλ(-40-1000),+100 */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_SDK_MANUALTHERM_BASICPARAM
+ {
+ public uint dwSize;
+ public ushort wDistance;//(m)[0, 10000]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public float fEmissivity;//( ȷСλ)[0.01, 1.00](ı)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_SDK_POINT_THERMOMETRY
+ {
+ public float fPointTemperature;/*µǰ¶, 궨Ϊ0-ʱЧȷСһλ(-40-1000),+100*10 */
+ public NET_VCA_POINT struPoint;//꣨궨Ϊ㡱ʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_SDK_REGION_THERMOMETRY
+ {
+ public float fMaxTemperature;//¶,ȷСһλ(-40-1000),+100*10 */
+ public float fMinTemperature;//¶,ȷСһλ(-40-1000),+100*10 */
+ public float fAverageTemperature;//ƽ¶,ȷСһλ(-40-1000),+100*10 */
+ public float fTemperatureDiff;//²,ȷСһλ(-40-1000),+100*10 */
+ public NET_VCA_POLYGON struRegion;//ߣ궨ΪߡߡʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_SDK_MANUALTHERM_RULE
+ {
+ public byte byRuleID;//ID 0-ʾЧ1ʼ listڲжЧԣ
+ public byte byEnable;//Ƿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] szRuleName;//
+ public byte byRuleCalibType;//궨 0-㣬1-2-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_SDK_POINT_THERMOMETRY struPointTherm;//£궨Ϊ0-ʱЧ
+ public NET_SDK_REGION_THERMOMETRY struRegionTherm; //£궨Ϊ1-2-ʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_SDK_MANUAL_THERMOMETRY
+ {
+ public uint dwSize;//ṹС
+ public uint dwChannel;//ͨ
+ public uint dwRelativeTime; // ʱֻ꣨
+ public uint dwAbsTime; // ʱֻ꣨
+ public byte byThermometryUnit;//µλ: 0-϶ȣ棩1-϶ȣH2-(K)
+ public byte byDataType;//״̬:0-У1-ʼ2-ֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_SDK_MANUALTHERM_RULE struRuleInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ʵʱ¶ȼṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_REALTIME_THERMOMETRY_COND
+ {
+ public uint dwSize;
+ public uint dwChan;//ͨţ1ʼ0xffffffffȡȫͨ
+ public byte byRuleID; //ID 0-ȡȫID1ʼ
+ /*
+ * 1-ʱģʽ豸ÿһϴݵ¡ºƽ¶ֵ²
+ * 2-²ģʽһһ»»ƽ»²ֵ²ڵ2϶ȣϴ¡ºƽ¶ֵڵһСʱ²ֵС2϶ȣϴ¡¡ƽº²ֵ
+ */
+ public byte byMode; //ģʽ 0-Ϊ豸1-ʱģʽ2-²ģʽ
+ public ushort wInterval; //ϴ²ģʽ֧֣1~3600S0Ĭ3600Sϴһ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POINT_THERM_CFG
+ {
+ public float fTemperature;//ǰ¶
+ public NET_VCA_POINT struPoint;//꣨궨ΪʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 120, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LINEPOLYGON_THERM_CFG
+ {
+ public float fMaxTemperature;//
+ public float fMinTemperature;//
+ public float fAverageTemperature;//ƽ
+ public float fTemperatureDiff;//²
+ public NET_VCA_POLYGON struRegion;//궨Ϊ/ߵʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_THERMOMETRY_UPLOAD
+ {
+ public uint dwSize;
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] szRuleName;//
+ public byte byRuleID;//ID
+ public byte byRuleCalibType;//궨 0-㣬1-2-
+ public ushort wPresetNo; //Ԥõ
+ public NET_DVR_POINT_THERM_CFG struPointThermCfg;
+ public NET_DVR_LINEPOLYGON_THERM_CFG struLinePolygonThermCfg;
+ public byte byThermometryUnit;//µλ: 0-϶ȣ棩1-϶ȣH2-(K)
+ public byte byDataType;//״̬:0-У1-ʼ2-
+ public byte byRes1;
+ /*
+ bit0-ĵ£0-֧֣1-֧֣
+ bit1-ߵ£0-֧֣1-֧֣
+ bit2-͵£0-֧֣1-֧֣
+ */
+ public byte bySpecialPointThermType;// Ƿ֧
+ public float fCenterPointTemperature;//ĵ¶,ȷСһλ(-40-1500),+100*10 bySpecialPointThermTypeжǷ֧ĵ㣩
+ public float fHighestPointTemperature;//ߵ¶,ȷСһλ(-40-1500),+100*10bySpecialPointThermTypeжǷ֧ߵ㣩
+ public float fLowestPointTemperature;//͵¶,ȷСһλ(-40-1500),+100*10bySpecialPointThermTypeжǷ֧͵㣩
+ public NET_VCA_POINT struHighestPoint;//ߡ¶λ꣨궨ΪߡʱЧ
+ public NET_VCA_POINT struLowestPoint;//ߡ¶λ꣨궨ΪߡʱЧ
+ public byte yIsFreezedata;//Ƿݶ 0- 1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public uint dwChan; //ͨţѯͨΪ0xffffffffʱֶЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 88, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ /***************************** end *********************************************/
+
+ /*******************************ݽṹ begin********************************/
+ //ȡ豸Ϣӿڶ
+ public const int DESC_LEN_32 = 32; //ֳ
+ public const int MAX_NODE_NUM = 256; //ڵ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DESC_NODE
+ {
+ public int iValue;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDescribe; //ֶ
+ public uint dwFreeSpace; //ȡбר,λΪM
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISKABILITY_LIST
+ {
+ public uint dwSize; //ṹ
+ public uint dwNodeNum; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NODE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DESC_NODE[] struDescNode; //
+ }
+
+ //ݽб
+ public const int BACKUP_SUCCESS = 100; //
+ public const int BACKUP_CHANGE_DEVICE = 101; //豸豸
+
+ public const int BACKUP_SEARCH_DEVICE = 300; //豸
+ public const int BACKUP_SEARCH_FILE = 301; //¼ļ
+ public const int BACKUP_SEARCH_LOG_FILE = 302; //־ļ
+
+ public const int BACKUP_EXCEPTION = 400; //쳣
+ public const int BACKUP_FAIL = 500; //ʧ
+
+ public const int BACKUP_TIME_SEG_NO_FILE = 501; //ʱ¼ļ
+ public const int BACKUP_NO_RESOURCE = 502; //벻Դ
+ public const int BACKUP_DEVICE_LOW_SPACE = 503; //豸
+ public const int BACKUP_DISK_FINALIZED = 504; //¼̷
+ public const int BACKUP_DISK_EXCEPTION = 505; //¼쳣
+ public const int BACKUP_DEVICE_NOT_EXIST = 506; //豸
+ public const int BACKUP_OTHER_BACKUP_WORK = 507; //ݲڽ
+ public const int BACKUP_USER_NO_RIGHT = 508; //ûûвȨ
+ public const int BACKUP_OPERATE_FAIL = 509; //ʧ
+ public const int BACKUP_NO_LOG_FILE = 510; //Ӳ־
+
+ //ݹ̽ӿڶ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BACKUP_NAME_PARAM
+ {
+ public uint dwFileNum; //ļ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RECORD_FILE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_FINDDATA_V30[] struFileList; //ļб
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDiskDes; //ݴ
+ public byte byWithPlayer; //Ƿݲ
+ public byte byContinue; /*Ƿ 0 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BACKUP_TIME_PARAM
+ {
+ public int lChannel; //ʱ䱸ݵͨ
+ public NET_DVR_TIME struStartTime; //ݵʼʱ
+ public NET_DVR_TIME struStopTime; //ݵֹʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDiskDes; //ݴ
+ public byte byWithPlayer; //Ƿݲ
+ public byte byContinue; //Ƿ 0 1
+ public byte byDrawFrame; //0 ֡ 1 ֡
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 33, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+ /********************************* end *******************************************/
+ public enum COMPRESSION_ABILITY_TYPE
+ {
+ COMPRESSION_STREAM_ABILITY = 0, //ѹ
+ MAIN_RESOLUTION_ABILITY = 1, //ѹֱ
+ SUB_RESOLUTION_ABILITY = 2, //ѹֱ
+ EVENT_RESOLUTION_ABILITY = 3, //¼ѹֱ
+ FRAME_ABILITY = 4, //֡
+ BITRATE_TYPE_ABILITY = 5, //λ
+ BITRATE_ABILITY = 6, //λ
+ THIRD_RESOLUTION_ABILITY = 7, //ѹֱ
+ STREAM_TYPE_ABILITY = 8, //
+ PIC_QUALITY_ABILITY = 9, //ͼ
+ INTERVAL_BPFRAME_ABILITY = 10, //BP֡
+ VIDEO_ENC_ABILITY = 11, //Ƶ
+ AUDIO_ENC_ABILITY = 12, //Ƶ
+ VIDEO_ENC_COMPLEXITY_ABILITY = 13, //Ƶ븴Ӷ
+ FORMAT_ABILITY = 14, //װʽ
+ }
+
+ //б
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ABILITY_LIST
+ {
+ public uint dwAbilityType; // COMPRESSION_ABILITY_TYPE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ public uint dwNodeNum; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NODE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DESC_NODE[] struDescNode; //
+ }
+
+ public const int MAX_ABILITYTYPE_NUM = 12; //
+
+ // ѹб
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSIONCFG_ABILITY
+ {
+ public uint dwSize; //ṹ
+ public uint dwAbilityNum; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ABILITYTYPE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ABILITY_LIST[] struAbilityNode; //
+ }
+
+ //ģʽA
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDATE_MODEA
+ {
+ public byte byStartMonth; // ʼ 1ʼ
+ public byte byStartDay; // ʼ 1ʼ
+ public byte byEndMonth; //
+ public byte byEndDay; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDATE_MODEB
+ {
+ public byte byStartMonth; // 1ʼ
+ public byte byStartWeekNum; // ڼ 1ʼ
+ public byte byStartWeekday; // ڼ
+ public byte byEndMonth; // 1ʼ
+ public byte byEndWeekNum; // ڼ 1ʼ
+ public byte byEndWeekday; // ڼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDATE_MODEC
+ {
+ public ushort wStartYear; //
+ public byte byStartMon; //
+ public byte byStartDay; //
+ public ushort wEndYear; //
+ public byte byEndMon; //
+ public byte byEndDay; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_HOLIDATE_UNION
+ {
+ //С 12ֽ
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwSize;
+ /*[FieldOffsetAttribute(0)]
+ public NET_DVR_HOLIDATE_MODEA struModeA; // ģʽA
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_HOLIDATE_MODEB struModeB; // ģʽB
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_HOLIDATE_MODEC struModeC; // ģʽC
+ * */
+ }
+
+ public enum HOLI_DATE_MODE
+ {
+ HOLIDATE_MODEA = 0,
+ HOLIDATE_MODEB,
+ HOLIDATE_MODEC
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_PARAM
+ {
+ public byte byEnable; // Ƿ
+ public byte byDateMode; // ģʽ 0-ģʽA 1-ģʽB 2-ģʽC
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_DVR_HOLIDATE_UNION uHolidate; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ public const int MAX_HOLIDAY_NUM = 32;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_PARAM_CFG
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HOLIDAY_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_HOLIDAY_PARAM[] struHolidayParam; // ղ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ձʽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_HANDLE
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime; // ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 240, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HOLIDAY_RECORD
+ {
+ public uint dwSize;
+ public NET_DVR_RECORDDAY struRecDay; // ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RECORDSCHED[] struRecordSched; // ¼ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ public const int MAX_LINK_V30 = 128;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ONE_LINK
+ {
+ public NET_DVR_IPADDR struIP; // ͻIP
+ public int lChannel; // ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LINK_STATUS
+ {
+ public uint dwSize; // ṹС
+ public ushort wLinkNum; // ӵĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LINK_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_LINK[] struOneLink; // ӵĿͻϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ public const int MAX_BOND_NUM = 2;
+
+ //BONDINGýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_ONE_BONDING
+ {
+ public byte byMode;
+ public byte byUseDhcp;
+ public byte byMasterCard;
+ public byte byStatus;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NETWORK_CARD, ArraySubType = UnmanagedType.I1)]
+ public byte[] byBond;
+ public NET_DVR_ETHERNET_V30 struEtherNet;
+ public NET_DVR_IPADDR struGatewayIpAddr;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //BONDINGýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_NETWORK_BONDING
+ {
+ public uint dwSize;
+ public byte byEnable;
+ public byte byNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_BOND_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_ONE_BONDING[] struOneBond;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISK_QUOTA
+ {
+ public byte byQuotaType; // ,1 -
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public uint dwHCapacity; // Ĵ32λ λMB
+ public uint dwLCapacity; // Ĵ32λ λMB
+ public uint dwHUsedSpace; // ʹõĴ̴С32λ λMB
+ public uint dwLUsedSpace; // ʹõĴ̴С32λ λMB
+ public byte byQuotaRatio; // Ĵ̱,λ:%
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 21, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISK_QUOTA_CFG
+ {
+ public uint dwSize; // ṹС
+ public NET_DVR_DISK_QUOTA struPicQuota; // ͼƬ
+ public NET_DVR_DISK_QUOTA struRecordQuota; // ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIMING_CAPTURE
+ {
+ public NET_DVR_JPEGPARA struJpegPara; // ʱץͼͼƬ
+ public uint dwPicInterval; //ʱץͼʱ,λs 1-1s 2-2s 3-3s 4-4s 5-5s
+ //6-10m 7-30m 8-1h 9-12h 10-24h
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_REL_CAPTURE_CHAN
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byChan; // λʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ public const int MAX_PIC_EVENT_NUM = 32;
+ public const int MAX_ALARMIN_CAPTURE = 16;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_REL_CAPTURE_CHAN_V40
+ {
+ public uint dwMaxRelCaptureChanNum; //ɴĹͨ-ֻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwChanNo; //Ĺץͼͨţֵʾý,0xffffffffʾЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EVENT_CAPTURE_V40
+ {
+ public NET_DVR_JPEGPARA struJpegPara; // ¼ץͼͼƬ
+ public uint dwPicInterval; // ¼ץͼʱ λΪ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PIC_EVENT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_REL_CAPTURE_CHAN_V40[] struRelCaptureChan; // ± 0 ƶⴥץͼ 1 Ƶڵץͼ 2 Ƶʧץͼ,3ʾPIRץͼ4ʾ߱ץͼ5ʾȱץͼ,6ʾץͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN_CAPTURE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_REL_CAPTURE_CHAN_V40[] struAlarmInCapture; // 봥ץͼ±0 1
+ public uint dwMaxGroupNum; //豸ֵ֧ÿ16
+ public byte byCapTimes; //ץͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 59, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EVENT_CAPTURE
+ {
+ public NET_DVR_JPEGPARA struJpegPara; // ¼ץͼͼƬ
+ public uint dwPicInterval; /*¼ץͼʱ λΪ 1-1s 2-2s 3-3s 4-4s 5-5s
+ * 6-10m 7-30m 8-1h 9-12h 10-24h*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PIC_EVENT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_REL_CAPTURE_CHAN[] struRelCaptureChan; /* ± 0 ƶⴥץͼ 1 Ƶڵץͼ,
+ * 2 Ƶʧץͼ,3ʾPIRץͼ4ʾ߱ץͼ
+ * 5ʾȱץͼ,6ʾץͼ 7ʾ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ALARMIN_CAPTURE, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_REL_CAPTURE_CHAN[] struAlarmInCapture; //봥ץͼ±0 1
+ public byte byCapTimes; //ץͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 59, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_JPEG_CAPTURE_CFG_V40
+ {
+ public uint dwSize; //ṹ峤
+ public NET_DVR_TIMING_CAPTURE struTimingCapture;
+ public NET_DVR_EVENT_CAPTURE_V40 struEventCapture;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_JPEG_CAPTURE_CFG
+ {
+ public uint dwSize; // ṹС
+ public NET_DVR_TIMING_CAPTURE struTimingCapture;
+ public NET_DVR_EVENT_CAPTURE struEventCapture;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAPTURE_DAY
+ {
+ public byte byAllDayCapture; // Ƿȫץͼ
+ public byte byCaptureType; // ץͼͣ0-ʱץͼ1-ƶץͼ2-ץͼ3-ƶץͼ4-ƶͱץͼ6-ܱץͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAPTURE_SCHED
+ {
+ public NET_DVR_SCHEDTIME struCaptureTime; // ץͼʱ
+ public byte byCaptureType; // ץͼͣ0-ʱץͼ1-ƶץͼ2-ץͼ3-ƶץͼ4-ƶͱץͼ6-ܱץͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ͨץͼƻ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCHED_CAPTURECFG
+ {
+ public uint dwSize; //ṹ
+ public byte byEnable; //Ƿץͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CAPTURE_DAY[] struCaptureDay;//ȫץͼƻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CAPTURE_SCHED[] struCaptureSched;//ʱץͼƻ
+ public NET_DVR_CAPTURE_DAY struCaptureHoliday; //ץͼƻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TIMESEGMENT_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CAPTURE_SCHED[] struHolidaySched; //ʱμץͼƻ
+ public uint dwRecorderDuration; //ץͼʱ 0xffffffffʾֵЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FLOW_TEST_PARAM
+ {
+ public uint dwSize; //ṹС
+ public int lCardIndex; //
+ public uint dwInterval; //豸ϴʱ, λ:100ms
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FLOW_INFO
+ {
+ public uint dwSize; //ṹС
+ public uint dwSendFlowSize; //С,λkbps
+ public uint dwRecvFlowSize; //С,λkbps
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //¼ǩ
+ public const int LABEL_NAME_LEN = 40;
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORD_LABEL
+ {
+ public uint dwSize; // ṹС
+ public NET_DVR_TIME struTimeLabel; // ǩʱ
+ public byte byQuickAdd; // Ƿ ʱǩЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = LABEL_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLabelName; // ǩ Ϊ40ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ public const int LABEL_IDENTIFY_LEN = 64;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LABEL_IDENTIFY
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = LABEL_IDENTIFY_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLabelIdentify; // 64ֽڱʶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ public const int MAX_DEL_LABEL_IDENTIFY = 20;// ɾǩʶ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEL_LABEL_PARAM
+ {
+ public uint dwSize; // ṹС
+ public byte byMode; // λʾ,0x01ʾʶɾ
+ public byte byRes1;
+ public ushort wLabelNum; // ǩĿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DEL_LABEL_IDENTIFY, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_LABEL_IDENTIFY[] struIndentify; // ǩʶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 160, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MOD_LABEL_PARAM
+ {
+ public NET_DVR_LABEL_IDENTIFY struIndentify; //Ҫĵıǩʶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = LABEL_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLabelName; //ĺıǩ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ǩṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FIND_LABEL
+ {
+ public uint dwSize; // ṹС
+ public int lChannel; // ҵͨ
+ public NET_DVR_TIME struStartTime; // ʼʱ
+ public NET_DVR_TIME struStopTime; // ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = LABEL_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLabelName; // ¼ǩ ǩΪգֹʱбǩ
+ public byte byDrawFrame; //0:֡1֡
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 39, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ //ǩϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINDLABEL_DATA
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = LABEL_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLabelName; // ǩ
+ public NET_DVR_TIME struTimeLabel; // ǩʱ
+ public NET_DVR_LABEL_IDENTIFY struLabelIdentify; // ǩʶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ }
+
+ public const int CARDNUM_LEN_V30 = 40;
+ public const int PICTURE_NAME_LEN = 64;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FIND_PICTURE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PICTURE_NAME_LEN)]
+ public string sFileName;//ͼƬ
+ public NET_DVR_TIME struTime;//ͼƬʱ
+ public uint dwFileSize;//ͼƬĴС
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = CARDNUM_LEN_V30)]
+ public string sCardNum; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FIND_PICTURE_PARAM
+ {
+ public uint dwSize; // ṹС
+ public int lChannel; // ͨ
+ public byte byFileType;
+ public byte byNeedCard; // ǷҪ
+ public byte byProvince; //ʡֵ
+ public byte byEventType; // ¼ͣ01-ͨ¼2-Υȡ֤3-¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CARDNUM_LEN_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCardNum; //
+ public NET_DVR_TIME struStartTime;//ͼƬĿʼʱ
+ public NET_DVR_TIME struStopTime;// ͼƬĽʱ
+ //ITC3.7
+ public uint dwTrafficType; //ͼƬЧ ο VCA_OPERATE _TYPE
+ public uint dwVehicleType; // ο VCA_VEHICLE_TYPE
+ //ΥͲο VCA_ILLEGAL_TYPE ǰָ֧ѡ
+ public uint dwIllegalType;
+ public byte byLaneNo; //(1~99)
+ public byte bySubHvtType ;//0-,1-(ֳ֧Ƽʡݼ),2-ǻ,3-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LICENSE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLicense; //ƺ
+ public byte byRegion; // ֵ 0-1-ŷ(Europe Region)2-(Russian Region)3-ŷ&˹(EU&CIS), 4-ж(Middle East),0xff-
+ public byte byCountry; // ֵգCOUNTRY_INDEX
+ public byte byArea; //
+ public byte byISO8601; //Ƿ8601ʱʽʱֶǷЧ0-ʱЧʱΪ豸ʱ 1-ʱЧ
+ public byte cStartTimeDifferenceH; //ʼʱUTCʱСʱ-12 ... +14 ʾʱ
+ public byte cStartTimeDifferenceM; //ʼʱUTCʱӣ-30, 0, 30, 45ʾʱ
+ public byte cStopTimeDifferenceH; //ʱUTCʱСʱ-12 ... +14ʾʱ
+ public byte cStopTimeDifferenceM; //ʱUTCʱӣ-30, 0, 30, 45ʾʱ
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ADDRESS
+ {
+ public NET_DVR_IPADDR struIP; //IPַ
+ public ushort wPort; //˿ں
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_PIC_EXTRA_INFO_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 544, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUnionLen; //峤ȣʵ
+ }
+
+ public const int MAX_FACE_PIC_NUM = 30; /*ͼ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_EXTRA_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_FACE_PIC_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_RECT[] struVcaRect; //ͼϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FIND_PICTURE_V50
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PICTURE_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sFileName;//ͼƬ
+ public NET_DVR_TIME struTime;//ͼƬʱ
+ public uint dwFileSize;//ͼƬĴС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CARDNUM_LEN_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCardNum; //
+ public byte byPlateColor;//οṹ VCA_PLATE_COLOR
+ public byte byVehicleLogo;//οṹ VLR_VEHICLE_CLASS
+ public byte byFileType; //ļͣ :0ʱץͼ1 ƶץͼ 2 ץͼ3 | ƶץͼ 4 & ƶץͼ 6 ֶץͼ ,9-ͼƬ,10- PIR11- ߱12- ȱ, 0xa Ԥʱͼ0xd , 0xe Խ⣬0xf ⣬0x10 , 0x11-豸ػطʱͼ, 0x12-
+ public byte byRecogResult;//ʶοṹVTR_RESULT
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LICENSE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLicense; //ƺ
+ public byte byEventSearchStatus; //ͼƬʾͬһҽʱ0-ʾûͼƬϢ1-ʾ滹ͼƬϢܹͼƬϢһ״̬Ϊ0ͼƬ
+ public NET_DVR_ADDRESS struAddr; //ͼƬڵĵַϢͼƬʱõ
+ public byte byISO8601; //Ƿ8601ʱʽʱֶǷЧ0-ʱЧʱΪ豸ʱ 1-ʱЧ
+ public byte cTimeDifferenceH; //UTCʱСʱ-12 ... +14
+ public byte cTimeDifferenceM; //UTCʱӣ-30,0, 30, 45
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 253, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ public NET_DVR_PIC_EXTRA_INFO_UNION uPicExtraInfo; //ͼƬϢ
+ }
+
+ public const int MAX_RECORD_PICTURE_NUM = 50; //ͼƬ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BACKUP_PICTURE_PARAM
+ {
+ public uint dwSize; // ṹС
+ public uint dwPicNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RECORD_PICTURE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_FIND_PICTURE[] struPicture;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDiskDes;
+ public byte byWithPlayer;
+ public byte byContinue; /*Ƿ 0 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_COMPRESSION_LIMIT
+ {
+ public uint dwSize; //ṹС
+ public uint dwChannel; //ͨ
+ public byte byCompressType; //ȡѹ1,2,3,¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public NET_DVR_COMPRESSIONCFG_V30 struCurrentCfg; //ǰѹ
+ }
+
+ public const int STEP_READY = 0; //
+ public const int STEP_RECV_DATA = 1; //
+ public const int STEP_UPGRADE = 2; //ϵͳ
+ public const int STEP_BACKUP = 3; //ϵͳ
+ public const int STEP_SEARCH = 255; //ļ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEO_EFFECT
+ {
+ public uint dwBrightValue; //[0,255]
+ public uint dwContrastValue; //Աȶ[0,255]
+ public uint dwSaturationValue; //Ͷ[0,255]
+ public uint dwHueValue; //ɫ[0,255]
+ public uint dwSharpness; //[0,255]
+ public uint dwDenoising; //ȥ[0,255]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEO_INPUT_EFFECT
+ {
+ public uint dwSize; //ṹС
+ public ushort wEffectMode; //ģʽ 0- 1- 2- 3- 255-Զ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 146, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_DVR_VIDEO_EFFECT struVideoEffect; //ƵЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOPARA_V40
+ {
+ public uint dwChannel; // ͨ
+ public uint dwVideoParamType; // Ƶ 0- 1-Աȶ 2-Ͷ 3-ɫ 4- 5-ȥ
+ public uint dwVideoParamValue; //ӦƵֵΧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEFAULT_VIDEO_COND
+ {
+ public uint dwSize; // ṹС
+ public uint dwChannel; // ͨ
+ public uint dwVideoMode; // ģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ENCODE_JOINT_PARAM
+ {
+ public uint dwSize; // ṹС
+ public byte byJointed; // 0 ûй 1 Ѿ
+ public byte byDevType; // 豸 1 豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; // ֽ
+ public NET_DVR_IPADDR struIP; // ıȡ豸IPַ
+ public ushort wPort; // ıȡ豸˿ں
+ public ushort wChannel; // ıȡ豸ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VCA_CHAN_WORKSTATUS
+ {
+ public byte byJointed; // 0-ûй 1-Ѿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_IPADDR struIP; // ȡ豸IPַ
+ public ushort wPort; // ȡ豸˿ں
+ public ushort wChannel; // ȡ豸ͨ
+ public byte byVcaChanStatus; // 0 - δ 1 -
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 19, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VCA_DEV_WORKSTATUS
+ {
+ public uint dwSize; // ṹС
+ public byte byDeviceStatus; // 豸״̬0 - 1-
+ public byte byCpuLoad; // CPUʹ0-100 ֱʹðٷ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VCA_CHAN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_VCA_CHAN_WORKSTATUS[] struVcaChanStatus;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_VIDEOPLATFORM_V40
+ {
+ /*ӴڶӦͨӦĽϵͳIJλ(Ƶۺƽ̨нϵͳЧ)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecoderId;
+ //ʾƵֱʣ1-D1,2-720P,3-1080P豸Ҫݴ//ֱʽнͨķ䣬1ó1080P豸4ͨ
+ //˽ͨ
+ public byte byDecResolution;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 143, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_NOTVIDEOPLATFORM_V40
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 160, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VGA_DISP_CHAN_CFG_V40
+ {
+ public uint dwSize;
+ public byte byAudio; /*ƵǷ*/
+ public byte byAudioWindowIdx; /*ƵӴ*/
+ public byte byVgaResolution; /*ֱʣȡ*/
+ public byte byVedioFormat; /*1:NTSC,2:PAL0-NULL*/
+ public uint dwWindowMode; /*ģʽȡ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecChan;/*ӴڹĽͨ*/
+ public byte byEnlargeStatus; /*ǷڷŴ״̬0Ŵ1Ŵ*/
+ public byte byEnlargeSubWindowIndex;//ŴӴں
+ public byte byScale; /*ʾģʽ0---ʵʾ1---ʾ( BNC )*/
+ /*ֹ壬0-Ƶۺƽ̨ڲʾͨã1-ʾͨ*/
+ public byte byUnionType;
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct struDiff
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 160, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ /*[FieldOffsetAttribute(0)]
+ public UNION_VIDEOPLATFORM_V40 struVideoPlatform;
+
+ [FieldOffsetAttribute(0)]
+ public UNION_NOTVIDEOPLATFORM_V40 struNotVideoPlatform;
+ * */
+ }
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 120, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_V6SUBSYSTEMPARAM
+ {
+ public byte bySerialTrans;//Ƿ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 35, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int NET_DVR_V6PSUBSYSTEMARAM_GET = 1501;//ȡV6ϵͳ
+ public const int NET_DVR_V6PSUBSYSTEMARAM_SET = 1502;//V6ϵͳ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CORRECT_DEADPIXEL_PARAM
+ {
+ public uint dwSize;
+ public uint dwCommand; //0-뻵ģʽ1-ӻ㣬2-滵㣬3-˳
+ public uint dwDeadPixelX; //X
+ public uint dwDeadPixelY; //Y
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ public const int MAX_REDAREA_NUM = 6; //̵
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_REDAREACFG
+ {
+ public uint dwSize;
+ public uint dwCorrectEnable; //ǷУܣ0-رգ1-
+ public uint dwCorrectLevel; //У1(У)-10(У),ĬΪ5
+ public uint dwAreaNum; //У
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_REDAREA_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_RECT[] struLaneRect; //У
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HISTORICDATACFG
+ {
+ public uint dwSize;
+ public uint dwTotalNum; //ʷݸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int INQUEST_MESSAGE_LEN = 44; //ѶصϢ
+ public const int INQUEST_MAX_ROOM_NUM = 2; //ѶҸ
+ public const int MAX_RESUME_SEGMENT = 2; //֧ͬʱָƬĿ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_ROOM
+ {
+ public byte byRoomIndex; //Ѷұ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ public const int MAX_INQUEST_CDRW_NUM = 4; //¼Ŀ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_CDRW_STATUS
+ {
+ /*״̬0-Ѷʼ
+ * 1-Ѷп¼2-Ѷֹͣ
+ * 3-¼Ѷļ,
+ * 4-(ºݺͱر)
+ * 5-
+ * 6-ʼӲ
+ * 7-ָѶ*/
+ public uint dwType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_INQUEST_CDRW_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_INQUEST_CDRW[] strCDRWNum; //0ʾ¼1
+ public NET_DVR_TIME_EX struInquestStartTime; //Ѷʼʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_CDRW
+ {
+ public uint dwEnable; //¼״̬ǷЧ,0-Ч,1-Ч
+ public uint dwStatus; /* dwType=0ʱ
+ 0-1-̻쳣,
+ dwType=12ʱ
+ 0-¼1-̻쳣
+ 2-ѷ(81֧)3-̿ռ䲻㣬
+ 4-쳣Ѷֹ(81֧)
+ dwType=3ʱ
+ 0-¼1-̻쳣
+ 2-ѷ(81֧)3-̿ռ䲻
+ dwType=4ʱ
+ 0-¼1-̻쳣
+ 2-ѷ(81֧)3-̿ռ䲻
+ dwType=5ʱ,
+ 0- 1-̻쳣,
+ 2-ѷ(81֧)
+ dwType=67ʱ,
+ 0-¼, 1-̻쳣,
+ 2-ѷ(81֧), 3-̿ռ䲻*/
+ public uint dwVolumn; //,λM
+ public uint dwFreeSpace; //ʣ,λM
+ public uint dwTimeLeft; // ʣʱ䣬λ
+ public byte byCDType; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_CDRW_CFG
+ {
+ public uint dwSize;
+ public uint dwNum; //¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U4)]
+ public uint[]dwRwSelectPara;// Ƿѡиù
+ public uint dwModeSelect; //0ʾѭ¼ģʽ 1ʾп¼ģʽ(Ĭģʽ)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public uint dwStartCDRW; //DVR Ѿʼ¼
+ public uint dwHdExcp; //Ӳ
+ public uint dwInterval; //ʱ10(0)20(1)30(2)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLable; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_MESSAGE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = INQUEST_MESSAGE_LEN)]
+ public string sMessage; //صϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 46, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_SENSOR_DEVICE
+ {
+ public ushort wDeviceType; //ݲɼ豸ͺ:0- 1- 2-ز 3- 4- 5-ء6-ϡ7-ά˹
+ public ushort wDeviceAddr; //ݲɼ豸ַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 28, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_SENSOR_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = INQUEST_MAX_ROOM_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_INQUEST_SENSOR_DEVICE[] struSensorDevice;
+ public uint dwSupportPro; //֧Э,λʾ, °汾չֶ
+ //0x1: 0x2:ز 0x4:
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 120, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_ROOM_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)]
+ public string szCDName; //ƣ˫̹һ
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct uCalcMode
+ {
+ [FieldOffsetAttribute(0)]
+ public byte byBitRate; // byCalcTypeΪ0ʱЧ(0-321-482-643-804-965-128
+ //6-1607-1928-2249-25610-32011-38412-448
+ //13-51214-64015-76816-896ǰ16ֵ)17-102418-128019-1536
+ //20-179221-204822-307223-409624-8192
+ [FieldOffsetAttribute(0)]
+ public byte byInquestTime; // byCalcTypeΪ1ʱЧ0-1Сʱ, 1-2Сʱ,2-3Сʱ,3-4Сʱ, 4-6Сʱ,5-8Сʱ
+ //8-16Сʱ, 9-20Сʱ,10-22Сʱ,11-24Сʱ
+ }
+ public byte byCalcType; //¼0- 1-ʱ
+ public byte byAutoDelRecord; // ǷԶɾ¼0-ɾʱ¼ 1-ɾ
+ public byte byAlarmThreshold; // ֵ
+ public byte byInquestChannelResolution; //Ѷֱͨʣ0:720P 1:1080P
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_SYSTEM_INFO
+ {
+ public uint dwRecordMode; //¼ģʽ:1 ˫ģʽ 2 ֿģʽ 3 ˫˫ģʽҪ豸
+ public uint dwWorkMode; //ģʽ:0 ģʽ 1 ͨģʽ(Ŀǰֻбģʽ)
+ public uint dwResolutionMode; //豸ֱʣ0: 1:D1 2:720P 3:1080PѶôֶΣ
+ public NET_DVR_INQUEST_SENSOR_INFO struSensorInfo; //ʪȴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = INQUEST_MAX_ROOM_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_INQUEST_ROOM_INFO[] struInquestRoomInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_RESUME_SEGMENT
+ {
+ public NET_DVR_TIME struStartTime; //¼ʼʱ
+ public NET_DVR_TIME struStopTime; //¼ֹʱ
+ public byte byRoomIndex; //Ѷұ,1ʼ
+ public byte byDriveIndex; //¼,1ʼ
+ public ushort wSegmetSize; //ƬϵĴС, λM
+ public uint dwSegmentNo; //ƬڱѶе,1ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_RESUME_EVENT
+ {
+ public uint dwResumeNum; //ָ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RESUME_SEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_INQUEST_RESUME_SEGMENT[] struResumeSegment;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 200, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INQUEST_DEVICE_VERSION
+ {
+ public byte byMainVersion; /*汾.
+ 0 : δ֪
+ 1 : 8000ѶDVR
+ ΰ汾: 1 : 8000HD-S
+ 2 : 8100ѶDVR
+ ΰ汾: 1 : Ѷ81SNL
+ 2 : Ѷ81SH
+ 3 : Ѷ81SFH
+ 3 : 8608ѶNVR
+ ΰ汾: 1 : DS-8608SN-SP
+ 2 : DS-8608SN-ST
+ */
+ public byte bySubVersion; //ߴΰ汾
+ public byte byUpgradeVersion; //汾,δΪ0
+ public byte byCustomizeVersion; //ư汾,ǶΪ0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISK_RAID_INFO
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; //RaidǷ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 35, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SYNCHRONOUS_IPC
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; //ǷãΪǰIPCͬ豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPC_PASSWD
+ {
+ public uint dwSize; //ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string sOldPasswd; //IPCľ룬DVRDVR֤
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = PASSWD_LEN)]
+ public string sNewPasswd; //IPC
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͨȡDVR״̬λbps
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DEVICE_NET_USING_INFO
+ {
+ public uint dwSize; //ṹС
+ public uint dwPreview; //Ԥ
+ public uint dwPlayback; //ط
+ public uint dwIPCModule; //IPC
+ public uint dwNetDiskRW; //̶д
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ }
+
+ //ͨDVRǰIPCIPַ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IPC_NETCFG
+ {
+ public uint dwSize; //ṹС
+ public NET_DVR_IPADDR struIP; //IPCIPַ
+ public ushort wPort; //IPCĶ˿
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 126)]
+ public string res;
+ }
+
+ //ʱ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_TIME_LOCK
+ {
+ public uint dwSize; //ṹС
+ public NET_DVR_TIME strBeginTime;
+ public NET_DVR_TIME strEndTime;
+ public uint dwChannel; //ͨ, 0xffʾͨ
+ public uint dwRecordType; //¼: 0xffffffffȫ0ʱ¼1-ƶ⣬23-ƶ⣬4-ƶ⣬5-6-ֶ¼7-¼(ͬļ)
+ public uint dwLockDuration; //ʱ,λ,0xffffffffʾ
+ public NET_DVR_TIME_EX strUnlockTimePoint; //ʱЧdwLockDurationΪʱʱ䵽ʱԶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LOCK_RETURN
+ {
+ public uint dwSize; //ṹС
+ public NET_DVR_TIME strBeginTime;
+ public NET_DVR_TIME strEndTime;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //67DVS
+ //֤
+ public enum NET_SDK_UPLOAD_TYPE
+ {
+ UPGRADE_CERT_FILE = 0,
+ UPLOAD_CERT_FILE = 1,
+ TRIAL_CERT_FILE = 2,
+ CONFIGURATION_FILE = 3
+ }
+
+ public enum NET_SDK_DOWNLOAD_TYPE
+ {
+ NET_SDK_DOWNLOAD_CERT = 0, //֤
+ NET_SDK_DOWNLOAD_IPC_CFG_FILE = 1,//IPCļ
+ NET_SDK_DOWNLOAD_BASELINE_SCENE_PIC = 2, //ػͼƬ
+ NET_SDK_DOWNLOAD_VQD_ALARM_PIC = 3, //VQDͼƬ
+ NET_SDK_DOWNLOAD_CONFIGURATION_FILE=4 //ļ
+ }
+
+ //״̬
+ public enum NET_SDK_DOWNLOAD_STATUS
+ {
+ NET_SDK_DOWNLOAD_STATUS_SUCCESS = 1, //سɹ
+ NET_SDK_DOWNLOAD_STATUS_PROCESSING, //
+ NET_SDK_DOWNLOAD_STATUS_FAILED, //ʧ
+ NET_SDK_DOWNLOAD_STATUS_UNKOWN_ERROR //δ֪
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BONJOUR_CFG
+ {
+ public uint dwSize; // ṹС
+ public byte byEnableBonjour; // Bonjourʹ 0 1ر
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFriendlyName; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SOCKS_CFG
+ {
+ public uint dwSize; // ṹС
+ public byte byEnableSocks; // ʹ 0ر 1
+ public byte byVersion; // SOCKS汾 4SOCKS4 5SOCKS5
+ public ushort wProxyPort; // ˿ڣĬ1080
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byProxyaddr; // IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUserName; // û SOCKS
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPassword; // SOCKS5
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LOCAL_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocalAddr; //ʹsocksΣʽΪ"ip/netmask;ip/netmask;"
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_QOS_CFG
+ {
+ public uint dwSize;
+ public byte byManageDscp; // ݵDSCPֵ [0-63]
+ public byte byAlarmDscp; // ݵDSCPֵ [0-63]
+ public byte byVideoDscp; // ƵݵDSCPֵ [0-63]byFlagΪ0ʱʾƵ
+ public byte byAudioDscp; // ƵݵDSCPֵ [0-63]byFlagΪ1ʱЧ
+ public byte byFlag; // 0Ƶһ1Ƶֿ
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 126, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HTTPS_CFG
+ {
+ public uint dwSize;
+ public ushort wHttpsPort; // HTTPS˿
+ public byte byEnable; // ʹ 0ر 1
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 125, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //֤
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CERT_NAME
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_COUNTRY_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCountry; //Ҵ CN
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byState; //ʡ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLocality; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byOrganization; //֯
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUnit; //λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCommonName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOMAIN_NAME, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEmail;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CERT_PARAM
+ {
+ public uint dwSize;
+ public ushort wCertFunc; //֤࣬0-802.1x,1-HTTPS
+ public ushort wCertType; //֤ͣ0-CA1-Certificate,2-˽Կļ
+ public byte byFileType; //֤ļͣ0-PEM,1-PFX
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 35, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int UPLOAD_CERTIFICATE = 1; //ϴ֤
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CERT_INFO
+ {
+ public uint dwSize;
+ public NET_DVR_CERT_PARAM struCertParam; //֤
+ public uint dwValidDays; //ЧΪǩʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPasswd; //˽Կ
+ public NET_DVR_CERT_NAME struCertName; // ֤
+ public NET_DVR_CERT_NAME struIssuerName; // ֤鷢ƣǩ֤ϢȡʱЧ
+ public NET_DVR_TIME_EX struBeginTime; //֤鴴ʱ䣨ǩ֤ϢȡʱЧ
+ public NET_DVR_TIME_EX struEndTime; //ֹ֤ʱ䣨ǩ֤ϢȡʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] serialNumber; //֤ʶ루ǩ֤ϢȡʱЧ
+ public byte byVersion;
+ public byte byKeyAlgorithm; // 0-RSA 1-DSA
+ public byte byKeyLen; //ܳ 0-512 1-1024 2-2048
+ public byte bySignatureAlgorithm; //ǩ㷨ͣǩ֤ϢȡʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //channel record status
+ //***ͨ¼״̬*****//
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHANS_RECORD_STATUS
+ {
+ public byte byValid; //ǷЧ
+ public byte byRecord; /*(ֻ)¼, λʾ:0: ¼1¼ 2-
+ 3- 4-Ƶ 5-δ 6-浵
+ 7-ش 8-û 9-δ֤
+ 10-浵к¼ 11-¼شк¼*/
+ public ushort wChannelNO; //ͨ
+ public uint dwRelatedHD; //
+ public byte byOffLineRecord; //¼ 0-ر 1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IP_ALARM_GROUP_NUM
+ {
+ public uint dwSize;
+ public uint dwIPAlarmInGroup; //IPͨ
+ public uint dwIPAlarmInNum; //IPͨ
+ public uint dwIPAlarmOutGroup; //IPͨ
+ public uint dwIPAlarmOutNum; //IPͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //****NVR end***//
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHAN_GROUP_RECORD_STATUS
+ {
+ public uint dwSize; //ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CHANS_RECORD_STATUS[] struChanStatus; //һ64
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECTCFG
+ {
+ public ushort wXCoordinate; /*ϽʼX*/
+ public ushort wYCoordinate; /*ϽY*/
+ public ushort wWidth; /*ο*/
+ public ushort wHeight; /*θ߶*/
+ }
+
+ /*Ϣ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WINCFG
+ {
+ public uint dwSize;
+ public byte byVaild;
+ public byte byInputIdx; /*Դ*/
+ public byte byLayerIdx; /*ͼ㣬0Ϊײ*/
+ public byte byTransparency; //ȣ0100
+ public NET_DVR_RECTCFG struWin;//ĿĴ(ʾǽ)
+ public ushort wScreenHeight;//
+ public ushort wScreenWidth;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALLWINCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LAYERNUMS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_WINCFG[] struWinCfg;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREENZOOM
+ {
+ public uint dwSize;
+ public uint dwScreenNum;//
+ public NET_DVR_POINT_FRAME struPointFrame;
+ public byte byLayer;//ͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //2011-04-18
+ /*Ϣ,99991ʼ */
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_CAMERAINFO
+ {
+ public uint dwGlobalCamId; /* camȫֱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCamName; /*cam*/
+ public uint dwMatrixId; /*camӦı*/
+ public uint dwLocCamId; /*camӦڲ*/
+ public byte byValid; /*ǷЧ0-1-*/
+ public byte byPtzCtrl; /* Ƿɿأ0-1-*/
+ public byte byUseType; //*ʹͣ0-Ϊʹã1-BNC2-SP3,3-V6ˣ4-*/
+ public byte byUsedByTrunk;//ǰʹ״̬0-ûбʹã1-ʹ
+ public byte byTrunkReq; /*ֱ,D1Ϊλ1 - 1D12- 2D1ΪʹʱָǸߵĴ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_TIME struInstallTime;//װʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPurpose;/*;*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*ʾϢ2048*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_MONITORINFO
+ {
+ public uint dwGloalMonId; /*mon ͳһ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sMonName;
+ public uint dwMatrixId; /*monھı*/
+ public uint dwLocalMonId; /*monڲ*/
+ public byte byValid; /*ǷЧ0-1-*/
+ public byte byTrunkType; /*ʹͣ0-Ϊʹã1-BNC2-SP3,3-V6ˣ4-*/
+ public byte byUsedByTrunk;//ǰʹ״̬0-ûбʹã1-ʹ
+ public byte byTrunkReq; /*ֱ, D1Ϊλ1- 1D12- 2D1ΪʹʱָǸߵĴ*/
+ public NET_DVR_TIME struInstallTime;//װʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPurpose;/*;*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_DIGITALMATRIX
+ {
+ public NET_DVR_IPADDR struAddress; /*豸Ϊ豸ʱIPϢ*/
+ public ushort wPort;
+ public byte byNicNum; /*0 - eth0, 1 - eth1, ˫ͨż*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 69, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_ANALOGMATRIX
+ {
+ public byte bySerPortNum; /*ӵĴں*/
+ public byte byMatrixSerPortType;/* صĴģļ̿(Э)ӻͨſڣЭ飩 0 --- ЭͨѶ 1 --- ͨѶ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_SINGLE_RS232 struRS232; //232ڲ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 200, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIXLIST
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwMatrixNum;//豸صľ
+ public IntPtr pBuffer;//Ϣ
+ public uint dwBufLen;//ָ볤ȣ
+ }
+
+
+ /*Ϣ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_UARTPARAM
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPortName;
+ public ushort wUserId; /*ûţ豸ΪʱһûȨ*/
+ public byte byPortType; /*ͣ0-RS232/1-RS485/2-RS422*/
+ public byte byFuncType; /*ӵ豸0-У1-̣2-ͨ(485ڲóͨ),3-ģ*/
+ public byte byProtocolType; /*ֵ֧Э, Ӽ豸ʱҪϢ,ȡ֧Эıż*/
+ public byte byBaudRate;
+ public byte byDataBits;
+ public byte byStopBits; /*ֹͣλ*/
+ public byte byParity; /*У*/
+ public byte byFlowCtrl; /*أأ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 22, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /*Ԥ*/
+ }
+
+ //256û1256
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_USERPARAM
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword;
+ public byte byRole;/*ûɫ:0-Ա,1-ԱֻһϵͳԱ255Ա*/
+ public byte byLevel; /*ͳһڲ,1- 255*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //255Դ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_RESOURSEGROUPPARAM
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byGroupName;
+ public byte byGroupType;/*0-CAM飬1-ʾMON*/
+ public byte byRes1;
+ public ushort wMemNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwGlobalId;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //255û
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_USERGROUPPARAM
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sGroupName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 255, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wUserMember; /*ûԱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 255, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wResorceGroupMember; /*ԴԱ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPermission;//Ȩޣ0-ptzȨޡлȨޡѯȨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_MATRIX_TRUNKPARAM
+ {
+ public uint dwSize;
+ public uint dwTrunkId;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sTrunkName;
+ public uint dwSrcMonId;
+ public uint dwDstCamId;
+ public byte byTrunkType; /*ʹ 1-BNC2-SP3˸壬3-SP3D1 4-V6ˣ5-*/
+ public byte byAbility; /*ʾ˵ĴԴ伸·*/
+ public byte bySubChan; /*Թ˸߶ԣʾͨ*/
+ public byte byLevel; /* 1-255*/
+ public ushort wReserveUserID; //ԤûID 1~256 0ʾͷԤ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 18, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_TRUNKLIST
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwTrunkNum;//豸صĸ
+ public IntPtr pBuffer;//Ϣ
+ public uint dwBufLen;//ָ볤ȣ
+ }
+
+ public const int MATRIX_PROTOCOL_NUM = 20; //ֵ֧Э
+ public const int KEYBOARD_PROTOCOL_NUM = 20; //ֵ֧Э
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PROTO_TYPE_EX
+ {
+ public ushort wType; /*ipcЭֵ*/
+ public ushort wCommunitionType; /*0ģ 1 2ģ⡢*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DESC_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDescribe; /*Эֶ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIXMANAGE_ABIILITY
+ {
+ public uint dwSize;
+ public uint dwMaxCameraNum;//Camera
+ public uint dwMaxMonitorNum;//ʾ
+ public ushort wMaxMatrixNum;//
+ public ushort wMaxSerialNum;//
+ public ushort wMaxUser;//û
+ public ushort wMaxResourceArrayNum;//Դ
+ public ushort wMaxUserArrayNum;//û
+ public ushort wMaxTrunkNum;//
+ public byte nStartUserNum;//ʼû
+ public byte nStartUserGroupNum;//ʼû
+ public byte nStartResourceGroupNum;//ʼԴ
+ public byte nStartSerialNum;//ʼں
+ public uint dwMatrixProtoNum; /*ЧľЭĿ0ʼ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MATRIX_PROTOCOL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PROTO_TYPE_EX[] struMatrixProto;/*Эб*/
+ public uint dwKeyBoardProtoNum; /*ЧļЭĿ0ʼ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MATRIX_PROTOCOL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PROTO_TYPE_EX[] struKeyBoardProto;/*Эб*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SINGLEWALLPARAM
+ {
+ public uint dwSize;
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwWallNum;//ǽ
+ //Ϊ128128Ⱥ߶ֵãΪֵ
+ public NET_DVR_RECTCFG struRectCfg;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*Ϣ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WALLWINCFG
+ {
+ public uint dwSize;
+ public byte byEnable;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 7, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwWinNum;//ں
+ public uint dwLayerIndex;//Ӧͼ
+ public NET_DVR_RECTCFG struWinPosition;//ĿĴ(ʾǽ)
+ public uint dwDeviceIndex;//ֲʽ豸
+ public ushort wInputIndex;//źԴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ز
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WALLWINPARAM
+ {
+ public uint dwSize;
+ public byte byTransparency; //ʹȣ0-أ0-
+ public byte byWinMode;//ڷģʽȡ
+ public byte byEnableSpartan;//ʹܣ0-أ1-
+ public byte byDecResource; //ΪڷĽԴ1-D1,2-720P,3-1080P
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECTCFG_EX
+ {
+ public uint dwXCoordinate;
+ public uint dwYCoordinate;
+ public uint dwWidth;
+ public uint dwHeight;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ǽλ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOWALLDISPLAYPOSITION
+ {
+ public uint dwSize;
+ public byte byEnable; //ʹܣ0- ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwVideoWallNo;//ǽ()
+ public uint dwDisplayNo; //ʾ()ȡȫʱЧ
+ public NET_DVR_RECTCFG_EX struRectCfg;//λ꣬Ϊ꣨ͨȡȺ߶ֵãΪֵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ʾ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPLAYPARAM
+ {
+ public uint dwDisplayNo;//ʾ
+ public byte byDispChanType;/*ģʽ,1-BNC2-VGA3-HDMI4-DVI5-SDI, 6-FIBER, \
+ 7-RGB, 8-YPrPb, 9-VGA/HDMI/DVIӦ10-3GSDI,11-VGA/DVIӦ12-HDBaseT, 0xff-Ч*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ʾ
+ public const int MAX_DISPLAY_NUM = 512; //ʾ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPLAYCFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISPLAY_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISPLAYPARAM[] struDisplayParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VIDEOWALLWINDOWPOSITION
+ {
+ public uint dwSize;
+ public byte byEnable; //ʹ,0-ʹܣ1-ʹ
+ public byte byWndOperateMode; //ڲģʽ0-ͳһ꣬1-ֱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwWindowNo;//ں
+ public uint dwLayerIndex;//Ӧͼţͼŵöö
+ public NET_DVR_RECTCFG_EX struRect; //ĿĴͳһ(ʾǽ)ȡͳһʱЧ
+ public NET_DVR_RECTCFG_EX struResolution; //ĿĴڷֱ꣬ȡֱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHAN_RELATION_RESOURCE
+ {
+ public uint dwSize;
+ public uint dwDisplayChan; //ʾͨţ1ֽ豸+1ֽڱ+2ֽʾͨţ
+ public byte byRelateAudio; //ǷӴƵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwSubWinNo; //ƵӴںţ1ֽڵǽ+1ֽӴں+2ֽڴںţ
+ public uint dwChannel; //ͨţȡȫʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PU_STREAM_CFG_V41
+ {
+ public uint dwSize;
+ public byte byStreamMode;//ȡģʽ0- Ч1- ͨIPȡ2- ͨURLȡ3- ̬ͨ豸ȡ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_DEC_STREAM_MODE uDecStreamMode;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_VIDEO_WALL_INFO
+ {
+ public uint dwSize;
+ public uint dwWindowNo;
+ public uint dwSceneNo;
+ public uint dwDestWallNo; //Ŀǽ
+ public uint dwDestSceneNo;//Ŀij
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_SCENE_CONTROL_INFO
+ {
+ public uint dwSize;
+ public NET_DVR_VIDEO_WALL_INFO struVideoWallInfo;
+ public uint dwCmd;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WALLSCENECFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSceneName; //
+ public byte byEnable; //ǷЧ0-Ч1-Ч
+ public byte bySceneIndex; //ţֻܻȡȡгʱʹøò
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 78, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BUF_INFO
+ {
+ public IntPtr pBuf;
+ public uint nLen;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_IN_PARAM
+ {
+ public NET_DVR_BUF_INFO struCondBuf;
+ public NET_DVR_BUF_INFO struInParamBuf;
+ public uint dwRecvTimeOut;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OUT_PARAM
+ {
+ public NET_DVR_BUF_INFO struOutBuf;
+ public IntPtr lpStatusList;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INPUTSTREAMCFG_V40
+ {
+ public uint dwSize;
+ public byte byValid; //
+ public byte byCamMode;//NET_DVR_CAM_MODE
+ public ushort wInputNo; //źԴ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)]
+ public string sCamName;
+ public NET_DVR_VIDEOEFFECT struVideoEffect;//Ƶ
+ public NET_DVR_PU_STREAM_CFG struPuStream; //ipʱʹ
+ public ushort wBoardNum; //źԴڵİ忨ţֻܻȡ
+ public ushort wInputIdxOnBoard; //źԴڰ忨ϵλãֻܻȡ
+ public uint dwResolution;//ֱ
+ public byte byVideoFormat;//ƵʽVIDEO_STANDARD
+ public byte byStatus; //źԴ״̬0-ֶЧ 1-ź 2-ź 3-쳣
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = NAME_LEN)]
+ public string sGroupName; //źԴ
+ public byte byJointMatrix; //0- 1-źԴΪNET_DVR_CAM_BNCNET_DVR_CAM_VGANET_DVR_CAM_DVINET_DVR_CAM_HDMI,еһʱòЧ
+ public byte byJointNo; //ƴźԴƴӱ(ֻܻȡ)
+ public byte byColorMode; //ɫģʽ 0-Զ 1- 2-ͨ 3-ͣΪԶʱʹstruVideoEffect
+ public byte byScreenServer; //Ļ0-1-
+ public byte byDevNo; //豸
+ public byte byRes1;
+ public uint dwInputSignalNo; //źԴţ£
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 120, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ץĹ()
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SINGLE_FACESNAPCFG
+ {
+ public byte byActive; //Ƿ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ public NET_VCA_POLYGON struVcaPolygon; //ʶ
+ }
+
+ //ץĹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAPCFG
+ {
+ public uint dwSize;
+ public byte bySnapTime; //ĿץĴ0-10
+ public byte bySnapInterval; //ץļλ֡
+ public byte bySnapThreshold; //ץֵ0-100
+ public byte byGenerateRate; //Ŀٶ,Χ[1, 5]
+ public byte bySensitive; //ĿȣΧ[1, 5]
+ public byte byReferenceBright; //2012-3-27ο[0,100]
+ public byte byMatchType; //2012-5-3ȶԱģʽ0-Ŀʧ1-ʵʱ
+ public byte byMatchThreshold; //2012-5-3ʵʱȶֵ0~100
+ public NET_DVR_JPEGPARA struPictureParam; //ͼƬṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RULE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_SINGLE_FACESNAPCFG[] struRule; //ץĹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 100, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ʶṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_HUMAN_FEATURE
+ {
+ public byte byRes3;
+ public byte bySex; //Ա, 0-ʾδ֪㷨֧֣,1 C , 2 C Ů, 0xff-㷨֧֣ûʶ
+ public byte byEyeGlass; //Ƿ۾ 0-ʾδ֪㷨֧֣,1 C , 2 C ,0xff-㷨֧֣public byte byRes4;
+ public byte byDeviation;//ֵ
+ public byte byEthnic; //ֶԤ,ݲ
+ public byte byMask; //Ƿ 0-ʾδ֪㷨֧֣,1 C , 2 Cͨ۾, 3 Cī,0xff-㷨֧֣ûʶ
+ public byte bySmile; //ǷЦ 0-ʾδ֪㷨֧֣,1 C Ц, 2 C Ц, 0xff-㷨֧֣ûʶ
+ public byte byFaceExpression;
+ public byte byBeard;
+ public byte byRes2;
+ public byte byHat; //ñ, 0-֧,1-ñ,2-ñ,0xff-unknowʾδ֪,㷨֧δ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ץĸϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAP_ADDINFO
+ {
+ //ο,ΪСͼ(ͷ)
+ public NET_VCA_RECT struFacePicRect;
+ public int iSwingAngle;//ת, -90~90
+ public int iTiltAngle;//, -90~90
+ public uint dwPupilDistance;//ͫ,ΧΪСֵΪ10,ֵΪǰֱʿ/1.6
+ public byte byBlockingState;//Ŀڵ״̬ 0-ʾδ֪㷨֧֣,1~ڵ,2~˲ʱڵ3~ڵ4~ڵ
+ public byte byFaceSnapThermometryEnabled;//ץIJʹ 1- 0-ر
+ public byte byIsAbnomalTemperature;//ץIJǷ¶쳣 1- 0-
+ public byte byThermometryUnit;//µλ: 0-϶ȣ棩1-϶ȣH2-(K)
+ public NET_DVR_TIME_EX struEnterTime; // ץ½ʱ
+ public NET_DVR_TIME_EX struExitTime; // ץ뿪ʱ
+ public float fFaceTemperature; // ¶ȣ - 20.0~150.0棬ȷС1λ
+ public float fAlarmTemperature;// ±ֵȷС1λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 472, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;// ֽ
+ }
+
+ //ץĽϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAP_RESULT
+ {
+ public uint dwSize;
+ public uint dwRelativeTime;
+ public uint dwAbsTime;
+ public uint dwFacePicID;
+ public uint dwFaceScore;
+ public NET_VCA_TARGET_INFO struTargetInfo;
+ public NET_VCA_RECT struRect;
+ public NET_VCA_DEV_INFO struDevInfo;
+ public uint dwFacePicLen;
+ public uint dwBackgroundPicLen;
+ public byte bySmart; //IDS豸0(Ĭֵ)Smart Functiom Return 1
+ public byte byAlarmEndMark;//0-1-ǣֶνIDֶʹãʾIDӦ±ҪṩNVRʹãжϱȡʶͼƬУߵͼƬ
+ public byte byRepeatTimes; //ظ0-
+ public byte byUploadEventDataType;//ͼƬݳʽ0-ݣ1-URL
+ public NET_VCA_HUMAN_FEATURE struFeature; //
+ public float fStayDuration; //ͣʱ(λ: )
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sStorageIP; //洢IPַ
+ public ushort wStoragePort; //洢˿ں
+ public ushort wDevInfoIvmsChannelEx; //NET_VCA_DEV_INFObyIvmsChannelܱͬʾֵϿͻbyIvmsChannelܼݣ255¿ͻ˰汾ʹwDevInfoIvmsChannelEx
+ public byte byFacePicQuality;
+ public byte byUIDLen; // ϴıʶ
+ public byte byLivenessDetectionStatus;// ״̬0-1-δ֪(ʧ)2-3-4-δ
+ /*ϢʶλǷNET_VCA_FACESNAP_ADDINFOṹ壩,0-Ϣ, 1-иϢ*/
+ public byte byAddInfo;
+ public IntPtr pUIDBuffer; //ʶָ
+ public IntPtr pAddInfoBuffer;
+ public byte byTimeDiffFlag; /*ʱֶǷЧ 0-ʱЧ 1-ʱЧ */
+ public byte cTimeDifferenceH; /*UTCʱСʱ-12 ... +14 +ʾ,byTimeDiffFlagΪ1ʱЧ*/
+ public byte cTimeDifferenceM; /*UTCʱӣ-30, 30, 45 +ʾbyTimeDiffFlagΪ1ʱЧ*/
+ public byte byBrokenNetHttp; //־λ0-شݣ1-ش
+ public IntPtr pBuffer1;//ָͼͼƬ
+ public IntPtr pBuffer2;//ͼͼƬݣͨұͼӿڿԻȡͼ
+ }
+
+ //ⱨϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_DETECTION
+ {
+ public uint dwSize;
+ public uint dwRelativeTime;
+ public uint dwAbsTime;
+ public uint dwBackgroundPicLen;
+ public NET_VCA_DEV_INFO struDevInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 30, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_RECT[] struFacePic; //ͼһֵڴͼͼ)ķֱ
+ public byte byFacePicNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 255, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ public IntPtr pBackgroundPicpBuffer;//ͼͼƬ
+ }
+
+ //齹
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEFOCUS_ALARM
+ {
+ public uint dwSize; /*ṹ*/
+ public NET_VCA_DEV_INFO struDevInfo;/*豸Ϣ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUDIOEXCEPTION_ALARM
+ {
+ public uint dwSize; /*ṹ*/
+ public byte byAlarmType;//ͣ1-Ƶ쳣2-Ƶͻ
+ public byte byRes1;
+ public ushort wAudioDecibel;//ǿȣƵͻʱõ
+ public NET_VCA_DEV_INFO struDevInfo;/*豸Ϣ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_BUTTON_DOWN_EXCEPTION_ALARM
+ {
+ public uint dwSize; /*ṹ*/
+ public NET_VCA_DEV_INFO struDevInfo;/*豸Ϣ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FD_IMAGE_CFG
+ {
+ public uint dwWidth; //Ҷͼݿ
+ public uint dwHeight; //Ҷͼ߶
+ public uint dwImageLen; //Ҷͼݳ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public IntPtr pImage; //Ҷͼ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FD_PROCIMG_CFG
+ {
+ public uint dwSize; //ṹС
+ public byte byEnable; //Ƿ;
+ public byte bySensitivity; //ȣ[0,5]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 22, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //ֽ
+ public NET_VCA_SIZE_FILTER struSizeFilter; //ߴ
+ public NET_VCA_POLYGON struPolygon; //
+ public NET_VCA_FD_IMAGE_CFG struFDImage; //ͼƬϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SUB_PROCIMG
+ {
+ public uint dwImageLen; //ͼƬݳ
+ public uint dwFaceScore; //,0-100
+ public NET_VCA_RECT struVcaRect; //ͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public IntPtr pImage; //ͼƬ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FD_PROCIMG_RESULT
+ {
+ public uint dwSize; //ṹС
+ public uint dwImageId; //ͼID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public uint dwSubImageNum; //ͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_TARGET_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_SUB_PROCIMG[] struProcImg; //ͼϢ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_PICMODEL_RESULT
+ {
+ public uint dwImageLen; //ͼƬݳ
+ public uint dwModelLen; //ģݳ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public IntPtr pImage; //ͼƬָ
+ public IntPtr pModel; //ģָ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_REGISTER_PIC
+ {
+ public uint dwImageID; //ͼID
+ public uint dwFaceScore; //,0-100
+ public NET_VCA_RECT struVcaRect; //ͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AREAINFOCFG
+ {
+ public ushort wNationalityID;//
+ public ushort wProvinceID;//ʡ
+ public ushort wCityID;//
+ public ushort wCountyID;//
+ public uint dwCode;//
+ }
+
+ //ԱϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_HUMAN_ATTRIBUTE
+ {
+ public byte bySex;//Ա0-У1-Ů
+ public byte byCertificateType;//֤ͣ0-֤1-֤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HUMAN_BIRTHDATE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byBirthDate;//£磺201106
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName; //
+ public NET_DVR_AREAINFOCFG struNativePlace;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCertificateNumber; //֤
+ public uint dwPersonInfoExtendLen;// ԱǩϢչ
+ public IntPtr pPersonInfoExtend; //ԱǩϢչϢ
+ public byte byGroup;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 11, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_HUMANATTRIBUTE_COND
+ {
+ public byte bySex; //Ա0-ã1-У2-Ů
+ public byte byCertificateType; //֤ͣ0-ã1-֤2-֤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HUMAN_BIRTHDATE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byStartBirthDate; //ʼ£磺201106
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HUMAN_BIRTHDATE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEndBirthDate; //ֹ£201106
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName; //
+ public NET_DVR_AREAINFOCFG struNativePlace; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCertificateNumber; //֤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ֹϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_INFO
+ {
+ public uint dwSize;//ṹС
+ public uint dwRegisterID;//עIDţֻ
+ public uint dwGroupNo;//
+ public byte byType;//־0-ȫ1-2-ֹ
+ public byte byLevel;//ֹȼ0-ȫ1-ͣ2-У3-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ public NET_VCA_HUMAN_ATTRIBUTE struAttribute;//ԱϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRemark;//עϢ
+ public uint dwFDDescriptionLen;//ݳ
+ public IntPtr pFDDescriptionBuffer;//ָ
+ public uint dwFCAdditionInfoLen;//ץĿ⸽Ϣ
+ public IntPtr pFCAdditionInfoBuffer;//ץĿ⸽Ϣָ루FCAdditionInfoаPTZ꣩
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_PARA
+ {
+ public uint dwSize; //ṹС
+ public NET_VCA_BLOCKLIST_INFO struBlockListInfo; //ֹ
+ public uint dwRegisterPicNum; //ֹͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HUMAN_PICTURE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_PICMODEL_RESULT[] struRegisterPic; //ֹͼƬϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_COND
+ {
+ public Int32 lChannel; //ͨ
+ public uint dwGroupNo; //
+ public byte byType; //־0-ȫ1-2-ֹ
+ public byte byLevel; //ֹȼ0-ȫ1-ͣ2-У3-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public NET_VCA_HUMAN_ATTRIBUTE struAttribute; //ԱϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_PIC
+ {
+ public uint dwSize; //ṹС
+ public uint dwFacePicNum; //ͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_HUMAN_PICTURE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_PICMODEL_RESULT[] struBlockListPic; //ƬϢ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FIND_PICTURECOND
+ {
+ public Int32 lChannel;//ͨ
+ public NET_DVR_TIME struStartTime;//ʼʱ
+ public NET_DVR_TIME struStopTime;//ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ public const int MAX_FACE_PIC_LEN = 6144; //ͼƬݳ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SUB_SNAPPIC_DATA
+ {
+ public uint dwFacePicID; //ͼID
+ public uint dwFacePicLen; //ͼݳ
+ public NET_DVR_TIME struSnapTime; //ץʱ
+ public uint dwSimilarity; //ƶ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_FACE_PIC_LEN)]
+ public string sPicBuf; //ͼƬ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_ADVANCE_FIND
+ {
+ public uint dwFacePicID; //ͼƬID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_NORMAL_FIND
+ {
+ public uint dwImageID; //ͼID
+ public uint dwFaceScore; //
+ public NET_VCA_RECT struVcaRect; //ͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_VCA_FIND_SNAPPIC_UNION
+ {
+ //СΪ44ֽ
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ /*[FieldOffsetAttribute(0)]
+ public NET_VCA_NORMAL_FIND struNormalFind; //ͨ
+ [FieldOffsetAttribute(0)]
+ public NET_VCA_ADVANCE_FIND struAdvanceFind; //
+ * */
+ }
+
+ public enum VCA_FIND_SNAPPIC_TYPE
+ {
+ VCA_NORMAL_FIND = 0x00000000, //ͨ
+ VCA_ADVANCE_FIND = 0x00000001 //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FIND_PICTURECOND_ADVANCE
+ {
+ public Int32 lChannel;//ͨ
+ public NET_DVR_TIME struStartTime;//ʼʱ
+ public NET_DVR_TIME struStopTime;//ʱ
+ public byte byThreshold; //ֵ0-100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public VCA_FIND_SNAPPIC_TYPE dwFindType;//ͣVCA_FIND_SNAPPIC_TYPE
+ public NET_VCA_FIND_SNAPPIC_UNION uFindParam; //
+ }
+
+ //ץϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAP_INFO_ALARM
+ {
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ public uint dwSnapFacePicID; //ץͼID
+ public uint dwSnapFacePicLen; //ץͼijȣΪ0ʾûͼƬ0ʾͼƬ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public byte byFaceScore; //ָ֣ͼ,0-100
+ public byte bySex;//Ա0-δ֪1-У2-Ů
+ public byte byGlasses;//Ƿ۾0-δ֪1-ǣ2-
+
+ public byte byRes1;
+ public byte byDeviation;//ֵ
+ public byte byGroup;
+ /*ͼͼƬȼ0-͵,1-е,2-ߵ,
+ 㷨ͼͼƬ,̬ͨȡڵȿӰʶܵۺĽ*/
+ public byte byFacePicQuality;
+ public byte byEthnic; //ֶԤ,ݲ
+ public uint dwUIDLen; // ϴıʶ
+ public IntPtr pUIDBuffer; //ʶָ
+ public float fStayDuration; //ͣʱ(λ: )
+ public IntPtr pBuffer1; //ץͼͼƬ
+ }
+
+
+ //ֹϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_INFO_ALARM
+ {
+ public NET_VCA_BLOCKLIST_INFO struBlockListInfo;
+ public uint dwBlockListPicLen; //ֹͼijȣΪ0ʾûͼƬ0ʾͼƬ
+ public uint dwFDIDLen;// ID
+ public IntPtr pFDID; //Idָ
+ public uint dwPIDLen;// ͼƬID
+ public IntPtr pPID; //ͼƬIDָ
+ public ushort wThresholdValue; //ֵ[0,100]
+ public byte byIsNoSaveFDPicture;//0-ͼƬ,1-ͼƬ, ˵ͼƬ߽ģʱԭͼʱ,ֶη1,ʱͼƬٷ
+ public byte byRealTimeContrast;//Ƿʵʱ 0-ʵʱ 1-ʵʱ
+ public IntPtr pBuffer1;//ָͼƬָ
+ }
+
+ //ֹȶԽϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAP_MATCH_ALARM
+ {
+ public uint dwSize; // ṹС
+ public float fSimilarity; //ƶȣ[0.001,1]
+ public NET_VCA_FACESNAP_INFO_ALARM struSnapInfo; //ץϢ
+ public NET_VCA_BLOCKLIST_INFO_ALARM struBlockListInfo; //ֹϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sStorageIP; //洢IPַ
+ public ushort wStoragePort; //洢˿ں
+ public byte byMatchPicNum; //ƥͼƬ0-豸ֵĬ0豸ֵΪ0ʱʾûƥͼƬϢ
+ public byte byPicTransType;//ͼƬݴ䷽ʽ: 0-ƣ1-url
+ public uint dwSnapPicLen;//豸ʶץͼƬ
+ public IntPtr pSnapPicBuffer;//豸ʶץͼƬָ
+ public NET_VCA_RECT struRegion;//Ŀ߽豸ʶץͼƬУͼ
+ public uint dwModelDataLen;//ģݳ
+ public IntPtr pModelDataBuffer;// ģָ
+ public byte byModelingStatus;// ģ״̬
+ public byte byLivenessDetectionStatus;//״̬0-1-δ֪ʧܣ2-3-4-δ
+ public byte cTimeDifferenceH; /*UTCʱСʱ-12 ... +14 +ʾ,0xffЧ*/
+ public byte cTimeDifferenceM; /*UTCʱӣ-30, 30, 45 +ʾ0xffЧ*/
+ public byte byMask; //ץͼǷ֣0-1-δ֪2-֣3-
+ public byte bySmile; //ץͼǷЦ0-1-δ֪2-Ц3-Ц
+ public byte byContrastStatus; //ȶԽ0-1-ȶԳɹ2-ȶʧ
+ public byte byBrokenNetHttp; //־λ0-شݣ1-ش
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_INFO_ALARM_LOG
+ {
+ public NET_VCA_BLOCKLIST_INFO struBlockListInfo; //ֹϢ
+ public uint dwBlockListPicID; //ֹͼIDڲͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAP_INFO_ALARM_LOG
+ {
+ public uint dwRelativeTime; // ʱ
+ public uint dwAbsTime; // ʱ
+ public uint dwSnapFacePicID; //ץͼID
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACESNAP_MATCH_ALARM_LOG
+ {
+ public uint dwSize; // ṹС
+ public float fSimilarity; //ƶȣ[0.001,1]
+ public NET_VCA_FACESNAP_INFO_ALARM_LOG struSnapInfoLog; //ץϢ
+ public NET_VCA_BLOCKLIST_INFO_ALARM_LOG struBlockListInfoLog; //ֹϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACEMATCH_PICCOND
+ {
+ public uint dwSize; // ṹС
+ public uint dwSnapFaceID; //ץͼID
+ public uint dwBlockListID; //ƥĽֹID
+ public uint dwBlockListFaceID; //ȶԵĽֹͼID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; // ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_FACEMATCH_PICTURE
+ {
+ public uint dwSize; // ṹС
+ public uint dwSnapFaceLen; //ץͼ
+ public uint dwBlockListFaceLen; //ȶԵĽֹͼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ public IntPtr pSnapFace; //ץͼͼƬ
+ public IntPtr pBlockListFace; //ȶԵĽֹͼ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_BLOCKLIST_FASTREGISTER_PARA
+ {
+ public uint dwSize; //ṹС
+ public NET_VCA_BLOCKLIST_INFO struBlockListInfo; //ֹ
+ public uint dwImageLen; //ͼݳ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public IntPtr pImage; //ͼ
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SINGLE_PATH
+ {
+ public byte byActive; // Ƿ,0-,1-
+ public byte byType; //0-洢ץģ1-洢ֹȶԱ2-洢ץĺͽֹȶԱ0xff-Ч
+ public byte bySaveAlarmPic; //ǷڱıͼƬ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //
+ public uint dwDiskDriver; //̷ţ0ʼ
+ public uint dwLeftSpace; //ԤλΪG
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //洢·
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_SAVE_PATH_CFG
+ {
+ public uint dwSize; //ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISKNUM_V30, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_SINGLE_PATH[] struPathInfo; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEV_ACCESS_CFG
+ {
+ public uint dwSize;
+ public NET_DVR_IPADDR struIP; //豸IPַ
+ public ushort wDevicePort; //˿ں
+ public byte byEnable; //Ƿã0-1-
+ public byte byRes1; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; //豸ĵ¼ʺ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; //豸ĵ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+ /********************************ʶ end****************************/
+ //ֱ
+ public const int NOT_AVALIABLE = 0;
+ public const int SVGA_60HZ = 52505660;
+ public const int SVGA_75HZ = 52505675;
+ public const int XGA_60HZ = 67207228;
+ public const int XGA_75HZ = 67207243;
+ public const int SXGA_60HZ = 84017212;
+ public const int SXGA2_60HZ = 84009020;
+ public const int _720P_60HZ = 83978300;
+ public const int _720P_50HZ = 83978290;
+ public const int _1080I_60HZ = 394402876;
+ public const int _1080I_50HZ = 394402866;
+ public const int _1080P_60HZ = 125967420;
+ public const int _1080P_50HZ = 125967410;
+ public const int _1080P_30HZ = 125967390;
+ public const int _1080P_25HZ = 125967385;
+ public const int _1080P_24HZ = 125967384;
+ public const int UXGA_60HZ = 105011260;
+ public const int UXGA_30HZ = 105011230;
+ public const int WSXGA_60HZ = 110234940;
+ public const int WUXGA_60HZ = 125982780;
+ public const int WUXGA_30HZ = 125982750;
+ public const int WXGA_60HZ = 89227324;
+ public const int SXGA_PLUS_60HZ = 91884860;
+
+ //ʾָͨģʽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPWINDOWMODE
+ {
+ public byte byDispChanType;//ʾͨͣ0-VGA, 1-BNC, 2-HDMI, 3-DVI
+ public byte byDispChanSeq;//ʾͨ,1ʼVGAʾڼVGA
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDispMode;
+ }
+
+ //ʾͨϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPINFO
+ {
+ public byte byChanNums;//ͨ
+ public byte byStartChan;//ʼͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SUPPORT_RES, ArraySubType = UnmanagedType.U1)]
+ public uint[] dwSupportResolution;//ֵ֧ķֱ
+ }
+
+ //ƴϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREENINFO
+ {
+ public byte bySupportBigScreenNums;//ƴ
+ public byte byStartBigScreenNum;//ƴʼ
+ public byte byMaxScreenX;//ƴģʽ
+ public byte byMaxScreenY;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_ABILITY_V41
+ {
+ public uint dwSize;
+ public byte byDspNums;//DSP
+ public byte byDecChanNums;//ͨ
+ public byte byStartChan;//ʼͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+
+ public NET_DVR_DISPINFO struVgaInfo;//VGAʾͨϢ
+ public NET_DVR_DISPINFO struBncInfo;//BNCʾͨϢ
+ public NET_DVR_DISPINFO struHdmiInfo;//HDMIʾͨϢ
+ public NET_DVR_DISPINFO struDviInfo;//DVIʾͨϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISPNUM_V41, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISPWINDOWMODE[] struDispMode;
+ public NET_DVR_SCREENINFO struBigScreenInfo;
+ public byte bySupportAutoReboot; //Ƿ֧Զ0-֧֣1-֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 119, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int MAX_WINDOWS = 16;//
+ public const int MAX_WINDOWS_V41 = 36;
+
+ public const int STARTDISPCHAN_VGA = 1;
+ public const int STARTDISPCHAN_BNC = 9;
+ public const int STARTDISPCHAN_HDMI = 25;
+ public const int STARTDISPCHAN_DVI = 29;
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_VIDEO_PLATFORM
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 160, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ /*[FieldOffsetAttribute(0)]
+ public VideoPlatform struVideoPlatform;
+ [FieldOffsetAttribute(0)]
+ public NotVideoPlatform struNotVideoPlatform;
+ * */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct VideoPlatform
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecoderId;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDecResolution;
+ public NET_DVR_RECTCFG struPosition; //ʾͨڵǽλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 80, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NotVideoPlatform
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 160, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*ʾͨýṹ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_VOUTCFG
+ {
+ public uint dwSize;
+ public byte byAudio; /*ƵǷ*/
+ public byte byAudioWindowIdx; /*ƵӴ*/
+ public byte byDispChanType; /*ʾͨͣ0-BNC1-VGA2-HDMI3-DVI4-YPbPr(뿨DECODER_SERVERר)*/
+ public byte byVedioFormat; /*1:NTSC,2:PAL0-NULL*/
+ public uint dwResolution;//ֱ
+ public uint dwWindowMode; /*ģʽȡ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecChan;/*ӴڹĽͨ,豸ֽ֧ԴԶʱ˲*/
+ public byte byEnlargeStatus; /*ǷڷŴ״̬0Ŵ1Ŵ*/
+ public byte byEnlargeSubWindowIndex;//ŴӴں
+ public byte byScale; /*ʾģʽ0---ʵʾ1---ʾ( BNC )*/
+ public byte byUnionType;/*ֹ,0-Ƶۺƽ̨ڲʾͨã1-ʾͨ*/
+ public NET_DVR_VIDEO_PLATFORM struDiff;
+ public uint dwDispChanNum; //ʾţ˲ȫȡʱЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 76, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*豸״̬*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISP_CHAN_STATUS_V41
+ {
+ public byte byDispStatus; /*ʾ״̬0δʾ1ʾ*/
+ public byte byBVGA; /*0-BNC1-VGA 2-HDMI3-DVI0xff-Ч*/
+ public byte byVideoFormat; /*Ƶʽ1:NTSC,2:PAL,0-NON*/
+ public byte byWindowMode; /*ģʽ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecChan; /*ӻĽͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFpsDisp; /*ÿӻʾ֡*/
+ public byte byScreenMode; /*Ļģʽ0-ͨ 1-*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwDispChan; /*ȡȫʾͨ״̬ʱЧʱ0*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*豸״̬*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DECODER_WORK_STATUS_V41
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MATRIX_CHAN_STATUS[] struDecChanStatus; /*ͨ״̬*/
+ /*ʾͨ״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DISPNUM_V41, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_DISP_CHAN_STATUS_V41[] struDispChanStatus;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmInStatus; /*״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAlarmOutStatus; /*״̬*/
+ public byte byAudioInChanStatus; /*Խ״̬*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 127, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*******************************ļط-Զ̻ط*******************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_DEC_REMOTE_PLAY_V41
+ {
+ public uint dwSize;
+ public NET_DVR_IPADDR struIP; /* DVR IPַ */
+ public ushort wDVRPort; /* ˿ں */
+ public byte byChannel; /* ͨ */
+ public byte byReserve;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /* û */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /* */
+ public uint dwPlayMode; /* 0ļ 1ʱ*/
+ public NET_DVR_TIME StartTime;
+ public NET_DVR_TIME StopTime;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 128)]
+ public string sFileName;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /**/
+ }
+
+ public const int MAX_BIGSCREENNUM_SCENE = 100;
+
+ //ʾͨýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECTCFG_SCENE
+ {
+ public ushort wXCoordinate; /*ϽʼX*/
+ public ushort wYCoordinate; /*ϽY*/
+ public ushort wWidth; /*ο*/
+ public ushort wHeight; /*θ߶*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCENEDISPCFG
+ {
+ public byte byEnable;//Ƿã0-ã1-
+ public byte bySoltNum;//λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byDispChanNum;
+ public byte byAudio; /*ƵǷ,0-1-*/
+ public byte byAudioWindowIdx; /*ƵӴ*/
+ public byte byVedioFormat; /*1:NTSC,2:PAL0-NULL*/
+ public byte byWindowMode; /*ģʽȡ*/
+ public byte byEnlargeStatus; /*ǷڷŴ״̬0Ŵ1Ŵ*/
+ public byte byEnlargeSubWindowIndex;//ŴӴں
+ public byte byScale; /*ʾģʽ0-ʵʾ1-ʾ( BNC )*/
+ public uint dwResolution;//ֱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecChan;/*ӴڹĽͨ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byJoinDecoderId;/*λ*/
+ //ʾƵֱʣ1-D1,2-720P,3-1080P豸Ҫݴ//ֱʽнͨķ䣬1ó1080P豸4ͨ˽ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WINDOWS_V41, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDecResolution;
+ public byte byRow;//ڵе
+ public byte byColumn;//ڵе
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public NET_DVR_RECTCFG struDisp; //ǽʾλ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEV_CHAN_INFO_SCENE
+ {
+ public NET_DVR_IPADDR struIP; /* DVR IPַ */
+ public ushort wDVRPort; /* ˿ں */
+ public byte byChannel; /* ͨţ9000豸IPC룬ͨŴ33ʼ */
+ public byte byTransProtocol; /* Э0-TCP1-UDP 2-MCAST3-RTP*/
+ public byte byTransMode; /* ģʽ 0 1*/
+ public byte byFactoryType; /*ǰ豸*/
+ public byte byDeviceType; //豸ͣ1-IPC2- ENCODER
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /* ½ʺ */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /* */
+ }
+
+ /*ý*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_STREAM_MEDIA_SERVER_CFG_SCENE
+ {
+ public byte byValid; /*Ƿýȡ,0ʾЧ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_IPADDR struDevIP; /*ýַ*/
+ public ushort wDevPort; /*ý˿*/
+ public byte byTransmitType; /*Э0-TCP1-UDP */
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PU_STREAM_CFG_SCENE
+ {
+ public NET_DVR_STREAM_MEDIA_SERVER_CFG_SCENE streamMediaServerCfg;
+ public NET_DVR_DEV_CHAN_INFO_SCENE struDevChanInfo;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CYC_SUR_CHAN_ELE_SCENE
+ {
+ public byte byEnable; /* Ƿ 0 1*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_STREAM_MEDIA_SERVER_CFG_SCENE struStreamMediaSvrCfg;
+ public NET_DVR_DEV_CHAN_INFO_SCENE struDecChanInfo; /*ѲͨϢ*/
+ }
+
+ //Ѳṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_LOOP_DECINFO_SCENE
+ {
+ public ushort wPoolTime; /*ѯ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CYCLE_CHAN, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CYC_SUR_CHAN_ELE_SCENE[] struChanArray;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BIGSCREENCFG_SCENE
+ {
+ public byte byAllValid; /*ʹܱ־ */
+ public byte byAssociateBaseMap;//ĵͼţ0
+ public byte byEnableSpartan;//ʹܣ1-0-
+ public byte byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LAYERNUMS, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_WINCFG[] struWinCfg;
+ public NET_DVR_BIGSCREENCFG struBigScreen;
+
+ public void Init()
+ {
+ struBigScreen = new NET_DVR_BIGSCREENCFG();
+ struWinCfg = new NET_DVR_WINCFG[MAX_LAYERNUMS];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_SCENECFG
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSceneName;
+ public byte byBigScreenNums;//ĸֵͨȡ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public ushort wDecChanNums;//нͨĸ
+ public ushort wDispChanNums;//ʾͨĸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public IntPtr pBigScreenBuffer;//û, byBigScreenNumssizeof(NET_DVR_BIGSCREENCFG_SCENE)
+ public IntPtr pDecChanBuffer;//ͨû, wDecChanNumssizeof(NET_DVR_DECODECHANCFG_SCENE)
+ public IntPtr pDispChanBuffer;//ʾͨû, wDispChanNumssizeof(NET_DVR_SCENEDISPCFG)
+ public void Init()
+ {
+ sSceneName = new byte[NAME_LEN];
+ byRes1 = new byte[3];
+ byRes1 = new byte[12];
+ }
+ }
+ public const int NET_DVR_GET_ALLWINCFG = 1503; //ڲȡ
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BIGSCREENASSOCIATECFG
+ {
+ public uint dwSize;
+ public byte byEnableBaseMap;//ʹܵͼʾ
+ public byte byAssociateBaseMap;//ĵͼţ0
+ public byte byEnableSpartan;//ʹܣ1-0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 21, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /**************************************************************/
+ public const int MAX_WIN_COUNT = 224; //ֵ֧
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREEN_WINCFG{
+ public uint dwSize;
+ public byte byVaild;
+ public byte byInputType; //CAM_MDOE
+ public ushort wInputIdx; /*Դ*/
+ public uint dwLayerIdx; /*ͼ㣬0Ϊײ*/
+ public NET_DVR_RECTCFG struWin; //ĿĴ(ʾǽ)
+ public byte byWndIndex; //ں
+ public byte byCBD; //0-ޣ1-2-
+ public byte bySubWnd; //0ǣ1
+ public byte byRes1;
+ public uint dwDeviceIndex;//豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_WINLIST
+ {
+ public uint dwSize;
+ public ushort wScreenSeq; //豸
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 10, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwWinNum; //豸صĴ
+ public IntPtr pBuffer; //ϢΪ224*sizeof(NET_DVR_WINCFG)
+ public uint dwBufLen; //ָ볤
+ }
+
+ public const int MAX_LAYOUT_COUNT = 16; //
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LAYOUTCFG
+ {
+ public uint dwSize;
+ public byte byValid; //ǷЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLayoutName; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_WIN_COUNT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCREEN_WINCFG[] struWinCfg; //ڴڲ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LAYOUT_LIST
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LAYOUT_COUNT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_LAYOUTCFG[] struLayoutInfo; //в
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int MAX_CAM_COUNT = 224;
+
+ public enum NET_DVR_CAM_MODE
+ {
+ NET_DVR_UNKNOW = 0,//Ч
+ NET_DVR_CAM_BNC,
+ NET_DVR_CAM_VGA,
+ NET_DVR_CAM_DVI,
+ NET_DVR_CAM_HDMI,
+ NET_DVR_CAM_IP,
+ NET_DVR_CAM_RGB,
+ NET_DVR_CAM_DECODER,
+ NET_DVR_CAM_MATRIX,
+ NET_DVR_CAM_YPBPR,
+ NET_DVR_CAM_USB,
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INPUTSTREAMCFG
+ {
+ public uint dwSize ;
+ public byte byValid ;
+ public byte byCamMode; //źԴͣNET_DVR_CAM_MODE
+ public ushort wInputNo; //źԴ0-224
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCamName; //źԴ
+ public NET_DVR_VIDEOEFFECT struVideoEffect; //Ƶ
+ public NET_DVR_PU_STREAM_CFG struPuStream; //ipʱʹ
+ public ushort wBoardNum ; //źԴڵİ忨
+ public ushort wInputIdxOnBoard; //źԴڰ忨ϵλ
+ public ushort wResolutionX; //ֱ
+ public ushort wResolutionY;
+ public byte byVideoFormat; //Ƶʽ0-ޣ1-NTSC2-PAL
+ public byte byNetSignalResolution; //; 1-CIF 2-4CIF 3-720P 4-1080P 5-500wp źԴķֱʣźԴʱ豸豸ֱԴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sGroupName; //źԴ
+ public byte byJointMatrix; // 0- 1-
+ public byte byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INPUTSTREAM_LIST
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CAM_COUNT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_INPUTSTREAMCFG[] struInputStreamInfo; //źԴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /**************************************************************/
+ /*ͨ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OUTPUTPARAM
+ {
+ public uint dwSize;
+ public byte byMonMode; /*ģʽ,1-BNC,2-VGA,3-DVI,4-HDMI*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwResolution; /*ֱʣȡֵ֧Ľ*/
+ public NET_DVR_VIDEOEFFECT struVideoEffect; /*ͨƵ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OUTPUTCFG
+ {
+ public uint dwSize;
+ public byte byScreenLayX; //-
+ public byte byScreenLayY; //-
+ public ushort wOutputChanNum; //ͨ0ʾ豸ֵ֧ͨȡֵʾʵͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_OUTPUTPARAM struOutputParam; /*ͨƵ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sWallName; //ǽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /**************************************************************/
+ public const int SCREEN_PROTOCOL_NUM = 20; //ֵ֧Э
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREENSERVER_ABILITY
+ {
+ public uint dwSize; /*ṹ*/
+ public byte byIsSupportScreenNum; /*ִ֧Ŀ*/
+ public byte bySerialNums; //ڸ
+ public byte byMaxInputNums;
+ public byte byMaxLayoutNums;
+ public byte byMaxWinNums;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 19, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byMaxScreenLayX;//-
+ public byte byMaxScreenLayY;//-
+ public ushort wMatrixProtoNum; /*ЧĴЭĿ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SCREEN_PROTOCOL_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PROTO_TYPE[] struScreenProto;/*Эб*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREENCONTROL_ABILITY
+ {
+ public uint dwSize; /*ṹ*/
+ public byte byLayoutNum; /* ָ*/
+ public byte byWinNum; /*Ļڸ*/
+ public byte byOsdNum; /*OSD*/
+ public byte byLogoNum; /*Logo*/
+ public byte byInputStreamNum; //Դ ---豸֧ͨԴԴ
+ public byte byOutputChanNum; //ͨ---豸֧ͨ
+ public byte byCamGroupNum; /**/
+ public byte byPlanNum; /*Ԥ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byIsSupportPlayBack; /*Ƿֻ֧ط*/
+ public byte byMatrixInputNum; //֧
+ public byte byMatrixOutputNum; //֧
+ public NET_DVR_DISPINFO struVgaInfo;//VGAϢ
+ public NET_DVR_DISPINFO struBncInfo;//BNCϢ
+ public NET_DVR_DISPINFO struHdmiInfo;//HDMIϢ
+ public NET_DVR_DISPINFO struDviInfo;//DVIϢ
+ public byte byMaxUserNums;//֧û
+ public byte byPicSpan; //ͼȣһŵͼɸǵĻ
+ public ushort wDVCSDevNum; //ֲʽ豸
+ public ushort wNetSignalNum; //Դ
+ public ushort wBaseCoordinateX;//
+ public ushort wBaseCoordinateY;
+ public byte byExternalMatrixNum; //Ӿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 49, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*******************************ź״̬*******************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ANALOGINPUTSTATUS
+ {
+ public uint dwLostFrame; /*Ƶ붪֡*/
+ public byte byHaveSignal; /*ǷƵź*/
+ public byte byVideoFormat; /*Ƶʽ1NTSC,2PAL,0*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 46, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_INPUTSTATUS_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 52, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ /*[FieldOffsetAttribute(0)]
+ public NET_DVR_MATRIX_CHAN_STATUS struIpInputStatus;
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_ANALOGINPUTSTATUS struAnalogInputStatus;
+ * */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INPUTSTATUS
+ {
+ public ushort wInputNo; /*źԴ*/
+ public byte byInputType; //NET_DVR_CAM_MODE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_INPUTSTATUS_UNION struStatusUnion;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREENINPUTSTATUS
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public uint dwNums; //豸صԴ״̬
+ public IntPtr pBuffer; //
+ public uint dwBufLen; //ָ볤ȣ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREENALARMCFG
+ {
+ public uint dwSize;
+ public byte byAlarmType; //ͣ1-Ӱγ2-Ӱ룬3-ϵͳ״̬쳣4-ϵͳָָ 5-Դ쳣 6-¶ȱ 7-FPGA汾ƥ 8-Ԥʼ 9-Ԥ 10- 11-IPַͻ12-쳣
+ public byte byBoardType; // 1- 2- 3-壬4-壬Ϊ1236ʱʹ
+ public byte bySubException; //쳣ʱ쳣 1- ֱı 2-˿ı3-ֱʴ4-ֱʸı䵼½Դ㣬رոԴӦڡ5-ֱʸı䣬ѿű1/88Χ6-ֱʻָ,7-ֱʸı䵼,豸رմ
+ public byte byRes1;
+ public ushort wStartInputNum; // 쳣Դ쳣㣩
+ public ushort wEndInputNum; // 쳣Դ쳣յ㣩
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MATRIX_CFG
+ {
+ public byte byValid; //жǷģǷЧ
+ public byte byCommandProtocol; //ģָ4֣
+ public byte byScreenType; //
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byScreenToMatrix; //ģĻĶӦϵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DIGITALSCREEN
+ {
+ public NET_DVR_IPADDR struAddress;/*豸Ϊ豸ʱIPϢ*/
+ public ushort wPort; //ͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 26, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ANALOGSCREEN
+ {
+ public byte byDevSerPortNum; /*豸Ĵں*/
+ public byte byScreenSerPort; /*ӴĴں*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 130, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_MATRIX_CFG struMatrixCfg;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_SCREEN_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 172, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ /*[FieldOffsetAttribute(0)]
+ public NET_DVR_DIGITALSCREEN struDigitalScreen;
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_ANALOGSCREEN struAnalogScreen;
+ * */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREEN_SCREENINFO
+ {
+ public uint dwSize;
+ public byte byValid; //ǷЧ
+ public byte nLinkMode; //ӷʽ0-ڣ1-
+ public byte byDeviceType; //豸ͺţȡ
+ public byte byScreenLayX; //-
+ public byte byScreenLayY; //-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; /*¼û*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PASSWD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPassword; /*¼*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDevName; /*豸*/
+ public NET_DVR_SCREEN_UNION struScreenUnion;
+ public byte byInputNum; // Դ
+ public byte byOutputNum; // Դ
+ public byte byCBDNum; //CBD
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 29, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*******************************ͼϴ*******************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_BASEMAP_CFG
+ {
+ public byte byScreenIndex; //Ļ
+ public byte byMapNum; /*ָ˶ٿ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] res;
+ public ushort wSourWidth; /* ԭͼƬĿ */
+ public ushort wSourHeight; /* ԭͼƬĸ߶ */
+ }
+
+ /*******************************OSD*******************************/
+ public const int MAX_OSDCHAR_NUM = 256;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_OSDCFG
+ {
+ public uint dwSize;
+ public byte byValid; /*ǷЧ 0Ч 1Ч*/
+ public byte byDispMode; //ʾģʽ1-2-3-ģʽ
+ public byte byFontColorY; /*ɫY,0-255*/
+ public byte byFontColorU; /*ɫU,0-255*/
+ public byte byFontColorV; /*ɫV,0-255*/
+ public byte byBackColorY; /*ɫY,0-255*/
+ public byte byBackColorU; /*ɫU,0-255*/
+ public byte byBackColorV; /*ɫV,0-255*/
+ public ushort wXCoordinate; /*OSDĻϽλx*/
+ public ushort wYCoordinate; /*OSDĻϽλy*/
+ public ushort wWidth; /*OSD*/
+ public ushort wHeight; /*OSD߶*/
+ public uint dwCharCnt; /*ַĸ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_OSDCHAR_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wOSDChar; /*OSDַ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*******************************ȡϢ*******************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SERIAL_CONTROL
+ {
+ public uint dwSize ;
+ public byte bySerialNum; // ڸ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySerial;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*******************************Ļ*******************************/
+ //ĻԴ
+ public enum INPUT_INTERFACE_TYPE
+ {
+ INTERFACE_VGA = 0,
+ INTERFACE_SVIDEO, // 2046NL֧֣2046NH֧
+ INTERFACE_YPBPR,
+ INTERFACE_DVI ,
+ INTERFACE_BNC ,
+ INTERFACE_DVI_LOOP,//(ͨ) 2046NH֧֣2046NL֧
+ INTERFACE_BNC_LOOP, //(ͨ) 2046NH֧֣2046NL.֧
+ INTERFACE_HDMI,
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INPUT_INTERFACE_CTRL
+ {
+ public byte byInputSourceType; //INPUT_INTERFACE_TYPE
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ʾԪɫ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPLAY_COLOR_CTRL
+ {
+ public byte byColorType; //1- 2-Աȶ 3-Ͷ 4-
+ public char byScale; //-1 0+1ֵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ʾԪλÿ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DISPLAY_POSITION_CTRL
+ {
+ public byte byPositionType; //1-ˮƽλ 2-ֱλã
+ public char byScale; //-1 0+1ֵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 14, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_SCREEN_CONTROL_PARAM
+ {
+ /*[FieldOffsetAttribute(0)]
+ public NET_DVR_INPUT_INTERFACE_CTRL struInputCtrl;
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_DISPLAY_COLOR_CTRL struDisplayCtrl;
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_DISPLAY_POSITION_CTRL struPositionCtrl;
+ [FieldOffsetAttribute(0)]
+ * */
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREEN_CONTROL
+ {
+ public uint dwSize;
+ public uint dwCommand ; /* Ʒ 1- 2- 3-ĻԴѡ 4-ʾԪɫ 5-ʾԪλÿ*/
+ public byte byProtocol; //Э,1:LCD-S1,2:LCD-S2
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_SCREEN_CONTROL_PARAM struControlParam;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 52, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*******************************ĻV41*******************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SCREEN_CONTROL_V41
+ {
+ public uint dwSize;
+ public byte bySerialNo; //ں
+ public byte byBeginAddress; //ϽĻţ1ʼ
+ public byte byEndAddress; //½Ļţ1ʼ
+ public byte byProtocol; // Э 1-LCD-S1 , 2-LCD-S2 , 3-LCD-L1 4-LCD-DLP 5-LCD-S3 , 6-LCD-H1
+ public uint dwCommand ; /* Ʒ 1- 2- 3-ĻԴѡ 4-ʾԪɫ 5-ʾԪλÿ*/
+ public NET_DVR_SCREEN_CONTROL_PARAM struControlParam;
+ public byte byWallNo; // ǽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 51, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /*******************************Ԥ*******************************/
+ public const int MAX_PLAN_ACTION_NUM = 32; //Ԥ
+ public const int DAYS_A_WEEK = 7; //һ7
+ public const int MAX_PLAN_COUNT = 16; //Ԥ
+
+ public enum NET_DVR_PLAN_OPERATE_TYPE
+ {
+ NET_DVR_SWITCH_LAYOUT = 1, // л Ĭ
+ NET_DVR_SCREEN_POWER_OFF, // رմĻʾ
+ NET_DVR_SCREEN_POWER_ON, // Ļʾ
+ }
+
+ /*ԤϢ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLAN_INFO
+ {
+ public byte byValid; // ǷЧ
+ public byte byType; // NET_DVR_PLAN_OPERATE_TYPE
+ public ushort wLayoutNo; // ֺ
+ public byte byScreenStyle; //Ļͺţػã1ǵ2Ǹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwDelayTime; // һʱ, λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CYCLE_TIME
+ {
+ public byte byValid;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_TIME_EX struTime;
+ }
+
+ /*Ԥ*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLAN_CFG
+ {
+ public uint dwSize;
+ public byte byValid; // ԤǷЧ
+ public byte byWorkMode; // Ԥģʽ 1ʾֶ2Զ3Ԥѭ
+ public byte byWallNo; //ǽţ1ʼ
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPlanName; //Ԥ
+ public NET_DVR_TIME_EX struTime; // ģʽΪԶʱʹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = DAYS_A_WEEK, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CYCLE_TIME[] struTimeCycle; /*ѭʱ䣬Ϊһڣꡢ¡ʹá磺struTimeCycle[0]еbyValidֵ1ʾִиԤȡֵΪ[0,6]0죬1һԴ*/
+ public uint dwWorkCount; // Ԥִд0Ϊһֱѭţֵʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PLAN_ACTION_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_PLAN_INFO[] strPlanEntry; // Ԥִе
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*******************************ȡ豸״̬*******************************/
+ /*Ԥб*/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLAN_LIST
+ {
+ public uint dwSize;
+ public uint dwPlanNums; //豸źԴ
+ public IntPtr pBuffer; //ָdwInputSignalNumsNET_DVR_PLAN_CFGṹСĻ
+ public byte byWallNo; //ǽţ1ʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwBufLen; //仺ȣڵdwInputSignalNumsNET_DVR_PLAN_CFGṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ /*******************************Ԥ*******************************/
+ //ýṹΪͨÿƽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CONTROL_PARAM
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDeviceID; //豸豸ID
+ public ushort wChan; //ͨ
+ public byte byIndex; //ȷʾʲô
+ public byte byRes1;
+ public uint dwControlParam;
+ public byte byMandatoryAlarm; //1-ʹ 0-ʹ
+ public byte byRes2;
+ public ushort wZoneIndex; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byOperatorCode;//ؿ
+ public uint dwPlanNo; //4ֽԤţͻͳһʹ4ֽڵԤţֽڵԤŲʹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ }
+
+ /*******************************ȡ豸״̬*******************************/
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DEVICE_RUN_STATUS
+ {
+ public uint dwSize;
+ public uint dwMemoryTotal; //ڴ λKbyte
+ public uint dwMemoryUsage; //ڴʹ λKbyte
+ public byte byCPUUsage; //CPUʹ 0-100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 127, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //91ϵHD-SDIDVR Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACCESS_CAMERA_INFO
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sCameraInfo; // ǰϢ
+ public byte byInterfaceType; // ǰ˽ӿͣ1:VGA, 2:HDMI, 3:YPbPr 4:SDI 5:FC
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwChannel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AUDIO_INPUT_PARAM
+ {
+ public byte byAudioInputType; //Ƶͣ0-mic in1-line in
+ public byte byVolume; //volume,[0-100]
+ public byte byEnableNoiseFilter; //Ƿ-أ-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 5, ArraySubType = UnmanagedType.I1)]
+ public byte[] byres;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CAMERA_DEHAZE_CFG
+ {
+ public uint dwSize;
+ public byte byDehazeMode; //0-ã1-Զģʽ2-
+ public byte byLevel; //ȼ0-100
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_INPUT_SIGNAL_LIST
+ {
+ public uint dwSize;
+ public uint dwInputSignalNums; //豸źԴ
+ public IntPtr pBuffer; //ָdwInputSignalNumsNET_DVR_INPUTSTREAMCFGṹСĻ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwBufLen; //仺ȣڵdwInputSignalNumsNET_DVR_INPUTSTREAMCFGṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ȫ״̬
+ public const int PULL_DISK_SUCCESS = 1; // ȫ̳ɹ
+ public const int PULL_DISK_FAIL = 2; // ȫʧ
+ public const int PULL_DISK_PROCESSING = 3; // ֹͣ
+ public const int PULL_DISK_NO_ARRAY = 4; // в
+ public const int PULL_DISK_NOT_SUPPORT = 5; // ְ֧ȫ
+
+ //ɨ״̬
+ public const int SCAN_RAID_SUC = 1; // ɨгɹ
+ public const int SCAN_RAID_FAIL = 2; // ɨʧ
+ public const int SCAN_RAID_PROCESSING = 3; // ɨ
+ public const int SCAN_RAID_NOT_SUPPORT = 4; // ֧ɨ
+
+ //ǰ״̬
+ public const int SET_CAMERA_TYPE_SUCCESS = 1; // ɹ
+ public const int SET_CAMERA_TYPE_FAIL = 2; // ʧ
+ public const int SET_CAMERA_TYPE_PROCESSING = 3; // ڴ
+
+ //9000 2.2
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORD_TIME_SPAN_INQUIRY
+ {
+ public uint dwSize; //ṹС
+ public byte byType; //0 Ƶ¼, 1ͼƬͨ¼, 2ANRͨ¼, 3֡ͨ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 63, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_RECORD_TIME_SPAN
+ {
+ public uint dwSize; //ṹС
+ public NET_DVR_TIME strBeginTime; //ʼʱ
+ public NET_DVR_TIME strEndTime; //ʱ
+ public byte byType; //0 Ƶ¼, 1ͼƬͨ¼, 2ANRͨ¼, 3֡ͨ¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 35, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DRAWFRAME_DISK_QUOTA_CFG
+ {
+ public uint dwSize; //ṹС
+ public byte byPicQuota; //ͼƬٷֱ [0%, 30%]
+ public byte byRecordQuota; //ͨ¼ٷֱ [20%, 40%]
+ public byte byDrawFrameRecordQuota; //֡¼ٷֱ [30%, 80%]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 61, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //ֽ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MANUAL_RECORD_PARA
+ {
+ public NET_DVR_STREAM_INFO struStreamInfo;
+ public uint lRecordType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //˿ӳýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NAT_PORT
+ {
+ public ushort wEnable;
+ public ushort wExtPort;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //˿ӳýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_NAT_CFG
+ {
+ public uint dwSize;
+ public ushort wEnableUpnp;
+ public ushort wEnableNat;
+ public NET_DVR_IPADDR struIpAddr;//ʱֹͣʱ
+ public NET_DVR_NAT_PORT struHttpPort;//ʱֹͣʱ
+ public NET_DVR_NAT_PORT struCmdPort;//ʱֹͣʱ
+ public NET_DVR_NAT_PORT struRtspPort;//ʱֹͣʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFriendName;
+ public byte byNatType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_NAT_PORT struHttpsPort;//ʱֹͣʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 76, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Upnp˿ӳ״̬ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_UPNP_PORT_STATE
+ {
+ public uint dwEnabled;//ö˿Ƿʹӳ
+ public ushort wInternalPort;//ӳǰĶ˿
+ public ushort wExternalPort;//ӳĶ˿
+ public uint dwStatus;//˿ӳ״̬0- δЧ1- δЧӳԴ˿ĿĶ˿һ£2- δЧӳ˿ںѱʹã3- Ч
+ public NET_DVR_IPADDR struNatExternalIp;//ӳⲿַ
+ public NET_DVR_IPADDR struNatInternalIp;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ //Upnp˿ӳ״̬ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_UPNP_NAT_STATE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_UPNP_PORT_STATE[] strUpnpPort;//˿ӳ״̬:0- web server˿ڣ1- ˿ڣ2- rtsp
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 200, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLAYCOND
+ {
+ public uint dwChannel;
+ public NET_DVR_TIME struStartTime;
+ public NET_DVR_TIME struStopTime;
+ public byte byDrawFrame; //0:֡1֡
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 63, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ //¼طŽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VOD_PARA
+ {
+ public uint dwSize; //ṹС
+ public NET_DVR_STREAM_INFO struIDInfo; //IDϢ
+ public NET_DVR_TIME struBeginTime;//طſʼʱ
+ public NET_DVR_TIME struEndTime;//طŽʱ
+ public IntPtr hWnd;//طŴ
+ public byte byDrawFrame;//Ƿ֡0- ֡1- ֡
+ public byte byVolumeType;//0-ͨ¼1-浵CVR豸ͨͨ¼浵ڱ¼
+ public byte byVolumeNum;//浵
+ public byte byRes1;//
+ public uint dwFileIndex;//浵ϵ¼ļ浵¼ʱصֵ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ATMFINDINFO
+ {
+ public byte byTransactionType; // 0-ȫ1-ѯ 2-ȡ 3- 4-룬5-תˣ 6-ѯ 7- 8-̳ 9-̿ 10-Զ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public uint dwTransationAmount ; // ;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct NET_DVR_SPECIAL_FINDINFO_UNION
+ {
+ [FieldOffsetAttribute(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLenth ;
+ /* [FieldOffsetAttribute(0)]
+ public NET_DVR_ATMFINDINFO struATMFindInfo; //ATMѯ
+ * */
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FILECOND_V40
+ {
+ public Int32 lChannel;
+ public uint dwFileType;
+ public uint dwIsLocked;
+ public uint dwUseCardNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CARDNUM_LEN_OUT, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCardNumber;
+ public NET_DVR_TIME struStartTime;
+ public NET_DVR_TIME struStopTime;
+ public byte byDrawFrame; //0:֡1֡
+ public byte byFindType; //0:ѯͨ1ѯ浵
+ public byte byQuickSearch; //0:ͨѯ1٣ѯ
+ public byte bySpecialFindInfoType ; //רвѯ 0-Ч 1-ATMѯ
+ public uint dwVolumeNum; //浵
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = GUID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byWorkingDeviceGUID; //GUIDͨȡN+1õ
+ public NET_DVR_SPECIAL_FINDINFO_UNION uSpecialFindInfo ; //רвѯ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //¼
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SEARCH_EVENT_PARAM_V40
+ {
+ public ushort wMajorType; //0-ƶ⣬1-, 2-¼ 5-pos¼ 7-޼
+ public ushort wMinorType; //- ͱ仯0xffffʾȫ
+ public NET_DVR_TIME struStartTime; //Ŀʼʱ䣬ֹͣʱ: ͬʱΪ(0, 0) ʾʱ俪ʼǰ4000¼
+ public NET_DVR_TIME struEndTime; //
+ public byte byLockType; // 0xff-ȫ0-δ1-
+ public byte byQuickSearch; // Ƿÿٲѯ0-ã1-ãٲѯ᷵ļС豸ݿвѯƵӲ̣
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 130, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ public UNION_EVENT_PARAM uSeniorParam;
+
+ public void Init()
+ {
+ byRes = new byte[130];
+ uSeniorParam.Init();
+ }
+ }
+
+ public const int SEARCH_EVENT_INFO_LEN_V40 = 800;
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct UNION_EVENT_PARAM
+ {
+ [FieldOffset(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SEARCH_EVENT_INFO_LEN_V40, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLen;
+ public void Init()
+ {
+ byLen = new byte[SEARCH_EVENT_INFO_LEN_V40];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struMotionParam
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wMotDetChanNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 672, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void Init()
+ {
+ wMotDetChanNo = new ushort[MAX_CHANNUM_V30];
+ byRes = new byte[672];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struStreamIDParam
+ {
+ public NET_DVR_STREAM_INFO struIDInfo;
+ public uint dwCmdType;
+ public byte byBackupVolumeNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byArchiveLabel;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 656, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void Init()
+ {
+ byRes1 = new byte[3];
+ byArchiveLabel = new byte[64];
+ byRes = new byte[656];
+ struIDInfo.Init();
+ }
+ }
+
+ //ҷؽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SEARCH_EVENT_RET_V40
+ {
+ public ushort wMajorType; //
+ public ushort wMinorType; //
+ public NET_DVR_TIME struStartTime; //¼ʼʱ
+ public NET_DVR_TIME struEndTime; //¼ֹͣʱ䣬¼ʱͿʼʱһ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V40, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wChan; //ͨţ0xffffʾЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public UNION_EVENT_RET uSeniorRet;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ public struct UNION_EVENT_RET
+ {
+ [FieldOffset(0)]
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 800, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLen;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struMotionRet
+ {
+ public uint dwMotDetNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 796, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int NET_SDK_MAX_TAPE_INDEX_LEN = 32; //Ŵ
+ public const int NET_SDK_MAX_FILE_LEN = 256; //ļ
+
+ //id¼ѯ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct struStreamIDRet
+ {
+ public uint dwRecordType; //¼ 0-ʱ¼ 1-ƶ 2-¼ 3-|ƶ 4-&ƶ 5- 6-ֶ¼ 7- 8- 9-ܱ 10-ش¼
+ public uint dwRecordLength; //¼С
+ public byte byLockFlag; // ־ 0û 1
+ public byte byDrawFrameType; // 0dz֡¼ 1֡¼
+ public byte byPosition;// ļڴ洢λã0-ϣ1-λϣֱأ2-ŴڣҪѴлλϣ3-ڴŴУҪѴ̲嵽Ŵ
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFileName; //ļ
+ public uint dwFileIndex; // 浵ϵļ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_MAX_TAPE_INDEX_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTapeIndex; //ļڴŴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_MAX_FILE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFileNameEx; //ļչ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 464, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_AES_KEY_INFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] sAESKey; /*Կ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; /*ֽ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_POE_CFG
+ {
+ public NET_DVR_IPADDR struIP; //IPַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ }
+
+ public const int MAX_PRO_PATH = 256; //Э·
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CUSTOM_PROTOCAL
+ {
+ public uint dwSize; //ṹС
+ public uint dwEnabled; //ǷøЭ0 1
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = DESC_LEN)]
+ public string sProtocalName; //ԶЭ, 16λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //,Эչ
+ public uint dwEnableSubStream; //Ƿ0 1
+ public byte byMainProType; //Э 1 RTSP
+ public byte byMainTransType; // 0Auto 1udp 2rtp over rtsp
+ public ushort wMainPort; //˿
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_PRO_PATH)]
+ public string sMainPath; //·
+ public byte bySubProType; //Э 1 RTSP
+ public byte bySubTransType; // 0Auto 1udp 2rtp over rtsp
+ public ushort wSubPort; //˿
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_PRO_PATH)]
+ public string sSubPath; //·
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 200, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ }
+
+ //ԤV40ӿ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PREVIEWINFO
+ {
+ public Int32 lChannel;//ͨ
+ public uint dwStreamType; // ͣ0-1-2-33-4 Դ
+ public uint dwLinkMode;// 0TCPʽ,1UDPʽ,2ಥʽ,3 - RTPʽ4-RTP/RTSP,5-RSTP/HTTP
+ public IntPtr hPlayWnd;//Ŵڵľ,ΪNULLʾͼ
+ public bool bBlocked; //0-ȡ, 1-ȡ, SDKڲconnectʧܽ5sijʱܹ,ʺѯȡ.
+ public bool bPassbackRecord; //0-¼ش,1¼ش
+ public byte byPreviewMode;//Ԥģʽ0-Ԥ1-ӳԤ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = STREAM_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byStreamID;//IDlChannelΪ0xffffffffʱô˲
+ public byte byProtoType; //ӦòȡЭ飬0-˽Э飬1-RTSPЭ
+ public byte byRes1;
+ public byte byVideoCodingType; //ݱ 0-ͨñ 1-ȳ̽ԭʼݣ¶ݵļϢͨȥ㣬ԭʼʵ¶ֵ
+ public uint dwDisplayBufNum; //ſⲥŻ֡Χ1-500ʱĬΪ1
+ public byte byNPQMode; //NPQֱģʽǹý 0-ֱ 1-ý
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 215, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ ///ץĻ
+ ///
+ public const int MAX_OVERLAP_ITEM_NUM = 50; //ַ
+ public const int NET_ITS_GET_OVERLAP_CFG = 5072;//ȡַӲãITSնˣ
+ public const int NET_ITS_SET_OVERLAP_CFG = 5073;//ַӲãITSնˣ
+ public const int NET_ITS_SET_LAMP_EXTERNAL_CFG = 5095; //ò
+
+ //ַṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_OVERLAPCFG_COND
+ {
+ public uint dwSize;
+ public uint dwChannel;//ͨ
+ public uint dwConfigMode;//ģʽ0- նˣ1- ǰ(ֱǰ˻ն˽ǰ)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ //ַϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_OVERLAP_SINGLE_ITEM_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ public byte byItemType;//
+ public byte byChangeLineNum;//ĻȡֵΧ[0,10]Ĭϣ0
+ public byte bySpaceNum;//ĿոȡֵΧ[0-255]Ĭϣ0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ //ַýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_OVERLAP_ITEM_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_OVERLAP_ITEM_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITS_OVERLAP_SINGLE_ITEM_PARAM[] struSingleItem;//ַϢ
+ public uint dwLinePercent;
+ public uint dwItemsStlye;
+ public ushort wStartPosTop;
+ public ushort wStartPosLeft;
+ public ushort wCharStyle;
+ public ushort wCharSize;
+ public ushort wCharInterval;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ public uint dwForeClorRGB;//ǰɫRGBֵbit0~bit7: Bbit8~bit15: Gbit16~bit23: RĬϣx00FFFFFF-
+ public uint dwBackClorRGB;//ɫRGBֵֻͼƬЧbit0~bit7: Bbit8~bit15: Gbit16~bit23: RĬϣx00000000-
+ public byte byColorAdapt;//ɫǷӦ0-1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ //ַϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_OVERLAP_INFO_PARAM
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySite;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRoadNum;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byInstrumentNum;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDirection;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDirectionDesc;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLaneDes;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//ﱣƵѹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 44, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitoringSite1;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitoringSite2;//ﱣƵѹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//ﱣƵѹ
+ }
+
+ //ַṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_OVERLAP_CFG
+ {
+ public uint dwSize;
+ public byte byEnable;//Ƿã0- ã1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//ﱣƵѹ
+ public NET_ITS_OVERLAP_ITEM_PARAM struOverLapItem;//ַ
+ public NET_ITS_OVERLAP_INFO_PARAM struOverLapInfo;//ַϢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//ﱣƵѹ
+ }
+
+ //ṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SETUPALARM_PARAM
+ {
+ public uint dwSize;
+ public byte byLevel;//ȼ0- һȼߣ1- ȼУ2- ȼͣ
+ public byte byAlarmInfoType;//ϴϢ֧֣ͣܽͨ0- ϱϢNET_DVR_PLATE_RESULT1- ±Ϣ(NET_ITS_PLATE_RESULT)
+ public byte byRetAlarmTypeV40;
+ public byte byRetDevInfoVersion;
+ public byte byRetVQDAlarmType;
+ public byte byFaceAlarmDetection;
+ public byte bySupport;
+ public byte byBrokenNetHttp;
+ public ushort wTaskNo;
+ public byte byDeployType; //ͣ0-ͻ˲1-ʵʱ
+ public byte bySubScription; //ģλʾδIJϱ //ռλ //Bit7-ƶ˳Ƿͼ0-ͼ(V30ϱ)1-ͼ(V40ϱ)
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public byte byAlarmTypeURL;
+ //bit0-ʾץıϴINTER_FACESNAP_RESULT0-ʾƴ䣬1-ʾURL䣨豸ֵ֧£豸֧ݾ屨ж,ͬʱ豸Ҫ֧URLطǰǡƴ洢
+ //bit1-ʾEVENT_JSONͼƬݳͣ0-ʾƴ䣬1-ʾURL䣨豸ֵ֧£豸֧ݾ屨жϣ
+ //bit2 - ȶ(ΪCOMM_SNAP_MATCH_ALARM)ͼƬϴͣ0 - ƴ䣬1 - URL
+ //bit3 - 쳣Ϊʶ(ΪCOMM_ALARM_RULE)ͼƬϴͣ0 - ƴ䣬1 - URL䣬ֶ豸Ƿ֧֣ӦӲڵǷΪtrue
+ public byte byCustomCtrl;//Bit0- ʾָ֧ʻͼϴ: 0-ϴ,1-ϴ
+ }
+
+ //բƲ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_BARRIERGATE_CFG
+ {
+ public uint dwSize;
+ public uint dwChannel;//ͨ
+ public byte byLaneNo; //բţ0-ʾЧֵ(豸ҪЧֵж),1-բ1
+ public byte byBarrierGateCtrl;//0-رյբ,1-բ,2-ֹͣբ 3-բ,4~բ
+ public byte byEntranceNo;//ڱ [1,8]
+ public byte byUnlock;//ýʹܣ0~Ϊã1~
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 12, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int MAX_RELAY_NUM = 12;
+ public const int MAX_IOIN_NUM = 8;
+ public const int MAX_VEHICLE_TYPE_NUM = 8;
+
+ public const int NET_DVR_GET_ENTRANCE_PARAMCFG = 3126; //ȡڿƲ
+ public const int NET_DVR_SET_ENTRANCE_PARAMCFG = 3127; //óڿƲ
+
+ //ڿ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_BARRIERGATE_COND
+ {
+ public byte byLaneNo;//ţ0- ʾЧֵ(豸ҪЧֵж)1- 1
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //̵
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_RELAY_PARAM
+ {
+ public byte byAccessDevInfo;//0-豸1-բ2-صբ3-ͣբ4-źš5-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //Ϣܿز
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_DVR_VEHICLE_CONTROL
+ {
+ public byte byGateOperateType;//ͣ0- 1- բ
+ public byte byRes1;
+ public ushort wAlarmOperateType; //ͣ0- bit0- ̵bit1- ϴbit3- 澯ϴֵ0-ʾأ1-ʾɸѡ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //ڿƲ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ENTRANCE_CFG
+ {
+ public uint dwSize;
+ public byte byEnable;
+ public byte byBarrierGateCtrlMode;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;//
+ public uint dwRelateTriggerMode;
+ public uint dwMatchContent;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_RELAY_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_RELAY_PARAM[] struRelayRelateInfo;//̵Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_IOIN_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byGateSingleIO;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_VEHICLE_TYPE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_VEHICLE_CONTROL[] struVehicleCtrl;//Ϣܿ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;//
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_GATE_VEHICLE
+ {
+ public uint dwSize;
+ public uint dwMatchNo;
+ public byte byGroupNum;
+ public byte byPicNo;
+ public byte bySecondCam;
+
+ public byte byRes;
+ public ushort wLaneid;
+ public byte byCamLaneId;
+ public byte byRes1;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
+ public byte[] byAlarmReason;
+
+ public ushort wBackList;
+ public ushort wSpeedLimit;
+ public uint dwChanIndex;
+
+
+ public NET_DVR_PLATE_INFO struPlateInfo;
+
+ public NET_DVR_VEHICLE_INFO struVehicleInfo;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
+ public byte[] byMonitoringSiteID;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
+ public byte[] byDeviceID;
+
+
+ public byte byDir;
+ public byte byDetectType;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
+ public byte[] byRes2;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
+ public byte[] byCardNo;
+
+ public uint dwPicNum;
+
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITS_PICTURE_INFO[] struPicInfo;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
+ public byte[] bySwipeTime;
+
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 224)]
+ public byte[] byRes3;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_PICTURE_INFO
+ {
+ public uint dwDataLen;
+ public byte byType;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
+ public byte[] byRes1;
+ public uint dwRedLightTime;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
+ public byte[] byAbsTime;
+ public NET_VCA_RECT struPlateRect;
+ public NET_VCA_RECT struPlateRecgRect;
+ public IntPtr pBuffer;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_PLATE_RESULT
+ {
+ public uint dwSize; //ṹ
+ public uint dwMatchNo; //ƥ,(,,)ƥ
+ public byte byGroupNum; //ͼƬһץĵһͼƬʱƥݣ
+ public byte byPicNo; //ĵͼƬţյͼƬʾ;ճʱͼƬʱҪɾ
+ public byte bySecondCam; //ǷڶץģԶץĵԶǰץĵĺĿлõ
+ public byte byFeaturePicNo; //Ƶ羯ȡڼͼΪдͼ,0xff-ʾȡ
+ public byte byDriveChan; //
+ public byte byVehicleType; //ͣοVTR_RESULT
+ public byte byDetSceneID;//ⳡ[1,4], IPCĬ0
+ //ԣλʾ0- (ͨ)bit1- Ʊ공(ı־)bit2- ΣƷֵ0- 1-
+ //ýڵѲʹ,ʹbyYellowLabelCarbyDangerousVehiclesжǷƱ공ΣƷ
+ public byte byVehicleAttribute;
+ public ushort wIllegalType; //ΥͲù궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIllegalSubType; //Υ
+ public byte byPostPicNo; //ΥʱȡڼͼƬΪͼ,0xff-ʾȡ
+ //ͨ(Чͨź豸ϴͨһ£ں˺ ͨһ)
+ public byte byChanIndex;
+ public ushort wSpeedLimit; //ޣʱЧ
+ public byte byChanIndexEx; //byChanIndexEx*256+byChanIndexʾʵͨš
+ public byte byRes2;
+ public NET_DVR_PLATE_INFO struPlateInfo; //Ϣṹ
+ public NET_DVR_VEHICLE_INFO struVehicleInfo; //Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 48, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitoringSiteID; //ʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 48, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDeviceID; //豸
+ public byte byDir; //ʾ1-У2-()3-˫4-ɶ5-,6-7-ɱϣ8-
+ public byte byDetectType; //ⷽʽ,1-ظд2-Ƶ3-֡ʶ4-״ﴥ
+ //ͣοITC_RELA_LANE_DIRECTION_TYPE
+ //òΪŶӦȷΨһԡ
+ public byte byRelaLaneDirectionType;
+ public byte byCarDirectionType; //ʻķ0ʾ£1ʾϣʵʳʻ֣
+ //wIllegalTypeΪʱʹøòwIllegalTypeΪֵʱwIllegalTypeΪòЧ
+ public uint dwCustomIllegalType; //ΥͶ(ûԶ)
+ /*Ϊ0~ָʽʱΪϵΥͣwIllegalTypedwCustomIllegalTypeЧֵΥ롣
+ * Ϊ1~ַʽʱpIllegalInfoBufЧϵΥͣwIllegalTypedwCustomIllegalTypeȻֵΥ*/
+ public IntPtr pIllegalInfoBuf; //ΥַϢṹָ룻ָNET_ITS_ILLEGAL_INFO
+ public byte byIllegalFromatType; //ΥϢʽͣ 0~ָʽ 1~ַʽ
+ public byte byPendant;// 0-ʾδ֪,1-2-
+ public byte byDataAnalysis; //0-δ, 1-ѷ
+ public byte byYellowLabelCar; //0-ʾδ֪, 1-ǻƱ공,2-Ʊ공
+ public byte byDangerousVehicles; //0-ʾδ֪, 1-ΣƷ,2-ΣƷ
+ //ֶΰPilotַΪʻCopilotַΪʻ
+ public byte byPilotSafebelt;//0-ʾδ֪,1-ϵȫ,2-ϵȫ
+ public byte byCopilotSafebelt;//0-ʾδ֪,1-ϵȫ,2-ϵȫ
+ public byte byPilotSunVisor;//0-ʾδ֪,1-,2-
+ public byte byCopilotSunVisor;//0-ʾδ֪, 1-,2-
+ public byte byPilotCall;// 0-ʾδ֪, 1-绰,2-绰
+ //0-բ1-δբ (רʷƥǷբɹı־)byAlarmDataTypeΪ0-ʵʱʱ 0-δբ 1-բ
+ public byte byBarrierGateCtrlType;
+ public byte byAlarmDataType;//0-ʵʱݣ1-ʷ
+ public NET_DVR_TIME_V30 struSnapFirstPicTime;//˵ʱ(ms)ץĵһͼƬʱ䣩
+ public uint dwIllegalTime;//Υʱ䣨ms = ץһͼƬʱ - ץĵһͼƬʱ
+ public uint dwPicNum; //ͼƬpicGroupNumͬϢͼƬͼƬϢstruVehicleInfoEx
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITS_PICTURE_INFO[] struPicInfo; //ͼƬϢ,Żص6ͼ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_ITS_PARK_VEHICLE
+ {
+ public uint dwSize;
+ public byte byGroupNum;
+ public byte byPicNo;
+ public byte byLocationNum;
+ public byte byParkError;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_PARKNO_LEN)]
+ public string byParkingNo;
+ public byte byLocationStatus;
+ public byte bylogicalLaneNum;
+ public ushort wUpLoadType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwChanIndex;
+ public NET_DVR_PLATE_INFO struPlateInfo;
+ public NET_DVR_VEHICLE_INFO struVehicleInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMonitoringSiteID;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDeviceID;
+ public uint dwPicNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.Struct)]
+ public NET_ITS_PICTURE_INFO[] struPicInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_GATE_INFO
+ {
+ public UNION_GATE_VEHICLE struVehicleInfo; //struAlarmTypeΪ(0x1Ƿ뱨)
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct UNION_GATE_VEHICLE
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LICENSE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sLicense;//ƺ
+ /*0- 1-̶2-ʱ3-Ԥ4-쳵5-Ȩ*/
+ public byte byVehicleType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 111, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GATE_ALARMINFO
+ {
+ public uint dwSize;
+ //0x1Ƿ뱨
+ //0x2բʱδر
+ //0x3ѹȦʱ
+ //0x4
+ //0x5ٿ
+ //0x6쳣
+ public byte byAlarmType;
+ public byte byExternalDevType;//豸(EXTERNAL_DEVICES_TYPE)
+ public byte byExternalDevStatus;//豸(EXTERNAL_DEVICES_STATUS)
+ public byte byRes;
+ public NET_DVR_TIME_V30 struAlarmTime;//ʱ
+ public UNION_GATE_INFO uAlarmInfo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //Ԥ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DIAGNOSIS_UPLOAD
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = STREAM_ID_LEN)]
+ public string sStreamID; ///< IDС32ֽ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 64)]
+ public string sMonitorIP; ///< ip
+ public uint dwChanIndex; ///< ͨ
+ public uint dwWidth; ///< ͼ
+ public uint dwHeight; ///< ͼ߶
+ public NET_DVR_TIME struCheckTime; ///< ʱ(ϲںʱֶ)ʽ2012-08-06 13:00:00
+ public byte byResult; ///0-δ 1- 2-쳣 3-¼ʧ 4-ȡ쳣
+ public byte bySignalResult; ///< Ƶʧ 0-δ 1- 2-쳣
+ public byte byBlurResult; ///< ͼģ0-δ 1- 2-쳣
+ public byte byLumaResult; ///< ͼ0-δ 1- 2-쳣
+ public byte byChromaResult; ///< ƫɫ0-δ 1- 2-쳣
+ public byte bySnowResult; ///< ż0-δ 1- 2-쳣
+ public byte byStreakResult; ///< Ƹż0-δ 1- 2-쳣
+ public byte byFreezeResult; ///< 涳0-δ 1- 2-쳣
+ public byte byPTZResult; ///< ̨0-δ 1- 2-쳣
+ public byte byContrastResult; //Աȶ쳣0-δ⣬1-2-쳣
+ public byte byMonoResult; //ڰͼ0-δ⣬1-2-쳣
+ public byte byShakeResult; //Ƶ0-δ⣬1-2-쳣
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 256)]
+ public string sSNapShotURL; ///<ͼƬURLַ
+ public byte byFlashResult; //Ƶ0-δ⣬1-2-쳣
+ public byte byCoverResult; //Ƶڵ0-δ⣬1-2-쳣
+ public byte bySceneResult; //0-δ⣬1-2-쳣
+ public byte byDarkResult; //ͼ0-δ⣬1-2-쳣
+ public byte byStreamType; //ͣ0-Ч1-δ֪2-ͣ3-ǹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 59, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int CID_CODE_LEN = 4;
+ public const int ACCOUNTNUM_LEN = 6;
+ public const int ACCOUNTNUM_LEN_32 = 32;
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CID_ALARM
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CID_CODE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCIDCode; //CID¼
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCIDDescribe; //CID¼
+ public NET_DVR_TIME_EX struTriggerTime; //ʱ
+ public NET_DVR_TIME_EX struUploadTime; //ϴʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACCOUNTNUM_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCenterAccount; //ʺ
+ public byte byReportType; //NET_DVR_ALARMHOST_REPORT_TYPE
+ public byte byUserType; //ûͣ0-û 1-û,2-ֻû,3-ϵͳû
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUserName; //ûû
+ public ushort wKeyUserNo; //û 0xFFFFʾЧ
+ public byte byKeypadNo; //̺ 0xFFʾЧ
+ public byte bySubSysNo; //ϵͳ 0xFFʾЧ
+ public ushort wDefenceNo; // 0xFFFFʾЧ
+ public byte byVideoChanNo; //Ƶͨ 0xFFʾЧ
+ public byte byDiskNo; //Ӳ̺ 0xFFʾЧ
+ public ushort wModuleAddr; //ģַ 0xFFFFʾЧ
+ public byte byCenterType; //0-Ч, 1-˺(6),2-չ˺(9)
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACCOUNTNUM_LEN_32, ArraySubType = UnmanagedType.I1)]
+ public byte[] sCenterAccountV40; //˺V40,ʹôֶʱsCenterAccountЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 28, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_PTZ_INFO
+ {
+ public float fPan;
+ public float fTilt;
+ public float fZoom;
+ public uint dwFocus;// ۽۽Χһ0-100000
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ⱨ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FIREDETECTION_ALARM
+ {
+ public uint dwSize; //ṹС
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public NET_VCA_DEV_INFO struDevInfo; //ǰ豸Ϣ
+ public ushort wPanPos;
+ public ushort wTiltPos;
+ public ushort wZoomPos;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwPicDataLen;//ץͼƬ
+ public IntPtr pBuffer; //ָ
+ public NET_VCA_RECT struRect;//
+ public NET_VCA_POINT struPoint;//¶ȵ
+ public ushort wFireMaxTemperature;//¶[300~4000]
+ public ushort wTargetDistance;//Ŀ[100m ~ 10000m]
+ public byte byStrategyType;//ͣ0~ⱨ1~Эͬ2~ϵͳ3~ָ㱨4~ָ
+ public byte byAlarmSubType;//͡0~ⱨ1~ⱨ2~̻𱨾
+ /*ǷPTZչ
+ 0~ãPTZֵwPanPoswTiltPoswZoomPosΪ
+ 1~ãPTZֵstruPtzPosExΪPTZ践ءstruPtzPosExֵתΪwPanPoswTiltPoswZoomPosֵ
+ */
+ public byte byPTZPosExEnable;
+ public byte byRes2;
+ public NET_PTZ_INFO struPtzPosEx;// ptzչ(ָ֧߾PTZֵȷСλ)
+ public uint dwVisiblePicLen;//ɼͼƬ
+ public IntPtr pVisiblePicBuf; //ɼͼƬָ
+ // pSmokeBufbyAlarmSubTypeΪ1ⱨ2̻𱨾ʱЧ
+ public IntPtr pSmokeBuf; //ⱨָ룬ָһNET_DVR_SMOKEDETECTION_ALARMṹ
+ public ushort wDevInfoIvmsChannelEx; //NET_VCA_DEV_INFObyIvmsChannelܱͬʾֵϿͻbyIvmsChannelܼݣ255¿ͻ˰汾ʹwDevInfoIvmsChannelEx
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 58, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_EVENT_INFO
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //ţΪ0Ч
+ public byte byCardType; //ͣ1-ͨ3-ֹ4-Ѳ5-вȿ6-7-Ϊ0Ч
+ public byte byAllowListNo; //,1-8Ϊ0Ч
+ public byte byReportChannel; //ϴͨ1-ϴ2-1ϴ3-2ϴΪ0Ч
+ public byte byCardReaderKind; //һ࣬0-Ч1-IC2-֤3-ά,4-ָͷ
+ public uint dwCardReaderNo; //ţΪ0Ч
+ public uint dwDoorNo; //ű(¥)Ϊ0Ч
+ public uint dwVerifyNo; //ؿ֤ţΪ0Ч
+ public uint dwAlarmInNo; //ţΪ0Ч
+ public uint dwAlarmOutNo; //ţΪ0Ч
+ public uint dwCaseSensorNo; //¼
+ public uint dwRs485No; //RS485ͨţΪ0Ч
+ public uint dwMultiCardGroupNo; //Ⱥ
+ public ushort wAccessChannel; //Աͨ
+ public byte byDeviceNo; //豸ţΪ0Ч
+ public byte byDistractControlNo;//ֿţΪ0Ч
+ public uint dwEmployeeNo; //ţΪ0Ч
+ public ushort wLocalControllerID; //͵ؿţ0-Ž1-64͵ؿ
+ public byte byInternetAccess; //ID1-1,2-2,3-1
+ public byte byType; //ͣ0:ʱ,1-24Сʱ,2-ʱ ,3-ڲ4-Կ 5- 6-ܽ 7-24Сʱ 8-24Сʱ9-24Сʱ,10-Žŷ11-Žŷ 0xff-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr; //ַΪ0Ч
+ public byte bySwipeCardType;//ˢͣ0-Ч1-ά
+ public byte byMask;//Ƿ֣0-1-δ֪2-֣3-
+ public uint dwSerialNo; //¼ˮţΪ0Ч
+ public byte byChannelControllerID; //ͨIDΪ0Ч1-ͨ2-ͨ
+ public byte byChannelControllerLampID; //ͨưIDΪ0ЧЧΧ1-255
+ public byte byChannelControllerIRAdaptorID; //ͨתӰIDΪ0ЧЧΧ1-255
+ public byte byChannelControllerIREmitterID; //ͨIDΪ0ЧЧΧ1-255
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_EVENT_INFO_EXTEND
+ {
+ public int dwFrontSerialNo; //¼ˮţΪ0ЧֶΪ0ƽ̨dwSerialNoжǷʧ¼ֶβΪ0ƽ̨ݸֶκdwSerialNoֶιͬжǷʧ¼ҪڽĺdwSerialNo
+ public byte byUserType; //Աͣ0-Ч1-ͨˣˣ2-ÿͣ3-ֹˣ4-Ա
+ public byte byCurrentVerifyMode; //ǰ֤ʽ0-Ч1-ߣ2-ˢ+룬3-ˢ4-ˢ룬5-ָƣ6-ָ+룬7-ָƻˢ8-ָ+ˢ9-ָ+ˢ+룬10-ָƻˢ룬11-+ָƣ12-+룬13-+ˢ14-15-+룬16-ָƻ룬17-+ָƣ18-+ָ+룬19-+ָ+ˢ20-++ָƣ21-+22-+ˢ23-ָƻ24-ˢ룬25-ˢ26-ˢָƣ27-ˢָƻ
+ public byte byCurrentEvent; //ǷΪʵʱ¼0-Ч1-ǣʵʱ¼2-¼
+ public byte byPurePwdVerifyEnable; //豸Ƿִ֧֤ 0-֧֣1-֧
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEmployeeNo; //ţԱID豸˵ʹ˹ţԱIDֶΣbyEmployeeNoһҪݣbyEmployeeNoתΪdwEmployeeNoôֶҲҪݣϲƽ̨ͻ˵ȽbyEmployeeNoֶΣֶΪգٿǽdwEmployeeNoֶΣ
+ public byte byAttendanceStatus; //״̬0-δ,1-ϰ࣬2-°࣬3-ʼϢ4-Ϣ5-ʼӰ࣬6-Ӱ
+ public byte byStatusValue; //״ֵ̬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_UUID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byUUID; //UUIDֶνڶԽөʯƽ̨вŻʹã
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_DEV_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDeviceName; //豸к
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 24, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //չṹϢV20
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_EVENT_INFO_EXTEND_V20
+ {
+ public byte byRemoteCheck; //ǷҪԶ̺飨0-Ч1-ҪĬϣ2-Ҫ
+ public byte byThermometryUnit; //µλ0-϶ȣĬϣ1-϶ȣ2-ģ
+ public byte byIsAbnomalTemperature; //ץIJǷ¶쳣1-ǣ0-
+ public byte byRes2;
+ public float fCurrTemperature; //¶ȣȷСһλ
+ public NET_VCA_POINT struRegionCoordinates; //¶
+ public ushort dwQRCodeInfoLen; //άϢȣΪ0DZʾ
+ public ushort dwVisibleLightDataLen; //ȳɼͼƬȣΪ0DZʾ
+ public ushort dwThermalDataLen; //ȳͼƬȣΪ0DZʾ
+ public IntPtr pQRCodeInfo; //άϢָ
+ public IntPtr pVisibleLightData; //ȳɼͼƬָ
+ public IntPtr pThermalData; //ȳͼƬָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAttendanceLabel; //Զ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 960, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_ALARM_INFO
+ {
+ public uint dwSize;
+ public uint dwMajor; //ͣο궨
+ public uint dwMinor; //ͣο궨
+ public NET_DVR_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNetUser;//û
+ public NET_DVR_IPADDR struRemoteHostAddr ;//Զַ
+ public NET_DVR_ACS_EVENT_INFO struAcsEventInfo; //ϸ
+ public uint dwPicDataLen; //ͼƬݴСΪ0DZʾ
+ public IntPtr pPicData;
+ public ushort wInductiveEventType; //¼ͣ0-ЧͻжϸֵΪ0ֵͨ¼֣ͨԭбͣdwMajordwMinor
+ public byte byPicTransType; //ͼƬݴ䷽ʽ: 0-ƣ1-url
+ public byte byRes1; //ֽ
+ public uint dwIOTChannelNo; //IOTͨ
+ public IntPtr pAcsEventInfoExtend; //byAcsEventInfoExtendΪ1ʱʾָһNET_DVR_ACS_EVENT_INFO_EXTENDṹ
+ public byte byAcsEventInfoExtend; //pAcsEventInfoExtendǷЧ0-Ч1-Ч
+ public byte byTimeType; //ʱͣ0-豸ʱ䣬1-UTCʱ䣨struTimeʱ䣩
+ public byte byRes2; //ֽ
+ public byte byAcsEventInfoExtendV20; //pAcsEventInfoExtendV20ǷЧ0-Ч1-Ч
+ public IntPtr pAcsEventInfoExtendV20; //byAcsEventInfoExtendV20Ϊ1ʱʾָһNET_DVR_ACS_EVENT_INFO_EXTEND_V20ṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_EVENT_DETAIL
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //ţmacַΪ0Ч
+ public byte byCardType; //ͣ1-ͨ3-ֹ4-Ѳ5-вȿ6-7-8-Ϊ0Ч
+ public byte byAllowListNo; //,1-8Ϊ0Ч
+ public byte byReportChannel; //ϴͨ1-ϴ2-1ϴ3-2ϴΪ0Ч
+ public byte byCardReaderKind; //һ࣬0-Ч1-IC2-֤3-ά,4-ָͷ
+ public uint dwCardReaderNo; //ţΪ0Ч
+ public uint dwDoorNo; //űţ¥ţΪ0Ч
+ public uint dwVerifyNo; //ؿ֤ţΪ0Ч
+ public uint dwAlarmInNo; //ţΪ0Ч
+ public uint dwAlarmOutNo; //ţΪ0Ч
+ public uint dwCaseSensorNo; //¼
+ public uint dwRs485No; //RS485ͨţΪ0Ч
+ public uint dwMultiCardGroupNo; //Ⱥ
+ public ushort wAccessChannel; //Աͨ
+ public byte byDeviceNo; //豸ţΪ0ЧЧΧ1-255
+ public byte byDistractControlNo;//ֿţΪ0Ч
+ public uint dwEmployeeNo; //ţΪ0Ч
+ public ushort wLocalControllerID; //͵ؿţ0-Ž1-64͵ؿ
+ public byte byInternetAccess; //ID1-1,2-2,3-1
+ public byte byType; //ͣ0:ʱ,1-24Сʱ,2-ʱ ,3-ڲ4-Կ 5- 6-ܽ 7-24Сʱ 8-24Сʱ9-24Сʱ,10-Žŷ11-Žŷ 0xff-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMACAddr; //ַΪ0Ч
+ public byte bySwipeCardType;//ˢͣ0-Ч1-ά
+ public byte byEventAttribute; //¼ԣ0-δ壬1-Ϸ֤2-
+ public uint dwSerialNo; //¼ˮţΪ0Ч
+ public byte byChannelControllerID; //ͨIDΪ0Ч1-ͨ2-ͨ
+ public byte byChannelControllerLampID; //ͨưIDΪ0ЧЧΧ1-255
+ public byte byChannelControllerIRAdaptorID; //ͨתӰIDΪ0ЧЧΧ1-255
+ public byte byChannelControllerIREmitterID; //ͨIDΪ0ЧЧΧ1-255
+ public uint dwRecordChannelNum; //¼ͨĿ
+ public IntPtr pRecordChannelData;//¼ͨСΪsizeof(DWORD)* dwRecordChannelNum
+ public byte byUserType; //Աͣ0-Ч1-ͨˣˣ2-ÿͣ3-ֹˣ4-Ա
+ public byte byCurrentVerifyMode; //ǰ֤ʽ0-Ч1-ߣ2-ˢ+룬3-ˢ4-ˢ룬5-ָƣ6-ָ+룬7-ָƻˢ8-ָ+ˢ9-ָ+ˢ+룬10-ָƻˢ룬11-+ָƣ12-+룬
+ //13-+ˢ14-15-+룬16-ָƻ룬17-+ָƣ18-+ָ+룬19-+ָ+ˢ20-++ָƣ21-+22-+ˢ23-ָƻ24-ˢ룬25-ˢ26-ˢָƣ27-ˢָƻ
+ public byte byAttendanceStatus; //״̬0-δ,1-ϰ࣬2-°࣬3-ʼϢ4-Ϣ5-ʼӰ࣬6-Ӱ
+ public byte byStatusValue; //״ֵ̬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEmployeeNo; //ţԱID豸˵ʹ˹ţԱIDֶΣbyEmployeeNoһҪݣbyEmployeeNoתΪdwEmployeeNoôֶҲҪݣϲƽ̨ͻ˵ȽbyEmployeeNoֶΣֶΪգٿǽdwEmployeeNoֶΣ
+ public byte byRes1; //
+ public byte byMask; //Ƿ֣0-1-δ֪2-֣3-
+ public byte byThermometryUnit; //µλ0-϶ȣĬϣ1-϶ȣ2-ģ
+ public byte byIsAbnomalTemperature; //ץIJǷ¶쳣1-ǣ0-
+ public float fCurrTemperature; //¶ȣȷСһλ
+ public NET_VCA_POINT struRegionCoordinates; //¶
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 48, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byMACAddr = new byte[CHCNetSDK.MACADDR_LEN];
+ byEmployeeNo = new byte[CHCNetSDK.NET_SDK_EMPLOYEE_NO_LEN];
+ byRes = new byte[48];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_EVENT_CFG
+ {
+ public uint dwSize;
+ public uint dwMajor; //ͣο궨
+ public uint dwMinor; //ͣο궨
+ public NET_DVR_TIME struTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNetUser;//û
+ public NET_DVR_IPADDR struRemoteHostAddr;//Զַ
+ public NET_DVR_ACS_EVENT_DETAIL struAcsEventInfo; //ϸ
+ public uint dwPicDataLen; //ͼƬݴСΪ0DZʾ
+ public IntPtr pPicData;
+ public ushort wInductiveEventType; //¼ͣ0-Чֵμ2.2½ڣͻжϸֵΪ0ֵͨ¼֣ͨԭбͣdwMajordwMinor
+ public byte byTimeType; //ʱͣ0-豸ʱ䣨Ĭϣ1-UTCʱ䣨struTimeʱ䣩
+ public byte byRes1;
+ public uint dwQRCodeInfoLen; //άϢȣΪ0DZʾ
+ public uint dwVisibleLightDataLen; //ȳɼͼƬȣΪ0DZʾ
+ public uint dwThermalDataLen; //ȳͼƬȣΪ0DZʾ
+ public IntPtr pQRCodeInfo; //άϢָ
+ public IntPtr pVisibleLightData; //ȳɼͼƬָ
+ public IntPtr pThermalData; //ȳͼƬָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ sNetUser = new byte[CHCNetSDK.MAX_NAMELEN];
+ struRemoteHostAddr.Init();
+ struAcsEventInfo.init();
+ byRes = new byte[36];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_DATE
+ {
+ public ushort wYear; //
+ public byte byMonth; //
+ public byte byDay; //
+ }
+
+ //֤Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ID_CARD_INFO
+ {
+ public uint dwSize; //ṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ID_NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName; //
+ public NET_DVR_DATE struBirth; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ID_ADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byAddr; //סַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ID_NUM_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIDNum; //֤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_ID_ISSUING_AUTHORITY_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIssuingAuthority; //ǩ
+ public NET_DVR_DATE struStartDate; //Чʼ
+ public NET_DVR_DATE struEndDate; //Чֹ
+ public byte byTermOfValidity; //ǷЧ 0-1-ǣЧֹЧ
+ public byte bySex; //Ա1-У2-Ů
+ public byte byNation;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 101, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //չṹϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ID_CARD_INFO_EXTEND
+ {
+ public byte byRemoteCheck; //ǷҪԶ̺飨0-Ч1-ҪĬϣ2-Ҫ
+ public byte byThermometryUnit; //µλ0-϶ȣĬϣ1-϶ȣ2-ģ
+ public byte byIsAbnomalTemperature; //ץIJǷ¶쳣1-ǣ0-
+ public byte byRes2;
+ public float fCurrTemperature; //¶ȣȷСһλ
+ public NET_VCA_POINT struRegionCoordinates; //¶
+ public uint dwQRCodeInfoLen; //άϢȣΪ0DZʾ
+ public uint dwVisibleLightDataLen; //ȳɼͼƬȣΪ0DZʾ
+ public uint dwThermalDataLen; //ȳͼƬȣΪ0DZʾ
+ public IntPtr pQRCodeInfo; //άϢָ
+ public IntPtr pVisibleLightData; //ȳɼͼƬָ
+ public IntPtr pThermalData; //ȳͼƬָ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 1024, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //֤Ϣ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ID_CARD_INFO_ALARM
+ {
+ public uint dwSize; //ṹ
+ public NET_DVR_ID_CARD_INFO struIDCardCfg;//֤Ϣ
+ public uint dwMajor; //ͣο궨
+ public uint dwMinor; //ͣο궨
+ public NET_DVR_TIME_V30 struSwipeTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byNetUser;//û
+ public NET_DVR_IPADDR struRemoteHostAddr;//Զַ
+ public uint dwCardReaderNo; //ţΪ0Ч
+ public uint dwDoorNo; //űţΪ0Ч
+ public uint dwPicDataLen; //ͼƬݴСΪ0DZʾ
+ public IntPtr pPicData;
+ public byte byCardType; //ͣ1-ͨ3-ֹ4-Ѳ5-вȿ6-7-8-Ϊ0Ч
+ public byte byDeviceNo; // 豸ţΪ0ʱЧЧΧ1-255
+ public byte byMask; //Ƿ֣0-1-δ֪2-֣3-
+ public byte byCurrentEvent;//ǷΪʵʱ¼0-Ч1-ǣʵʱ¼2-¼
+ public uint dwFingerPrintDataLen; // ָݴСΪ0DZʾ
+ public IntPtr pFingerPrintData;
+ public uint dwCapturePicDataLen; // ץͼƬݴСΪ0DZʾ
+ public IntPtr pCapturePicData;
+ public uint dwCertificatePicDataLen; //֤ץͼƬݴСΪ0DZʾ
+ public IntPtr pCertificatePicData;
+ public byte byCardReaderKind; //һ࣬0-Ч1-IC2-֤3-ά,4-ָͷ
+ public byte byHelmet;//ѡǷȫñ0-1-δ֪2-ȫ, 3-ȫñ
+ public byte byRes3;
+ public byte byIDCardInfoExtend; //pIDCardInfoExtendǷЧ0-Ч1-Ч
+ public IntPtr pIDCardInfoExtend; //byIDCardInfoExtendΪ1ʱʾָһNET_DVR_ID_CARD_INFO_EXTENDṹ
+ public uint dwSerialNo; //¼ˮţΪ0Ч
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 168, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_VALID_PERIOD_CFG
+ {
+ public byte byEnable; //ʹЧڣ0-ʹܣ1ʹ
+ public byte byBeginTimeFlag; //Ƿʼʱı־0-ƣ1-
+ public byte byEnableTimeFlag; //Ƿֹʱı־0-ƣ1-
+ public byte byTimeDurationNo; //Ч,0ʼʱͨSDKøƿʱֻҪЧɣԼ
+ public NET_DVR_TIME_EX struBeginTime; //Чʼʱ
+ public NET_DVR_TIME_EX struEndTime; //Чڽʱ
+ public byte byTimeType; //ʱͣ0-豸ʱ䣨Ĭϣ1-UTCʱ䣨struBeginTimestruEndTimeֶЧ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CARD_COND
+ {
+ public uint dwSize;
+ public uint dwCardNum; //card number, 0xffffffff means to get all card information when getting
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes = new byte[64];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CARD_RECORD
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //card No
+ public byte byCardType;
+ public byte byLeaderCard;
+ public byte byUserType;
+ public byte byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDoorRight;
+ public NET_DVR_VALID_PERIOD_CFG struValid;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_GROUP_NUM_128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byBelongGroup;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CARD_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardPassword;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256, ArraySubType = UnmanagedType.I1)]
+ public ushort[] wCardRightPlan;
+ public uint dwMaxSwipeTimes;
+ public uint dwSwipeTimes;
+ public uint dwEmployeeNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName;
+ //λʾ0-Ȩޣ1-Ȩ
+ //0λʾ籨
+ //1λʾʾ
+ //2λʾƿͿ
+ //3λʾͨ
+ //4λʾ
+ //5λʾѲ
+ public uint dwCardRight;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byCardNo = new byte[ACS_CARD_NO_LEN];
+ byDoorRight = new byte[MAX_DOOR_NUM_256];
+ byBelongGroup = new byte[MAX_GROUP_NUM_128];
+ byCardPassword = new byte[CARD_PASSWORD_LEN];
+ wCardRightPlan = new ushort[MAX_DOOR_NUM_256];
+ byName = new byte[NAME_LEN];
+ byRes = new byte[256];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CARD_STATUS
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //card No
+ public uint dwErrorCode;
+ public byte byStatus; //0-fail, 1-success
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 23, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byCardNo = new byte[ACS_CARD_NO_LEN];
+ byRes = new byte[23];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CARD_SEND_DATA
+ {
+ public uint dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //card No
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byCardNo = new byte[ACS_CARD_NO_LEN];
+ byRes = new byte[16];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_PARAM_CTRL_ByCard
+ {
+ public int dwSize;
+ public byte byMode;//0 del by card,1 del by card reader
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_FACE_PARAM_BYCARD struProcessMode;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes1 = new byte[3];
+ byRes = new byte[64];
+ struProcessMode = new NET_DVR_FACE_PARAM_BYCARD();
+ struProcessMode.Init();
+ }
+ }
+
+ public const int MAX_FACE_NUM = 2; //max face number
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_PARAM_BYCARD
+ {
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_CARD_READER_NUM_512, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEnableCardReader;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.MAX_FACE_NUM, ArraySubType = UnmanagedType.I1)]
+ public byte[] byFaceID;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 42, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+
+ public void Init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byEnableCardReader = new byte[CHCNetSDK.MAX_CARD_READER_NUM_512];
+ byFaceID = new byte[CHCNetSDK.MAX_FACE_NUM];
+ byRes1 = new byte[42];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_PARAM_CTRL_ByReader
+ {
+ public int dwSize;
+ public byte byMode;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_FACE_PARAM_BYREADER struProcessMode;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes1 = new byte[3];
+ byRes = new byte[64];
+ struProcessMode = new NET_DVR_FACE_PARAM_BYREADER();
+ struProcessMode.Init();
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_PARAM_BYREADER
+ {
+ public int dwCardReaderNo;
+ public byte byClearAllCard;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo;
+ [MarshalAs(UnmanagedType.ByValArray, SizeConst = 548, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+
+ public void Init()
+ {
+ byRes1 = new byte[3];
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byRes = new byte[548];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_STATUS
+ {
+ public int dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ERROR_MSG_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byErrorMsg;//·ϢbyCardReaderRecvStatusΪ4ʱʾѴӦĿ
+ public int dwReaderNo; //ţ·
+ public byte byRecvStatus; //״ֽ̬ڱʾ0-ʧܣ1-ɹ2-Ի3-ڴ()4-Ѵڸ5-ǷID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 131, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byErrorMsg = new byte[CHCNetSDK.ERROR_MSG_LEN];
+ byRes = new byte[131];
+ }
+ }
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_RECORD
+ {
+ public int dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN)]
+ public byte[] byCardNo;
+ public int dwFaceLen;
+ public IntPtr pFaceBuffer;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 128)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byRes = new byte[128];
+ }
+ }
+
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_COND
+ {
+ public int dwSize;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN)]
+ public byte[] byCardNo;//Ŀţʱòɲã
+ public int dwFaceNum;// ûȡȡʱΪ0xffffffffʾȡϢ
+ public int dwEnableReaderNo;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 124)]
+ public byte[] byRes;
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byRes = new byte[124];
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACE_PARAM_CTRL_CARDNO
+ {
+ public int dwSize;
+ public byte byMode;//ɾʽ0-ŷʽɾ1-ɾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public CHCNetSDK.NET_DVR_FACE_PARAM_BYCARD struByCard;//ŵķʽɾ,ʱд
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public void Init()
+ {
+ byRes1 = new byte[3];
+ byRes = new byte[64];
+ struByCard.Init();
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FINGERPRINT_COND
+ {
+ public int dwSize;
+ public int dwFingerprintNum;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CHCNetSDK.ACS_CARD_NO_LEN)]
+ public byte[] byCardNo;
+ public int dwEnableReaderNo;
+ public byte byFingerPrintID;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 131)]
+ public byte[] byRes;
+
+ public void init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byRes = new byte[131];
+ }
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CARD_CFG_V50
+ {
+ public uint dwSize;
+ public uint dwModifyParamType;
+ // ҪĵĿÿʱЧλʾÿλһֲ1ΪҪģ0Ϊ
+ // #define CARD_PARAM_CARD_VALID 0x00000001 //ǷЧ
+ // #define CARD_PARAM_VALID 0x00000002 //Чڲ
+ // #define CARD_PARAM_CARD_TYPE 0x00000004 //Ͳ
+ // #define CARD_PARAM_DOOR_RIGHT 0x00000008 //Ȩ
+ // #define CARD_PARAM_LEADER_CARD 0x00000010 //
+ // #define CARD_PARAM_SWIPE_NUM 0x00000020 //ˢ
+ // #define CARD_PARAM_GROUP 0x00000040 //Ⱥ
+ // #define CARD_PARAM_PASSWORD 0x00000080 //
+ // #define CARD_PARAM_RIGHT_PLAN 0x00000100 //Ȩƻ
+ // #define CARD_PARAM_SWIPED_NUM 0x00000200 //ˢ
+ // #define CARD_PARAM_EMPLOYEE_NO 0x00000400 //
+ // #define CARD_PARAM_NAME 0x00000800 //
+ // #define CARD_PARAM_DEPARTMENT_NO 0x00001000 //ű
+ // #define CARD_SCHEDULE_PLAN_NO 0x00002000 //Űƻ
+ // #define CARD_SCHEDULE_PLAN_TYPE 0x00004000 //Űƻ
+ // #define CARD_ROOM_NUMBER 0x00008000 //
+ // #define CARD_SIM_NO 0x00010000 //SIMţֻţ
+ // #define CARD_FLOOR_NUMBER 0x00020000 //¥
+ // #define CARD_USER_TYPE 0x00040000 //û
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //
+ public byte byCardValid; //ǷЧ0-Ч1-ЧɾʱΪ0ɾȡʱֶʼΪ1
+ public byte byCardType; //ͣ1-ͨ3-ֹ4-Ѳ5-вȿ6-7-8-9-Ա10-Ӧ11-ӦȨʱȨޣܿţĬͨ
+ public byte byLeaderCard; //ǷΪ1-ǣ0-
+ public byte byUserType; // 0 C ͨû1 - Աû;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDoorRight; //Ȩ(¥ȨޡȨ)λʾ1ΪȨޣ0ΪȨޣӵλλʾţ1-NǷȨ
+ public NET_DVR_VALID_PERIOD_CFG struValid; //Чڲ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_GROUP_NUM_128, ArraySubType = UnmanagedType.I1)]
+ public byte[] byBelongGroup; //Ⱥ飬ֽڱʾ1-ڣ0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = CARD_PASSWORD_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardPassword; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_NUM_256*MAX_CARD_RIGHT_PLAN_NUM, ArraySubType = UnmanagedType.U2)]
+ public ushort[] wCardRightPlan; //ȨƻȡֵΪƻģţͬţͬƻģȨķʽ
+ public uint dwMaxSwipeTime; //ˢ0Ϊƣ
+ public uint dwSwipeTime; //ˢ
+ public ushort wRoomNumber; //
+ public ushort wFloorNumber; //
+ public uint dwEmployeeNo; //ţûID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName; //
+ public ushort wDepartmentNo; //ű
+ public ushort wSchedulePlanNo; //Űƻ
+ public byte bySchedulePlanType; //Űƻͣ0-塢1-ˡ2-
+ public byte byRightType; //·Ȩͣ0-ͨȨޡ1-άȨޡ2-ȨޣӶԽ豸άȨšţţˢЧڲȨޣţөʯAPP˺ţͨȨһ£
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ public uint dwLockID; //ID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_LOCK_CODE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byLockCode; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DOOR_CODE_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRoomCode; //
+ //λʾ0-Ȩޣ1-Ȩ
+ //0λʾ籨
+ //1λʾʾ
+ //2λʾƿͿ
+ //3λʾͨ
+ //4λʾ
+ //5λʾѲ
+ public uint dwCardRight; //Ȩ
+ public uint dwPlanTemplate; //ƻģ(ÿ)ʱǷãλʾ0--ã1-
+ public uint dwCardUserId; //ֿID
+ public byte byCardModelType; //0-գ1- M1 CARD S502- M1 CARD S703- FM1208 CPU4- FM1216 CPU5-CPU6-֤7- NFC
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 51, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes3;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] bySIMNum; //SIMţֻţ
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CHECK_FACE_PICTURE_COND
+ {
+ public uint dwSize;
+ public uint dwPictureNum; //ͼƬ
+ public byte byCheckTemplate; //0-УͼƬǷϷĬϣ1-УͼƬͽģǷƥ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 127, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GROUP_COMBINATION_INFO_V50
+ {
+ public byte byEnable; //ǷøȺ
+ public byte byMemberNum; //ˢԱ
+ public byte bySequenceNo; //Ⱥˢ
+ public byte byRes;
+ public uint dwGroupNo; //Ⱥ,0xffffffffʾԶ̿ţ0xfffffffeʾ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MULTI_CARD_GROUP_CFG_V50
+ {
+ public byte byEnable; //Ƿøöؿ0-ã1-
+ public byte byEnableOfflineVerifyMode; //Ƿʱ֤ʽԶ̿ţ1-ã0-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwTemplateNo; //öؿܵļƻģ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = GROUP_COMBINATION_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_GROUP_COMBINATION_INFO_V50[] struGroupCombination; //Ⱥϲ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_MULTI_CARD_CFG_V50
+ {
+ public uint dwSize;
+ public byte byEnable; //Ƿöؿܣ0-ã1-
+ public byte bySwipeIntervalTimeout; //ˢʱʱ䣬1-255sĬ10s
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_MULTI_CARD_GROUP_NUM_20, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_MULTI_CARD_GROUP_CFG_V50[] struGroupCfg; //Ⱥˢ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ public const int NET_SDK_MONITOR_ID_LEN = 64; //ID
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ACS_EVENT_COND
+ {
+ public uint dwSize;
+ public uint dwMajor; //ͣο¼ϴ궨壬0-ȫ
+ public uint dwMinor; //ͣο¼ϴ궨壬0-ȫ
+ public NET_DVR_TIME struStartTime; //ʼʱ
+ public NET_DVR_TIME struEndTime; //ʱ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = ACS_CARD_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCardNo; //
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byName; //ֿ
+ public byte byPicEnable; //ǷͼƬ0-ͼƬ1-ͼƬ
+ public byte byTimeType; //ʱͣ0-豸ʱ䣨Ĭϣ1-UTCʱ䣨struStartTimestruEndTimeʱ䣩
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2; //
+ public uint dwBeginSerialNo; //ʼˮţΪ0ʱĬȫ
+ public uint dwEndSerialNo; //ˮţΪ0ʱĬȫ
+ public uint dwIOTChannelNo; //IOTͨţ0-Ч
+ public ushort wInductiveEventType; //¼ͣ0-Чֵμ2.2½ڣͻжϸֵΪ0ֵͨ¼֣ͨԭбͣdwMajordwMinor
+ public byte bySearchType; //ʽ0-1-¼ԴʱͨΪƵͨţ2-ID
+ public byte byEventAttribute; //¼ԣ0-δ壬1-Ϸ¼2-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_MONITOR_ID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] szMonitorID; //ID豸кšͨ͡ɣŽ㣺豸к+DOOR+űţ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_EMPLOYEE_NO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byEmployeeNo; //ţԱID
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 140, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+
+ public void Init()
+ {
+ byCardNo = new byte[CHCNetSDK.ACS_CARD_NO_LEN];
+ byName = new byte[CHCNetSDK.NAME_LEN];
+ byRes2 = new byte[2];
+ byEmployeeNo = new byte[CHCNetSDK.NET_SDK_EMPLOYEE_NO_LEN];
+ byRes = new byte[140];
+ }
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LOCAL_GENERAL_CFG
+ {
+ public byte byExceptionCbDirectly; //0-̳ͨ߳쳣ص1-ֱ쳣صϲ
+ public byte byNotSplitRecordFile; //طźԤб浽¼ļƬ 0-ĬƬ1-Ƭ
+ public byte byResumeUpgradeEnable; //ʹܣ0-رգĬϣ1-
+ public byte byAlarmJsonPictureSeparate; //JSONݺͼƬǷ룬0-룬1-루COMM_ISAPI_ALARMصأ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes; //
+ public Int64 i64FileSize; //λByte
+ public uint dwResumeUpgradeTimeout; //ʱʱ䣬λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 236, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1; //Ԥ
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LOCAL_CHECK_DEV
+ {
+ public uint dwCheckOnlineTimeout; //Ѳʱλms СֵΪ30sֵ120sΪ0ʱʾĬֵ(120s)
+ public uint dwCheckOnlineNetFailMax; //ԭʧܵۼӴֵSDKŻصû쳣Ϊ0ʱʾʹĬֵ1
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARM_ISAPI_INFO
+ {
+ public IntPtr pAlarmData; //
+ public uint dwAlarmDataLen; // ݳ
+ public byte byDataType; // 0-invalid,1-xml,2-json
+ public byte byPicturesNumber; // ͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public IntPtr pPicPackData; // ͼƬ䳤
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ }
+ public const int MAX_FILE_PATH_LEN = 256; //ļ·
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARM_ISAPI_PICDATA
+ {
+ public uint dwPicLen;
+ public byte byPicType; //ͼƬʽ: 1- jpg
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_FILE_PATH_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] szFilename;
+ public IntPtr pPicData;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_EXTERNAL_DEVICE_STATE_UNION
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 512, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_ALARMHOST_EXTERNAL_DEVICE_STATE
+ {
+ public uint dwSize;
+ public byte byDevType; //1-UPS2-صԴ3-ϵͳ4-ʪȴ5-յ6-7-״̬, 8-ˮλ9-ﳾ10-ɼǡ11-ٴ״̬12-ͨչģ״̬13-ˮ״̬14-̫ܿ״̬15-SF6״̬16-״̬17-ɼϵͳ״̬18-ˮʼ״̬19-ȼʾϵͳ״̬20-״̬
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_EXTERNAL_DEVICE_STATE_UNION struDevState;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes2;
+ }
+
+ //豸
+ public const int REGIONTYPE = 0;//
+ public const int MATRIXTYPE = 11;//ڵ
+ public const int DEVICETYPE = 2;//豸
+ public const int CHANNELTYPE = 3;//ͨ
+ public const int USERTYPE = 5;//û
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LOG_MATRIX
+ {
+ public NET_DVR_TIME strLogTime;
+ public uint dwMajorType;
+ public uint dwMinorType;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sPanelUser;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_NAMELEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sNetUser;
+ public NET_DVR_IPADDR struRemoteHostAddr;
+ public uint dwParaType;
+ public uint dwChannel;
+ public uint dwDiskNumber;
+ public uint dwAlarmInPort;
+ public uint dwAlarmOutPort;
+ public uint dwInfoLen;
+ public byte byDevSequence;//λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMacAddr;//MACַ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber;//к
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = LOG_INFO_LEN - SERIALNO_LEN - MACADDR_LEN - 1)]
+ public string sInfo;
+ }
+
+ //Ƶۺƽ̨
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct tagVEDIOPLATLOG
+ {
+ public byte bySearchCondition;//0-λ1-к 2-MACַ
+ public byte byDevSequence;//λţ0-79ӦϵͳIJλţ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = SERIALNO_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sSerialNumber;//к
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MACADDR_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byMacAddr;//MACַ
+ }
+
+ //ؼ
+ public enum IVS_PARAM_KEY
+ {
+ OBJECT_DETECT_SENSITIVE = 1,//Ŀ
+ BACKGROUND_UPDATE_RATE = 2,//ٶ
+ SCENE_CHANGE_RATIO = 3,//仯Сֵ
+ SUPPRESS_LAMP = 4,//ǷƳͷ
+ MIN_OBJECT_SIZE = 5,//ܼСĿС
+ OBJECT_GENERATE_RATE = 6,//Ŀٶ
+ MISSING_OBJECT_HOLD = 7,//Ŀʧʱ
+ MAX_MISSING_DISTANCE = 8,//Ŀʧ
+ OBJECT_MERGE_SPEED = 9,//Ŀ꽻ʱĿںٶ
+ REPEATED_MOTION_SUPPRESS = 10,//ظ˶
+ ILLUMINATION_CHANGE = 11,//Ӱ仯ƿ
+ TRACK_OUTPUT_MODE = 12,//ģʽ0-Ŀģ1-Ŀĵײ
+ ENTER_CHANGE_HOLD = 13,//仯ֵ
+ RESUME_DEFAULT_PARAM = 255,//ָĬϹؼֲ
+ }
+
+ //궨ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LF_CALIBRATION_PARAM
+ {
+ public byte byPointNum;//Ч궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CALIB_PT, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_CB_POINT[] struCBPoint;//궨
+ }
+
+ //LF˫ýṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LF_CFG
+ {
+ public uint dwSize;//ṹ
+ public byte byEnable;//궨ʹ
+ public byte byFollowChan;// ƵĴͨ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public NET_DVR_LF_CALIBRATION_PARAM struCalParam;//궨
+ }
+
+ //L/Fֶƽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LF_MANUAL_CTRL_INFO
+ {
+ public NET_VCA_POINT struCtrlPoint;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //L/FĿṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LF_TRACK_TARGET_INFO
+ {
+ public uint dwTargetID;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 8, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_LF_TRACK_MODE
+ {
+ public uint dwSize;//ṹ
+ public byte byTrackMode;//ģʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//0
+ [StructLayoutAttribute(LayoutKind.Explicit)]
+ public struct uModeParam
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
+ [FieldOffsetAttribute(0)]
+ public uint[] dwULen;
+ /*[FieldOffsetAttribute(0)]
+ public NET_DVR_LF_MANUAL_CTRL_INFO struManualCtrl;//ֶṹ
+ [FieldOffsetAttribute(0)]
+ public NET_DVR_LF_TRACK_TARGET_INFO struTargetTrack;//Ŀṹ
+ * */
+ }
+ }
+
+ // Long config callback type
+ public enum NET_SDK_CALLBACK_TYPE
+ {
+ NET_SDK_CALLBACK_TYPE_STATUS = 0, //ص״ֵ̬
+ NET_SDK_CALLBACK_TYPE_PROGRESS, //صֵ
+ NET_SDK_CALLBACK_TYPE_DATA //ص
+ }
+
+
+ // Long config status value
+ public enum NET_SDK_CALLBACK_STATUS_NORMAL
+ {
+ NET_SDK_CALLBACK_STATUS_SUCCESS = 1000, //ɹ
+ NET_SDK_CALLBACK_STATUS_PROCESSING, //
+ NET_SDK_CALLBACK_STATUS_FAILED, //ʧ
+ NET_SDK_CALLBACK_STATUS_EXCEPTION, //쳣
+ NET_SDK_CALLBACK_STATUS_LANGUAGE_MISMATCH, //Բƥ
+ NET_SDK_CALLBACK_STATUS_DEV_TYPE_MISMATCH, //豸Ͳƥ
+ NET_DVR_CALLBACK_STATUS_SEND_WAIT //͵ȴ
+ }
+
+ //SensorϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SENSOR_PARAM
+ {
+ public byte bySensorType;//SensorType:0-CCD,1-CMOS
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 31, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ public float fHorWidth;//ˮƽ ȷСλ *10000
+ public float fVerWidth;//ֱ ȷСλ *10000
+ public float fFold;//zoom=1ûʱĽ ȷСλ *100
+ }
+
+
+ //λϢ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PTZPOS_PARAM{
+ public float fPanPos;//ˮƽȷС1λ
+ public float fTiltPos;//ֱȷС1λ
+ public float fZoomPos;//䱶ȷС1λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes ;
+ }
+
+ //GISϢϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GIS_UPLOADINFO
+ {
+ public uint dwSize;//ṹС
+ public uint dwRelativeTime; //ʱ
+ public uint dwAbsTime; //ʱ
+ public NET_VCA_DEV_INFO struDevInfo;//ǰ豸
+ public float fAzimuth;//̵ķλϢλ[0.00,360.00)
+ public byte byLatitudeType ;//γͣ0-γ1-γ
+ public byte byLongitudeType ;// ͣ0-ȣ1-
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public NET_DVR_LLI_PARAM struLatitude; /*γ*/
+ public NET_DVR_LLI_PARAM struLongitude; /**/
+ public float fHorizontalValue;//ˮƽӳǣȷСλ
+ public float fVerticalValue;//ֱӳǣȷСλ
+ public float fVisibleRadius;//ǰӰ뾶ȷСλ
+ public float fMaxViewRadius;//Ӱ뾶ȷС0λԤ
+ public NET_DVR_SENSOR_PARAM struSensorParam;//SensorϢ
+ public NET_DVR_PTZPOS_PARAM struPtzPos; //ptz
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 256, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int NET_SDK_MAX_FDID_LEN = 256;
+
+ //(ͼƬ+ͼƬϢ)ṹ塣
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_FACELIB_COND
+ {
+ public uint dwSize; // ṹС
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NET_SDK_MAX_FDID_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] szFDID;
+ public byte byConcurrent;//豸0- 1- ʼ
+ public byte byCover;//Ƿʽ 0-1-
+ public byte byCustomFaceLibID;//FDIDǷԶ壬0-ǣ1-ǣ
+ public byte byPictureSaveMode;//ϴԭͼģʽ0-棬1-;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byIdentityKey;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 60, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_SEND_PARAM_IN
+ {
+ public IntPtr pSendData;
+ public uint dwSendDataLen;
+ public NET_DVR_TIME_V30 struTime;
+ public byte byPicType;
+ public byte byPicURL; //ͼƬݲURLʽ 0-ͼƬݣ1-ͼƬURLʽ
+ public byte byUploadModeling;
+ public byte byRes1;
+ public uint dwPicMangeNo;
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string sPicName;
+ public uint dwPicDisplayTime;
+ public IntPtr pSendAppendData;
+ public uint dwSendAppendDataLen;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 192, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public enum HKUploadType
+ {
+ IMPORT_DATA_TO_FACELIB = 39,// (ͼƬ+ͼƬϢ)
+ }
+
+ public const int MAX_UPLOADFILE_URL_LEN = 240;
+
+ //ͼƬݵĽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_UPLOAD_FILE_RET
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_UPLOADFILE_URL_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] sUrl;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 260, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//
+ }
+
+ //GPSϢṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_GPSALARMINFO
+ {
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = NAME_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byDeviceID;/*豸ID*/
+ public NET_DVR_TIME_EX struGpsTime; /*GPSϴʱ*/
+ public uint dwLongitude; /* */
+ public uint dwLatitude; /* γ*/
+ public int iTimeZone; /*ʱ÷ʾ+601+4808-60-4808ֶκGPSTimeһʱ*/
+ public uint dwDirection; /*=ʵʷԶΪλΪ˳ʱ뷽㣩*100*/
+ public ushort wSatellites; /**/
+ public ushort wPrecision; /**/
+ public uint dwHeight; /*߶:ףԤ*/
+ public uint dwGPSSeq; /*GPSţGPSʱҪõ*/
+ public ushort wSpeed;//ٶȣλkm/h
+ /* direction[0]:'E'or'W'(/), direction[1]:'N'or'S'(γ/γ)*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] sDirection;
+ public byte byLocateMode;/*λģʽ(ֵ0)1,λ,2,3,,4,Ч65,Чλ78Чλ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ȶͼϴ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_HEATMAP_RESULT
+ {
+ public uint dwSize;
+ public NET_VCA_DEV_INFO struDevInfo;/*豸Ϣ*/
+ public NET_DVR_TIME_EX struStartTime;/*ʼʱ*/
+ public NET_DVR_TIME_EX struEndTime;/*ʱ*/
+ public uint dwMaxHeatMapValue;//ȶֵ
+ public uint dwMinHeatMapValue;//Сȶֵ
+ public uint dwTimeHeatMapValue;// (ʱȶֵ)ƽȶֵ
+ public ushort wArrayLine;//ͼƬصֵ
+ public ushort wArrayColumn;//ͼƬصֵ ֵΪ0ʱصֵڴϢڣ
+ public IntPtr pBuffer; //ȶͼƬصϢ
+ public byte byDetSceneID;//ⳡ[1],ǰ֧1, IPCĬ0
+ public byte byBrokenNetHttp; //־λ0-شݣ1-ش
+ public ushort wDevInfoIvmsChannelEx; //NET_VCA_DEV_INFObyIvmsChannelܱͬʾֵϿͻbyIvmsChannelܼݣ255¿ͻ˰汾ʹwDevInfoIvmsChannelEx
+ public byte byTimeDiffFlag; /*ʱֶǷЧ 0-ʱЧ 1-ʱЧ */
+ public byte cStartTimeDifferenceH; /*ʼʱUTCʱСʱ-12 ... +14+ʾ*/
+ public byte cStartTimeDifferenceM; /*ʼʱUTCʱӣ-30, 30, 45+ʾ*/
+ public byte cStopTimeDifferenceH; /*ʱUTCʱСʱ-12 ... +14 +ʾ*/
+ public byte cStopTimeDifferenceM; /*ʱUTCʱӣ-30, 30, 45+ʾ*/
+ public byte byArrayUnitType; //ԪͣϢÿصݵͣ1-byte2-short,4-int
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ public uint dwTotalTime;//ͣʱܺͣλ룬Աͣʱ䱨ʱϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 112, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ /********************************ӿڲṹ(end)*********************************/
+
+
+ #region ӿں
+ /********************************SDKӿں*********************************/
+
+ /*********************************************************
+ Function: NET_DVR_Init
+ Desc: ʼSDKSDKǰᡣ
+ Input:
+ Output:
+ Return: TRUEʾɹFALSEʾʧܡ
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_Init();
+
+ /*********************************************************
+ Function: NET_DVR_Cleanup
+ Desc: ͷSDKԴڽ֮ǰ
+ Input:
+ Output:
+ Return: TRUEʾɹFALSEʾʧ
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_Cleanup();
+
+
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessage(uint nMessage, IntPtr hWnd);
+
+ /*********************************************************
+ Function: EXCEPYIONCALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void EXCEPYIONCALLBACK(uint dwType, int lUserID, int lHandle, IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetExceptionCallBack_V30(uint nMessage, IntPtr hWnd, EXCEPYIONCALLBACK fExceptionCallBack, IntPtr pUser);
+
+
+ /*********************************************************
+ Function: MESSCALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate int MESSCALLBACK(int lCommand, string sDVRIP, string pBuf, uint dwBufLen);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessCallBack(MESSCALLBACK fMessCallBack);
+
+ /*********************************************************
+ Function: MESSCALLBACKEX
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate int MESSCALLBACKEX(int iCommand, int iUserID, string pBuf, uint dwBufLen);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessCallBack_EX(MESSCALLBACKEX fMessCallBack_EX);
+
+ /*********************************************************
+ Function: MESSCALLBACKNEW
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate int MESSCALLBACKNEW(int lCommand, string sDVRIP, string pBuf, uint dwBufLen, ushort dwLinkDVRPort);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessCallBack_NEW(MESSCALLBACKNEW fMessCallBack_NEW);
+
+ /*********************************************************
+ Function: MESSAGECALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate int MESSAGECALLBACK(int lCommand, System.IntPtr sDVRIP, System.IntPtr pBuf, uint dwBufLen, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessageCallBack(MESSAGECALLBACK fMessageCallBack, uint dwUser);
+
+
+ /*********************************************************
+ Function: MSGCallBack
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void MSGCallBack(int lCommand, ref NET_DVR_ALARMER pAlarmer, IntPtr pAlarmInfo, uint dwBufLen, IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessageCallBack_V30(MSGCallBack fMessageCallBack, IntPtr pUser);
+
+ public delegate bool MSGCallBack_V31(int lCommand, ref NET_DVR_ALARMER pAlarmer, IntPtr pAlarmInfo, uint dwBufLen, IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRMessageCallBack_V31(MSGCallBack_V31 fMessageCallBack, IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetSDKLocalCfg(int enumType, IntPtr lpInBuff);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetSDKLocalCfg(int enumType, IntPtr lpOutBuff);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetConnectTime(uint dwWaitTime, uint dwTryTimes);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetReconnect(uint dwInterval, int bEnableRecon);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetLocalIP(byte[] strIP, ref uint pValidNum, ref Boolean pEnableBind);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetValidIP(uint dwIPIndex, Boolean bEnableBind);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern uint NET_DVR_GetSDKVersion();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern uint NET_DVR_GetSDKBuildVersion();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern Int32 NET_DVR_IsSupport();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StartListen(string sLocalIP, ushort wLocalPort);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopListen();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_StartListen_V30(String sLocalIP, ushort wLocalPort, MSGCallBack DataCallback, IntPtr pUserData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopListen_V30(Int32 lListenHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern Int32 NET_DVR_Login(string sDVRIP, ushort wDVRPort, string sUserName, string sPassword, ref NET_DVR_DEVICEINFO lpDeviceInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_Logout(int iUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern uint NET_DVR_GetLastError();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern IntPtr NET_DVR_GetErrorMsg(ref int pErrorNo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetShowMode(uint dwShowType, uint colorKey);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDVRIPByResolveSvr(string sServerIP, ushort wServerPort, string sDVRName, ushort wDVRNameLen, string sDVRSerialNumber, ushort wDVRSerialLen, IntPtr pGetIP);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDVRIPByResolveSvr_EX(string sServerIP, ushort wServerPort, byte[] sDVRName, ushort wDVRNameLen, byte[] sDVRSerialNumber, ushort wDVRSerialLen, byte[] sGetIP, ref uint dwPort);
+ //Ԥؽӿ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern Int32 NET_DVR_RealPlay(int iUserID, ref NET_DVR_CLIENTINFO lpClientInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern Int32 NET_SDK_RealPlay(int iUserLogID, ref NET_DVR_CLIENTINFO lpDVRClientInfo);
+ /*********************************************************
+ Function: REALDATACALLBACK
+ Desc: Ԥص
+ Input: lRealHandle ǰԤ
+ dwDataType
+ pBuffer ݵĻָ
+ dwBufSize С
+ pUser û
+ Output:
+ Return: void
+ **********************************************************/
+ public delegate void REALDATACALLBACK(Int32 lRealHandle, UInt32 dwDataType, IntPtr pBuffer, UInt32 dwBufSize, IntPtr pUser);
+ [DllImport(@".\HCNetSDK.dll")]
+
+ /*********************************************************
+ Function: NET_DVR_RealPlay_V30
+ Desc: ʵʱԤ
+ Input: lUserID [in] NET_DVR_Login()NET_DVR_Login_V30()ķֵ
+ lpClientInfo [in] Ԥ
+ cbRealDataCallBack [in] ݻص
+ pUser [in] û
+ bBlocked [in] Ƿ01
+ Output:
+ Return: 1ʾʧܣֵΪNET_DVR_StopRealPlayȺľ
+ **********************************************************/
+ public static extern int NET_DVR_RealPlay_V30(int iUserID, ref NET_DVR_CLIENTINFO lpClientInfo, REALDATACALLBACK fRealDataCallBack_V30, IntPtr pUser, UInt32 bBlocked);
+
+ /*********************************************************
+ Function: NET_DVR_RealPlay_V40
+ Desc: ʵʱԤչӿڡ
+ Input: lUserID [in] NET_DVR_Login()NET_DVR_Login_V30()ķֵ
+ lpPreviewInfo [in] Ԥ
+ fRealDataCallBack_V30 [in] ݻص
+ pUser [in] û
+ Output:
+ Return: 1ʾʧܣֵΪNET_DVR_StopRealPlayȺľ
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_RealPlay_V40(int iUserID, ref NET_DVR_PREVIEWINFO lpPreviewInfo, REALDATACALLBACK fRealDataCallBack_V30, IntPtr pUser);
+
+ // [DllImport(@".\HCNetSDK.dll")]
+ // public static extern int NET_DVR_GetRealPlayerIndex(int lRealHandle);
+ /*********************************************************
+ Function: NET_DVR_StopRealPlay
+ Desc: ֹͣԤ
+ Input: lRealHandle [in] ԤNET_DVR_RealPlayNET_DVR_RealPlay_V30ķֵ
+ Output:
+ Return:
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopRealPlay(int iRealHandle);
+
+ /*********************************************************
+ Function: DRAWFUN
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void DRAWFUN(int lRealHandle, IntPtr hDc, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_RigisterDrawFun(int lRealHandle, DRAWFUN fDrawFun, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetPlayerBufNumber(Int32 lRealHandle, uint dwBufNum);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ThrowBFrame(Int32 lRealHandle, uint dwNum);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetAudioMode(uint dwMode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_OpenSound(Int32 lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseSound();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_OpenSoundShare(Int32 lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseSoundShare(Int32 lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_Volume(Int32 lRealHandle, ushort wVolume);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SaveRealData(Int32 lRealHandle, string sFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopSaveRealData(Int32 lRealHandle);
+
+ /*********************************************************
+ Function: REALDATACALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void SETREALDATACALLBACK(int lRealHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetRealDataCallBack(int lRealHandle, SETREALDATACALLBACK fRealDataCallBack, uint dwUser);
+
+ /*********************************************************
+ Function: STDDATACALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void STDDATACALLBACK(int lRealHandle, uint dwDataType, ref byte pBuffer, uint dwBufSize, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetStandardDataCallBack(int lRealHandle, STDDATACALLBACK fStdDataCallBack, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CapturePicture(Int32 lRealHandle, string sPicFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CapturePictureBlock(Int32 lRealHandle, string sPicFileName, int dwTimeOut);
+
+ //̬I֡
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MakeKeyFrame(Int32 lUserID, Int32 lChannel);//
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MakeKeyFrameSub(Int32 lUserID, Int32 lChannel);//
+
+ //̨ؽӿ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetPTZCtrl(Int32 lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetPTZCtrl_Other(Int32 lUserID, int lChannel);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZControl(Int32 lRealHandle, uint dwPTZCommand, uint dwStop);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZControl_Other(Int32 lUserID, Int32 lChannel, uint dwPTZCommand, uint dwStop);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_TransPTZ(Int32 lRealHandle, string pPTZCodeBuf, uint dwBufSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_TransPTZ_Other(int lUserID, int lChannel, string pPTZCodeBuf, uint dwBufSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZPreset(int lRealHandle, uint dwPTZPresetCmd, uint dwPresetIndex);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZPreset_Other(int lUserID, int lChannel, uint dwPTZPresetCmd, uint dwPresetIndex);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_TransPTZ_EX(int lRealHandle, string pPTZCodeBuf, uint dwBufSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZControl_EX(int lRealHandle, uint dwPTZCommand, uint dwStop);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZPreset_EX(int lRealHandle, uint dwPTZPresetCmd, uint dwPresetIndex);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZCruise(int lRealHandle, uint dwPTZCruiseCmd, byte byCruiseRoute, byte byCruisePoint, ushort wInput);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZCruise_Other(int lUserID, int lChannel, uint dwPTZCruiseCmd, byte byCruiseRoute, byte byCruisePoint, ushort wInput);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZCruise_EX(int lRealHandle, uint dwPTZCruiseCmd, byte byCruiseRoute, byte byCruisePoint, ushort wInput);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZTrack(int lRealHandle, uint dwPTZTrackCmd);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZTrack_Other(int lUserID, int lChannel, uint dwPTZTrackCmd);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZTrack_EX(int lRealHandle, uint dwPTZTrackCmd);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZControlWithSpeed(int lRealHandle, uint dwPTZCommand, uint dwStop, uint dwSpeed);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZControlWithSpeed_Other(int lUserID, int lChannel, uint dwPTZCommand, uint dwStop, uint dwSpeed);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZControlWithSpeed_EX(int lRealHandle, uint dwPTZCommand, uint dwStop, uint dwSpeed);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetPTZCruise(int lUserID, int lChannel, int lCruiseRoute, ref NET_DVR_CRUISE_RET lpCruiseRet);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZMltTrack(int lRealHandle, uint dwPTZTrackCmd, uint dwTrackIndex);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZMltTrack_Other(int lUserID, int lChannel, uint dwPTZTrackCmd, uint dwTrackIndex);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZMltTrack_EX(int lRealHandle, uint dwPTZTrackCmd, uint dwTrackIndex);
+
+ //ļط
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFile(int lUserID, int lChannel, uint dwFileType, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextFile(int lFindHandle, ref NET_DVR_FIND_DATA lpFindData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_FindClose(int lFindHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextFile_V30(int lFindHandle, ref NET_DVR_FINDDATA_V30 lpFindData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextFile_V40(int lFindHandle, ref NET_DVR_FINDDATA_V40 lpFindData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFile_V30(int lUserID, ref NET_DVR_FILECOND pFindCond);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFile_V40(int lUserID, ref NET_DVR_FILECOND_V40 pFindCond);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFileByEvent_V40(int lUserID, ref NET_DVR_SEARCH_EVENT_PARAM_V40 lpSearchEventParam);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextEvent_V40(int lSearchHandle, ref NET_DVR_SEARCH_EVENT_RET_V40 lpSearchEventRet);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_FindClose_V30(int lFindHandle);
+
+ //2007-04-16Ӳѯŵļ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextFile_Card(int lFindHandle, ref NET_DVR_FINDDATA_CARD lpFindData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFile_Card(int lUserID, int lChannel, uint dwFileType, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_LockFileByName(int lUserID, string sLockFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_UnlockFileByName(int lUserID, string sUnlockFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_PlayBackByName(int lUserID, string sPlayBackFileName, IntPtr hWnd);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_PlayBackByTime(int lUserID, int lChannel, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime, System.IntPtr hWnd);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_PlayBackByTime_V40(int lUserID, ref NET_DVR_VOD_PARA pVodPara);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_PlayBackReverseByName(int lUserID, string sPlayBackFileName, IntPtr hWnd);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_PlayBackReverseByTime_V40(int lUserID, IntPtr hWnd, ref NET_DVR_PLAYCOND pPlayCond);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PlayBackControl(int lPlayHandle, uint dwControlCode, uint dwInValue, ref uint LPOutValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PlayBackControl_V40(int lPlayHandle, uint dwControlCode, IntPtr lpInBuffer, uint dwInValue, IntPtr lpOutBuffer, ref uint LPOutValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopPlayBack(int lPlayHandle);
+
+ /*********************************************************
+ Function: PLAYDATACALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void PLAYDATACALLBACK(int lPlayHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetPlayDataCallBack(int lPlayHandle, PLAYDATACALLBACK fPlayDataCallBack, uint dwUser);
+
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PlayBackSaveData(int lPlayHandle, string sFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopPlayBackSave(int lPlayHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetPlayBackOsdTime(int lPlayHandle, ref NET_DVR_TIME lpOsdTime);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PlayBackCaptureFile(int lPlayHandle, string sFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetFileByName(int lUserID, string sDVRFileName, string sSavedFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetFileByTime(int lUserID, int lChannel, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime, string sSavedFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetFileByTime_V40(int lUserID, string sSavedFileName, ref NET_DVR_PLAYCOND pDownloadCond);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopGetFile(int lFileHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetDownloadPos(int lFileHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetPlayBackPos(int lPlayHandle);
+
+ //ͼƬ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindPicture(int lUserID, ref NET_DVR_FIND_PICTURE_PARAM pFindParam);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextPicture_V50(int lFindHandle, ref NET_DVR_FIND_PICTURE_V50 lpFindData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseFindPicture(int lFindHandle);
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetPicture(int lUserID, String sDVRFileName, String sSavedFileName);
+
+ //
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_Upgrade(int lUserID, string sFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetUpgradeState(int lUpgradeHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetUpgradeProgress(int lUpgradeHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseUpgradeHandle(int lUpgradeHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetNetworkEnvironment(uint dwEnvironmentLevel);
+
+ //Զ̸ʽӲ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FormatDisk(int lUserID, int lDiskNumber);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetFormatProgress(int lFormatHandle, ref int pCurrentFormatDisk, ref int pCurrentDiskPos, ref int pFormatStatic);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseFormatHandle(int lFormatHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetIPCProtoList(int lUserID, ref NET_DVR_IPC_PROTO_LIST lpProtoList);
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetIPCProtoList_V41(int lUserID, ref NET_DVR_IPC_PROTO_LIST_V41 lpProtoList);
+
+ //
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_SetupAlarmChan(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseAlarmChan(int lAlarmHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_SetupAlarmChan_V30(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_SetupAlarmChan_V41(int lUserID, ref NET_DVR_SETUPALARM_PARAM lpSetupParam);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseAlarmChan_V30(int lAlarmHandle);
+
+ //Խ
+ /*********************************************************
+ Function: VOICEDATACALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void VOICEDATACALLBACK(int lVoiceComHandle, string pRecvDataBuffer, uint dwBufSize, byte byAudioFlag, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_StartVoiceCom(int lUserID, VOICEDATACALLBACK fVoiceDataCallBack, uint dwUser);
+
+ /*********************************************************
+ Function: VOICEDATACALLBACKV30
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void VOICEDATACALLBACKV30(int lVoiceComHandle, IntPtr pRecvDataBuffer, uint dwBufSize, byte byAudioFlag, System.IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_StartVoiceCom_V30(int lUserID, uint dwVoiceChan, bool bNeedCBNoEncData, VOICEDATACALLBACKV30 fVoiceDataCallBack, IntPtr pUser);
+
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetVoiceComClientVolume(int lVoiceComHandle, ushort wVolume);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopVoiceCom(int lVoiceComHandle);
+
+ //ת
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_StartVoiceCom_MR(int lUserID, VOICEDATACALLBACK fVoiceDataCallBack, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_StartVoiceCom_MR_V30(int lUserID, uint dwVoiceChan, VOICEDATACALLBACKV30 fVoiceDataCallBack, IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_VoiceComSendData(int lVoiceComHandle, string pSendBuf, uint dwBufSize);
+
+ //㲥
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientAudioStart();
+
+ /*********************************************************
+ Function: VOICEAUDIOSTART
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void VOICEAUDIOSTART(string pRecvDataBuffer, uint dwBufSize, IntPtr pUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientAudioStart_V30(VOICEAUDIOSTART fVoiceAudioStart, IntPtr pUser);
+
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientAudioStop();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_AddDVR(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_AddDVR_V30(int lUserID, uint dwVoiceChan);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DelDVR(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DelDVR_V30(int lVoiceHandle);
+
+
+ //ͨ
+ /*********************************************************
+ Function: SERIALDATACALLBACK
+ Desc: (ص)
+ Input:
+ Output:
+ Return:
+ **********************************************************/
+ public delegate void SERIALDATACALLBACK(int lSerialHandle, string pRecvDataBuffer, uint dwBufSize, uint dwUser);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SerialStart(int lUserID, int lSerialPort, SERIALDATACALLBACK fSerialDataCallBack, uint dwUser);
+
+ //485ΪͨʱҪָͨţΪͬͨ485ÿԲͬ(粨)
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SerialSend(int lSerialHandle, int lChannel, string pSendBuf, uint dwBufSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SerialStop(int lSerialHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SendTo232Port(int lUserID, string pSendBuf, uint dwBufSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SendToSerialPort(int lUserID, uint dwSerialPort, uint dwSerialIndex, string pSendBuf, uint dwBufSize);
+
+ // nBitrate = 16000
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern System.IntPtr NET_DVR_InitG722Decoder(int nBitrate);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern void NET_DVR_ReleaseG722Decoder(IntPtr pDecHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DecodeG722Frame(IntPtr pDecHandle, ref byte pInBuffer, ref byte pOutBuffer);
+
+ //
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern IntPtr NET_DVR_InitG722Encoder();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_EncodeG722Frame(IntPtr pEncodeHandle, ref byte pInBuffer, ref byte pOutBuffer);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern void NET_DVR_ReleaseG722Encoder(IntPtr pEncodeHandle);
+
+ //Զ̿Ʊʾ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClickKey(int lUserID, int lKeyIndex);
+
+ //Զ̿豸ֶ¼
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StartDVRRecord(int lUserID, int lChannel, int lRecordType);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopDVRRecord(int lUserID, int lChannel);
+
+ //뿨
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_InitDevice_Card(ref int pDeviceTotalChan);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ReleaseDevice_Card();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_InitDDraw_Card(IntPtr hParent, uint colorKey);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ReleaseDDraw_Card();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_RealPlay_Card(int lUserID, ref NET_DVR_CARDINFO lpCardInfo, int lChannelNum);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ResetPara_Card(int lRealHandle, ref NET_DVR_DISPLAY_PARA lpDisplayPara);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_RefreshSurface_Card();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClearSurface_Card();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_RestoreSurface_Card();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_OpenSound_Card(int lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseSound_Card(int lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetVolume_Card(int lRealHandle, ushort wVolume);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_AudioPreview_Card(int lRealHandle, int bEnable);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetCardLastError_Card();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern System.IntPtr NET_DVR_GetChanHandle_Card(int lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CapturePicture_Card(int lRealHandle, string sPicFileName);
+
+ //ȡ뿨кŴ˽ӿЧGetBoardDetailӿڻ(2005-12-08֧)
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetSerialNum_Card(int lChannelNum, ref uint pDeviceSerialNo);
+
+ //־
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindDVRLog(int lUserID, int lSelectMode, uint dwMajorType, uint dwMinorType, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextLog(int lLogHandle, ref NET_DVR_LOG lpLogData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_FindLogClose(int lLogHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindDVRLog_V30(int lUserID, int lSelectMode, uint dwMajorType, uint dwMinorType, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime, bool bOnlySmart);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextLog_V30(int lLogHandle, ref NET_DVR_LOG_V30 lpLogData);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_FindLogClose_V30(int lLogHandle);
+
+ //ֹ200485,113ӿ
+ //ATM DVR
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFileByCard(int lUserID, int lChannel, uint dwFileType, int nFindType, ref byte sCardNumber, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime);
+
+
+ //2005-09-15
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CaptureJPEGPicture(int lUserID, int lChannel, ref NET_DVR_JPEGPARA lpJpegPara, string sPicFileName);
+
+ //JPEGץͼڴ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CaptureJPEGPicture_NEW(int lUserID, int lChannel, ref NET_DVR_JPEGPARA lpJpegPara, byte[] sJpegPicBuffer, uint dwPicSize, ref uint lpSizeReturned);
+
+ //2006-02-16
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetRealPlayerIndex(int lRealHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetPlayBackPlayerIndex(int lPlayHandle);
+
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ //ʶϴļ
+ public static extern Int32 NET_DVR_UploadSend(int lUploadHandle, ref NET_DVR_SEND_PARAM_IN pstruSendParamIN, IntPtr lpOutBuffer);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ //ʶϴļ
+ public static extern Int32 NET_DVR_UploadFile_V40(int lUserID, uint dwUploadType, IntPtr lpInBuffer, uint dwInBufferSize, string sFileName, IntPtr lpOutBuffer, uint dwOutBufferSize);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern Int32 NET_DVR_GetUploadState(int lUploadHandle, ref uint pProgress);
+
+ //ȡǰϴĽϢ
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetUploadResult(int lUploadHandle, IntPtr lpOutBuffer, uint dwOutBufferSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_UploadClose(int lUploadHandle);
+
+
+
+ //2006-08-28 704-640
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetScaleCFG(int lUserID, uint dwScale);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetScaleCFG(int lUserID, ref uint lpOutScale);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetScaleCFG_V30(int lUserID, ref NET_DVR_SCALECFG pScalecfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetScaleCFG_V30(int lUserID, ref NET_DVR_SCALECFG pScalecfg);
+
+ //2006-08-28 ATM˿
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetATMPortCFG(int lUserID, ushort wATMPort);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetATMPortCFG(int lUserID, ref ushort LPOutATMPort);
+
+ //2006-11-10 ֧Կ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_InitDDrawDevice();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ReleaseDDrawDevice();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetDDrawDeviceTotalNums();
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDDrawDevice(int lPlayPort, uint nDeviceNum);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZSelZoomIn(int lRealHandle, ref NET_DVR_POINT_FRAME pStruPointFrame);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_PTZSelZoomIn_EX(int lUserID, int lChannel, ref NET_DVR_POINT_FRAME pStruPointFrame);
+
+ //豸DS-6001D/DS-6001F
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StartDecode(int lUserID, int lChannel, ref NET_DVR_DECODERINFO lpDecoderinfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopDecode(int lUserID, int lChannel);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDecoderState(int lUserID, int lChannel, ref NET_DVR_DECODERSTATE lpDecoderState);
+
+ //2005-08-01
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDecInfo(int lUserID, int lChannel, ref NET_DVR_DECCFG lpDecoderinfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDecInfo(int lUserID, int lChannel, ref NET_DVR_DECCFG lpDecoderinfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDecTransPort(int lUserID, ref NET_DVR_PORTCFG lpTransPort);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDecTransPort(int lUserID, ref NET_DVR_PORTCFG lpTransPort);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DecPlayBackCtrl(int lUserID, int lChannel, uint dwControlCode, uint dwInValue, ref uint LPOutValue, ref NET_DVR_PLAYREMOTEFILE lpRemoteFileInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StartDecSpecialCon(int lUserID, int lChannel, ref NET_DVR_DECCHANINFO lpDecChanInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopDecSpecialCon(int lUserID, int lChannel, ref NET_DVR_DECCHANINFO lpDecChanInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DecCtrlDec(int lUserID, int lChannel, uint dwControlCode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DecCtrlScreen(int lUserID, int lChannel, uint dwControl);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDecCurLinkStatus(int lUserID, int lChannel, ref NET_DVR_DECSTATUS lpDecStatus);
+
+ //·
+ //2007-11-30 V211֧½ӿ //11
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixStartDynamic(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DYNAMIC_DEC lpDynamicInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixStopDynamic(int lUserID, uint dwDecChanNum);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDecChanInfo(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DEC_CHAN_INFO lpInter);
+
+ [DllImport(@"..\bin\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDecChanInfo_V41(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DEC_CHAN_INFO_V41 lpOuter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetLoopDecChanInfo(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_LOOP_DECINFO lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetLoopDecChanInfo(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_LOOP_DECINFO lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetLoopDecChanEnable(int lUserID, uint dwDecChanNum, uint dwEnable);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetLoopDecChanEnable(int lUserID, uint dwDecChanNum, ref uint lpdwEnable);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetLoopDecEnable(int lUserID, ref uint lpdwEnable);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetDecChanEnable(int lUserID, uint dwDecChanNum, uint dwEnable);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDecChanEnable(int lUserID, uint dwDecChanNum, ref uint lpdwEnable);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDecChanStatus(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DEC_CHAN_STATUS lpInter);
+
+ //2007-12-22 ֽ֧ӿ //18
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetTranInfo(int lUserID, ref NET_DVR_MATRIX_TRAN_CHAN_CONFIG lpTranInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetTranInfo(int lUserID, ref NET_DVR_MATRIX_TRAN_CHAN_CONFIG lpTranInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetRemotePlay(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DEC_REMOTE_PLAY lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetRemotePlayControl(int lUserID, uint dwDecChanNum, uint dwControlCode, uint dwInValue, ref uint LPOutValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetRemotePlayStatus(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DEC_REMOTE_PLAY_STATUS lpOuter);
+
+ //2009-4-13
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixStartDynamic_V30(int lUserID, uint dwDecChanNum, ref NET_DVR_PU_STREAM_CFG lpDynamicInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixStartDynamic_V41(int lUserID, uint dwDecChanNum, ref NET_DVR_PU_STREAM_CFG_V41 lpDynamicInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetLoopDecChanInfo_V30(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_LOOP_DECINFO_V30 lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetLoopDecChanInfo_V30(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_LOOP_DECINFO_V30 lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDecChanInfo_V30(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_DEC_CHAN_INFO_V30 lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetTranInfo_V30(int lUserID, ref NET_DVR_MATRIX_TRAN_CHAN_CONFIG_V30 lpTranInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetTranInfo_V30(int lUserID, ref NET_DVR_MATRIX_TRAN_CHAN_CONFIG_V30 lpTranInfo);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDisplayCfg(int lUserID, uint dwDispChanNum, ref NET_DVR_VGA_DISP_CHAN_CFG lpDisplayCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetDisplayCfg(int lUserID, uint dwDispChanNum, ref NET_DVR_VGA_DISP_CHAN_CFG lpDisplayCfg);
+
+ [DllImport(@"..\bin\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDisplayCfg_V41(int lUserID, uint dwDispChanNum, ref NET_DVR_MATRIX_VOUTCFG lpDisplayCfg);
+
+ [DllImport(@"..\bin\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetDisplayCfg_V41(int lUserID, uint dwDispChanNum, ref NET_DVR_MATRIX_VOUTCFG lpDisplayCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_MatrixStartPassiveDecode(int lUserID, uint dwDecChanNum, ref NET_DVR_MATRIX_PASSIVEMODE lpPassiveMode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSendData(int lPassiveHandle, System.IntPtr pSendBuf, uint dwBufSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixStopPassiveDecode(int lPassiveHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_UploadLogo(int lUserID, uint dwDispChanNum, ref NET_DVR_DISP_LOGOCFG lpDispLogoCfg, System.IntPtr sLogoBuffer);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_PicUpload(int lUserID, String sFileName, ref NET_DVR_PICTURECFG lpPictureCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetPicUploadProgress(int lUploadHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_CloseUploadHandle(int lUploadHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_GetPicUploadState(int lUploadHandle);
+
+ public const int NET_DVR_SHOWLOGO = 1;/*ʾLOGO*/
+ public const int NET_DVR_HIDELOGO = 2;/*LOGO*/
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_LogoSwitch(int lUserID, uint dwDecChan, uint dwLogoSwitch);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetDeviceStatus(int lUserID, ref NET_DVR_DECODER_WORK_STATUS lpDecoderCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetInputSignalList_V40(int lUserID, uint dwDevNum, ref NET_DVR_INPUT_SIGNAL_LIST lpInputSignalList);
+
+ public const int DISP_CMD_ENLARGE_WINDOW = 1; /*ʾͨŴij*/
+ public const int DISP_CMD_RENEW_WINDOW = 2; /*ʾͨڻԭ*/
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixDiaplayControl(int lUserID, uint dwDispChanNum, uint dwDispChanCmd, uint dwCmdParam);
+
+ //end
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_RefreshPlay(int lPlayHandle);
+
+ //ָĬֵ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_RestoreConfig(int lUserID);
+
+ //
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SaveConfig(int lUserID);
+
+ //
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_RebootDVR(int lUserID);
+
+ //رDVR
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ShutDownDVR(int lUserID);
+
+ // begin
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDVRConfig(int lUserID, uint dwCommand, int lChannel, IntPtr lpOutBuffer, uint dwOutBufferSize, ref uint lpBytesReturned);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDVRConfig(int lUserID, uint dwCommand, int lChannel, System.IntPtr lpInBuffer, uint dwInBufferSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDVRWorkState_V30(int lUserID, IntPtr pWorkState);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDVRWorkState(int lUserID, ref NET_DVR_WORKSTATE lpWorkState);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetVideoEffect(int lUserID, int lChannel, uint dwBrightValue, uint dwContrastValue, uint dwSaturationValue, uint dwHueValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetVideoEffect(int lUserID, int lChannel, ref uint pBrightValue, ref uint pContrastValue, ref uint pSaturationValue, ref uint pHueValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientGetframeformat(int lUserID, ref NET_DVR_FRAMEFORMAT lpFrameFormat);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientSetframeformat(int lUserID, ref NET_DVR_FRAMEFORMAT lpFrameFormat);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetAtmProtocol(int lUserID, ref NET_DVR_ATM_PROTOCOL lpAtmProtocol);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetAlarmOut_V30(int lUserID, IntPtr lpAlarmOutState);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetAlarmOut(int lUserID, ref NET_DVR_ALARMOUTSTATUS lpAlarmOutState);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetAlarmOut(int lUserID, int lAlarmOutPort, int lAlarmOutStatic);
+
+ //ȡUPNP˿ӳ״̬
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetUpnpNatState(int lUserID, ref NET_DVR_UPNP_NAT_STATE lpState);
+
+ //Ƶ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientSetVideoEffect(int lRealHandle, uint dwBrightValue, uint dwContrastValue, uint dwSaturationValue, uint dwHueValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ClientGetVideoEffect(int lRealHandle, ref uint pBrightValue, ref uint pContrastValue, ref uint pSaturationValue, ref uint pHueValue);
+
+ //ļ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetConfigFile(int lUserID, string sFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetConfigFile(int lUserID, string sFileName);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetConfigFile_V30(int lUserID, string sOutBuffer, uint dwOutSize, ref uint pReturnSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetConfigFile_EX(int lUserID, string sOutBuffer, uint dwOutSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetConfigFile_EX(int lUserID, string sInBuffer, uint dwInSize);
+
+ //־ļдӿ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetLogToFile(int bLogEnable, string strLogDir, bool bAutoDel);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetSDKState(ref NET_DVR_SDKSTATE pSDKState);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetSDKAbility(ref NET_DVR_SDKABL pSDKAbl);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetPTZProtocol(int lUserID, ref NET_DVR_PTZCFG pPtzcfg);
+
+ //ǰ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_LockPanel(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_UnLockPanel(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetRtspConfig(int lUserID, uint dwCommand, ref NET_DVR_RTSPCFG lpInBuffer, uint dwInBufferSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetRtspConfig(int lUserID, uint dwCommand, ref NET_DVR_RTSPCFG lpOutBuffer, uint dwOutBufferSize);
+
+ //Ƶۺƽ̨
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixGetSceneCfg(int lUserID, uint dwSceneNum, ref NET_DVR_MATRIX_SCENECFG lpSceneCfg);
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_MatrixSetSceneCfg(int lUserID, uint dwSceneNum, ref NET_DVR_MATRIX_SCENECFG lpSceneCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetRealHeight(int lUserID, int lChannel, ref NET_VCA_LINE lpLine, ref Single lpHeight);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetRealLength(int lUserID, int lChannel, ref NET_VCA_LINE lpLine, ref Single lpLength);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SaveRealData_V30(int lRealHandle, uint dwTransType, string sFileName);
+
+ //Win32λ
+ //[DllImport(@".\HCNetSDK.dll")]
+ //public static extern bool NET_DVR_EncodeG711Frame(uint iType, ref byte pInBuffer, ref byte pOutBuffer);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern IntPtr NET_DVR_InitG711Encoder(ref NET_DVR_AUDIOENC_INFO enc_info);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_EncodeG711Frame(IntPtr handle, ref NET_DVR_AUDIOENC_PROCESS_PARAM p_enc_proc_param);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ReleaseG711Encoder(IntPtr pEncodeHandle);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_DecodeG711Frame(uint iType, ref byte pInBuffer, ref byte pOutBuffer);
+
+ //2009-7-22 end
+
+ //ʼ 9000_1.1
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_EmailTest(int lUserID);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindFileByEvent(int lUserID, ref NET_DVR_SEARCH_EVENT_PARAM lpSearchEventParam);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextEvent(int lSearchHandle, ref NET_DVR_SEARCH_EVENT_RET lpSearchEventRet);
+
+ /*********************************************************
+ Function: NET_DVR_Login_V30
+ Desc:
+ Input: sDVRIP [in] 豸IPַ
+ wServerPort [in] 豸˿ں
+ sUserName [in] ¼û
+ sPassword [in] û
+ Output: lpDeviceInfo [out] 豸Ϣ
+ Return: -1ʾʧܣֵʾصûIDֵ
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern Int32 NET_DVR_Login_V30(string sDVRIP, Int32 wDVRPort, string sUserName, string sPassword, ref NET_DVR_DEVICEINFO_V30 lpDeviceInfo);
+
+ [DllImport(@"HCNetSDK.dll")]
+ public static extern int NET_DVR_Login_V40(ref NET_DVR_USER_LOGIN_INFO pLoginInfo, ref NET_DVR_DEVICEINFO_V40 lpDeviceInfo);
+ /*********************************************************
+ Function: NET_DVR_Logout_V30
+ Desc: ûע豸
+ Input: lUserID [in] ûID
+ Output:
+ Return: TRUEʾɹFALSEʾʧ
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_Logout_V30(Int32 lUserID);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindNextLog_MATRIX(int iLogHandle, ref NET_DVR_LOG_MATRIX lpLogData);
+
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern int NET_DVR_FindDVRLog_Matrix(int iUserID, int lSelectMode, uint dwMajorType, uint dwMinorType, ref tagVEDIOPLATLOG lpVedioPlatLog, ref NET_DVR_TIME lpStartTime, ref NET_DVR_TIME lpStopTime);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_STDXMLConfig(int iUserID, ref NET_DVR_XML_CONFIG_INPUT lpInputParam, ref NET_DVR_XML_CONFIG_OUTPUT lpOutputParam);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDeviceConfig(int lUserID, uint dwCommand, uint dwCount, IntPtr lpInBuffer, uint dwInBufferSize, IntPtr lpStatusList, IntPtr lpOutBuffer, uint dwOutBufferSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDeviceConfig(int lUserID, uint dwCommand, uint dwCount, IntPtr lpInBuffer, uint dwInBufferSize, IntPtr lpStatusList, IntPtr lpInParamBuffer, uint dwInParamBufferSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetDeviceConfigEx(Int32 lUserID, uint dwCommand, uint dwCount, ref NET_DVR_IN_PARAM lpInParam, ref NET_DVR_OUT_PARAM lpOutParam);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetSTDConfig(int iUserID, uint dwCommand, ref NET_DVR_STD_CONFIG lpConfigParam);
+
+ [DllImportAttribute(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetSTDConfig(int iUserID, uint dwCommand, ref NET_DVR_STD_CONFIG lpConfigParam);
+
+ public delegate void RemoteConfigCallback(uint dwType, IntPtr lpBuffer, uint dwBufLen, IntPtr pUserData);
+
+ [DllImportAttribute(@"HCNetSDK.dll")]
+ public static extern int NET_DVR_StartRemoteConfig(int lUserID, int dwCommand, IntPtr lpInBuffer, Int32 dwInBufferLen, RemoteConfigCallback cbStateCallback, IntPtr pUserData);
+
+ [DllImportAttribute(@"HCNetSDK.dll")]
+ public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, IntPtr lpOutBuff, int dwOutBuffSize);
+
+ [DllImportAttribute(@"HCNetSDK.dll")]
+ public static extern bool NET_DVR_SendRemoteConfig(int lHandle, int dwDataType, IntPtr pSendBuf, int dwBufSize);
+
+ [DllImportAttribute(@"HCNetSDK.dll")]
+ public static extern bool NET_DVR_StopRemoteConfig(int lHandle);
+
+
+ [DllImportAttribute(@"HCNetSDK.dll")]
+ public static extern bool NET_DVR_RemoteControl(int lUserID, int dwCommand, IntPtr lpInBuffer, int dwInBufferSize);
+
+ [DllImportAttribute(@"HCNetSDK.dll")]
+ public static extern bool NET_DVR_RemoteControl(int lUserID, int dwCommand, ref CHCNetSDK.NET_DVR_FACE_PARAM_CTRL_CARDNO lpInBuffer, int dwInBufferSize);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ContinuousShoot(Int32 lUserID, ref NET_DVR_SNAPCFG lpInter);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_ManualSnap(Int32 lUserID, ref NET_DVR_MANUALSNAP lpInter, ref NET_DVR_PLATE_RESULT lpOuter);
+
+ /*********************************************************
+ Function: NET_DVR_GetDeviceAbility
+ Desc:
+ Input:
+ Output:
+ Return: TRUEʾɹFALSEʾʧܡ
+ **********************************************************/
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetDeviceAbility(int lUserID, uint dwAbilityType, IntPtr pInBuf, uint dwInLength, IntPtr pOutBuf, uint dwOutLength);
+
+ ///ȡؼ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetBehaviorParamKey(int lUserID, int lChannel, uint dwParameterKey, int nValue);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetBehaviorParamKey(int lUserID, int lChannel, uint dwParameterKey, ref int pValue);
+
+ //ȡ/쳣ΪʶĿӽӿ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetVCADrawMode(int lUserID, int lChannel, ref NET_VCA_DRAW_MODE lpDrawMode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetVCADrawMode(int lUserID, int lChannel, ref NET_VCA_DRAW_MODE lpDrawMode);
+
+ //˫ģʽýӿ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetLFTrackMode(int lUserID, int lChannel, ref NET_DVR_LF_TRACK_MODE lpTrackMode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetLFTrackMode(int lUserID, int lChannel, ref NET_DVR_LF_TRACK_MODE lpTrackMode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetCCDCfg(int lUserID, int lChannel, ref NET_DVR_CCD_CFG lpCCDCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_SetCCDCfg(int lUserID, int lChannel, ref NET_DVR_CCD_CFG lpCCDCfg);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_GetParamSetMode(int lUserID, ref uint dwParamSetMode);
+
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_DVR_InquestStartCDW_V30(int lUserID, ref NET_DVR_INQUEST_ROOM lpInquestRoom, bool bNotBurn);
+ #endregion
+
+ #region Ϣ¼
+ [DllImport("User32.dll", EntryPoint = "PostMessage")]
+ public static extern int PostMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
+ #endregion
+
+
+ //ʶ
+ public enum VCA_RECOGNIZE_SCENE
+ {
+ VCA_LOW_SPEED_SCENE = 0,//ͨշվСſڡͣ
+ VCA_HIGH_SPEED_SCENE = 1,//ͨڡٹ·ƶ)
+ VCA_MOBILE_CAMERA_SCENE = 2,//ƶӦã
+ }
+
+ //ʶ־
+ public enum VCA_RECOGNIZE_RESULT
+ {
+ VCA_RECOGNIZE_FAILURE = 0,//ʶʧ
+ VCA_IMAGE_RECOGNIZE_SUCCESS,//ͼʶɹ
+ VCA_VIDEO_RECOGNIZE_SUCCESS_OF_BEST_LICENSE,//ƵʶŽ
+ VCA_VIDEO_RECOGNIZE_SUCCESS_OF_NEW_LICENSE,//Ƶʶµij
+ VCA_VIDEO_RECOGNIZE_FINISH_OF_CUR_LICENSE,//Ƶʶƽ
+ }
+
+
+ //Ƶʶ
+ public enum VCA_TRIGGER_TYPE
+ {
+ INTER_TRIGGER = 0,// ģڲʶ
+ EXTER_TRIGGER = 1,// ⲿźŴȦ״ֶźţ
+ }
+
+ public const int MAX_CHINESE_CHAR_NUM = 64; //
+ //ƿɶ̬IJ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_PLATE_PARAM
+ {
+ public NET_VCA_RECT struSearchRect;//(һ)
+ public NET_VCA_RECT struInvalidateRect;//Чڲ (һ)
+ public ushort wMinPlateWidth;//С
+ public ushort wTriggerDuration;//֡
+ public byte byTriggerType;//ģʽ, VCA_TRIGGER_TYPE
+ public byte bySensitivity;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 64, ArraySubType = UnmanagedType.I1)]
+ public byte[] byCharPriority;// ȼ
+ }
+
+ /*wMinPlateWidth:òĬΪ80أòöڳƺӳʶ˵ĵ
+ ʶӰ죬ùôгСƾͻ©ʶгƿձϴѸòԴڼٶٳƵĴڱ½Ϊ80 ڸ½Ϊ120
+ wTriggerDuration ⲿźų֡京ǴӴźſʼʶֵ֡ڵٳΪ50100ٳΪ1525ƶʶʱҲⲿΪ1525Ըֳ
+ */
+ //ʶӽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_PLATEINFO
+ {
+ public VCA_RECOGNIZE_SCENE eRecogniseScene;//ʶ(ٺ)
+ public NET_VCA_PLATE_PARAM struModifyParam;//ƿɶ̬IJ
+ }
+
+ //ʶò
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_PLATECFG
+ {
+ public uint dwSize;
+ public byte byPicProType;//ʱͼƬʽ 0- 1-ϴ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 2, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;//Ϊ0
+ public NET_DVR_JPEGPARA struPictureParam;//ͼƬṹ
+ public NET_VCA_PLATEINFO struPlateInfo;//Ϣ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT_2, ArraySubType = UnmanagedType.Struct)]
+ public NET_DVR_SCHEDTIME[] struAlarmTime;//ʱ
+ public NET_DVR_HANDLEEXCEPTION_V30 struHandleType;//ʽ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_CHANNUM_V30, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRelRecordChan;//¼ͨ,Ϊ1ʾͨ
+ }
+
+ //ʶӽṹ
+ [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+ public struct NET_VCA_PLATE_INFO
+ {
+ public VCA_RECOGNIZE_RESULT eResultFlag;//ʶ־
+ public VCA_PLATE_TYPE ePlateType;//
+ public VCA_PLATE_COLOR ePlateColor;//ɫ
+ public NET_VCA_RECT struPlateRect;//λ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes;//Ϊ0
+ public uint dwLicenseLen;//Ƴ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_LICENSE_LEN)]
+ public string sLicense;//ƺ
+ [MarshalAsAttribute(UnmanagedType.ByValTStr, SizeConst = MAX_LICENSE_LEN)]
+ public string sBelieve;//ʶַŶȣ"A12345", ŶΪ10,20,30,40,50,60,70ʾ""ȷĿֻ10%"A"ֵȷĿ20%
+ }
+
+ //Ƽ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_PLATE_RESULT
+ {
+ public uint dwSize;//ṹ
+ public uint dwRelativeTime;//ʱ
+ public uint dwAbsTime;//ʱ
+ public byte byPlateNum;//Ƹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes1;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_PLATE_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_PLATE_INFO[] struPlateInfo;//Ϣṹ
+ public uint dwPicDataLen;//ͼƬij Ϊ0ʾûͼƬ0ʾýṹͼƬ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes2;//Ϊ0 ͼƬĸ߿
+ public System.IntPtr pImage;//ָͼƬָ
+ }
+
+ //ܿ
+ [DllImport(@".\HCNetSDK.dll")]
+ public static extern bool NET_VCA_RestartLib(int lUserID, int lChannel);
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_LINE_SEGMENT
+ {
+ public NET_VCA_POINT struStartPoint;//ʾ߶ʱʾͷ
+ public NET_VCA_POINT struEndPoint;//ʾ߶ʱʾŲ
+ public float fValue;//߶ֵλ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //궨
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_VCA_LINE_SEG_LIST
+ {
+ public uint dwSize;//ṹ
+ public byte bySegNum;//궨
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 3, ArraySubType = System.Runtime.InteropServices.UnmanagedType.I1)]
+ public byte[] byRes;//0
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_SEGMENT_NUM, ArraySubType = UnmanagedType.Struct)]
+ public NET_VCA_LINE_SEGMENT[] struSeg;
+ }
+
+ //2009-8-18 ץĻ
+ public const int PLATE_INFO_LEN = 1024;
+ public const int PLATE_NUM_LEN = 16;
+ public const int FILE_NAME_LEN = 256;
+
+ //liscense plate result
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_PLATE_RET
+ {
+ public uint dwSize;//ṹ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PLATE_NUM_LEN, ArraySubType = UnmanagedType.I1)]
+ public byte[] byPlateNum;//ƺ
+ public byte byVehicleType;//
+ public byte byTrafficLight;//0-̵ƣ1-
+ public byte byPlateColor;//ɫ
+ public byte byDriveChan;//
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.I1)]
+ public byte[] byTimeInfo;/*ʱϢ*///plate_172.6.113.64_20090724155526948_197170484
+ //Ŀǰ17λȷms:20090724155526948
+ public byte byCarSpeed;/*λkm/h*/
+ public byte byCarSpeedH;/*cm/s8λ*/
+ public byte byCarSpeedL;/*cm/s8λ*/
+ public byte byRes;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = PLATE_INFO_LEN - 36, ArraySubType = UnmanagedType.I1)]
+ public byte[] byInfo;
+ public uint dwPicLen;
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct NET_DVR_CCD_CFG
+ {
+ public uint dwSize;//ṹ
+ public byte byBlc;/*ⲹ0-off; 1-on*/
+ public byte byBlcMode;/*blc0-Զ1-ϣ2-£3-4-ң5-УעblcΪ on ʱЧ*/
+ public byte byAwb;/*Զƽ0-Զ1; 1-Զ2; 2-Զ*/
+ public byte byAgc;/*Զ0-; 1-; 2-; 3-*/
+ public byte byDayNight;/*ҹת0 ɫ1ڰף2Զ*/
+ public byte byMirror;/*0-;1-;2-;3-*/
+ public byte byShutter;/*0-Զ; 1-1/25; 2-1/50; 3-1/100; 4-1/250;5-1/500; 6-1/1k ;7-1/2k; 8-1/4k; 9-1/10k; 10-1/100k;*/
+ public byte byIrCutTime;/*IRCUTлʱ䣬5, 10, 15, 20, 25*/
+ public byte byLensType;/*ͷ0-ӹȦ; 1-ԶȦ*/
+ public byte byEnVideoTrig;/*Ƶʹܣ1-֧֣0-֧֡ƵģʽƵٶȰbyShutterٶȣץͼƬĿٶȰbyCapShutterٶȣץɺԶڻƵģʽ*/
+ public byte byCapShutter;/*ץʱĿٶȣ1-1/25; 2-1/50; 3-1/100; 4-1/250;5-1/500; 6-1/1k ;7-1/2k; 8-1/4k; 9-1/10k; 10-1/100k; 11-1/150; 12-1/200*/
+ public byte byEnRecognise;/*1-֧ʶ0-֧ʶ*/
+ }
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct tagCAMERAPARAMCFG
+ {
+ public uint dwSize;
+ public uint dwPowerLineFrequencyMode;/*0-50HZ; 1-60HZ*/
+ public uint dwWhiteBalanceMode;/*0ֶƽ; 1Զƽ1ΧС; 2 Զƽ2Χ2200K-15000K;3Զ3*/
+ public uint dwWhiteBalanceModeRGain;/*ֶƽʱЧֶƽ R*/
+ public uint dwWhiteBalanceModeBGain;/*ֶƽʱЧֶƽ B*/
+ public uint dwExposureMode;/*0 ֶع 1Զع*/
+ public uint dwExposureSet;/* 0-USERSET, 1-Զx22-Զ43-Զ81/25, 4-1/50, 5-1/100, 6-1/250, 7-1/500, 8-1/750, 9-1/1000, 10-1/2000, 11-1/4000,12-1/10,000; 13-1/100,000*/
+ public uint dwExposureUserSet;/* ԶԶعʱ*/
+ public uint dwExposureTarget;/*ֶعʱ ΧManumalЧ룩*/
+ public uint dwIrisMode;/*0 ԶȦ 1ֶȦ*/
+ public uint dwGainLevel;/*棺0-100*/
+ public uint dwBrightnessLevel;/*0-100*/
+ public uint dwContrastLevel;/*0-100*/
+ public uint dwSharpnessLevel;/*0-100*/
+ public uint dwSaturationLevel;/*0-100*/
+ public uint dwHueLevel;/*0-100*/
+ public uint dwGammaCorrectionEnabled;/*0 dsibale 1 enable*/
+ public uint dwGammaCorrectionLevel;/*0-100*/
+ public uint dwWDREnabled;/*̬0 dsibale 1 enable*/
+ public uint dwWDRLevel1;/*0-F*/
+ public uint dwWDRLevel2;/*0-F*/
+ public uint dwWDRContrastLevel;/*0-100*/
+ public uint dwDayNightFilterType;/*ҹл0 day,1 night,2 auto */
+ public uint dwSwitchScheduleEnabled;/*0 dsibale 1 enable,()*/
+ //ģʽ1()
+ public uint dwBeginTime; /*0-100*/
+ public uint dwEndTime;/*0-100*/
+ //ģʽ2
+ public uint dwDayToNightFilterLevel;//0-7
+ public uint dwNightToDayFilterLevel;//0-7
+ public uint dwDayNightFilterTime;//(60)
+ public uint dwBacklightMode;/*ⲹ:0 USERSET 1 UP2 DOWN3 LEFT4 RIGHT5MIDDLE*/
+ public uint dwPositionX1;//X1
+ public uint dwPositionY1;//Y1
+ public uint dwPositionX2;//X2
+ public uint dwPositionY2;//Y2
+ public uint dwBacklightLevel;/*0x0-0xF*/
+ public uint dwDigitalNoiseRemoveEnable; /*ȥ룺0 dsibale 1 enable*/
+ public uint dwDigitalNoiseRemoveLevel;/*0x0-0xF*/
+ public uint dwMirror; /* 0 Left;1 Right,;2 Up;3Down */
+ public uint dwDigitalZoom;/*:0 dsibale 1 enable*/
+ public uint dwDeadPixelDetect;/*,0 dsibale 1 enable*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 20, ArraySubType = UnmanagedType.U4)]
+ public uint[] dwRes;
+ }
+
+ public const int NET_DVR_GET_CCDPARAMCFG = 1067; //IPCȡCCD
+ public const int NET_DVR_SET_CCDPARAMCFG = 1068; //IPCCCD
+
+ //ͼǿ
+ //ͼǿȥ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct tagIMAGEREGION
+ {
+ public uint dwSize;//ܵĽṹ
+ public ushort wImageRegionTopLeftX;/* ͼǿȥx */
+ public ushort wImageRegionTopLeftY;/* ͼǿȥy */
+ public ushort wImageRegionWidth;/* ͼǿȥĿ */
+ public ushort wImageRegionHeight;/*ͼǿȥĸ*/
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ //ͼǿȥ뼶ȶʹ
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct tagIMAGESUBPARAM
+ {
+ public NET_DVR_SCHEDTIME struImageStatusTime;//ͼ״̬ʱ
+ public byte byImageEnhancementLevel;//ͼǿļ0-70ʾر
+ public byte byImageDenoiseLevel;//ͼȥļ0-70ʾر
+ public byte byImageStableEnable;//ͼȶʹܣ0ʾرգ1ʾ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 9, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+
+ public const int NET_DVR_GET_IMAGEREGION = 1062; //ͼǿͼǿȥȡ
+ public const int NET_DVR_SET_IMAGEREGION = 1063; //ͼǿͼǿȥȡ
+ public const int NET_DVR_GET_IMAGEPARAM = 1064; // ͼǿͼ(ȥ롢ǿȶʹ)ȡ
+ public const int NET_DVR_SET_IMAGEPARAM = 1065; // ͼǿͼ(ȥ롢ǿȶʹ)
+
+ [StructLayoutAttribute(LayoutKind.Sequential)]
+ public struct tagIMAGEPARAM
+ {
+ public uint dwSize;
+ //ͼǿʱβãտʼ
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = MAX_DAYS * MAX_TIMESEGMENT, ArraySubType = UnmanagedType.Struct)]
+ public tagIMAGESUBPARAM[] struImageParamSched;
+ [MarshalAsAttribute(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.I1)]
+ public byte[] byRes;
+ }
+ }
+}
diff --git a/DM_Weight/HIKVISION/CHKFunction.cs b/DM_Weight/HIKVISION/CHKFunction.cs
new file mode 100644
index 0000000..7ac5996
--- /dev/null
+++ b/DM_Weight/HIKVISION/CHKFunction.cs
@@ -0,0 +1,191 @@
+using DM_Weight.util;
+using PreviewDemo;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+using System.Windows;
+using log4net;
+using System.Runtime.InteropServices;
+
+namespace DM_Weight.HIKVISION
+{
+ public class CHKFunction
+ {
+ private readonly ILog logger = LogManager.GetLogger(typeof(CHKFunction));
+ private bool m_bInitSDK = false;
+
+ private Int32 m_lRealHandle = -1;
+ public static int HKUserId = -1;
+ private uint iLastErr = 0;
+ private string str;
+
+ public CHCNetSDK.NET_DVR_USER_LOGIN_INFO struLogInfo;
+ public CHCNetSDK.NET_DVR_DEVICEINFO_V40 DeviceInfo;
+ public CHCNetSDK.NET_DVR_TIME m_struTimeCfg;
+
+
+ private System.ComponentModel.Container components = null;
+
+ public CHKFunction()
+ {
+ HIKInit();
+ HIKLogin();
+ }
+
+ public bool HIKInit()
+ {
+ m_bInitSDK = CHCNetSDK.NET_DVR_Init();
+ if (m_bInitSDK == false)
+ {
+ //MessageBox.Show("NET_DVR_Init error!");
+ //return;
+ logger.Info("NET_DVR_Init error!");
+ }
+ else
+ {
+ //保存SDK日志 To save the SDK log
+ CHCNetSDK.NET_DVR_SetLogToFile(3, "C:\\SdkLog\\", true);
+ }
+ return m_bInitSDK;
+ }
+
+ public int HIKLogin()
+ {
+ string ip = ReadApp.ReadAppSetting("HIKIP");
+ string port = ReadApp.ReadAppSetting("HIKPort");
+ string userName = ReadApp.ReadAppSetting("HIKUser");
+ string password = ReadApp.ReadAppSetting("HIKPassword");
+ if (HKUserId < 0)
+ {
+
+ struLogInfo = new CHCNetSDK.NET_DVR_USER_LOGIN_INFO();
+
+ //设备IP地址或者域名
+ byte[] byIP = System.Text.Encoding.Default.GetBytes(ip);
+ struLogInfo.sDeviceAddress = new byte[129];
+ byIP.CopyTo(struLogInfo.sDeviceAddress, 0);
+
+ //设备用户名
+ byte[] byUserName = System.Text.Encoding.Default.GetBytes(userName);
+ struLogInfo.sUserName = new byte[64];
+ byUserName.CopyTo(struLogInfo.sUserName, 0);
+
+ //设备密码
+ byte[] byPassword = System.Text.Encoding.Default.GetBytes(password);
+ struLogInfo.sPassword = new byte[64];
+ byPassword.CopyTo(struLogInfo.sPassword, 0);
+
+ struLogInfo.wPort = ushort.Parse(port);//设备服务端口号
+
+ //if (LoginCallBack == null)
+ //{
+ // LoginCallBack = new CHCNetSDK.LOGINRESULTCALLBACK(cbLoginCallBack);//注册回调函数
+ //}
+ //struLogInfo.cbLoginResult = LoginCallBack;
+ struLogInfo.bUseAsynLogin = false; //是否异步登录:0- 否,1- 是
+
+ DeviceInfo = new CHCNetSDK.NET_DVR_DEVICEINFO_V40();
+
+ //登录设备 Login the device
+ HKUserId = CHCNetSDK.NET_DVR_Login_V40(ref struLogInfo, ref DeviceInfo);
+ if (HKUserId < 0)
+ {
+ iLastErr = CHCNetSDK.NET_DVR_GetLastError();
+ str = "NET_DVR_Login_V40 failed, error code= " + iLastErr; //登录失败,输出错误号
+ logger.Info(str);
+ }
+ else
+ {
+ //登录成功
+ //MessageBox.Show("Login Success!");
+ logger.Info("Login Success!");
+ }
+
+ }
+ else
+ {
+ //注销登录 Logout the device
+ if (m_lRealHandle >= 0)
+ {
+ //MessageBox.Show("Please stop live view firstly");
+ logger.Info("Please stop live view firstly");
+ }
+
+ if (!CHCNetSDK.NET_DVR_Logout(HKUserId))
+ {
+ iLastErr = CHCNetSDK.NET_DVR_GetLastError();
+ str = "NET_DVR_Logout failed, error code= " + iLastErr;
+ logger.Info(str);
+ }
+ HKUserId = -1;
+ }
+ return HKUserId;
+ }
+
+ public void HIKLoginOut()
+ {
+ if (m_lRealHandle >= 0)
+ {
+ bool stopRealPlay = CHCNetSDK.NET_DVR_StopRealPlay(m_lRealHandle);
+ logger.Info($"录像机NET_DVR_StopRealPlay接口返回{stopRealPlay}");
+ }
+ if (HKUserId >= 0)
+ {
+ bool logout = CHCNetSDK.NET_DVR_Logout(HKUserId);
+ logger.Info($"录像机NET_DVR_Logout接口返回{logout}");
+ }
+ if (m_bInitSDK == true)
+ {
+ bool cleanUp = CHCNetSDK.NET_DVR_Cleanup();
+ logger.Info($"录像机NET_DVR_Cleanup接口返回{cleanUp}");
+ }
+ }
+
+ public bool HIKStartDVRRecord()
+ {
+ bool isStart = CHCNetSDK.NET_DVR_StartDVRRecord(HKUserId, 0xffff, 0);
+ logger.Info($"录像机NET_DVR_StartDVRRecord接口返回{isStart}");
+ return isStart;
+ }
+ public bool HIKStopDVRRecord()
+ {
+ bool isStop = CHCNetSDK.NET_DVR_StopDVRRecord(HKUserId, 0xffff);
+ logger.Info($"录像机NET_DVR_StopDVRRecord接口返回{isStop}");
+ return isStop;
+ }
+ public void HIK_DVR_TIME()
+ {
+ UInt32 dwReturn = 0;
+ Int32 nSize = Marshal.SizeOf(m_struTimeCfg);
+ IntPtr ptrTimeCfg = Marshal.AllocHGlobal(nSize);
+ Marshal.StructureToPtr(m_struTimeCfg, ptrTimeCfg, false);
+ if (CHCNetSDK.NET_DVR_GetDVRConfig(HKUserId, CHCNetSDK.NET_DVR_GET_TIMECFG, -1, ptrTimeCfg, (UInt32)nSize, ref dwReturn))
+ {
+
+ m_struTimeCfg = (CHCNetSDK.NET_DVR_TIME)Marshal.PtrToStructure(ptrTimeCfg, typeof(CHCNetSDK.NET_DVR_TIME));
+ logger.Info($"录像机时间接口{Convert.ToString(m_struTimeCfg.dwYear)}- {Convert.ToString(m_struTimeCfg.dwMonth)}- {Convert.ToString(m_struTimeCfg.dwDay)}- {Convert.ToString(m_struTimeCfg.dwHour)}- {Convert.ToString(m_struTimeCfg.dwMinute)}- {Convert.ToString(m_struTimeCfg.dwSecond)}");
+ }
+ }
+ ///
+ /// 清理所有正在使用的资源。
+ ///
+ //public void Dispose()
+ //{
+ // if (m_lRealHandle >= 0)
+ // {
+ // bool stopRealPlay= CHCNetSDK.NET_DVR_StopRealPlay(m_lRealHandle);
+ // }
+ // if (HKUserId >= 0)
+ // {
+ // CHCNetSDK.NET_DVR_Logout(HKUserId);
+ // }
+ // if (m_bInitSDK == true)
+ // {
+ // CHCNetSDK.NET_DVR_Cleanup();
+ // }
+ //}
+ }
+}
diff --git a/DM_Weight/Images/TbExit.png b/DM_Weight/Images/TbExit.png
new file mode 100644
index 0000000..ae68ade
Binary files /dev/null and b/DM_Weight/Images/TbExit.png differ
diff --git a/DM_Weight/Images/TbJiay.png b/DM_Weight/Images/TbJiay.png
new file mode 100644
index 0000000..98d4044
Binary files /dev/null and b/DM_Weight/Images/TbJiay.png differ
diff --git a/DM_Weight/Images/TbKuc.png b/DM_Weight/Images/TbKuc.png
new file mode 100644
index 0000000..50f7cdb
Binary files /dev/null and b/DM_Weight/Images/TbKuc.png differ
diff --git a/DM_Weight/Images/TbQyao.png b/DM_Weight/Images/TbQyao.png
new file mode 100644
index 0000000..71b5306
Binary files /dev/null and b/DM_Weight/Images/TbQyao.png differ
diff --git a/DM_Weight/Images/TbSet.png b/DM_Weight/Images/TbSet.png
new file mode 100644
index 0000000..9d5fbf7
Binary files /dev/null and b/DM_Weight/Images/TbSet.png differ
diff --git a/DM_Weight/Images/TbTuiy.png b/DM_Weight/Images/TbTuiy.png
new file mode 100644
index 0000000..ccc1bb6
Binary files /dev/null and b/DM_Weight/Images/TbTuiy.png differ
diff --git a/DM_Weight/Images/body-bg.jpg b/DM_Weight/Images/body-bg.jpg
new file mode 100644
index 0000000..20a067e
Binary files /dev/null and b/DM_Weight/Images/body-bg.jpg differ
diff --git a/DM_Weight/Images/box-16.jpg b/DM_Weight/Images/box-16.jpg
new file mode 100644
index 0000000..0631941
Binary files /dev/null and b/DM_Weight/Images/box-16.jpg differ
diff --git a/DM_Weight/Images/box.png b/DM_Weight/Images/box.png
new file mode 100644
index 0000000..7f00143
Binary files /dev/null and b/DM_Weight/Images/box.png differ
diff --git a/DM_Weight/Images/favicon.ico b/DM_Weight/Images/favicon.ico
new file mode 100644
index 0000000..8a22d00
Binary files /dev/null and b/DM_Weight/Images/favicon.ico differ
diff --git a/DM_Weight/Images/finger-bg-r.png b/DM_Weight/Images/finger-bg-r.png
new file mode 100644
index 0000000..a4b7366
Binary files /dev/null and b/DM_Weight/Images/finger-bg-r.png differ
diff --git a/DM_Weight/Images/logo.png b/DM_Weight/Images/logo.png
new file mode 100644
index 0000000..432cccd
Binary files /dev/null and b/DM_Weight/Images/logo.png differ
diff --git a/DM_Weight/Models/ChannelStock.cs b/DM_Weight/Models/ChannelStock.cs
new file mode 100644
index 0000000..0fbfd3a
--- /dev/null
+++ b/DM_Weight/Models/ChannelStock.cs
@@ -0,0 +1,220 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Prism.Mvvm;
+using SqlSugar;
+namespace DM_Weight.Models
+{
+ ///
+ ///
+ ///
+ [SugarTable("channel_stock")]
+ public class ChannelStock : BindableBase
+ {
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName = "chsguid", IsPrimaryKey = true)]
+ //[SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ [SugarColumn(ColumnName = "chnguid")]
+ public string Chnguid { get; set; }
+
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "machine_id")]
+ public string MachineId { get; set; }
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "row_no")]
+ public int DrawerNo { get; set; }
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "col_no")]
+ public int ColNo { get; set; }
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "pos_no")]
+ public int PosNo { get; set; }
+
+
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "drug_id")]
+ public string DrugId { get; set; }
+
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "manu_no")]
+ public string ManuNo { get; set; }
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "eff_date")]
+ public string EffDate { get; set; }
+ ///
+ ///
+ /// 默认值: NULL
+ ///
+ [SugarColumn(ColumnName = "quantity")]
+ public int Quantity { get; set; }
+
+ ///
+ ///
+ /// 默认值: 1
+ ///
+ [SugarColumn(ColumnName = "drawer_type")]
+ public int DrawerType { get; set; }
+ ///
+ ///
+ /// 默认值: 1
+ ///
+ [SugarColumn(ColumnName = "board_type")]
+ public int BoardType { get; set; }
+ private int? _state = 0;
+ ///
+ ///
+ /// 默认值: 1(用于标识毒麻柜是否给交接柜补药:0未补,1已补)
+ ///
+ [SugarColumn(ColumnName = "state")]
+ public int? State
+ {
+ get => _state;
+ set { SetProperty(ref _state, value); }
+ }
+
+ [SugarColumn(IsIgnore = true)]
+ public bool IsSelected { get; set; }
+
+ [SugarColumn(IsIgnore = true)]
+ public string Location
+ {
+ get => DrawerNo + "-" + ColNo;
+ }
+ private int _addQuantity = 0;
+ [SugarColumn(IsIgnore = true)]
+ public int AddQuantity
+ {
+ get => _addQuantity;
+ set
+ {
+ SetProperty(ref _addQuantity, value);
+ }
+ }
+
+ private int _takeQuantity = 0;
+
+ [SugarColumn(IsIgnore = true)]
+ public int TakeQuantity
+ {
+ get => _takeQuantity;
+ set
+ {
+ if (value > Quantity)
+ {
+ throw new ArgumentException("取药数量不能大于库存");
+ }
+ SetProperty(ref _takeQuantity, value);
+ }
+ }
+ //private string _tipMessage=string.Empty;
+ //[SugarColumn(IsIgnore = true)]
+ //public string TipMessage
+ //{
+ // get => _tipMessage;
+ // set
+ // {
+ // SetProperty(ref _tipMessage, value);
+ // }
+ //}
+ private int _returnQuantity = 0;
+
+ [SugarColumn(IsIgnore = true)]
+ public int ReturnQuantity
+ {
+ get => _returnQuantity;
+ set
+ {
+ SetProperty(ref _returnQuantity, value);
+ }
+ }
+
+ private int _checkQuantity = 0;
+
+
+ [SugarColumn(IsIgnore = true)]
+ public int CheckQuantity
+ {
+ get => _checkQuantity;
+ set
+ {
+ if (value < 0)
+ {
+ throw new ArgumentException("盘点数量不能是负数");
+ }
+ SetProperty(ref _checkQuantity, value);
+ }
+ }
+ ///
+ /// 药品基数
+ ///
+ private int _baseQuantity = 0;
+ [SugarColumn(ColumnName = "Check_Quantity")]
+ public int BaseQuantity
+ {
+ get => _baseQuantity;
+ set
+ {
+ SetProperty(ref _baseQuantity, value);
+ }
+ }
+
+
+ [SugarColumn(IsIgnore = true)]
+ public int? CanReturnQuantity { get; set; }
+
+ [Navigate(NavigateType.ManyToOne, nameof(DrugId))]
+ public DrugInfo DrugInfo { get; set; }
+
+
+ [SugarColumn(IsIgnore = true)]
+ public int process { get; set; } = 0;
+
+ [SugarColumn(IsIgnore = true)]
+ public DrugManuNo? drugManuNo { get; set; }
+
+ //private ChannelList? _channelList;
+ //[Navigate(NavigateType.ManyToOne, nameof(Chnguid))]
+ //public ChannelList ChannelLst { get => _channelList; set => SetProperty(ref _channelList, value); }
+ //[SugarColumn(IsIgnore = true)]
+ //public DrugPleaseClaim PleaseClaim { get; set; }
+
+ //dm_machine_record表id值
+ [SugarColumn(IsIgnore = true)]
+ public int? MachineRecordId { get; set; }
+
+ [SugarColumn(IsIgnore =true)]
+ public string OrderNos { get; set; }
+
+ //交接柜加药数量
+ [SugarColumn(ColumnName = "col_no1")]
+ public int AddToJJNum { get; set; }
+ //需要加药数量
+ [SugarColumn(ColumnName = "col_no2")]
+ public int NeedNum { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/DM_Weight/Models/DrugBase.cs b/DM_Weight/Models/DrugBase.cs
new file mode 100644
index 0000000..542dc25
--- /dev/null
+++ b/DM_Weight/Models/DrugBase.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Prism.Mvvm;
+using SqlSugar;
+
+namespace DM_Weight.Models
+{
+ ///
+ /// 药品基数表
+ ///
+ [SugarTable("drug_base")]
+ public class DrugBase:BindableBase
+ {
+ private int _baseId = 0;
+ [SugarColumn(ColumnName = "baseid", IsPrimaryKey = true)]
+ public int BaseId { get=> _baseId; set { SetProperty(ref _baseId, value); } }
+ private string _drugId;
+ [SugarColumn(ColumnName = "drugid")]
+ public string DrugId { get => _drugId; set { SetProperty(ref _drugId, value); } }
+ private string _machineId = "";
+ [SugarColumn(ColumnName = "machine_id")]
+ public string MachineId { get => _machineId; set { SetProperty(ref _machineId, value); } }
+ private int _baseQuantity = 0;
+ [SugarColumn(ColumnName = "baseQuantity")]
+ public int BaseQuantity { get=>_baseQuantity; set{ SetProperty(ref _baseQuantity, value); } }
+
+ }
+}
diff --git a/DM_Weight/Models/DrugInfo.cs b/DM_Weight/Models/DrugInfo.cs
new file mode 100644
index 0000000..2121108
--- /dev/null
+++ b/DM_Weight/Models/DrugInfo.cs
@@ -0,0 +1,108 @@
+using Prism.Mvvm;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.Models
+{
+ ///
+ ///
+ ///
+ [SugarTable("drug_info")]
+ public class DrugInfo : BindableBase
+ {
+ ///
+ ///
+ ///
+ //[SugarColumn(ColumnName = "pharmacy")]
+ //public string Pharmacy { get; set; }
+ ///
+ /// ҩƷID
+ ///
+ [SugarColumn(ColumnName = "drug_id", IsPrimaryKey = true)]
+ public string DrugId { get; set; }
+ ///
+ /// ƴ
+ ///
+ [SugarColumn(ColumnName = "py_code")]
+ public string PyCode { get; set; }
+ ///
+ ///
+ ///
+ //[SugarColumn(ColumnName = "BD_code")]
+ //public string BdCode { get; set; }
+ ///
+ /// ҩƷ
+ ///
+ [SugarColumn(ColumnName = "drug_barcode")]
+ public string DrugBarcode { get; set; }
+
+ ///
+ /// ҩƷ����
+ ///
+ [SugarColumn(ColumnName = "drug_name")]
+ public string DrugName { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName = "drug_brand_name")]
+ public string DrugBrandname { get; set; }
+ ///
+ /// ҩƷ���
+ ///
+ [SugarColumn(ColumnName = "drug_spec")]
+ public string DrugSpec { get; set; }
+ ///
+ /// ����
+ ///
+ [SugarColumn(ColumnName = "dosage")]
+ public string Dosage { get; set; }
+ ///
+ /// ��װ��λ
+ ///
+ [SugarColumn(ColumnName = "pack_unit")]
+ public string PackUnit { get; set; }
+ ///
+ /// ��������
+ ///
+ [SugarColumn(ColumnName = "manufactory")]
+ public string Manufactory { get; set; }
+ ///
+ /// ���ҩ��
+ ///
+ [SugarColumn(ColumnName = "max_stock")]
+ public int? MaxStock { get; set; }
+
+ ///
+ /// 药品类型
+ ///
+ [SugarColumn(ColumnName = "drug_type")]
+ public string DrugType { get; set; }
+
+ //[SugarColumn(IsIgnore=true)]
+ [Navigate(NavigateType.OneToMany, nameof(ChannelStock.DrugId), nameof(DrugId))]//BookA表中的studenId
+ public List channelStocks { get; set; }
+
+
+ [Navigate(NavigateType.OneToMany, nameof(DrugManuNo.DrugId))]//BookA表中的studenId
+ public List? DrugManuNos { get; set; }
+ [SugarColumn(IsIgnore = true)]
+ public int? StockQuantity { get; set; }
+
+ private DrugBase _base;
+ [Navigate(NavigateType.OneToOne, nameof(DrugBase.DrugId), nameof(DrugId))]
+ public DrugBase drugBase
+ {
+ get => _base;
+ set { SetProperty(ref _base, value); }
+ }
+ [SugarColumn(IsIgnore = true)]
+ public string drug_name_spec { get; set; }
+
+
+
+ }
+}
diff --git a/DM_Weight/Models/DrugManuNo.cs b/DM_Weight/Models/DrugManuNo.cs
new file mode 100644
index 0000000..f30b7a9
--- /dev/null
+++ b/DM_Weight/Models/DrugManuNo.cs
@@ -0,0 +1,35 @@
+using Prism.Mvvm;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.Models
+{
+ [SugarTable("drug_manu_no")]
+ public class DrugManuNo : BindableBase
+ {
+ private string _id;
+ [SugarColumn(ColumnName = "dmnguid", IsPrimaryKey = true)]
+ public string Id { get => _id; set => SetProperty(ref _id, value); }
+
+ private string _drugId;
+ [SugarColumn(ColumnName = "drug_id")]
+ public string DrugId { get => _drugId; set => SetProperty(ref _drugId, value); }
+
+ private string _manuNo;
+ [SugarColumn(ColumnName = "manu_no")]
+ public string ManuNo { get => _manuNo; set => SetProperty(ref _manuNo, value); }
+
+ private string _manuDate;
+ [SugarColumn(ColumnName = "manu_date")]
+ public string ManuDate { get => _manuDate; set => SetProperty(ref _manuDate, value); }
+
+
+ private string _effDate;
+ [SugarColumn(ColumnName = "eff_date")]
+ public string EffDate { get => _effDate; set => SetProperty(ref _effDate, value); }
+ }
+}
diff --git a/DM_Weight/Models/PremissionDm.cs b/DM_Weight/Models/PremissionDm.cs
new file mode 100644
index 0000000..56eb546
--- /dev/null
+++ b/DM_Weight/Models/PremissionDm.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using SqlSugar;
+namespace DM_Weight.Models
+{
+ ///
+ ///
+ ///
+ [Serializable]
+ public class PremissionDm
+ {
+ ///
+ /// 主键
+ ///
+ public int Id { get; set; }
+ ///
+ /// 菜单名
+ ///
+ public string PremissionName { get; set; }
+ ///
+ /// 菜单路径
+ ///
+ public string PremissionPath { get; set; }
+ ///
+ /// 图片source
+ ///
+ public string PremissionImage { get; set; }
+
+
+ public ObservableCollection? Children { get; set; }
+
+ }
+}
diff --git a/DM_Weight/Models/RoleDm.cs b/DM_Weight/Models/RoleDm.cs
new file mode 100644
index 0000000..ce3e319
--- /dev/null
+++ b/DM_Weight/Models/RoleDm.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace DM_Weight.Models
+{
+ ///
+ ///
+ ///
+ [SugarTable("role")]
+ public class RoleDm
+ {
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )]
+ public int? Id { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="role_name" )]
+ public string RoleName { get; set; }
+ ///
+ ///
+ ///
+ //[SugarColumn(ColumnName="role_des" )]
+ //public string RoleDes { get; set; }
+ ///
+ ///
+ ///
+ ///[SugarColumn(ColumnName="permissions" )]
+ [SugarColumn(ColumnName = "permissions", ColumnDataType = "varchar(4000)" /*可以设置类型*/, IsJson = true)]//必填
+ public List Permissions { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="machine_id" )]
+ public string MachineId { get; set; }
+ }
+}
diff --git a/DM_Weight/Models/UserList.cs b/DM_Weight/Models/UserList.cs
new file mode 100644
index 0000000..3c3d2a0
--- /dev/null
+++ b/DM_Weight/Models/UserList.cs
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+namespace DM_Weight.Models
+{
+ ///
+ ///
+ ///
+ [SugarTable("user_list")]
+ public class UserList
+ {
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="id" ,IsPrimaryKey = true ,IsIdentity = true )]
+ public int Id { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="user_id" )]
+ public string UserName { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="user_name" )]
+ public string Nickname { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="pass_word" )]
+ public string PassWord { get; set; }
+
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="user_barcode" )]
+ public string UserBarcode { get; set; }
+
+
+ ///
+ ///
+ ///
+ //[SugarColumn(ColumnName="status" )]
+ //public int? Status { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="machine_role_id" )]
+ public int? RoleId { get; set; }
+
+
+ [Navigate(NavigateType.ManyToOne, nameof(RoleId))]
+ public RoleDm? Role { get; set; }
+ ///
+ ///
+ ///
+ //[SugarColumn(ColumnName="user_card" )]
+ // public string UserCard { get; set; }
+
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="machine_id" )]
+ public string MachineId { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="sign" )]
+ public byte[] Sign { get; set; }
+
+ public override string ToString()
+ {
+ return "userList = [UserName:" + Nickname + ", UserId:" + UserName + "]";
+ }
+ }
+}
diff --git a/DM_Weight/Report/GridReportUtil.cs b/DM_Weight/Report/GridReportUtil.cs
new file mode 100644
index 0000000..4f1ce51
--- /dev/null
+++ b/DM_Weight/Report/GridReportUtil.cs
@@ -0,0 +1,428 @@
+using gregn6Lib;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using DM_Weight.Models;
+using System.Configuration;
+using DM_Weight.util;
+using System.Diagnostics;
+
+namespace DM_Weight.Report
+{
+ public class GridReportUtil
+ {
+
+ // 定义Grid++Report报表主对象
+ public static GridppReport Report = new GridppReport();
+ public static string gridConnectionString = ConfigurationManager.AppSettings["gridConnectionString"];
+ /**
+ * 打印预览
+ * tempname: 模板文件名称
+ * data: 模板数据
+ */
+ public static void PrintReport(string tempname, object data)
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ // 加载模板文件
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + tempname);
+ string s = JsonConvert.SerializeObject(data);
+ // 加载数据
+ Report.LoadDataFromXML(JsonConvert.SerializeObject(data));
+ Report.PrintPreview(true);
+ }
+
+ public static void PrintReportStock()
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ //Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
+ //{
+ // Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ //});
+ string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate,
+ di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,
+ cl.`drug_id` AS drugId FROM channel_stock cl INNER JOIN drug_info di ON di.`drug_id` = cl.`drug_id` WHERE cl.`machine_id` = '{machine_id}' AND cl.`drawer_type` = 1 ORDER BY cl.`drug_id`";
+ // 加载模板文件
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "stock_template.grf");
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+ Report.PrintPreview(true);
+ }
+ public static void PrintReportAccountBook(DateTime? startDate, DateTime? endDate)
+ {
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ // 加载模板文件
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_book_temp.grf");
+ string SQL = string.Empty;
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ //Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
+ //{
+ // Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ // Report.ParameterByName("startDate").Value = startDate ?? Convert.ToDateTime("2010-1-1");
+ // Report.ParameterByName("endDate").Value = endDate ?? DateTime.Now.AddDays(1);
+ //});
+ //Report.DetailGrid.Recordset.QuerySQL = SQL;
+ SQL = $@"SELECT mr.`stock_quantity` AS `stockQuantity`, IF(mr.`type` IN (1, 31), mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` > 0, mr.`quantity`, 0))
+ AS `inQuantity`, IF(mr.`type` = 2, mr.`quantity`, IF(mr.`type` = 4 AND mr.`quantity` < 0, (0 - mr.`quantity`), 0)) AS `outQuantity`,
+ mr.`operation_time` AS `operationTime`, mr.`invoice_id` AS `invoiceId`, di.`drug_name` AS `drugName`, di.`drug_id` AS `drugId`,
+ di.`drug_spec` AS `drugSpec`, di.`pack_unit` AS `packUnit`, di.`dosage` AS `dosage`, di.`manufactory` AS `manufactory`,
+ mr.`manu_no` AS `manuNo`, mr.`eff_date` AS `effDate`, u1.`user_name` AS `operatorName`, u2.`user_name` AS `reviewerName` FROM
+ dm_machine_record mr LEFT JOIN drug_info di ON mr.`drug_id` = di.`drug_id` LEFT JOIN user_list u1 ON mr.`operator` = u1.`id`
+ LEFT JOIN user_list u2 ON mr.`reviewer` = u2.`id` WHERE mr.`machine_id` = '{p_machine_id}' AND mr.`operation_time` > '{p_startDate}'
+ AND mr.`operation_time` < '{p_endDate}' ORDER BY mr.`drug_id`, mr.`operation_time`, mr.`id`";
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+ Report.PrintPreview(true);
+ }
+ public static void PrintReportAccountBook(DateTime? startDate, DateTime? endDate, int type, string drug_id)
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ // 加载模板文件
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_book_temp.grf");
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = $@" SELECT ac.create_date as operationTime, ac.TYPE,
+ if(ac.type in(1,2),0,ac.yesterday_quantity) as YQuantity,if(ac.type in(3,4),0,ac.add_quantity) as inQuantity,if(ac.type in(3,4),0,ac.out_quantity) as outQuantity,
+ if(ac.type in(1,2),0,ac.manu_stock) as ManuStock,ac.total_stock AS stockQuantity, -- if(ac.type in(1,2),0,ac.total_stock) as TotalStock,
+ ac.invoice_no as invoiceId, ac.manu_no as manuNo,ac.eff_date as effDate,di.drug_id,di.drug_name as DrugName,di.drug_spec as DrugSpec,di.manufactory as manufactory,di.pack_unit AS packUnit,di.dosage,u1.user_name as operatorName,u2.user_name as reviewerName
+ FROM account_book_g2 ac left join drug_info di on ac.drug_id=di.drug_id left join user_list u1 on ac.user_id1=u1.id left join user_list u2 on ac.user_id2=u2.id
+ WHERE ac.machine_id='{p_machine_id}' and create_time>'{p_startDate}' AND create_time<'{p_endDate}' ";
+ if (!string.IsNullOrEmpty(drug_id))
+ {
+ SQL += " AND ac.drug_id='" + drug_id + "' ";
+ }
+ if (type > 0)
+ {
+ if (type == 1)
+ {
+ SQL += " WHERE AddQuantity>0 ";
+ }
+ if (type == 2)
+ {
+ SQL += " WHERE OutQuantity>0 ";
+ }
+ if (type == 3)
+ {
+ SQL += " WHERE type=3 ";
+ }
+ if (type == 4)
+ {
+ SQL += " WHERE type=4 ";
+ }
+ }
+ SQL += " ORDER BY di.drug_id,ac.create_date desc";
+
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+ Report.PrintPreview(true);
+ //string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "account_book_temp.pdf";
+ //if (File.Exists(filePath))
+ //{
+ // try
+ // {
+
+ // File.Delete(filePath);
+ // }
+ // catch (Exception ex)
+ // {
+ // FindAndKillProcess();
+
+ // }
+ //}
+ //Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
+ }
+ public static void PrintReportMechineRecord(int type, DateTime? startDate, DateTime? endDate)
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = string.Empty;
+ //Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
+ //{
+ // Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ // Report.ParameterByName("startDate").Value = startDate??DateTime.Now.AddYears(-10);
+ // Report.ParameterByName("endDate").Value = endDate??DateTime.Now.AddDays(1);
+ //});
+ // 加载模板文件
+ if (type == 1)
+ {
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_add.grf");
+ SQL = $@"SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
+ dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
+ di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
+ di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
+ ul.`user_name` AS nickname FROM dm_machine_record dmr LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
+ LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator` WHERE dmr.`type` = 1 AND dmr.`machine_id` = '{p_machine_id}'
+ AND dmr.`operation_time` > '{p_startDate}' AND dmr.`operation_time` < '{p_endDate}'";
+ }
+ else if (type == 2)
+ {
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_take.grf");
+ SQL = $@" SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
+ dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
+ di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
+ di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
+ ul.`user_name` AS nickname FROM dm_machine_record dmr LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
+ LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator` WHERE dmr.`type` = 2
+ AND dmr.`machine_id` ='{p_machine_id}' AND dmr.`operation_time` > '{p_startDate}'
+ AND dmr.`operation_time` < '{p_endDate}'";
+ }
+ else if (type == 3)
+ {
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_return.grf");
+ SQL = $@" SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,
+ CONCAT(dmr.`quantity`,IF(dmr.`type`=32,""(空瓶)"","""")) AS quantity,dmr.`manu_no` AS manuNo,
+ dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,di.`drug_name` AS drugName,
+ di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
+ di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,
+ dmr.`drug_id` AS drugId,ul.`user_name` AS nickname FROM dm_machine_record dmr
+ LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id` LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`
+ WHERE dmr.`type` in (31, 32) AND dmr.`machine_id` = '{p_machine_id}' AND dmr.`operation_time` > '{p_startDate}'
+ AND dmr.`operation_time` < '{p_endDate}'";
+ }
+ else
+ {
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check.grf");
+ SQL = $@" SELECT dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
+ dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
+ di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
+ di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
+ ul.`user_name` AS nickname FROM dm_machine_record dmr LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
+ LEFT JOIN user_list ul ON ul.`id` = dmr.`Operator` WHERE dmr.`type` = 4
+ AND dmr.`machine_id` = '{p_machine_id}' AND dmr.`operation_time` > '{p_startDate}'
+ AND dmr.`operation_time` < '{p_endDate}'";
+ }
+
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+
+ Report.PrintPreview(true);
+ }
+
+
+
+ //交接班记录报表
+ public static void PrintChangeShiftsReport(DateTime? startDate, DateTime? endDate)
+ {
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ // 加载模板文件
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "changeShifts_temp.grf");
+ string SQL = string.Empty;
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(() =>
+ {
+ Report.ParameterByName("machine_id").Value = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ Report.ParameterByName("startDate").Value = startDate ?? Convert.ToDateTime("2010-1-1");
+ Report.ParameterByName("endDate").Value = endDate ?? DateTime.Now.AddDays(1);
+ });
+ SQL = $@"SELECT opt_date,drug_name,drug_spec,beforenum,getnum,usenum,manu_no,surplus,CONCAT(fromoperator,' ',fromreviewer) as fromoperator,
+ CONCAT(tooperator,' ',toreviewer) as tooperator
+ from `hkc_shiftsreport` WHERE `machineid` = '{p_machine_id}' AND `opt_date` > '{p_startDate}'
+ AND opt_date < '{p_endDate}' ORDER BY opt_date";
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+ //Report.PrintPreview(true);
+ string filePath = AppDomain.CurrentDomain.BaseDirectory + "ReportTemp//" + "changeShifts_temp.pdf";
+ if (File.Exists(filePath))
+ {
+ try
+ {
+
+ File.Delete(filePath);
+ }
+ catch (Exception ex)
+ {
+ FindAndKillProcess();
+
+ }
+ }
+ Report.ExportDirect(GRExportType.gretPDF, filePath, false, true);
+
+ }
+ public static bool FindAndKillProcess()
+ {
+ foreach (Process clsProcess in Process.GetProcesses())
+ {
+ if (clsProcess.ProcessName.Contains("wps") || clsProcess.ProcessName.Contains("msedge"))
+ {
+ clsProcess.Kill();
+ //return true;
+ }
+ }
+ //process not found, return false
+ return false;
+ }
+ ///
+ /// 空安瓿回收销毁报表
+ ///
+ ///
+ ///
+ public static void PrintEmptyDestoryReport(DateTime? startDate, DateTime? endDate)
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = string.Empty;
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "ReturnEmptyDistory_template.grf");
+
+ SQL = $@"
+ SELECT di.drug_id, di.drug_name as drugName,di.dosage,di.drug_spec as drugSpec,di.big_unit,oi.Order_Date, CONCAT(oi.p_name,'/',oi.dept_name) as userDeptName,
+ od.Quantity,mr.Manu_No,ul.user_name as retuenUser,u2.user_name as returnReviewer,u3.User_name as distoryUser,u4.User_name as distoryRevierer,(od.Quantity-mr.return_quantity2) as needReturnEmptyCount
+ from order_info oi inner join order_detail od on oi.order_no=od.order_no
+ inner join (SELECT id as mrId,manu_no,invoice_id,id,operator,reviewer, sum(return_quantity2) as return_quantity2 FROM dm_machine_record where type=2 and machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}' GROUP BY invoice_id) mr on oi.order_no=mr.invoice_id
+ INNER JOIN drug_info di on od.drug_id=di.drug_id
+ LEFT JOIN (SELECT manu_no,invoice_id,id,operator,reviewer,get_id from dm_machine_record where type=32 and machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') re on re.get_id=mr.id
+ LEFT JOIN (SELECT recordId,operatorid,reviewerid,machine_id FROM destory_detail WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') ddl on re.id=ddl.recordId
+ -- LEFT JOIN (SELECT User_name,machine_id,id FROM user_list WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') ul0 on mr.operator=ul0.id
+ -- LEFT JOIN (SELECT User_name,machine_id,id FROM user_list WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') ul00 on re.reviewer=ul00.id
+ LEFT JOIN (SELECT User_name,machine_id,id FROM user_list WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') ul on re.operator=ul.id
+ LEFT JOIN (SELECT User_name,machine_id,id FROM user_list WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') u2 on re.reviewer=u2.id
+ LEFT JOIN (SELECT User_name,machine_id,id FROM user_list WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') u3 on ddl.operatorid=u3.id
+ LEFT JOIN (SELECT User_name,machine_id,id FROM user_list WHERE machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') u4 on ddl.reviewerid=u4.id
+ WHERE
+ oi.Pharmacy='{ConfigurationManager.AppSettings["storage"] ?? ""}' and oi.Order_Date>'{startDate}' and oi.Order_Date<'{endDate}' GROUP BY Order_Date";
+
+
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+
+ Report.PrintPreview(true);
+ }
+ ///
+ /// 发药登记表
+ ///
+ ///
+ ///
+ public static void OrderUseReport(DateTime? startDate,DateTime? endDate, string drug_id)
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = string.Empty;
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "orderUse_template.grf");
+
+ SQL = $@"
+ SELECT oi.p_name,oi.age,oi.sex,oi.id_number,oi.patientno,oi.disease,od.drug_id,oi.doctor_name,oi.order_no,oi.order_date,
+ dmr.id,dmr.`drawer_no` AS drawerNo,dmr.`col_no` AS colNo,dmr.`type` AS `type`,dmr.`quantity` AS quantity,
+ dmr.`manu_no` AS manuNo,dmr.`eff_date` AS effDate,dmr.`operation_time` AS operationTime,
+ di.`drug_name` AS drugName,di.`drug_spec` AS drugSpec,di.`pack_unit` AS packUnit,
+ di.`manufactory` AS manuFactory,di.`max_stock` AS baseQuantity,dmr.`drug_id` AS drugId,
+ ul.`user_name` AS nickname,U2.`user_name` AS reviewNickname FROM dm_machine_record dmr
+
+ INNER JOIN ORDER_INFO oi on dmr.invoice_id=oi.order_no
+ INNER JOIN order_detail od on oi.order_no=od.order_no and oi.order_id=od.order_id
+
+ LEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`
+ LEFT JOIN (select id,user_name from user_list where machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') ul ON ul.`id` = dmr.`Operator`
+ LEFT JOIN (select id,user_name from user_list where machine_id='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}') U2 ON U2.ID=dmr.reviewer
+ WHERE dmr.`type` = 2 and oi.Pharmacy='{ConfigurationManager.AppSettings["storage"] ?? ""}'
+ AND dmr.`machine_id` ='{ConfigurationManager.AppSettings["machineId"] ?? "DM3"}' AND oi.`order_date` > '{startDate}'
+ AND oi.`order_date` < '{endDate}'";
+
+ if (!string.IsNullOrEmpty(drug_id))
+ {
+ SQL += " AND ac.drug_id='" + drug_id + "' ";
+ }
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+
+ Report.PrintPreview(true);
+
+ }
+
+ ///
+ /// 使用登记册
+ /// 能按麻醉师名字、时间结合起来查找
+ ///
+ public static void UserAccount(DateTime? startDate,DateTime? endDate,string Name,string box)
+ {
+
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = string.Empty;
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_use_temp.grf");
+
+ SQL = $@"
+ SELECT re.create_time as OptDate, di.drug_name as DrugName,di.Drug_spec as DrugSpec,dt.Set_manu_no as ManuNo,re.patient_name as PName,
+ CONCAT(use_dose,dose_unit) as UDose,CONCAT(residual_dose,dose_unit) as ReDose,if(residual_dose>0,'是','否') as Disposal,
+ re.anaesthetist_name as AName,re.operator_name as OName,re.supervisor_name as CName,of.operator as EmpRecive,'彭蕾' as EmpMedicRecive,re.disposal_time as DisposalTime,SUBSTRING_INDEX(of.win_no, '号', 1) as WinNo,re.card_no as cardNo
+ from surgical_residual re inner join drug_info di on re.drug_id=di.drug_id inner join hkc_order_finish of on re.order_no=of.order_no and of.state=2 left join order_detail_sm dt on re.order_no=dt.order_no
+ where re.create_time > '{startDate}' and re.create_time< '{endDate}'";
+
+
+
+ if (!string.IsNullOrEmpty(Name))
+ {
+ SQL += " AND re.anaesthetist_name='" + Name + "' ";
+ }
+ if(!string.IsNullOrEmpty(box))
+ {
+ SQL+= " AND of.win_no='" + box + "' ";
+ }
+ SQL += " ORDER BY re.create_time";
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+
+ Report.PrintPreview(true);
+ }
+ public static void PrintReportAccountBook(DateTime? startDate, DateTime? endDate, string drug_id)
+ {
+ // 定义Grid++Report报表主对象
+ GridppReport Report = new GridppReport();
+ // 加载模板文件
+ Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "account_book_new.grf");
+ Report.DetailGrid.Recordset.ConnectionString = gridConnectionString;
+ DateTime? p_startDate = startDate ?? Convert.ToDateTime("2010-1-1");
+ DateTime? p_endDate = endDate ?? DateTime.Now.AddDays(1);
+ string p_machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
+ string SQL = $@" select ab.drug_id, ab.type,
+ di.drug_name AS DrugName,di.Drug_spec AS DrugSpec,di.big_unit AS BigUnit,di.small_unit AS SmallUnit,
+ DATE_FORMAT(ab.create_date,'%Y/%m/%d') AS YearMD,ab.manu_no AS ManuNo,DATE_FORMAT(ab.eff_date,'%Y%m%d') AS effDate,IF(ab.type=1,ab.add_quantity,'') AS InQuantity,ab.shoushuJian AS shoushuJian,
+ re.Patient_name AS PName,re.sex AS Sex,re.age AS Age,re.use_dose AS UseDose,re.residual_dose AS ResidualDose,re.create_time AS DiposalTime
+ ,re.operator_name, ab.manu_stock AS Stock,ab.total_stock AS empty,ab.total_stock,UL.User_name AS SendUser,
+ IF(ab.type=1,UL.User_name,UL2.User_name) AS InCheckUser,
+ re.supervisor_name AS CheckUser,ab.manu_stock,ab.total_stock,ab.user_id1,ab.user_id2,ab.out_Quantity
+ ,DB.BASEQUANTITY AS BaseQuantity,re.card_no AS ZYH,oi.dept_name AS KS,re.anaesthetist_name AS YS,
+ IF(ab.`type`=1,'',UL.User_name) AS emptyUser,
+ (SELECT sum(quantity) from channel_stock cs where cs.drug_id=ab.drug_id and cs.manu_no=ab.manu_no and cs.machine_id in('DM3','DM5')) AS CurrentStock
+ from account_book_g2 ab inner join drug_info di on ab.drug_id=di.Drug_ID
+ LEFT JOIN DRUG_BASE DB ON di.DRUG_ID=DB.DRUGID AND DB.MACHINE_ID='DM3'
+ LEFT JOIN order_info_sm oi on ab.invoice_no=oi.order_no
+ LEFT JOIN user_list UL ON ab.user_id1=UL.ID
+ LEFT JOIN user_list UL2 ON ab.user_id2=UL.ID
+ LEFT JOIN surgical_residual re on ab.invoice_no=re.order_no WHERE ab.machine_id='DM3' and ab.type in(1,2) and
+ ab.create_time>'{p_startDate}' AND ab.create_time<'{p_endDate}' ";
+ if (!string.IsNullOrEmpty(drug_id))
+ {
+ SQL += " AND ab.drug_id='" + drug_id + "' ";
+ }
+ SQL += " ORDER BY ab.create_date asc,ab.drug_id,ab.Manu_No,ab.id ";
+
+ Report.DetailGrid.Recordset.QuerySQL = SQL;
+ Report.PrintPreview(true);
+ }
+ }
+}
diff --git a/DM_Weight/ReportTemp/ReturnEmptyDistory_template.grf b/DM_Weight/ReportTemp/ReturnEmptyDistory_template.grf
new file mode 100644
index 0000000..9b5ac42
--- /dev/null
+++ b/DM_Weight/ReportTemp/ReturnEmptyDistory_template.grf
@@ -0,0 +1,432 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape"
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "PrintAdaptMethod":"ResizeToFit",
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n cl.`row_no` AS drawerNo,\r\n cl.`col_no` AS colNo,\r\n cl.`quantity` AS quantity,\r\n cl.`manu_no` AS manuNo,\r\n cl.`eff_date` AS effDate,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n cl.`drug_id` AS drugId\r\nFROM\r\n channel_stock cl\r\nINNER JOIN drug_info di ON di.`drug_id` = cl.`drug_id`\r\nWHERE cl.`machine_id` = :machine_id\r\n AND cl.`drawer_type` = 1\r\n ORDER BY cl.`drug_id`",
+ "Field":[
+ {
+ "Name":"Order_Date"
+ },
+ {
+ "Name":"userDeptName",
+ "Format":"0"
+ },
+ {
+ "Name":"drugName"
+ },
+ {
+ "Name":"Quantity",
+ "Type":"Integer"
+ },
+ {
+ "Name":"Manu_No"
+ },
+ {
+ "Name":"retuenUser"
+ },
+ {
+ "Name":"returnReviewer",
+ "Type":"Integer"
+ },
+ {
+ "Name":"distoryUser"
+ },
+ {
+ "Name":"distoryRevierer"
+ },
+ {
+ "Name":"drugSpec"
+ },
+ {
+ "Name":"dosage"
+ },
+ {
+ "Name":"big_unit"
+ },
+ {
+ "Name":"drug_id"
+ },
+ {
+ "Name":"needReturnEmptyCount"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"日期",
+ "Width":3.175
+ },
+ {
+ "Name":"科室/患者",
+ "Width":5.3975
+ },
+ {
+ "Name":"Dept_Name",
+ "Width":1.61396
+ },
+ {
+ "Name":"批号",
+ "Width":2.98979
+ },
+ {
+ "Name":"空安瓿回收人",
+ "Width":2.98979
+ },
+ {
+ "Name":"空安瓿交回人",
+ "Width":2.99
+ },
+ {
+ "Name":"数量",
+ "Width":2
+ },
+ {
+ "Name":"空安瓿销毁执行人",
+ "Width":2.98979
+ },
+ {
+ "Name":"空安瓿销毁审核人",
+ "Width":2.99
+ }
+ ],
+ "ColumnContent":{
+ "Height":0.79375,
+ "ColumnContentCell":[
+ {
+ "Column":"日期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"Order_Date"
+ },
+ {
+ "Column":"科室/患者",
+ "TextAlign":"MiddleCenter",
+ "DataField":"userDeptName"
+ },
+ {
+ "Column":"Dept_Name",
+ "TextAlign":"MiddleCenter",
+ "DataField":"Quantity"
+ },
+ {
+ "Column":"批号",
+ "DataField":"Manu_No"
+ },
+ {
+ "Column":"空安瓿回收人",
+ "DataField":"retuenUser"
+ },
+ {
+ "Column":"空安瓿交回人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"returnReviewer"
+ },
+ {
+ "Column":"数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"distoryUser"
+ },
+ {
+ "Column":"空安瓿销毁执行人",
+ "DataField":"distoryRevierer"
+ },
+ {
+ "Column":"空安瓿销毁审核人",
+ "DataField":"needReturnEmptyCount"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.7,
+ "RepeatStyle":"OnGroupHeaderPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"日期",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"科室/患者",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"科室/患者"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Dept_Name",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批号",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿回收人",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n回收人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿交回人",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n交回人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n销毁\r\n执行人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿销毁执行人",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n销毁\r\n审核人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿销毁审核人",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"待回收\r\n空安瓿\r\n数量"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "ByFields":"drug_id",
+ "GroupHeader":{
+ "PrintGridBorder":false,
+ "RepeatOnPage":true,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox16",
+ "Top":0.0529167,
+ "Width":1.19063,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"品名:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox7",
+ "Left":1.16417,
+ "Top":0.0529167,
+ "Width":5.63563,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"drugName"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox17",
+ "Left":6.93208,
+ "Top":0.0529167,
+ "Width":1.11125,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"剂型:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox8",
+ "Left":8.01688,
+ "Top":0.0529167,
+ "Width":3.175,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"dosage"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox18",
+ "Left":11.5888,
+ "Top":0.0529167,
+ "Width":1.21708,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"规格:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox10",
+ "Left":16.5365,
+ "Top":0.0529167,
+ "Width":2.83104,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"drugSpec"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox20",
+ "Left":19.7379,
+ "Top":0.0529167,
+ "Width":2.01083,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"单位:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox11",
+ "Left":21.7223,
+ "Top":0.05,
+ "Width":5.92667,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"big_unit"
+ }
+ ],
+ "NewPageColumn":"Before"
+ },
+ "GroupFooter":{
+ "Height":0.635
+ }
+ }
+ ]
+ },
+ "Parameter":[
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":2.40771,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox1",
+ "Center":"Horizontal",
+ "Left":8.99583,
+ "Top":0.608542,
+ "Width":9.18104,
+ "Height":1.21708,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"回收销毁记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/account_book_new.grf b/DM_Weight/ReportTemp/account_book_new.grf
new file mode 100644
index 0000000..2723e51
--- /dev/null
+++ b/DM_Weight/ReportTemp/account_book_new.grf
@@ -0,0 +1,712 @@
+{
+ "Version":"6.8.1.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape",
+ "TopMargin":0.3175,
+ "RightMargin":1,
+ "BottomMargin":0.3969
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n dmr.`drawer_no` AS drawerNo,\r\n dmr.`col_no` AS colNo,\r\n dmr.`type` AS `type`,\r\n CONCAT(dmr.`quantity`,IF(dmr.`type`=32,\"(空瓶)\",\"\")) AS quantity,\r\n dmr.`manu_no` AS manuNo,\r\n dmr.`eff_date` AS effDate,\r\n dmr.`operation_time` AS operationTime,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n dmr.`drug_id` AS drugId,\r\n ul.`user_name` AS nickname\r\nFROM\r\n dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` in (31, 32)\r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
+ "Field":[
+ {
+ "Name":"药品名称",
+ "DBFieldName":"DrugName"
+ },
+ {
+ "Name":"日期",
+ "DBFieldName":"YearMD"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"ManuNo"
+ },
+ {
+ "Name":"效期",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"effDate"
+ },
+ {
+ "Name":"领入",
+ "DBFieldName":"InQuantity"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"DrugSpec"
+ },
+ {
+ "Name":"大单位",
+ "DBFieldName":"BigUnit"
+ },
+ {
+ "Name":"小单位",
+ "DBFieldName":"SmallUnit"
+ },
+ {
+ "Name":"基数",
+ "DBFieldName":"BaseQuantity"
+ },
+ {
+ "Name":"手术间",
+ "DBFieldName":"shoushuJian"
+ },
+ {
+ "Name":"患者姓名",
+ "DBFieldName":"PName"
+ },
+ {
+ "Name":"性别",
+ "DBFieldName":"Sex"
+ },
+ {
+ "Name":"年龄",
+ "DBFieldName":"Age"
+ },
+ {
+ "Name":"住院号",
+ "DBFieldName":"ZYH"
+ },
+ {
+ "Name":"科室",
+ "DBFieldName":"KS"
+ },
+ {
+ "Name":"使用剂量",
+ "DBFieldName":"UseDose"
+ },
+ {
+ "Name":"剩余剂量",
+ "DBFieldName":"ResidualDose"
+ },
+ {
+ "Name":"余液处理时间",
+ "DBFieldName":"DiposalTime"
+ },
+ {
+ "Name":"医师",
+ "DBFieldName":"YS"
+ },
+ {
+ "Name":"复核人",
+ "DBFieldName":"CheckUser"
+ },
+ {
+ "Name":"实物",
+ "DBFieldName":"Stock"
+ },
+ {
+ "Name":"空瓶",
+ "DBFieldName":"empty"
+ },
+ {
+ "Name":"发药人",
+ "DBFieldName":"SendUser"
+ },
+ {
+ "Name":"领药人",
+ "DBFieldName":"InUser"
+ },
+ {
+ "Name":"领药复核人",
+ "DBFieldName":"InCheckUser"
+ },
+ {
+ "Name":"空瓶回收人",
+ "DBFieldName":"emptyUser"
+ },
+ {
+ "Name":"批次库存",
+ "DBFieldName":"CurrentStock"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"日期",
+ "Width":2.77813
+ },
+ {
+ "Name":"批次",
+ "Width":2.19604
+ },
+ {
+ "Name":"有效期",
+ "Width":2.77813
+ },
+ {
+ "Name":"领入",
+ "Width":0.820208
+ },
+ {
+ "Name":"手术间",
+ "Width":0.79375
+ },
+ {
+ "Name":"患者姓名",
+ "Width":1.61396
+ },
+ {
+ "Name":"性别",
+ "Width":1.00542
+ },
+ {
+ "Name":"年龄",
+ "Width":0.79375
+ },
+ {
+ "Name":"住院号",
+ "Width":1.5875
+ },
+ {
+ "Name":"科室",
+ "Width":2.2225
+ },
+ {
+ "Name":"使用剂量",
+ "Width":1.82563
+ },
+ {
+ "Name":"剩余剂量",
+ "Width":1.5875
+ },
+ {
+ "Name":"余液处理时间",
+ "Width":2.59292
+ },
+ {
+ "Name":"医师",
+ "Width":1.5875
+ },
+ {
+ "Name":"复核人",
+ "Width":1.79917
+ },
+ {
+ "Name":"空瓶回收人",
+ "Width":1.5875
+ },
+ {
+ "Name":"Column7",
+ "Width":1.61396
+ },
+ {
+ "Name":"实物",
+ "Width":1.40229
+ },
+ {
+ "Name":"空瓶",
+ "Width":1.19063
+ },
+ {
+ "Name":"发药人",
+ "Width":1.79917
+ },
+ {
+ "Name":"Column2",
+ "Width":1.79917
+ },
+ {
+ "Name":"Column8",
+ "Width":1.79917
+ }
+ ],
+ "ColumnContent":{
+ "Height":2.01083,
+ "ColumnContentCell":[
+ {
+ "Column":"日期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"日期"
+ },
+ {
+ "Column":"批次",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批号"
+ },
+ {
+ "Column":"有效期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"效期"
+ },
+ {
+ "Column":"领入",
+ "TextAlign":"MiddleCenter",
+ "DataField":"领入"
+ },
+ {
+ "Column":"手术间",
+ "TextAlign":"MiddleCenter",
+ "DataField":"手术间"
+ },
+ {
+ "Column":"患者姓名",
+ "TextAlign":"MiddleCenter",
+ "DataField":"患者姓名"
+ },
+ {
+ "Column":"性别",
+ "TextAlign":"MiddleCenter",
+ "DataField":"性别"
+ },
+ {
+ "Column":"年龄",
+ "DataField":"年龄"
+ },
+ {
+ "Column":"住院号",
+ "DataField":"住院号"
+ },
+ {
+ "Column":"科室",
+ "DataField":"科室"
+ },
+ {
+ "Column":"使用剂量",
+ "DataField":"使用剂量"
+ },
+ {
+ "Column":"剩余剂量",
+ "DataField":"剩余剂量"
+ },
+ {
+ "Column":"余液处理时间",
+ "DataField":"余液处理时间"
+ },
+ {
+ "Column":"医师",
+ "DataField":"医师"
+ },
+ {
+ "Column":"复核人",
+ "DataField":"复核人"
+ },
+ {
+ "Column":"空瓶回收人",
+ "DataField":"空瓶回收人"
+ },
+ {
+ "Column":"Column7"
+ },
+ {
+ "Column":"实物",
+ "DataField":"实物"
+ },
+ {
+ "Column":"空瓶",
+ "DataField":"空瓶"
+ },
+ {
+ "Column":"发药人",
+ "DataField":"发药人"
+ },
+ {
+ "Column":"Column2",
+ "DataField":"领药复核人"
+ },
+ {
+ "Column":"Column8",
+ "DataField":"批次库存"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":2.59292,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"日期",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批次",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"有效期",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"有效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"领入",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"领\r\n入"
+ },
+ {
+ "GroupTitle":true,
+ "Name":"Column1",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"手术间",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"手\r\n术\r\n间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"患者姓名",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"患者\r\n姓名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"性别",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"性\r\n别"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"年龄",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"年\r\n龄"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"住院号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"住院号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"科室",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"科室"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"使用剂量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"使用\r\n剂量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"剩余剂量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"剩余\r\n剂量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"余液处理时间",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"余液\r\n处理\r\n时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"医师",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"医师"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"复核人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"复核人"
+ }
+ ],
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"使用"
+ },
+ {
+ "GroupTitle":true,
+ "Name":"Column6",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"空瓶回收人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"回收人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column7",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药房\r\n回收人"
+ }
+ ],
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空瓶回收"
+ },
+ {
+ "GroupTitle":true,
+ "Name":"Column3",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"实物",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"实物"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空瓶",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空瓶"
+ }
+ ],
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"结存数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"发药人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"发药人"
+ },
+ {
+ "GroupTitle":true,
+ "Name":"Column5",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"Column2",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"复核人"
+ }
+ ],
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"领药人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column8",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批次\r\n库存"
+ }
+ ]
+ }
+ },
+ "PageHeader":{
+ "Height":0
+ },
+ "Parameter":[
+ {
+ "Name":"startDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/1/1"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/4/28 23:59:59"
+ },
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.5875,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "Dock":"Fill",
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"湘谭县人民医院麻醉药品、精神药品专用账册、使用登记册(手术室)"
+ }
+ ],
+ "RepeatOnPage":true
+ },
+ {
+ "Name":"ReportHeader2",
+ "Height":1.00542,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox3",
+ "Dock":"Fill",
+ "Border":{
+ "Styles":"[DrawLeft|DrawTop|DrawRight]"
+ },
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"药品名称:[#药品名称#] 规格:[#规格#] 单位:[#大单位#] 基数:[#基数#]"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/account_book_temp.grf b/DM_Weight/ReportTemp/account_book_temp.grf
new file mode 100644
index 0000000..f09a20c
--- /dev/null
+++ b/DM_Weight/ReportTemp/account_book_temp.grf
@@ -0,0 +1,618 @@
+{
+ "Version":"6.8.1.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape",
+ "LeftMargin":1,
+ "TopMargin":1.42875,
+ "RightMargin":1,
+ "BottomMargin":1.8
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"日期",
+ "Type":"DateTime",
+ "Format":"M/d",
+ "DBFieldName":"operationTime"
+ },
+ {
+ "Name":"操作类型",
+ "DBFieldName":"type"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"manuNo"
+ },
+ {
+ "Name":"上次批次结存",
+ "Type":"Integer",
+ "DBFieldName":"beforeManuQuan"
+ },
+ {
+ "Name":"入库数量",
+ "Type":"Integer",
+ "DBFieldName":"inQuantity"
+ },
+ {
+ "Name":"出库数量",
+ "Type":"Integer",
+ "DBFieldName":"outQuantity"
+ },
+ {
+ "Name":"批号结存",
+ "Type":"Integer",
+ "DBFieldName":"manuQuantity"
+ },
+ {
+ "Name":"总结存",
+ "Type":"Integer",
+ "DBFieldName":"stockQuantity"
+ },
+ {
+ "Name":"收/发药人",
+ "DBFieldName":"operatorName"
+ },
+ {
+ "Name":"复核人",
+ "DBFieldName":"reviewerName"
+ },
+ {
+ "Name":"药品名称",
+ "DBFieldName":"drugName"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"drugSpec"
+ },
+ {
+ "Name":"单位",
+ "DBFieldName":"bigUnit"
+ },
+ {
+ "Name":"剂型",
+ "DBFieldName":"dosage"
+ },
+ {
+ "Name":"厂家",
+ "DBFieldName":"manuFactory"
+ },
+ {
+ "Name":"有效期",
+ "Type":"DateTime",
+ "Format":"yy/M/d",
+ "DBFieldName":"effDate"
+ },
+ {
+ "Name":"sign1",
+ "Type":"Binary"
+ },
+ {
+ "Name":"sign2",
+ "Type":"Binary"
+ },
+ {
+ "Name":"drugId",
+ "DBFieldName":"drug_Id"
+ },
+ {
+ "Name":"凭证号",
+ "DBFieldName":"invoiceId"
+ },
+ {
+ "Name":"供应单位",
+ "DBFieldName":"supplierDept"
+ },
+ {
+ "Name":"领用部门",
+ "DBFieldName":"receiveDept"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"日期",
+ "Width":1.77271
+ },
+ {
+ "Name":"凭证号",
+ "Width":2.19604
+ },
+ {
+ "Name":"批号",
+ "Width":3.99521
+ },
+ {
+ "Name":"有效期",
+ "Width":2.43417
+ },
+ {
+ "Name":"入库数量",
+ "Width":1.79917
+ },
+ {
+ "Name":"出库数量",
+ "Width":1.79917
+ },
+ {
+ "Name":"Column4",
+ "Width":1.98438
+ },
+ {
+ "Name":"收/发药人",
+ "Width":2.80458
+ },
+ {
+ "Name":"复核人",
+ "Width":2.80458
+ },
+ {
+ "Name":"Column2",
+ "Width":2.35479
+ },
+ {
+ "Name":"Column3",
+ "Width":2.38125
+ }
+ ],
+ "ColumnContent":{
+ "Height":0.85,
+ "ColumnContentCell":[
+ {
+ "Column":"日期",
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"日期"
+ },
+ {
+ "Column":"凭证号",
+ "DataField":"凭证号"
+ },
+ {
+ "Column":"批号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批号"
+ },
+ {
+ "Column":"有效期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"有效期"
+ },
+ {
+ "Column":"入库数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"入库数量"
+ },
+ {
+ "Column":"出库数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"出库数量"
+ },
+ {
+ "Column":"Column4",
+ "TextAlign":"MiddleCenter",
+ "DataField":"总结存"
+ },
+ {
+ "Column":"收/发药人",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox12",
+ "Dock":"Fill",
+ "TextAlign":"MiddleCenter",
+ "DataField":"收/发药人"
+ }
+ ]
+ },
+ {
+ "Column":"复核人",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox13",
+ "Dock":"Fill",
+ "TextAlign":"MiddleCenter",
+ "DataField":"复核人"
+ }
+ ]
+ },
+ {
+ "Column":"Column2",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox14",
+ "Dock":"Fill",
+ "TextAlign":"MiddleCenter",
+ "DataField":"供应单位"
+ }
+ ]
+ },
+ {
+ "Column":"Column3",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox15",
+ "Dock":"Fill",
+ "TextAlign":"MiddleCenter",
+ "DataField":"领用部门"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.19063,
+ "RepeatStyle":"OnGroupHeaderPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"日期",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"凭证号",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"凭证号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批号",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"有效期",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"有效\r\n期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"入库数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"借入\r\n数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"出库数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"发出\r\n数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column4",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"总结存"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"收/发药人",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"发药人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"复核人",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"复核人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column2",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"供应单位"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column3",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"领用部门"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "ByFields":"drugId",
+ "GroupHeader":{
+ "NewPage":"Before",
+ "PrintGridBorder":false,
+ "RepeatOnPage":true,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox15",
+ "Left":28.3898,
+ "Top":0.238125,
+ "Width":2.01083,
+ "Height":0.79375,
+ "Text":"生产厂家:"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox11",
+ "Left":30.3742,
+ "Top":0.211667,
+ "Width":5.3975,
+ "Height":0.79375,
+ "Text":"[#manuFactory#]"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox16",
+ "Top":0.0529167,
+ "Width":1.19063,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"品名:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox7",
+ "Left":1.16417,
+ "Top":0.0529167,
+ "Width":5.63563,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"药品名称"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox17",
+ "Left":6.93208,
+ "Top":0.0529167,
+ "Width":1.11125,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"规格:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox8",
+ "Left":8.01688,
+ "Top":0.0529167,
+ "Width":3.175,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"规格"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox18",
+ "Left":11.5888,
+ "Top":0.0529167,
+ "Width":1.21708,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"单位:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox9",
+ "Left":12.7794,
+ "Top":0.0529167,
+ "Width":1.87854,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"单位"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox19",
+ "Left":15.3988,
+ "Top":0.0529167,
+ "Width":1.16417,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"剂型:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox10",
+ "Left":16.5365,
+ "Top":0.0529167,
+ "Width":2.83104,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"剂型"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox20",
+ "Left":19.7379,
+ "Top":0.0529167,
+ "Width":2.01083,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"生产厂家:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox11",
+ "Left":21.7223,
+ "Top":0.05,
+ "Width":5.92667,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"厂家"
+ }
+ ],
+ "NewPageColumn":"Before"
+ },
+ "GroupFooter":{
+ "Visible":false
+ }
+ }
+ ]
+ },
+ "Parameter":[
+ {
+ "Name":"machine_id"
+ },
+ {
+ "Name":"startDate",
+ "DataType":"DateTime"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "Font":{
+ "Name":"宋体",
+ "Size":262500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"麻醉、精神药品逐笔专用账册"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/account_use_temp.grf b/DM_Weight/ReportTemp/account_use_temp.grf
new file mode 100644
index 0000000..2206626
--- /dev/null
+++ b/DM_Weight/ReportTemp/account_use_temp.grf
@@ -0,0 +1,506 @@
+{
+ "Version":"6.8.1.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape",
+ "LeftMargin":1,
+ "TopMargin":1.42875,
+ "RightMargin":1,
+ "BottomMargin":1.8
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"日期",
+ "Type":"DateTime",
+ "Format":"M/d",
+ "DBFieldName":"OptDate"
+ },
+ {
+ "Name":"品名",
+ "DBFieldName":"DrugName"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"DrugSpec"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"ManuNo"
+ },
+ {
+ "Name":"床号",
+ "DBFieldName":"BedNum"
+ },
+ {
+ "Name":"病人姓名",
+ "DBFieldName":"PName"
+ },
+ {
+ "Name":"使用剂量",
+ "DBFieldName":"UDose"
+ },
+ {
+ "Name":"剩余剂量",
+ "DBFieldName":"ReDose"
+ },
+ {
+ "Name":"处理",
+ "DBFieldName":"Disposal"
+ },
+ {
+ "Name":"医师",
+ "DBFieldName":"AName"
+ },
+ {
+ "Name":"执行者",
+ "DBFieldName":"OName"
+ },
+ {
+ "Name":"核对者",
+ "DBFieldName":"CName"
+ },
+ {
+ "Name":"空安瓿批号",
+ "DBFieldName":"ManuNo"
+ },
+ {
+ "Name":"空安瓿回收者",
+ "DBFieldName":"EmpRecive"
+ },
+ {
+ "Name":"空安瓿药房接收者",
+ "DBFieldName":"EmpMedicRecive"
+ },
+ {
+ "Name":"手术间",
+ "DBFieldName":"WinNo"
+ },
+ {
+ "Name":"余液处置时间",
+ "DBFieldName":"DisposalTime"
+ },
+ {
+ "Name":"住院号",
+ "DBFieldName":"cardNo"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"日期",
+ "Width":1.77271
+ },
+ {
+ "Name":"品名",
+ "Width":3.41313
+ },
+ {
+ "Name":"规格",
+ "Width":2.35479
+ },
+ {
+ "Name":"批号",
+ "Width":2.83104
+ },
+ {
+ "Name":"手术间",
+ "Width":1.00542
+ },
+ {
+ "Name":"住院号",
+ "Width":2.35479
+ },
+ {
+ "Name":"病人姓名",
+ "Width":1.79917
+ },
+ {
+ "Name":"使用剂量",
+ "Width":1.79917
+ },
+ {
+ "Name":"剩余剂量",
+ "Width":1.98438
+ },
+ {
+ "Name":"余液处置时间",
+ "Width":3.22792
+ },
+ {
+ "Name":"处理",
+ "Width":2.35479
+ },
+ {
+ "Name":"医师",
+ "Width":1.79917
+ },
+ {
+ "Name":"执行者",
+ "Width":1.61396
+ },
+ {
+ "Name":"核对者",
+ "Width":1.5875
+ },
+ {
+ "Name":"空安瓿批号",
+ "Width":2.8575
+ },
+ {
+ "Name":"空安瓿回收者",
+ "Width":2.19604
+ },
+ {
+ "Name":"空安瓿药房接收者",
+ "Width":1.61396,
+ "Visible":false
+ }
+ ],
+ "ColumnContent":{
+ "Height":0.85,
+ "ColumnContentCell":[
+ {
+ "Column":"日期",
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "ShrinkFontToFit":true,
+ "DataField":"日期"
+ },
+ {
+ "Column":"品名",
+ "TextAlign":"MiddleCenter",
+ "DataField":"品名"
+ },
+ {
+ "Column":"规格",
+ "TextAlign":"MiddleCenter",
+ "DataField":"规格"
+ },
+ {
+ "Column":"批号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批号"
+ },
+ {
+ "Column":"手术间",
+ "TextAlign":"MiddleCenter",
+ "DataField":"手术间"
+ },
+ {
+ "Column":"住院号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"住院号"
+ },
+ {
+ "Column":"病人姓名",
+ "TextAlign":"MiddleCenter",
+ "DataField":"病人姓名"
+ },
+ {
+ "Column":"使用剂量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"使用剂量"
+ },
+ {
+ "Column":"剩余剂量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"剩余剂量"
+ },
+ {
+ "Column":"余液处置时间",
+ "DataField":"余液处置时间"
+ },
+ {
+ "Column":"处理",
+ "TextAlign":"MiddleCenter",
+ "DataField":"处理"
+ },
+ {
+ "Column":"医师",
+ "TextAlign":"MiddleCenter",
+ "DataField":"医师"
+ },
+ {
+ "Column":"执行者",
+ "TextAlign":"MiddleCenter",
+ "DataField":"执行者"
+ },
+ {
+ "Column":"核对者",
+ "TextAlign":"MiddleCenter",
+ "DataField":"核对者"
+ },
+ {
+ "Column":"空安瓿批号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批号"
+ },
+ {
+ "Column":"空安瓿回收者",
+ "TextAlign":"MiddleCenter",
+ "DataField":"空安瓿回收者"
+ },
+ {
+ "Column":"空安瓿药房接收者",
+ "TextAlign":"MiddleCenter",
+ "DataField":"空安瓿药房接收者"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":2.98979,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"日期",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"品名",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"品名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"规格",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"规格"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批号",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"手术间",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"手\r\n术\r\n间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"住院号",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"住院号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"病人姓名",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"病人\r\n姓名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"使用剂量",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"使用\r\n剂量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"剩余剂量",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"剩余\r\n剂量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"余液处置时间",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"余液处置\r\n时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"处理",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"剩余剂量\r\n是否双人\r\n在监控下\r\n用棉球或\r\n敷料作介质\r\n稀释后\r\n作医疗\r\n废物处理"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"医师",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"医师"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"执行者",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"执行者"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"核对者",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"核对者"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿批号",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿回收者",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n回收者"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"空安瓿药房接收者",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"空安瓿\r\n药房\r\n接收者"
+ }
+ ]
+ }
+ },
+ "Parameter":[
+ {
+ "Name":"machine_id"
+ },
+ {
+ "Name":"startDate",
+ "DataType":"DateTime"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "Font":{
+ "Name":"宋体",
+ "Size":262500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"麻醉药品、精神药品使用登记册"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/changeShifts_temp.grf b/DM_Weight/ReportTemp/changeShifts_temp.grf
new file mode 100644
index 0000000..5c55723
--- /dev/null
+++ b/DM_Weight/ReportTemp/changeShifts_temp.grf
@@ -0,0 +1,345 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape",
+ "LeftMargin":1,
+ "TopMargin":1.4287,
+ "RightMargin":1,
+ "BottomMargin":1.8
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "Recordset":{
+ "Field":[
+ {
+ "Name":"日期",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"opt_date"
+ },
+ {
+ "Name":"品名",
+ "DBFieldName":"drug_name"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"drug_spec"
+ },
+ {
+ "Name":"上班结存数",
+ "Type":"Integer",
+ "DBFieldName":"beforenum"
+ },
+ {
+ "Name":"领用数",
+ "Type":"Integer",
+ "DBFieldName":"getnum"
+ },
+ {
+ "Name":"消耗数",
+ "Type":"Integer",
+ "DBFieldName":"usenum"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"manu_no"
+ },
+ {
+ "Name":"余",
+ "Type":"Integer",
+ "DBFieldName":"surplus"
+ },
+ {
+ "Name":"交班人",
+ "DBFieldName":"fromoperator"
+ },
+ {
+ "Name":"接班人",
+ "DBFieldName":"tooperator"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"日期",
+ "Width":2.56646
+ },
+ {
+ "Name":"品名",
+ "Width":4.60375
+ },
+ {
+ "Name":"规格",
+ "Width":2.59292
+ },
+ {
+ "Name":"上班结存数",
+ "Width":1.4
+ },
+ {
+ "Name":"领用数",
+ "Width":1.4
+ },
+ {
+ "Name":"消耗数",
+ "Width":1.4
+ },
+ {
+ "Name":"批号",
+ "Width":1.98438
+ },
+ {
+ "Name":"余",
+ "Width":0.608542
+ },
+ {
+ "Name":"交班人",
+ "Width":2.80458
+ },
+ {
+ "Name":"接班人",
+ "Width":2.35479
+ }
+ ],
+ "ColumnContent":{
+ "Height":0.85,
+ "ColumnContentCell":[
+ {
+ "Column":"日期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"日期"
+ },
+ {
+ "Column":"品名",
+ "DataField":"品名"
+ },
+ {
+ "Column":"规格",
+ "TextAlign":"MiddleCenter",
+ "DataField":"规格"
+ },
+ {
+ "Column":"上班结存数",
+ "TextAlign":"MiddleCenter",
+ "DataField":"上班结存数"
+ },
+ {
+ "Column":"领用数",
+ "TextAlign":"MiddleCenter",
+ "DataField":"领用数"
+ },
+ {
+ "Column":"消耗数",
+ "TextAlign":"MiddleCenter",
+ "DataField":"消耗数"
+ },
+ {
+ "Column":"批号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批号"
+ },
+ {
+ "Column":"余",
+ "TextAlign":"MiddleCenter",
+ "DataField":"余"
+ },
+ {
+ "Column":"交班人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"交班人"
+ },
+ {
+ "Column":"接班人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"接班人"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.00542,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"日期",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"品名",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"品名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"规格",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"规格"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"上班结存数",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "Text":"上班\r\n结存数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"领用数",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "Text":"领用数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"消耗数",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "WordWrap":true,
+ "TextAlign":"MiddleCenter",
+ "Text":"消耗数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批号",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"余",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"余"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"交班人",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"交班人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"接班人",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"接班人"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "ByFields":"日期",
+ "GroupHeader":{
+ "Height":0,
+ "PrintGridBorder":false,
+ "NewPageColumn":"Before"
+ },
+ "GroupFooter":{
+ "Visible":false,
+ "PrintGridBorder":false
+ }
+ }
+ ]
+ },
+ "Parameter":[
+ {
+ "Name":"machine_id"
+ },
+ {
+ "Name":"startDate",
+ "DataType":"DateTime"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "Font":{
+ "Name":"宋体",
+ "Size":262500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"交接班记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/machine_log_add.grf b/DM_Weight/ReportTemp/machine_log_add.grf
new file mode 100644
index 0000000..bf9031e
--- /dev/null
+++ b/DM_Weight/ReportTemp/machine_log_add.grf
@@ -0,0 +1,283 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "LeftMargin":0.3175,
+ "TopMargin":0.899583,
+ "RightMargin":0.396875
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n dmr.`drawer_no` AS drawerNo,\r\n dmr.`col_no` AS colNo,\r\n dmr.`type` AS `type`,\r\n dmr.`quantity` AS quantity,\r\n dmr.`manu_no` AS manuNo,\r\n dmr.`eff_date` AS effDate,\r\n dmr.`operation_time` AS operationTime,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n dmr.`drug_id` AS drugId,\r\n ul.`user_name` AS nickname\r\nFROM\r\n dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 1 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
+ "Field":[
+ {
+ "Name":"操作人",
+ "DBFieldName":"Nickname"
+ },
+ {
+ "Name":"时间",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd HH:mm:ss",
+ "DBFieldName":"operationTime"
+ },
+ {
+ "Name":"药品名称",
+ "DBFieldName":"DrugName"
+ },
+ {
+ "Name":"数量",
+ "DBFieldName":"quantity"
+ },
+ {
+ "Name":"批次",
+ "DBFieldName":"manuNo"
+ },
+ {
+ "Name":"效期",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"effDate"
+ },
+ {
+ "Name":"库位",
+ "DBFieldName":"drawerNo"
+ },
+ {
+ "Name":"colNo"
+ },
+ {
+ "Name":"type2",
+ "Type":"Integer",
+ "DBFieldName":"type"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"操作人",
+ "Width":2.38125
+ },
+ {
+ "Name":"时间",
+ "Width":3.78354
+ },
+ {
+ "Name":"药品名称",
+ "Width":4.63021
+ },
+ {
+ "Name":"数量",
+ "Width":1.98438
+ },
+ {
+ "Name":"批次",
+ "Width":2.61938
+ },
+ {
+ "Name":"效期",
+ "Width":2.38125
+ },
+ {
+ "Name":"库位",
+ "Width":2.59292
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.00542,
+ "ColumnContentCell":[
+ {
+ "Column":"操作人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"操作人"
+ },
+ {
+ "Column":"时间",
+ "TextAlign":"MiddleCenter",
+ "DataField":"时间"
+ },
+ {
+ "Column":"药品名称",
+ "TextAlign":"MiddleCenter",
+ "DataField":"药品名称"
+ },
+ {
+ "Column":"数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"数量"
+ },
+ {
+ "Column":"批次",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批次"
+ },
+ {
+ "Column":"效期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"效期"
+ },
+ {
+ "Column":"库位",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox1",
+ "Left":9.60438,
+ "Top":-2.16958,
+ "Width":2.80458,
+ "Height":0.661458
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "TextAlign":"MiddleCenter",
+ "Text":"[#库位#] - [#colNo#]"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.40229,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"操作人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"操作人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"时间",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"药品名称",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药品名称"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批次",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批次"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"效期",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"库位",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"库位"
+ }
+ ]
+ }
+ },
+ "Parameter":[
+ {
+ "Name":"startDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/1/1"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/4/28 23:59:59"
+ },
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "Left":7.59354,
+ "Top":0.211667,
+ "Width":5.60917,
+ "Height":1.19063,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"入库记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/machine_log_check.grf b/DM_Weight/ReportTemp/machine_log_check.grf
new file mode 100644
index 0000000..09cc4ae
--- /dev/null
+++ b/DM_Weight/ReportTemp/machine_log_check.grf
@@ -0,0 +1,283 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "LeftMargin":0.3175,
+ "TopMargin":0.899583,
+ "RightMargin":0.396875
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n dmr.`drawer_no` AS drawerNo,\r\n dmr.`col_no` AS colNo,\r\n dmr.`type` AS `type`,\r\n dmr.`quantity` AS quantity,\r\n dmr.`manu_no` AS manuNo,\r\n dmr.`eff_date` AS effDate,\r\n dmr.`operation_time` AS operationTime,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n dmr.`drug_id` AS drugId,\r\n ul.`user_name` AS nickname\r\nFROM\r\n dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 4 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
+ "Field":[
+ {
+ "Name":"操作人",
+ "DBFieldName":"Nickname"
+ },
+ {
+ "Name":"时间",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd HH:mm:ss",
+ "DBFieldName":"operationTime"
+ },
+ {
+ "Name":"药品名称",
+ "DBFieldName":"DrugName"
+ },
+ {
+ "Name":"数量",
+ "DBFieldName":"quantity"
+ },
+ {
+ "Name":"批次",
+ "DBFieldName":"manuNo"
+ },
+ {
+ "Name":"效期",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"effDate"
+ },
+ {
+ "Name":"库位",
+ "DBFieldName":"drawerNo"
+ },
+ {
+ "Name":"colNo"
+ },
+ {
+ "Name":"type2",
+ "Type":"Integer",
+ "DBFieldName":"type"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"操作人",
+ "Width":2.38125
+ },
+ {
+ "Name":"时间",
+ "Width":3.78354
+ },
+ {
+ "Name":"药品名称",
+ "Width":4.63021
+ },
+ {
+ "Name":"数量",
+ "Width":1.98438
+ },
+ {
+ "Name":"批次",
+ "Width":2.61938
+ },
+ {
+ "Name":"效期",
+ "Width":2.38125
+ },
+ {
+ "Name":"库位",
+ "Width":2.59292
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.00542,
+ "ColumnContentCell":[
+ {
+ "Column":"操作人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"操作人"
+ },
+ {
+ "Column":"时间",
+ "TextAlign":"MiddleCenter",
+ "DataField":"时间"
+ },
+ {
+ "Column":"药品名称",
+ "TextAlign":"MiddleCenter",
+ "DataField":"药品名称"
+ },
+ {
+ "Column":"数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"数量"
+ },
+ {
+ "Column":"批次",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批次"
+ },
+ {
+ "Column":"效期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"效期"
+ },
+ {
+ "Column":"库位",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox1",
+ "Left":9.60438,
+ "Top":-2.16958,
+ "Width":2.80458,
+ "Height":0.661458
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "TextAlign":"MiddleCenter",
+ "Text":"[#库位#] - [#colNo#]"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.40229,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"操作人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"操作人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"时间",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"药品名称",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药品名称"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批次",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批次"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"效期",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"库位",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"库位"
+ }
+ ]
+ }
+ },
+ "Parameter":[
+ {
+ "Name":"startDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/1/1"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/4/28 23:59:59"
+ },
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "Left":7.59354,
+ "Top":0.211667,
+ "Width":5.60917,
+ "Height":1.19063,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"盘点记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/machine_log_return.grf b/DM_Weight/ReportTemp/machine_log_return.grf
new file mode 100644
index 0000000..493f661
--- /dev/null
+++ b/DM_Weight/ReportTemp/machine_log_return.grf
@@ -0,0 +1,283 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "LeftMargin":0.3175,
+ "TopMargin":0.899583,
+ "RightMargin":0.396875
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n dmr.`drawer_no` AS drawerNo,\r\n dmr.`col_no` AS colNo,\r\n dmr.`type` AS `type`,\r\n CONCAT(dmr.`quantity`,IF(dmr.`type`=32,\"(空瓶)\",\"\")) AS quantity,\r\n dmr.`manu_no` AS manuNo,\r\n dmr.`eff_date` AS effDate,\r\n dmr.`operation_time` AS operationTime,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n dmr.`drug_id` AS drugId,\r\n ul.`user_name` AS nickname\r\nFROM\r\n dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` in (31, 32)\r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
+ "Field":[
+ {
+ "Name":"操作人",
+ "DBFieldName":"Nickname"
+ },
+ {
+ "Name":"时间",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd HH:mm:ss",
+ "DBFieldName":"operationTime"
+ },
+ {
+ "Name":"药品名称",
+ "DBFieldName":"DrugName"
+ },
+ {
+ "Name":"数量",
+ "DBFieldName":"quantity"
+ },
+ {
+ "Name":"批次",
+ "DBFieldName":"manuNo"
+ },
+ {
+ "Name":"效期",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"effDate"
+ },
+ {
+ "Name":"库位",
+ "DBFieldName":"drawerNo"
+ },
+ {
+ "Name":"colNo"
+ },
+ {
+ "Name":"type2",
+ "Type":"Integer",
+ "DBFieldName":"type"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"操作人",
+ "Width":2.38125
+ },
+ {
+ "Name":"时间",
+ "Width":3.78354
+ },
+ {
+ "Name":"药品名称",
+ "Width":4.63021
+ },
+ {
+ "Name":"数量",
+ "Width":1.98438
+ },
+ {
+ "Name":"批次",
+ "Width":2.61938
+ },
+ {
+ "Name":"效期",
+ "Width":2.38125
+ },
+ {
+ "Name":"库位",
+ "Width":2.59292
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.00542,
+ "ColumnContentCell":[
+ {
+ "Column":"操作人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"操作人"
+ },
+ {
+ "Column":"时间",
+ "TextAlign":"MiddleCenter",
+ "DataField":"时间"
+ },
+ {
+ "Column":"药品名称",
+ "TextAlign":"MiddleCenter",
+ "DataField":"药品名称"
+ },
+ {
+ "Column":"数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"数量"
+ },
+ {
+ "Column":"批次",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批次"
+ },
+ {
+ "Column":"效期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"效期"
+ },
+ {
+ "Column":"库位",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox1",
+ "Left":9.60438,
+ "Top":-2.16958,
+ "Width":2.80458,
+ "Height":0.661458
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "TextAlign":"MiddleCenter",
+ "Text":"[#库位#] - [#colNo#]"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.40229,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"操作人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"操作人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"时间",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"药品名称",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药品名称"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批次",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批次"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"效期",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"库位",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"库位"
+ }
+ ]
+ }
+ },
+ "Parameter":[
+ {
+ "Name":"startDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/1/1"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/4/28 23:59:59"
+ },
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "Left":7.59354,
+ "Top":0.211667,
+ "Width":5.60917,
+ "Height":1.19063,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"归还记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/machine_log_take.grf b/DM_Weight/ReportTemp/machine_log_take.grf
new file mode 100644
index 0000000..32fe037
--- /dev/null
+++ b/DM_Weight/ReportTemp/machine_log_take.grf
@@ -0,0 +1,283 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "LeftMargin":0.3175,
+ "TopMargin":0.899583,
+ "RightMargin":0.396875
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n dmr.`drawer_no` AS drawerNo,\r\n dmr.`col_no` AS colNo,\r\n dmr.`type` AS `type`,\r\n dmr.`quantity` AS quantity,\r\n dmr.`manu_no` AS manuNo,\r\n dmr.`eff_date` AS effDate,\r\n dmr.`operation_time` AS operationTime,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n dmr.`drug_id` AS drugId,\r\n ul.`user_name` AS nickname\r\nFROM\r\n dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 2 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
+ "Field":[
+ {
+ "Name":"操作人",
+ "DBFieldName":"Nickname"
+ },
+ {
+ "Name":"时间",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd HH:mm:ss",
+ "DBFieldName":"operationTime"
+ },
+ {
+ "Name":"药品名称",
+ "DBFieldName":"DrugName"
+ },
+ {
+ "Name":"数量",
+ "DBFieldName":"quantity"
+ },
+ {
+ "Name":"批次",
+ "DBFieldName":"manuNo"
+ },
+ {
+ "Name":"效期",
+ "Type":"DateTime",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"effDate"
+ },
+ {
+ "Name":"库位",
+ "DBFieldName":"drawerNo"
+ },
+ {
+ "Name":"colNo"
+ },
+ {
+ "Name":"type2",
+ "Type":"Integer",
+ "DBFieldName":"type"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"操作人",
+ "Width":2.38125
+ },
+ {
+ "Name":"时间",
+ "Width":3.78354
+ },
+ {
+ "Name":"药品名称",
+ "Width":4.63021
+ },
+ {
+ "Name":"数量",
+ "Width":1.98438
+ },
+ {
+ "Name":"批次",
+ "Width":2.61938
+ },
+ {
+ "Name":"效期",
+ "Width":2.38125
+ },
+ {
+ "Name":"库位",
+ "Width":2.59292
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.00542,
+ "ColumnContentCell":[
+ {
+ "Column":"操作人",
+ "TextAlign":"MiddleCenter",
+ "DataField":"操作人"
+ },
+ {
+ "Column":"时间",
+ "TextAlign":"MiddleCenter",
+ "DataField":"时间"
+ },
+ {
+ "Column":"药品名称",
+ "TextAlign":"MiddleCenter",
+ "DataField":"药品名称"
+ },
+ {
+ "Column":"数量",
+ "TextAlign":"MiddleCenter",
+ "DataField":"数量"
+ },
+ {
+ "Column":"批次",
+ "TextAlign":"MiddleCenter",
+ "DataField":"批次"
+ },
+ {
+ "Column":"效期",
+ "TextAlign":"MiddleCenter",
+ "DataField":"效期"
+ },
+ {
+ "Column":"库位",
+ "FreeCell":true,
+ "Control":[
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox1",
+ "Left":9.60438,
+ "Top":-2.16958,
+ "Width":2.80458,
+ "Height":0.661458
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox1",
+ "Dock":"Fill",
+ "Center":"Both",
+ "TextAlign":"MiddleCenter",
+ "Text":"[#库位#] - [#colNo#]"
+ }
+ ]
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.40229,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"操作人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"操作人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"时间",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"时间"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"药品名称",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药品名称"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批次",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批次"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"效期",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"库位",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"库位"
+ }
+ ]
+ }
+ },
+ "Parameter":[
+ {
+ "Name":"startDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/1/1"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/4/28 23:59:59"
+ },
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "Left":7.59354,
+ "Top":0.211667,
+ "Width":5.60917,
+ "Height":1.19063,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"出库记录"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/orderUse_template.grf b/DM_Weight/ReportTemp/orderUse_template.grf
new file mode 100644
index 0000000..b9b956d
--- /dev/null
+++ b/DM_Weight/ReportTemp/orderUse_template.grf
@@ -0,0 +1,633 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape",
+ "TopMargin":0.3175,
+ "RightMargin":0.8996,
+ "BottomMargin":0.3969
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n dmr.`drawer_no` AS drawerNo,\r\n dmr.`col_no` AS colNo,\r\n dmr.`type` AS `type`,\r\n dmr.`quantity` AS quantity,\r\n dmr.`manu_no` AS manuNo,\r\n dmr.`eff_date` AS effDate,\r\n dmr.`operation_time` AS operationTime,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n dmr.`drug_id` AS drugId,\r\n ul.`user_name` AS nickname\r\nFROM\r\n dm_machine_record dmr\r\nLEFT JOIN drug_info di ON di.`drug_id` = dmr.`drug_id`\r\nLEFT JOIN user_list ul ON ul.`id` = dmr.`Operator`\r\nWHERE dmr.`type` = 2 \r\n AND dmr.`machine_id` = :machine_id\r\n AND dmr.`operation_time` > :startDate\r\n AND dmr.`operation_time` < :endDate",
+ "Field":[
+ {
+ "Name":"患者姓名",
+ "DBFieldName":"p_name"
+ },
+ {
+ "Name":"性别",
+ "DBFieldName":"sex"
+ },
+ {
+ "Name":"年龄",
+ "Type":"Integer",
+ "DBFieldName":"age"
+ },
+ {
+ "Name":"身份证号",
+ "DBFieldName":"id_number"
+ },
+ {
+ "Name":"病历号",
+ "DBFieldName":"patientno"
+ },
+ {
+ "Name":"疾病名称",
+ "Format":"yyyy/MM/dd",
+ "DBFieldName":"disease"
+ },
+ {
+ "Name":"药品ID",
+ "DBFieldName":"drugId"
+ },
+ {
+ "Name":"数量",
+ "Type":"Integer",
+ "DBFieldName":"quantity"
+ },
+ {
+ "Name":"处方医生",
+ "DBFieldName":"doctor_name"
+ },
+ {
+ "Name":"处方编号",
+ "DBFieldName":"order_no"
+ },
+ {
+ "Name":"处方日期",
+ "DBFieldName":"order_date"
+ },
+ {
+ "Name":"发药人",
+ "DBFieldName":"nickname"
+ },
+ {
+ "Name":"复核人",
+ "DBFieldName":"reviewNickname"
+ },
+ {
+ "Name":"批号",
+ "DBFieldName":"manuNo"
+ },
+ {
+ "Name":"麻醉卡号"
+ },
+ {
+ "Name":"代办人姓名"
+ },
+ {
+ "Name":"代办人身份证号"
+ },
+ {
+ "Name":"编号"
+ },
+ {
+ "Name":"药品名称",
+ "DBFieldName":"drugName"
+ },
+ {
+ "Name":"规格",
+ "DBFieldName":"drugSpec"
+ },
+ {
+ "Name":"单位",
+ "DBFieldName":"packUnit"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"患者姓名",
+ "Width":2.38125
+ },
+ {
+ "Name":"性别",
+ "Width":1.00542
+ },
+ {
+ "Name":"年龄",
+ "Width":0.978958
+ },
+ {
+ "Name":"身份证号",
+ "Width":5.00063
+ },
+ {
+ "Name":"病历号",
+ "Width":2.77813
+ },
+ {
+ "Name":"疾病名称",
+ "Width":3.01625
+ },
+ {
+ "Name":"药品ID",
+ "Width":2.59292
+ },
+ {
+ "Name":"数量",
+ "Width":1.69333
+ },
+ {
+ "Name":"处方医生",
+ "Width":2.32833
+ },
+ {
+ "Name":"处方编号",
+ "Width":2.80458
+ },
+ {
+ "Name":"发药人",
+ "Width":3.20146
+ },
+ {
+ "Name":"复核人",
+ "Width":1.69333
+ },
+ {
+ "Name":"批号",
+ "Width":1.69333
+ },
+ {
+ "Name":"麻醉卡号",
+ "Width":3.59833
+ },
+ {
+ "Name":"代办人姓名",
+ "Width":1.69333
+ },
+ {
+ "Name":"代办人身份证号",
+ "Width":1.69333
+ },
+ {
+ "Name":"Column10",
+ "Width":2.14313
+ },
+ {
+ "Name":"Column11",
+ "Width":1.69333
+ }
+ ],
+ "ColumnContent":{
+ "Height":1.00542,
+ "ColumnContentCell":[
+ {
+ "Column":"患者姓名",
+ "TextAlign":"MiddleCenter",
+ "DataField":"患者姓名"
+ },
+ {
+ "Column":"性别",
+ "TextAlign":"MiddleCenter",
+ "DataField":"性别"
+ },
+ {
+ "Column":"年龄",
+ "TextAlign":"MiddleCenter",
+ "DataField":"年龄"
+ },
+ {
+ "Column":"身份证号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"身份证号"
+ },
+ {
+ "Column":"病历号",
+ "TextAlign":"MiddleCenter",
+ "DataField":"病历号"
+ },
+ {
+ "Column":"疾病名称",
+ "TextAlign":"MiddleCenter",
+ "DataField":"疾病名称"
+ },
+ {
+ "Column":"药品ID",
+ "DataField":"药品ID"
+ },
+ {
+ "Column":"数量",
+ "DataField":"数量"
+ },
+ {
+ "Column":"处方医生",
+ "DataField":"处方医生"
+ },
+ {
+ "Column":"处方编号",
+ "DataField":"处方编号"
+ },
+ {
+ "Column":"发药人",
+ "DataField":"处方日期"
+ },
+ {
+ "Column":"复核人",
+ "DataField":"发药人"
+ },
+ {
+ "Column":"批号",
+ "DataField":"复核人"
+ },
+ {
+ "Column":"麻醉卡号",
+ "DataField":"批号"
+ },
+ {
+ "Column":"代办人姓名",
+ "DataField":"麻醉卡号"
+ },
+ {
+ "Column":"代办人身份证号",
+ "DataField":"代办人姓名"
+ },
+ {
+ "Column":"Column10",
+ "DataField":"代办人身份证号"
+ },
+ {
+ "Column":"Column11"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.40229,
+ "RepeatStyle":"OnGroupHeaderPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"患者姓名",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"患者\r\n姓名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"性别",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"性\r\n别"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"年龄",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"年\r\n龄"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"身份证号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"身份证号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"病历号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"病历号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"疾病名称",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"疾病名称"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"药品ID",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药品ID"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"数量",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数\r\n量"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"处方医生",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"处方\r\n医生"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"处方编号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"处方编号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"发药人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"处方日期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"复核人",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"发药人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"批号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"复核人"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"麻醉卡号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"代办人姓名",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"麻醉卡号"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"代办人身份证号",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"代办人\r\n姓名"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column10",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"代办人\r\n身份证"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column11",
+ "Font":{
+ "Name":"宋体",
+ "Size":120000,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"编号"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"Group1",
+ "ByFields":"药品ID",
+ "GroupHeader":{
+ "PrintGridBorder":false,
+ "RepeatOnPage":true,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox16",
+ "Top":0.0529167,
+ "Width":1.19063,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"药品名称:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox7",
+ "Left":1.16417,
+ "Top":0.0529167,
+ "Width":5.63563,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"药品名称"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox17",
+ "Left":6.93208,
+ "Top":0.0529167,
+ "Width":1.11125,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"规格:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox8",
+ "Left":8.01688,
+ "Top":0.0529167,
+ "Width":3.175,
+ "Height":0.978958,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"规格"
+ },
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox15",
+ "Left":11.59,
+ "Top":0.05,
+ "Width":2.01083,
+ "Height":0.79375,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "Text":"单位:"
+ },
+ {
+ "Type":"FieldBox",
+ "Name":"FieldBox9",
+ "Left":12.78,
+ "Top":0.05,
+ "Width":1.88,
+ "Height":0.98,
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Bold":true,
+ "Charset":134
+ },
+ "DataField":"单位"
+ }
+ ],
+ "NewPageColumn":"Before"
+ },
+ "GroupFooter":{
+ "Height":0.635
+ }
+ }
+ ]
+ },
+ "Parameter":[
+ {
+ "Name":"startDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/1/1"
+ },
+ {
+ "Name":"endDate",
+ "DataType":"DateTime",
+ "Format":"yyyy-MM-dd hh:mm:ss",
+ "Value":"2023/4/28 23:59:59"
+ },
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":1.79917,
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox2",
+ "Left":7.59354,
+ "Top":0.211667,
+ "Width":5.60917,
+ "Height":1.19063,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"发药登记表"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/ReportTemp/stock_template.grf b/DM_Weight/ReportTemp/stock_template.grf
new file mode 100644
index 0000000..6a2d5fb
--- /dev/null
+++ b/DM_Weight/ReportTemp/stock_template.grf
@@ -0,0 +1,346 @@
+{
+ "Version":"6.3.0.1",
+ "Font":{
+ "Name":"宋体",
+ "Size":105000,
+ "Weight":400,
+ "Charset":134
+ },
+ "Printer":{
+ "Oriention":"Landscape"
+ },
+ "DetailGrid":{
+ "CenterView":true,
+ "PrintAdaptMethod":"ResizeToFit",
+ "AppendBlankRow":true,
+ "Recordset":{
+ "QuerySQL":"SELECT \r\n cl.`row_no` AS drawerNo,\r\n cl.`col_no` AS colNo,\r\n cl.`quantity` AS quantity,\r\n cl.`manu_no` AS manuNo,\r\n cl.`eff_date` AS effDate,\r\n di.`drug_name` AS drugName,\r\n di.`drug_spec` AS drugSpec,\r\n di.`pack_unit` AS packUnit,\r\n di.`manufactory` AS manuFactory,\r\n di.`max_stock` AS baseQuantity,\r\n cl.`drug_id` AS drugId\r\nFROM\r\n channel_stock cl\r\nINNER JOIN drug_info di ON di.`drug_id` = cl.`drug_id`\r\nWHERE cl.`machine_id` = :machine_id\r\n AND cl.`drawer_type` = 1\r\n ORDER BY cl.`drug_id`",
+ "Field":[
+ {
+ "Name":"drugName"
+ },
+ {
+ "Name":"drugSpec"
+ },
+ {
+ "Name":"manuFactory"
+ },
+ {
+ "Name":"quantityCount"
+ },
+ {
+ "Name":"manuNo"
+ },
+ {
+ "Name":"effDate"
+ },
+ {
+ "Name":"quantity",
+ "Type":"Integer",
+ "Format":"0"
+ },
+ {
+ "Name":"drawerNo"
+ },
+ {
+ "Name":"drugId"
+ },
+ {
+ "Name":"baseQuantity",
+ "Type":"Integer"
+ }
+ ]
+ },
+ "Column":[
+ {
+ "Name":"drugName",
+ "Width":5.37104
+ },
+ {
+ "Name":"drugSpec"
+ },
+ {
+ "Name":"manuFactory",
+ "Width":4.60375
+ },
+ {
+ "Name":"Column1"
+ },
+ {
+ "Name":"quantityCount",
+ "Width":2.59292
+ },
+ {
+ "Name":"manuNo"
+ },
+ {
+ "Name":"effDate"
+ },
+ {
+ "Name":"quantity",
+ "Width":2.43417
+ }
+ ],
+ "ColumnContent":{
+ "Height":0.79375,
+ "ColumnContentCell":[
+ {
+ "Column":"drugName",
+ "TextAlign":"MiddleCenter",
+ "DataField":"drugName"
+ },
+ {
+ "Column":"drugSpec",
+ "TextAlign":"MiddleCenter",
+ "DataField":"drugSpec"
+ },
+ {
+ "Column":"manuFactory",
+ "TextAlign":"MiddleCenter",
+ "DataField":"manuFactory"
+ },
+ {
+ "Column":"Column1",
+ "FreeCell":true
+ },
+ {
+ "Column":"quantityCount",
+ "FreeCell":true
+ },
+ {
+ "Column":"manuNo",
+ "TextAlign":"MiddleCenter",
+ "DataField":"manuNo"
+ },
+ {
+ "Column":"effDate",
+ "TextAlign":"MiddleCenter",
+ "DataField":"effDate"
+ },
+ {
+ "Column":"quantity",
+ "TextAlign":"MiddleCenter",
+ "DataField":"quantity"
+ }
+ ]
+ },
+ "ColumnTitle":{
+ "Height":1.19063,
+ "RepeatStyle":"OnPage",
+ "ColumnTitleCell":[
+ {
+ "GroupTitle":false,
+ "Column":"drugName",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"药品名称"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"drugSpec",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"规格"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"manuFactory",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"厂家"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"Column1",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"基数"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"quantityCount",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"总库存"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"manuNo",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"批次"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"effDate",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"效期"
+ },
+ {
+ "GroupTitle":false,
+ "Column":"quantity",
+ "Font":{
+ "Name":"宋体",
+ "Size":142500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"数量"
+ }
+ ]
+ },
+ "Group":[
+ {
+ "Name":"drugId",
+ "ByFields":"drugId",
+ "GroupHeader":{
+ "Visible":false,
+ "Height":0.79375,
+ "RepeatOnPage":true,
+ "OccupyColumn":true,
+ "IncludeFooter":true,
+ "OccupiedColumns":"drugName;drugSpec;manuFactory;quantityCount;Column1",
+ "VAlign":"Middle"
+ },
+ "GroupFooter":{
+ "Visible":false,
+ "Height":0.396875
+ }
+ },
+ {
+ "Name":"Group1",
+ "ByFields":"drugId",
+ "GroupHeader":{
+ "Control":[
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox3",
+ "AlignColumn":"drugName",
+ "Width":5.3975,
+ "Height":1.19063,
+ "TextAlign":"MiddleCenter",
+ "Text":"[#drugName#]"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox4",
+ "AlignColumn":"drugSpec",
+ "Left":5.37104,
+ "Width":3.01625,
+ "Height":1.19063,
+ "TextAlign":"MiddleCenter",
+ "Text":"[#drugSpec#]"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox5",
+ "AlignColumn":"manuFactory",
+ "Left":8.36083,
+ "Width":4.63021,
+ "Height":1.19063,
+ "TextAlign":"MiddleCenter",
+ "Text":"[#manuFactory#]"
+ },
+ {
+ "Type":"MemoBox",
+ "Name":"MemoBox6",
+ "AlignColumn":"Column1",
+ "Left":12.9646,
+ "Width":3.01625,
+ "Height":1.19063,
+ "TextAlign":"MiddleCenter",
+ "Text":"[#baseQuantity#]"
+ },
+ {
+ "Type":"SummaryBox",
+ "Name":"SummaryBox1",
+ "AlignColumn":"quantityCount",
+ "Left":15.9544,
+ "Width":2.61938,
+ "Height":1.19063,
+ "TextAlign":"MiddleCenter",
+ "DataField":"quantity",
+ "Format":"0"
+ }
+ ],
+ "OccupyColumn":true,
+ "SameAsColumn":false,
+ "OccupiedColumns":"Column1;drugName;drugSpec;manuFactory;quantityCount",
+ "VAlign":"Middle"
+ },
+ "GroupFooter":{
+ "Visible":false
+ }
+ }
+ ]
+ },
+ "Parameter":[
+ {
+ "Name":"machine_id",
+ "Value":"DM1"
+ }
+ ],
+ "ReportHeader":[
+ {
+ "Name":"ReportHeader1",
+ "Height":2.40771,
+ "Control":[
+ {
+ "Type":"StaticBox",
+ "Name":"StaticBox1",
+ "Center":"Horizontal",
+ "Left":8.89,
+ "Top":0.608542,
+ "Width":9.18104,
+ "Height":1.21708,
+ "Font":{
+ "Name":"宋体",
+ "Size":217500,
+ "Bold":true,
+ "Charset":134
+ },
+ "TextAlign":"MiddleCenter",
+ "Text":"毒麻药品库存信息"
+ }
+ ],
+ "RepeatOnPage":true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/DM_Weight/Validation/NotEmptyValidationRule.cs b/DM_Weight/Validation/NotEmptyValidationRule.cs
new file mode 100644
index 0000000..9532beb
--- /dev/null
+++ b/DM_Weight/Validation/NotEmptyValidationRule.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Controls;
+
+namespace DM_Weight.Validation
+{
+ public class NotEmptyValidationRule : ValidationRule
+ {
+ public override ValidationResult Validate(object value, CultureInfo cultureInfo)
+ {
+ return string.IsNullOrWhiteSpace((value ?? "").ToString())
+ ? new ValidationResult(false, "字段不能为空")
+ : ValidationResult.ValidResult;
+ }
+ }
+}
diff --git a/DM_Weight/ViewModels/AccountWindowForDrugViewModel.cs b/DM_Weight/ViewModels/AccountWindowForDrugViewModel.cs
new file mode 100644
index 0000000..f37509d
--- /dev/null
+++ b/DM_Weight/ViewModels/AccountWindowForDrugViewModel.cs
@@ -0,0 +1,159 @@
+using DM_Weight.msg;
+using DM_Weight.Report;
+using DM_Weight.util;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using DM_Weight.Models;
+using Prism.Services.Dialogs;
+using System.Threading.Tasks;
+
+namespace DM_Weight.ViewModels
+{
+ public class AccountWindowForDrugViewModel : BindableBase, INavigationAware, IRegionMemberLifetime
+ {
+ public static AccountWindowForDrugViewModel vm;
+ private DateTime? _startDate = DateTime.Now;
+
+
+ public DateTime? StartDate
+ {
+ get => _startDate;
+ set
+ {
+ SetProperty(ref _startDate, value);
+ }
+ }
+
+ private DateTime? _endDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);
+
+ public DateTime? EndDate
+ {
+ get => _endDate;
+ set
+ {
+ SetProperty(ref _endDate, value);
+ }
+ }
+ IEventAggregator _eventAggregator;
+ IDialogService _dialogService;
+ public AccountWindowForDrugViewModel(IEventAggregator eventAggregator, IDialogService dialogService)
+ {
+ _eventAggregator = eventAggregator;
+ _dialogService = dialogService;
+ vm = this;
+ }
+ ///
+ /// 导出账册
+ ///
+ public DelegateCommand DownloadAccountBook
+ {
+ get => new DelegateCommand(() =>
+ {
+ if (DrugInfo == null || string.IsNullOrEmpty(DrugInfo.DrugId))
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = $"请选择药品!",
+ Type = MsgType.ERROR,
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ return;
+ }
+ GridReportUtil.PrintReportAccountBook(StartDate, EndDate, DrugInfo.DrugId);
+
+ });
+ }
+
+ public bool KeepAlive => false;
+
+ public bool IsNavigationTarget(NavigationContext navigationContext)
+ {
+ return true;
+ }
+
+ public void OnNavigatedFrom(NavigationContext navigationContext)
+ {
+ }
+
+ public void OnNavigatedTo(NavigationContext navigationContext)
+ {
+ //药品信息
+ GetAllDrugInfos();
+ }
+ ///
+ /// 药品
+ ///
+ private List? _drugInfos;
+
+ public List? DrugInfos
+ {
+ get => _drugInfos;
+ set => SetProperty(ref _drugInfos, value);
+ }
+ private DrugInfo? _drugInfo;
+
+ public DrugInfo? DrugInfo
+ {
+ get => _drugInfo;
+ set
+ {
+ SetProperty(ref _drugInfo, value);
+ }
+ }
+ private void GetAllDrugInfos()
+ {
+ var list = SqlSugarHelper.Db.Queryable().Includes(di => di.DrugManuNos).OrderBy(di => di.DrugId).ToList();
+ DrugInfos = list;
+ DrugInfo = list[0];
+ }
+ public void UpdateComboBoxItems(string text)
+ {
+ string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
+ d.manufactory,d.max_stock,CONCAT(drug_name,' ',drug_spec)as DrugName FROM `drug_info` d";
+ if (string.IsNullOrEmpty(text))
+ {
+ DrugInfos = SqlSugarHelper.Db.SqlQueryable(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
+ return;
+ }
+ if (DrugInfos != null)
+ {
+ DrugInfos.Clear();
+ }
+ DrugInfos = SqlSugarHelper.Db.SqlQueryable(str).Where(di => di.DrugName.Contains(text) || di.PyCode.Contains(text)).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
+ }
+ public DelegateCommand SelectTimeAction
+ {
+ get => new DelegateCommand(async (s) =>
+ {
+ // 此处延时1毫秒,等待页面渲染
+ await Task.Delay(TimeSpan.FromMilliseconds(1));
+ DialogParameters dialogParameters = new DialogParameters();
+ dialogParameters.Add("DateTime", StartDate);
+ dialogParameters.Add("Type", s);
+ DialogServiceExtensions.ShowDialogHost(_dialogService, "DatetimeDialog", dialogParameters, DoDialogResult, "RootDialog");
+ });
+ }
+ private void DoDialogResult(IDialogResult dialogResult)
+ {
+ // 委托 被动执行 被子窗口执行
+ // dialogResult 第一方面可以拿到任意参数 第二方面 可判断关闭状态
+ if (dialogResult.Result == ButtonResult.OK)
+ {
+ if (dialogResult.Parameters.GetValue("Type").Equals("1"))
+ {
+ StartDate = dialogResult.Parameters.GetValue("DateTime");
+ }
+ else
+ {
+ EndDate = dialogResult.Parameters.GetValue("DateTime");
+ }
+ }
+ //MessageBox.Show("返回值:" + dialogResult.Result.ToString());
+ }
+ }
+}
diff --git a/DM_Weight/ViewModels/AccountWindowViewModel.cs b/DM_Weight/ViewModels/AccountWindowViewModel.cs
new file mode 100644
index 0000000..dc2cc0a
--- /dev/null
+++ b/DM_Weight/ViewModels/AccountWindowViewModel.cs
@@ -0,0 +1,147 @@
+using DM_Weight.Models;
+using DM_Weight.msg;
+using DM_Weight.Report;
+using DM_Weight.util;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace DM_Weight.ViewModels
+{
+ public class AccountWindowViewModel : BindableBase, INavigationAware, IRegionMemberLifetime
+ {
+ private DateTime? _startDate = DateTime.Now;
+
+ public DateTime? StartDate
+ {
+ get => _startDate;
+ set
+ {
+ SetProperty(ref _startDate, value);
+ }
+ }
+
+ private DateTime? _endDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 23, 59, 59);
+
+ public DateTime? EndDate
+ {
+ get => _endDate;
+ set
+ {
+ SetProperty(ref _endDate, value);
+ }
+ }
+ private string _name;
+ public string Name { get => _name; set { SetProperty(ref _name, value); } }
+ private static readonly DateTime Jan1st1970 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+ ///
+ /// 麻醉医师姓名
+ ///
+ private List _UserInfos;
+ public List UserInfos
+ {
+ get => _UserInfos;
+ set { SetProperty(ref _UserInfos, value); }
+ }
+
+ private UserList _User;
+ public UserList User
+ {
+ get => _User;
+ set { SetProperty(ref _User, value); }
+ }
+ private static List boxDefine =
+ new List { "1号手术间", "2号手术间", "3号手术间", "4号手术间", "5号手术间", "6号手术间", "7号手术间", "8号手术间", "9号手术间", "10号手术间", "11号手术间", "12号手术间", "13号手术间", "14号手术间", "15号手术间", "16号手术间", "17号手术间", "18号手术间" };
+
+ private List _Boxs = boxDefine;
+ public List Boxs
+ {
+ get => _Boxs;
+ set { SetProperty(ref _Boxs, value); }
+ }
+ private string _Box;
+ public string Box
+ {
+ get => _Box;
+ set { SetProperty(ref _Box, value); }
+ }
+ IDialogService _dialogService;
+ public AccountWindowViewModel(IDialogService dialogService)
+ {
+ _dialogService = dialogService;
+ }
+
+ public long CurrentTimeMillis()
+ {
+ return (long)(DateTime.UtcNow - Jan1st1970).TotalMilliseconds;
+ }
+
+ public void OnNavigatedTo(NavigationContext navigationContext)
+ {
+ //绑定用户信息
+ UserInfos = SqlSugarHelper.Db.Queryable()
+ .Where(ul => ul.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM5")).ToList();
+ }
+
+ public bool IsNavigationTarget(NavigationContext navigationContext)
+ {
+ return true;
+ }
+
+ public void OnNavigatedFrom(NavigationContext navigationContext)
+ {
+ }
+
+ ///
+ /// 导出账册
+ ///
+ public DelegateCommand DownloadAccountBook
+ {
+ get => new DelegateCommand(() =>
+ {
+ GridReportUtil.UserAccount(StartDate, EndDate, User == null ? "" : User.Nickname, Box);
+
+ });
+ }
+ public DelegateCommand SelectTimeAction
+ {
+ get => new DelegateCommand(async (s) =>
+ {
+ // 此处延时1毫秒,等待页面渲染
+ await Task.Delay(TimeSpan.FromMilliseconds(1));
+ DialogParameters dialogParameters = new DialogParameters();
+ dialogParameters.Add("DateTime", StartDate);
+ dialogParameters.Add("Type", s);
+ DialogServiceExtensions.ShowDialogHost(_dialogService, "DatetimeDialog", dialogParameters, DoDialogResult, "RootDialog");
+ });
+ }
+ private void DoDialogResult(IDialogResult dialogResult)
+ {
+ // 委托 被动执行 被子窗口执行
+ // dialogResult 第一方面可以拿到任意参数 第二方面 可判断关闭状态
+ if (dialogResult.Result == ButtonResult.OK)
+ {
+ if (dialogResult.Parameters.GetValue("Type").Equals("1"))
+ {
+ StartDate = dialogResult.Parameters.GetValue("DateTime");
+ }
+ else
+ {
+ EndDate = dialogResult.Parameters.GetValue("DateTime");
+ }
+ }
+ //MessageBox.Show("返回值:" + dialogResult.Result.ToString());
+ }
+ public bool KeepAlive => true;
+
+ }
+}
diff --git a/DM_Weight/ViewModels/DatetimeDialogViewModel.cs b/DM_Weight/ViewModels/DatetimeDialogViewModel.cs
new file mode 100644
index 0000000..7d67334
--- /dev/null
+++ b/DM_Weight/ViewModels/DatetimeDialogViewModel.cs
@@ -0,0 +1,73 @@
+using DM_Weight.Models;
+using DM_Weight.msg;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Services.Dialogs;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DM_Weight.ViewModels
+{
+ internal class DatetimeDialogViewModel : BindableBase, IDialogAware
+ {
+ public string Title => throw new NotImplementedException();
+
+ public event Action RequestClose;
+
+ private DateTime? _date = new DateTime();
+ public DateTime? Date
+ {
+ get => _date;
+ set
+ {
+ SetProperty(ref _date, value);
+ }
+ }
+ private DateTime? _time = new DateTime();
+ public DateTime? Time
+ {
+ get => _time;
+ set
+ {
+ SetProperty(ref _time, value);
+ }
+ }
+
+ public bool CanCloseDialog()
+ {
+ return true;
+ }
+
+ public void OnDialogClosed()
+ {
+
+ }
+ string typeS;
+ public void OnDialogOpened(IDialogParameters parameters)
+ {
+ DateTime o = parameters.GetValue("DateTime");
+
+ typeS = parameters.GetValue("Type");
+ Date = o;
+ Time = o;
+ }
+
+ public DelegateCommand CloseAction
+ {
+ get => new DelegateCommand(() =>
+ {
+ var datetime=new DateTime(Date?.Year ?? DateTime.Now.Year, Date?.Month ?? DateTime.Now.Month, Date?.Day ?? DateTime.Now.Day,
+ Time?.Hour ?? DateTime.Now.Hour, Time?.Minute ?? DateTime.Now.Minute, Time?.Second ?? DateTime.Now.Second);
+ var result = new DialogResult(ButtonResult.OK, new DialogParameters
+ {
+ { "DateTime", datetime },
+ {"Type",typeS }
+ });
+ RequestClose?.Invoke(result);
+ });
+ }
+ }
+}
diff --git a/DM_Weight/ViewModels/HomeWindowViewModel.cs b/DM_Weight/ViewModels/HomeWindowViewModel.cs
new file mode 100644
index 0000000..74e4011
--- /dev/null
+++ b/DM_Weight/ViewModels/HomeWindowViewModel.cs
@@ -0,0 +1,292 @@
+using log4net;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+using Prism.Regions;
+using Prism.Services.Dialogs;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using DM_Weight.Models;
+using DM_Weight.util;
+using DM_Weight.Views;
+using System.Timers;
+using Unity;
+using System.Windows.Threading;
+using Newtonsoft.Json.Linq;
+using DM_Weight.msg;
+using DM_Weight.HIKVISION;
+using System.Threading;
+using MaterialDesignThemes.Wpf;
+using System.Windows.Media;
+using System.Collections.ObjectModel;
+
+namespace DM_Weight.ViewModels
+{
+ public class HomeWindowViewModel : BindableBase, IConfirmNavigationRequest, IRegionMemberLifetime
+ {
+
+ private readonly ILog logger = LogManager.GetLogger(typeof(HomeWindowViewModel));
+ private readonly IDialogService _dialogService;
+ private UserList? _userList;
+ private UserList? _userList2;
+
+
+ private SolidColorBrush _colorBrush;
+
+ public SolidColorBrush SnackbarBackground
+ {
+ get => _colorBrush;
+ set => SetProperty(ref _colorBrush, value);
+ }
+ private ISnackbarMessageQueue _snackbarMessageQueue = new SnackbarMessageQueue(TimeSpan.FromSeconds(3));
+
+ public ISnackbarMessageQueue SnackbarMessageQueue
+ {
+ get => _snackbarMessageQueue;
+ set => SetProperty(ref _snackbarMessageQueue, value);
+ }
+ private int loginMode = Convert.ToInt32(ConfigurationManager.AppSettings["loginMode"]?.ToString() ?? "1");
+ public bool MultiLogin
+ {
+ get => loginMode == 2;
+ }
+ private PremissionDm? _selectedMenu;
+
+ private PremissionDm? _selectedChildMenu;
+
+ private List? _premissionDmList;
+
+ public PremissionDm? SelectedChildMenu
+ {
+ get { return _selectedChildMenu; }
+ set
+ {
+ SetProperty(ref _selectedChildMenu, value);
+ }
+ }
+
+ public PremissionDm? SelectedMenu
+ {
+ get { return _selectedMenu; }
+ set
+ {
+ SetProperty(ref _selectedMenu, value);
+ }
+ }
+
+ private DelegateCommand _selectionCommon;
+ public DelegateCommand SelectionCommon
+ {
+ get => _selectionCommon ?? (_selectionCommon = new DelegateCommand(SelectionMethod));
+ }
+ private void SelectionMethod()
+ {
+ logger.Info("开始进入父菜单");
+ if (SelectedMenu != null && SelectedMenu.PremissionName == "退出")
+ {
+ logger.Info($"用户【{Operator?.Nickname}】退出登录");
+ Operator = null;
+ Reviewer = null;
+ System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+ {
+ _regionManager.RequestNavigate("MainRegion", "LoginWindow");
+ }));
+ //_regionManager.RequestNavigate("MainRegion", "BeforeLogin");
+
+ }
+ else
+ {
+ //SelectedMenu.Children = SelectedMenu.Children;
+ //SelectedChildMenu = SelectedMenu.Children[0];
+ //_regionManager.RequestNavigate("ContentRegion", SelectedMenu.Children[0].PremissionPath);
+ }
+ logger.Info("结束父菜单");
+ }
+ #region
+
+
+ #endregion
+ public List PremissionDmList { get { return _premissionDmList; } set { SetProperty(ref _premissionDmList, value); } }
+
+ public UserList UserList { get { return _userList; } set { SetProperty(ref _userList, value); } }
+ public UserList UserList2 { get { return _userList2; } set { SetProperty(ref _userList2, value); } }
+
+ public static UserList? Operator;
+ public static UserList? Reviewer;
+
+ IRegionManager _regionManager;
+ IUnityContainer _container;
+
+ private bool _is16Drawer;
+ public bool Is16Drawer { get => _is16Drawer; set => SetProperty(ref _is16Drawer, value); }
+ public bool KeepAlive => false;
+ //private CHKFunction _chkFunction;
+ IEventAggregator _eventAggregator;
+ public HomeWindowViewModel(IRegionManager iRegionManager, IDialogService dialogService, IUnityContainer container, IEventAggregator eventAggregator)
+ {
+ _regionManager = iRegionManager;
+ _dialogService = dialogService;
+ _container = container;
+ this._eventAggregator = eventAggregator;
+ //_chkFunction = cHKFunction;
+ }
+
+ public DelegateCommand OpenFingerDialog
+ {
+ get => new DelegateCommand((string Type) =>
+ {
+ DialogParameters dialogParameters = new DialogParameters();
+ dialogParameters.Add("User", Type.Equals("Operator") ? Operator : Reviewer);
+ DialogServiceExtensions.ShowDialogHost(_dialogService, "FingerprintDialog", dialogParameters, DoDialogResult, "RootDialog");
+ });
+ }
+
+
+
+ //public DelegateCommand OpenEditPasswordDialog
+ //{
+ // get => new DelegateCommand((string Type) =>
+ // {
+ // DialogParameters dialogParameters = new DialogParameters();
+ // dialogParameters.Add("EditPass", true);
+ // dialogParameters.Add("User", Type.Equals("Operator") ? Operator : Reviewer);
+ // DialogServiceExtensions.ShowDialogHost(_dialogService, "EditUserDialog", dialogParameters, DoDialogResult, "RootDialog");
+ // });
+ //}
+ private void DoDialogResult(IDialogResult dialogResult)
+ {
+ // 委托 被动执行 被子窗口执行
+ // dialogResult 第一方面可以拿到任意参数 第二方面 可判断关闭状态
+ if (dialogResult.Result == ButtonResult.OK)
+ {
+
+ }
+ }
+
+ ///
+ /// 查看冰箱温度
+ ///
+ //public DelegateCommand CheckWDCommand { get => new DelegateCommand(CheckAction); }
+ //private void CheckAction()
+ //{
+ //GetWD();
+ //}
+
+ #region 子菜单点击
+ private DelegateCommand _selectionChildCommon;
+ public DelegateCommand SelectionChildCommon
+ {
+ get => _selectionChildCommon ?? (_selectionChildCommon = new DelegateCommand(SelectionChildMethod));
+ }
+ private void SelectionChildMethod()
+ {
+ SelectChildNavigate(SelectedChildMenu);
+ }
+ private void SelectChildNavigate(PremissionDm SelectedChildMenu)
+ {
+ if (SelectedChildMenu != null)
+ {
+ _regionManager.RequestNavigate("ContentRegion", SelectedChildMenu.PremissionPath);
+
+ }
+ }
+ #endregion
+ //这个方法用于拦截请求,continuationCallback(true)就是不拦截,continuationCallback(false)拦截本次操作
+ public void ConfirmNavigationRequest(NavigationContext navigationContext, Action continuationCallback)
+ {
+ continuationCallback(true);
+ }
+
+ //接收导航传过来的参数
+ public void OnNavigatedTo(NavigationContext navigationContext)
+ {
+ //取出user
+ UserList = navigationContext.Parameters.GetValue("operator");
+ Operator = UserList;
+ logger.Info($"发药人【{Operator.Nickname}】登录");
+ if (navigationContext.Parameters.ContainsKey("reviewer"))
+ {
+ UserList2 = navigationContext.Parameters.GetValue("reviewer");
+ Reviewer = UserList2;
+ logger.Info($"审核人【{Reviewer.Nickname}】登录");
+ }
+ PremissionDm child = new PremissionDm { Id = 46, PremissionName = "账册", PremissionPath = "AccountWindow" };
+ PremissionDm child2 = new PremissionDm { Id = 47, PremissionName = "药品专用账本", PremissionPath = "AccountWindowForDrug" };
+ ObservableCollection childrenList = new ObservableCollection();
+ childrenList.Add(child);
+ childrenList.Add(child2);
+ List premissions = new List()
+ {
+ new PremissionDm{Id=1,PremissionName="使用账册",PremissionPath="",PremissionImage="/Images/TbKuc.png",Children=childrenList},
+ new PremissionDm{Id=1,PremissionName="退出",PremissionPath="",PremissionImage="/Images/TbExit.png",Children=childrenList}
+ };
+ if (premissions.Count <= 0)
+ {
+ Operator = null;
+ Reviewer = null;
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ _regionManager.RequestNavigate("MainRegion", "LoginWindow");
+ });
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = $"用户{UserList.Nickname}或还未设置权限,请联系管理员",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ return;
+ }
+ //SqlSugarHelper.Db.SqlQueryable(sql)
+ //.ToTree(pd => pd.Children, pd => pd.ParentId, 0);
+ PremissionDmList = premissions;
+ SelectedMenu = premissions[0];
+ SelectedChildMenu = premissions[0].Children[0];
+ _regionManager.RequestNavigate("ContentRegion", "AccountWindow");
+
+
+ int autoExit = Convert.ToInt32(ConfigurationManager.AppSettings["autoExit"] ?? "0");
+ int stopRecord = Convert.ToInt32(ConfigurationManager.AppSettings["stopRecord"] ?? "0");
+ if (autoExit > 0)
+ {
+ System.Timers.Timer timer = new System.Timers.Timer();
+ timer.Interval = 1000;
+ timer.Elapsed += (sender, e) =>
+ {
+ // 30秒内无人操作鼠标键盘
+ if (CheckComputerFreeState.GetLastInputTime() > autoExit)
+ {
+ logger.Info($"设备30秒内无人操作,用户【{Operator?.Nickname}】自动退出登录");
+ //_chkFunction.HIKStopDVRRecord();
+ Operator = null;
+ Reviewer = null;
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ _regionManager.RequestNavigate("MainRegion", "LoginWindow");
+ timer.Stop();
+ });
+ }
+ };
+ timer.Start();
+ }
+ }
+
+ //每次导航的时候,该实列用不用重新创建,true是不重新创建,false是重新创建
+ public bool IsNavigationTarget(NavigationContext navigationContext)
+ {
+ return true;
+ }
+
+ //这个方法用于拦截请求
+ public void OnNavigatedFrom(NavigationContext navigationContext)
+ {
+
+ }
+ }
+}
diff --git a/DM_Weight/ViewModels/LoginWindowViewModel.cs b/DM_Weight/ViewModels/LoginWindowViewModel.cs
new file mode 100644
index 0000000..81aed55
--- /dev/null
+++ b/DM_Weight/ViewModels/LoginWindowViewModel.cs
@@ -0,0 +1,337 @@
+using log4net;
+using log4net.Core;
+using log4net.Repository.Hierarchy;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Ioc;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Configuration;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using DM_Weight.Models;
+using DM_Weight.msg;
+using DM_Weight.util;
+using DM_Weight.Views;
+using System.Collections.ObjectModel;
+using Microsoft.Win32;
+using System.Xml;
+using System.Diagnostics;
+using DM_Weight.HIKVISION;
+using System.Security.AccessControl;
+
+namespace DM_Weight.ViewModels
+{
+ public class LoginWindowViewModel : BindableBase, IRegionMemberLifetime, IConfirmNavigationRequest
+ {
+ private readonly ILog logger = LogManager.GetLogger(typeof(LoginWindowViewModel));
+
+ private string username;
+ private string password;
+
+ private Boolean _loginBtnEnable = true;
+
+ IRegionManager _regionManager;
+ IEventAggregator _eventAggregator;
+
+ private int loginMode = Convert.ToInt32(ConfigurationManager.AppSettings["loginMode"]?.ToString() ?? "1");
+ private string firstLogin = ConfigurationManager.AppSettings["firstLogin"]?.ToString() ?? "operator";
+
+ public bool SingleLogin
+ {
+ get => ReadAppSetting("loginMode") == "1";
+ //get => loginMode == 1;
+ }
+ public bool MultiLogin
+ {
+ //get => loginMode == 2;
+ get => ReadAppSetting("loginMode") == "2";
+ }
+
+ public string LoginUserCheck
+ {
+
+ get => ReadAppSetting("loginUser");
+ }
+
+ //private CHKFunction _chkFunction;
+
+ public Boolean LoginBtnEnable { get { return _loginBtnEnable; } set { SetProperty(ref _loginBtnEnable, value); } }
+ public string Password { get { return password; } set { SetProperty(ref password, value); } }
+
+ public string Username { get { return username; } set { SetProperty(ref username, value); } }
+
+ public UserList Operator { get; set; }
+ public UserList Reviewer { get; set; }
+
+ private bool _fingerMsg;
+
+ public bool FingerMsg
+ {
+ get => _fingerMsg;
+ set => SetProperty(ref _fingerMsg, value);
+ }
+ //public bool FridgePortMsg
+ //{
+ // get => !_portUtil.fridgeSerial.IsOpen;
+ //}
+ //录像机登录状态
+ //private bool _hikMsg;
+ //public bool HIKMsg
+ //{
+ // get=>_hikMsg;
+ // set=>SetProperty(ref _hikMsg, value);
+ //}
+
+ //public LoginWindowViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, PortUtil portUtil, FingerprintUtil fingerprintUtil)
+ //{
+ // _fingerprintUtil = fingerprintUtil;
+ // _portUtil = portUtil;
+ // _regionManager = regionManager;
+ // _eventAggregator = eventAggregator;
+ //}
+ public LoginWindowViewModel(IRegionManager regionManager, IEventAggregator eventAggregator)
+ {
+ //_chkFunction= chcFunction;
+ _regionManager = regionManager;
+ _eventAggregator = eventAggregator;
+ }
+ private DelegateCommand? _loginCommand;
+
+ private DelegateCommand? _exitCommand;
+
+ public DelegateCommand LoginCommand =>
+_loginCommand ??= new DelegateCommand(Login);
+
+ public DelegateCommand ExitCommand =>
+_exitCommand ??= new DelegateCommand(Exit);
+
+ public bool KeepAlive => false;
+
+ void Login()
+ {
+ LoginBtnEnable = false;
+ if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password))
+ {
+ if (Username.Equals("hkcadmin") && Password.Equals("hkc123"))
+ {
+ ObservableCollection defaultAll = null;// RoleManagerWindowViewModel.defaultAll;
+ PremissionDm[] a = new PremissionDm[defaultAll.Count];
+ Array.Copy(defaultAll.ToArray(), 0, a, 0, defaultAll.Count);
+ a[4].Children.Add(new PremissionDm()
+ {
+ Id = 54,
+ PremissionName = "调试页面",
+ PremissionPath = "DebugWindow",
+ });
+ //添加参数,键值对格式
+ keys.Add("operator", new UserList()
+ {
+ UserName = Username,
+ Nickname = "华康测试账号",
+ Id = 9999,
+ Role = new RoleDm()
+ {
+ Id = 9999,
+ RoleName = "hkcadmin",
+ Permissions = a.ToList()
+ },
+ });
+ _regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
+ }
+ else
+ {
+ UserList userList = SqlSugarHelper.Db.Queryable()
+
+ .Includes(u => u.Role)
+
+ .First(u => u.UserName == username && ConfigurationManager.AppSettings["machineId"].ToString().Equals(u.MachineId));
+ if (userList == null)
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = "无此用户",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ Username = "";
+ Password = "";
+ }
+ else if (userList.Role == null|| userList.Role.Permissions.Count<=0)
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = "用户还未设置权限,请联系管理员",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ Username = "";
+ Password = "";
+ }
+ else
+ {
+ if (userList.PassWord == MD5.GetMD5Hash(Password))
+ {
+
+ SetUser(userList);
+ }
+ else
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = "密码错误",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ Password = "";
+ }
+ }
+ }
+ }
+ else
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = "请输入账号或密码",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ }
+ LoginBtnEnable = true;
+ }
+
+ private NavigationParameters keys = new NavigationParameters();
+
+ void SetUser(UserList user)
+ {
+ // 单人登录模式
+ if (SingleLogin)
+ {
+ //添加参数,键值对格式
+ keys.Add("operator", user);
+ //System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+ //{
+ _regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
+ //}));
+ }
+ // 双人登录模式
+ else
+ {
+ // 如果已经录入了发药人,已经有一个用户登录
+ if (keys.ContainsKey("operator"))
+ {
+ if (keys.GetValue("operator").Id != user.Id)
+ {
+ keys.Add("reviewer", user);
+ Reviewer = user;
+ RaisePropertyChanged("Reviewer");
+ //System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+ //{
+ _regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
+ //}));
+
+ }
+ else
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = "该发药人账号已登录,请输入不同账号",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ }
+ }
+ // 如果已经录入了审核人, 已经有一个用户登录
+ else if (keys.ContainsKey("reviewer"))
+ {
+ if (keys.GetValue("reviewer").Id != user.Id)
+ {
+ keys.Add("operator", user);
+ Operator = user;
+ RaisePropertyChanged("Operator");
+ //System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+ //{
+ _regionManager.RequestNavigate("MainRegion", "HomeWindow", keys);
+ //}));
+
+ }
+ else
+ {
+ AlertMsg alertMsg = new AlertMsg
+ {
+ Message = "该审核人账号已登录,请输入不同账号",
+ Type = MsgType.ERROR
+ };
+ _eventAggregator.GetEvent().Publish(alertMsg);
+ }
+ }
+ // 第一个用户登录
+ else
+ {
+ if (firstLogin.Equals("operator"))
+ {
+ keys.Add("operator", user);
+ Operator = user;
+ RaisePropertyChanged("Operator");
+ }
+ else
+ {
+ keys.Add("reviewer", user);
+ Reviewer = user;
+ RaisePropertyChanged("Reviewer");
+ }
+ Username = string.Empty;
+ Password =string.Empty;
+ }
+ }
+ }
+
+ void Exit()
+ {
+ //_chkFunction.HIKLoginOut();
+ Process.GetCurrentProcess().Kill();
+ Environment.Exit(0);
+ }
+
+
+ //这个方法用于拦截请求,continuationCallback(true)就是不拦截,continuationCallback(false)拦截本次操作
+ public void ConfirmNavigationRequest(NavigationContext navigationContext, Action continuationCallback)
+ {
+
+ continuationCallback(true);
+ }
+
+
+ //接收导航传过来的参数 现在是在此处初始化了表格数据
+ public void OnNavigatedTo(NavigationContext navigationContext)
+ {
+ }
+
+
+ //每次导航的时候,该实列用不用重新创建,true是不重新创建,false是重新创建
+ public bool IsNavigationTarget(NavigationContext navigationContext)
+ {
+ return true;
+ }
+
+ //这个方法用于拦截请求
+ public void OnNavigatedFrom(NavigationContext navigationContext)
+ {
+ }
+ //手动实现调用配置的逻辑 规避修改配置文件后不起作用的问题
+ public string ReadAppSetting(string key)
+ {
+ string xPath = $"/configuration/appSettings//add[@key='{key}']";
+ XmlDocument doc = new XmlDocument();
+ string exeFileName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
+ doc.Load(exeFileName + ".dll.config");
+ XmlNode node = doc.SelectSingleNode(xPath);
+ return node.Attributes["value"].Value.ToString();
+ }
+ }
+}
diff --git a/DM_Weight/ViewModels/MainWindowViewModel.cs b/DM_Weight/ViewModels/MainWindowViewModel.cs
new file mode 100644
index 0000000..2111270
--- /dev/null
+++ b/DM_Weight/ViewModels/MainWindowViewModel.cs
@@ -0,0 +1,101 @@
+using MaterialDesignThemes.Wpf;
+using Prism.Commands;
+using Prism.Events;
+using Prism.Mvvm;
+using Prism.Regions;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+using DM_Weight.msg;
+using DM_Weight.util;
+using DM_Weight.Views;
+using Unity;
+using DM_Weight.HIKVISION;
+
+namespace DM_Weight.ViewModels
+{
+ internal class MainWindowViewModel : BindableBase
+ {
+ private string _title = "Prism App"; //标题
+
+ private ISnackbarMessageQueue _snackbarMessageQueue = new SnackbarMessageQueue(TimeSpan.FromSeconds(3));
+
+ private SolidColorBrush _colorBrush;
+
+
+ //private PortUtil _portUtil;
+
+ //private ScreenUtil _screenUtil;
+
+ public SolidColorBrush Background
+ {
+ get => _colorBrush;
+ set => SetProperty(ref _colorBrush, value);
+ }
+
+ public ISnackbarMessageQueue SnackbarMessageQueue
+ {
+ get => _snackbarMessageQueue;
+ set => SetProperty(ref _snackbarMessageQueue, value);
+ }
+ public string Title
+ {
+ get { return _title; }
+ set { SetProperty(ref _title, value); }
+ }
+
+
+ IEventAggregator eventAggregator;
+
+
+ //public MainWindowViewModel(IEventAggregator eventAggregator, PortUtil portUtil, ScreenUtil screenUtil)
+ //{
+ // _portUtil = portUtil;
+ // this.eventAggregator = eventAggregator;
+ // this.eventAggregator.GetEvent().Subscribe(doMyPrismEvent2);
+ // _screenUtil = screenUtil;
+ //}
+ //private FingerprintUtil _fingerprintUtil;
+ IRegionManager _regionManager;
+ IUnityContainer _container;
+ //private CHKFunction _cHKFunction;
+ public MainWindowViewModel(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator)
+ {
+ //_portUtil = portUtil;
+ this.eventAggregator = eventAggregator;
+ this.eventAggregator.GetEvent().Subscribe(doMyPrismEvent2);
+ //_fingerprintUtil = fingerprintUtil;
+ _regionManager = regionManager;
+ _container = container;
+ //_cHKFunction = cHKFunction;
+ //System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+ //{
+
+ _container.RegisterType