l2736 1 місяць тому
батько
коміт
13e5c7a117

+ 0 - 1
Avalonia/ShakerApp/ShakerApp.csproj

@@ -38,7 +38,6 @@
   </ItemGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\..\Calc\SIMDFxpConvert\SIMDFxpConvert.csproj" />
     <ProjectReference Include="..\..\Communication\ICommunication\ICommunication.csproj" />
     <ProjectReference Include="..\..\EventBroker\EventBroker\EventBroker.csproj" />
     <ProjectReference Include="..\..\Language\ILanguage\ILanguage.csproj" />

+ 10 - 10
Avalonia/ShakerApp/Tools/Tools.cs

@@ -74,11 +74,11 @@ namespace ShakerApp.Tools
             float[] img = new float[len];
             Unsafe.CopyBlock(ref Unsafe.As<float, byte>(ref real[0]), ref Unsafe.As<float, byte>(ref value), len*(uint)Unsafe.SizeOf<float>());
 
-            MainViewModel.Default.Calc.FFT.FFT(real, img);
-            MainViewModel.Default.Calc.Multiply.Multiply(ref real[0], ref real[0], len);
-            MainViewModel.Default.Calc.Multiply.Multiply(ref img[0], ref img[0], len);
-            MainViewModel.Default.Calc.Add.Add(ref real[0], ref img[0], len);
-            MainViewModel.Default.Calc.Sqrt.Sqrt(ref real[0], len);
+            Shaker.Models.Tools.Tools.Calc.FFT.FFT(real, img);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref real[0], ref real[0], len);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref img[0], ref img[0], len);
+            Shaker.Models.Tools.Tools.Calc.Add.Add(ref real[0], ref img[0], len);
+            Shaker.Models.Tools.Tools.Calc.Sqrt.Sqrt(ref real[0], len);
             var peaks = FindPeaks(ref real[0], len);
             if (peaks.Count == 0) return 0;
             var valueindex = peaks.FindIndex(x => x.Value == peaks.Max(y => y.Value));
@@ -103,11 +103,11 @@ namespace ShakerApp.Tools
             double[] img = new double[len];
             Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref real[0]), ref Unsafe.As<double, byte>(ref value), len*(uint)Unsafe.SizeOf<double>());
 
-            MainViewModel.Default.Calc.FFT.FFT(real, img);
-            MainViewModel.Default.Calc.Multiply.Multiply(ref real[0], ref real[0], len);
-            MainViewModel.Default.Calc.Multiply.Multiply(ref img[0], ref img[0], len);
-            MainViewModel.Default.Calc.Add.Add(ref real[0], ref img[0], len);
-            MainViewModel.Default.Calc.Sqrt.Sqrt(ref real[0], len);
+            Shaker.Models.Tools.Tools.Calc.FFT.FFT(real, img);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref real[0], ref real[0], len);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref img[0], ref img[0], len);
+            Shaker.Models.Tools.Tools.Calc.Add.Add(ref real[0], ref img[0], len);
+            Shaker.Models.Tools.Tools.Calc.Sqrt.Sqrt(ref real[0], len);
             double maxv = real.Max();
             int maxvindex = Array.IndexOf(real, maxv);
             double harmonicv = 0;

+ 0 - 1
Avalonia/ShakerApp/ViewModels/MainViewModel.cs

@@ -25,7 +25,6 @@ namespace ShakerApp.ViewModels;
 
 public class MainViewModel : DisplayViewModelBase<IModel>
 {
-    public ICalc Calc { get; } = new SIMDFxpConvert.SIMDCalc();
     private AvaloniaDictionary<string, Window?> OpenedWindows = new AvaloniaDictionary<string, Window?>();
     private bool canDebug = false;
 

+ 11 - 159
Avalonia/ShakerApp/ViewModels/ShakerConfig/RandomConfigViewModel.cs

@@ -355,7 +355,7 @@ namespace ShakerApp.ViewModels
                 SpectrumItems.Add(new IndexValueItemViewModel<RandomSpectrumItemViewModel>(i + 1, new RandomSpectrumItemViewModel(items[i])));
             }
             if (items.Count < 3) return;
-            CalcRefSpectrum(items.Select(x => x.Frequency).ToArray(), items.Select(x => x.Value).ToArray(), items.Select(x => x.ValueType).ToArray(), FrequencyResolution,out var fy_array,out var f,out var turningfreq);
+            Shaker.Models.Tools.Tools.CalcRefSpectrum(items.Select(x => x.Frequency).ToArray(), items.Select(x => x.Value).ToArray(), items.Select(x => x.ValueType).ToArray(), FrequencyResolution,out var fy_array,out var f,out var turningfreq);
             if (fy_array.Length == 0) return;
             this.Model.SpectralTables.Clear();
             for(int i=0;i<turningfreq.Length;i++)
@@ -366,16 +366,16 @@ namespace ShakerApp.ViewModels
                     TurningValue = fy_array[(int)((turningfreq[i]-SpectrumItems[0].Value.Frequency)/FrequencyResolution)],
                 });
             }
-            RMSAcceleration = Math.Sqrt(ViewModels.MainViewModel.Default.Calc.Sum.Sum(ref fy_array[0], (uint)fy_array.Length) * FrequencyResolution);
+            RMSAcceleration = Math.Sqrt(Shaker.Models.Tools.Tools.Calc.Sum.Sum(ref fy_array[0], (uint)fy_array.Length) * FrequencyResolution);
             ResetRMS = RMSAcceleration;
             double[] f2 = new double[f.Length];
             double[] fv = new double[f.Length];
-            MainViewModel.Default.Calc.Multiply.Multiply(ref f[0], ref f[0], (uint)f.Length,ref f2[0]);
-            MainViewModel.Default.Calc.Division.Division(ref fy_array[0],ref  f2[0],  (uint)f.Length,ref fv[0]);
-            double sum = MainViewModel.Default.Calc.Sum.Sum(ref fv[0], (uint)fv.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref f[0], ref f[0], (uint)f.Length,ref f2[0]);
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref fy_array[0],ref  f2[0],  (uint)f.Length,ref fv[0]);
+            double sum = Shaker.Models.Tools.Tools.Calc.Sum.Sum(ref fv[0], (uint)fv.Length);
             MaxVelocity = Math.Sqrt((sum - (fv[0] + fv[^1] / 2) / 2) * FrequencyResolution) / (2 * Math.PI) * Sigma * 9.8f;
-            MainViewModel.Default.Calc.Division.Division(ref fv[0], ref f2[0], (uint)f.Length, ref fv[0]);
-            sum = MainViewModel.Default.Calc.Sum.Sum(ref fv[0], (uint)fv.Length);
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref fv[0], ref f2[0], (uint)f.Length, ref fv[0]);
+            sum = Shaker.Models.Tools.Tools.Calc.Sum.Sum(ref fv[0], (uint)fv.Length);
             MaxDisplacement = Math.Sqrt((sum - (fv[0] + fv[^1] / 2) / 2) * FrequencyResolution) / (2 * Math.PI*2*Math.PI) * Sigma * 9800f;
             OnPropertyChanged(nameof(MaxAcceleration));
             double[,] spectrumdata = new double[5, f.Length];
@@ -406,160 +406,12 @@ namespace ShakerApp.ViewModels
         }
         private void CalcSpectrum(List<RandomSpectrumItemModel> models, [In] double[] f, [In] double[] fy_array, [In] double deltaf, [In] double[] turn_freq,ref double[,] spectrumdata)
         {
-            CalcItemSpectrum(models.Select(x => x.UpStop).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[1, 0]);
-            CalcItemSpectrum(models.Select(x => x.UpWarn).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[2, 0]);  
-            CalcItemSpectrum(models.Select(x => x.DownStop).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[3, 0]);
-            CalcItemSpectrum(models.Select(x => x.DownWarn).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[4, 0]);
+            Shaker.Models.Tools.Tools.CalcItemSpectrum(models.Select(x => x.UpStop).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[1, 0]);
+            Shaker.Models.Tools.Tools.CalcItemSpectrum(models.Select(x => x.UpWarn).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[2, 0]);  
+            Shaker.Models.Tools.Tools.CalcItemSpectrum(models.Select(x => x.DownStop).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[3, 0]);
+            Shaker.Models.Tools.Tools.CalcItemSpectrum(models.Select(x => x.DownWarn).ToArray(), f, fy_array, deltaf, turn_freq, ref spectrumdata[4, 0]);
         }
-        private void CalcItemSpectrum(double[] offset, [In] double[] f, [In] double[] fy_array, [In] double deltaf, [In] double[] turn_freq, ref double spectrumdata)
-        {
-            for (int i = 0; i < offset.Length - 1; i++)
-            {
-                int index = (int)((turn_freq[i] - turn_freq[0]) / deltaf);
-                uint len = (uint)((turn_freq[i + 1] - turn_freq[i]) / deltaf);
-                if (offset[i+1] == offset[i])
-                {
-                    var x = Math.Pow(10, offset[i] / 10);
-                    MainViewModel.Default.Calc.Multiply.Multiply(ref fy_array[index], x, len, ref Unsafe.Add(ref spectrumdata,index));
-                }
-                else
-                {
-                    double db1_psd = Math.Pow(10, offset[i] / 10) * fy_array[index];
-                    double db2_psd = Math.Pow(10, offset[i + 1] / 10) * fy_array[index+len];
-                    var x= Math.Log10(db2_psd / db1_psd) / (Math.Log2(turn_freq[i + 1] / turn_freq[i])) * 10;
-                    for(int j=0;j<len;j++)
-                    {
-                        ref double result = ref Unsafe.Add(ref spectrumdata, index + j);
-                       result =  Math.Pow(10, Math.Log2(f[index + j] / turn_freq[i]) * x / 10) * db1_psd;
-                    }
-                }
-            }
-            ref double temp = ref Unsafe.Add(ref spectrumdata, fy_array.Length - 1);
-            temp = Math.Pow(10, offset[^1] / 10) * fy_array[^1];
-        }
-        private void CalcRefSpectrum(double[] f_array, double[] y_array, RandomValueType[] k_array, double deltaf ,out double[] fy_array,out double[] f,out double[] turningfreq)
-        {
-            int n=f_array.Length;
-            // 计算圆整频率值及其对应的谱值
-            double[] round_f = new double[n];
-            double[] round_y = new double[n];
-            turningfreq = new double[n];
-            for (int i = 0; i < n; i++)
-            {
-                round_f[i] = Math.Ceiling(f_array[i] / deltaf) * deltaf;
-                turningfreq[i] = round_f[i];
-            }
-
-            // 若第一个点值未知时,需先计算第一个点的值
-            if (k_array[0] ==  RandomValueType.Slope && k_array[1] ==  RandomValueType.Slope)
-            {
-                y_array[0] = y_array[1];
-            }
-
-            if (k_array[0] ==  RandomValueType.Slope && k_array[1] ==  RandomValueType.Value)
-            {
-                k_array[0] = 0;
-                y_array[0] = y_array[1];
-            }
-
-            if (k_array[0] ==  RandomValueType.Slope)
-            {
-                double kk = y_array[1];
-                y_array[0] = y_array[2] / (Math.Pow(10, kk / 10 * Math.Log(f_array[1] / f_array[0], 2)));
-                y_array[1] = y_array[2];
-                k_array[0] = 0;
-                k_array[1] = 0;
-            }
-
-            // 计算第二点及其后点的值
-            for (int i = 1; i < n; i++)
-            {
-                if (f_array[i] == 0)
-                {
-                    double kk = y_array[i];
-                    y_array[i] = y_array[i + 1];
-                    f_array[i] = Math.Pow(2, (10 * Math.Log(y_array[i + 1] / y_array[i - 1], 10) / kk)) * f_array[i - 1];
-                }
-                else
-                {
-                    if (k_array[i] ==  RandomValueType.Slope)
-                    {
-                        y_array[i] = Math.Pow(10, y_array[i] / 10 * Math.Log(f_array[i] / f_array[i - 1], 2)) * y_array[i - 1];
-                        k_array[i] = 0;
-                    }
-                }
-            }
-
-            // 验证结果值
-            double[] k_exam = new double[n - 1];
-            for (int i = 0; i < n; i++)
-            {
-                if (i < n - 1)
-                {
-                    k_exam[i] = 10 * Math.Log(y_array[i + 1] / y_array[i], 10) / Math.Log(f_array[i + 1] / f_array[i], 2);
-                }
-            }
-
-            // 计算圆整后频率对应的谱值
-            for (int i = 0; i < n; i++)
-            {
-                if (round_f[i] == f_array[i])
-                {
-                    round_y[i] = y_array[i];
-                }
-
-                if (i < n - 1)
-                {
-                    if (round_f[i] > f_array[i])
-                    {
-                        round_y[i] = Math.Pow(10, k_exam[i] / 10 * Math.Log(round_f[i] / f_array[i], 2)) * y_array[i];
-                    }
-                }
-
-                if (i == n - 1)
-                {
-                    round_y[i] = Math.Pow(10, k_exam[i - 1] / 10 * Math.Log(round_f[i] / f_array[i], 2)) * y_array[i];
-                }
 
-                if (round_f[i] < f_array[i])
-                {
-                    round_y[i] = Math.Pow(10, k_exam[i - 1] / 10 * Math.Log(f_array[i] / round_f[i], 2)) * y_array[i];
-                }
-            }
-
-            int parts = k_exam.Length; // 将谱按斜率分成几段,parts为总的段数\
-            f = Enumerable.Range(0, (int)((round_f[n - 1] - round_f[0]) / deltaf) + 1).Select(x => x * deltaf + round_f[0]).ToArray();
-            fy_array =new double[f.Length];
-            fy_array[0] = round_y[0];
-            fy_array[^1] = round_y[^1];
-            int part_begin = 0;
-
-            for (int i = 0; i < parts; i++)
-            {
-                fy_array[part_begin] = round_y[i];
-                int n_part = (int)Math.Round((round_f[i + 1] - round_f[i]) / deltaf);
-
-                if (k_exam[i] == 0)
-                {
-                    for (int k = part_begin + 1; k <= part_begin + n_part; k++)
-                    {
-                        fy_array[k] = fy_array[k - 1];
-                    }
-                }
-                else
-                {
-                    if (n_part > 0)
-                    {
-                        for (int k = part_begin + 1; k <= part_begin + n_part; k++)
-                        {
-                            fy_array[k] = Math.Pow(10, k_exam[i] / 10 * Math.Log(f[k] / f[k - 1], 2)) * fy_array[k - 1];
-                        }
-                    }
-                }
-
-                part_begin += n_part;
-            }
-        }
         protected override void Save()
         {
             base.Save();

+ 1 - 1
Avalonia/ShakerApp/ViewModels/ShakerDataViewModel.cs

@@ -187,7 +187,7 @@ namespace ShakerApp.ViewModels
                         Name = ShakerConfigViewModel.Instance.Model.AnalogSignalConfigs[i].Name,
                         Max = max,
                         Min = min,
-                        RMS = MainViewModel.Default.Calc.Sum.Rms(ref Unsafe.As<byte,float>(ref data[i*bytecount*col]), col),
+                        RMS = Shaker.Models.Tools.Tools.Calc.Sum.Rms(ref Unsafe.As<byte,float>(ref data[i*bytecount*col]), col),
                         Average = v/ col,
                         THD = thd,
                         Unit = ShakerConfigViewModel.Instance.Model.AnalogSignalConfigs[i].Unit,

+ 5 - 0
Shaker.Model/Models/RandomConfigModel.cs

@@ -21,6 +21,11 @@
         public uint WarnLines = 120;
         public double StopRMS = 6;
         public double RMSAcceleration = 0;
+        /// <summary>
+        /// 均衡系数
+        /// </summary>
+        public double EquilibriumCoefficient = 0.01;
+
         public override object Clone()
         {
             return this.CloneBase();

+ 1 - 0
Shaker.Model/Models/RandomDataModel.cs

@@ -24,6 +24,7 @@ namespace Shaker.Models
         public uint TestTotalRunTime = 0;
         public double CurrentTestLevel = 0;
         public uint CurrentTestTime = 0;
+        public uint TestIndex = 0;
         public uint CurrentLevelTestMaxTime = 0;
         public override object Clone()
         {

+ 1 - 0
Shaker.Model/Shaker.Models.csproj

@@ -15,6 +15,7 @@
 
 
   <ItemGroup>
+    <ProjectReference Include="..\Calc\SIMDFxpConvert\SIMDFxpConvert.csproj" />
     <ProjectReference Include="..\PLCConnect\IPLCConnect\IPLCConnect.csproj" />
   </ItemGroup>
 

+ 165 - 4
Shaker.Model/Tools/Tools.cs

@@ -1,8 +1,10 @@
-using System;
+using FxpConvert.Common;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq.Expressions;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
 using System.Xml.Schema;
@@ -11,6 +13,7 @@ namespace Shaker.Models.Tools
 {
     public static  class Tools
     {
+        public static ICalc Calc { get; } = new SIMDFxpConvert.SIMDCalc();
         /// <summary>
         /// 单边谱扩展到双边谱
         /// </summary>
@@ -19,8 +22,8 @@ namespace Shaker.Models.Tools
         public static double[] UnilateralSpectrumToBilateralSpectrum(double[] unilateralSpectrum) 
         {
             double[] result = new double[unilateralSpectrum.Length << 1];
-            result[0] = unilateralSpectrum[0];
-            Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref result[1]), ref Unsafe.As<double, byte>(ref unilateralSpectrum[0]), (uint)(unilateralSpectrum.Length * Unsafe.SizeOf<double>()));
+            Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref result[0]), ref Unsafe.As<double, byte>(ref unilateralSpectrum[0]), (uint)(unilateralSpectrum.Length * Unsafe.SizeOf<double>()));
+            result[unilateralSpectrum.Length] = unilateralSpectrum[^1];
             double[] temp = unilateralSpectrum.Reverse().ToArray();
             Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref result[unilateralSpectrum.Length+1]), ref Unsafe.As<double, byte>(ref temp[0]), (uint)((unilateralSpectrum.Length-1) * Unsafe.SizeOf<double>()));
             return result;
@@ -47,7 +50,156 @@ namespace Shaker.Models.Tools
             }
             return model.SweepItems.Count - 1;
         }
+        public static  void CalcItemSpectrum(double[] offset, [In] double[] f, [In] double[] fy_array, [In] double deltaf, [In] double[] turn_freq, ref double spectrumdata)
+        {
+            for (int i = 0; i < offset.Length - 1; i++)
+            {
+                int index = (int)((turn_freq[i] - turn_freq[0]) / deltaf);
+                uint len = (uint)((turn_freq[i + 1] - turn_freq[i]) / deltaf);
+                if (offset[i + 1] == offset[i])
+                {
+                    var x = Math.Pow(10, offset[i] / 10);
+                    Calc.Multiply.Multiply(ref fy_array[index], x, len, ref Unsafe.Add(ref spectrumdata, index));
+                }
+                else
+                {
+                    double db1_psd = Math.Pow(10, offset[i] / 10) * fy_array[index];
+                    double db2_psd = Math.Pow(10, offset[i + 1] / 10) * fy_array[index + len];
+                    var x = Math.Log10(db2_psd / db1_psd) / (Math.Log2(turn_freq[i + 1] / turn_freq[i])) * 10;
+                    for (int j = 0; j < len; j++)
+                    {
+                        ref double result = ref Unsafe.Add(ref spectrumdata, index + j);
+                        result = Math.Pow(10, Math.Log2(f[index + j] / turn_freq[i]) * x / 10) * db1_psd;
+                    }
+                }
+            }
+            ref double temp = ref Unsafe.Add(ref spectrumdata, fy_array.Length - 1);
+            temp = Math.Pow(10, offset[^1] / 10) * fy_array[^1];
+        }
+
+        public static void CalcRefSpectrum(double[] f_array, double[] y_array, RandomValueType[] k_array, double deltaf, out double[] fy_array, out double[] f, out double[] turningfreq)
+        {
+            int n = f_array.Length;
+            // 计算圆整频率值及其对应的谱值
+            double[] round_f = new double[n];
+            double[] round_y = new double[n];
+            turningfreq = new double[n];
+            for (int i = 0; i < n; i++)
+            {
+                round_f[i] = Math.Ceiling(f_array[i] / deltaf) * deltaf;
+                turningfreq[i] = round_f[i];
+            }
+
+            // 若第一个点值未知时,需先计算第一个点的值
+            if (k_array[0] == RandomValueType.Slope && k_array[1] == RandomValueType.Slope)
+            {
+                y_array[0] = y_array[1];
+            }
+
+            if (k_array[0] == RandomValueType.Slope && k_array[1] == RandomValueType.Value)
+            {
+                k_array[0] = 0;
+                y_array[0] = y_array[1];
+            }
+
+            if (k_array[0] == RandomValueType.Slope)
+            {
+                double kk = y_array[1];
+                y_array[0] = y_array[2] / (Math.Pow(10, kk / 10 * Math.Log(f_array[1] / f_array[0], 2)));
+                y_array[1] = y_array[2];
+                k_array[0] = 0;
+                k_array[1] = 0;
+            }
+
+            // 计算第二点及其后点的值
+            for (int i = 1; i < n; i++)
+            {
+                if (f_array[i] == 0)
+                {
+                    double kk = y_array[i];
+                    y_array[i] = y_array[i + 1];
+                    f_array[i] = Math.Pow(2, (10 * Math.Log(y_array[i + 1] / y_array[i - 1], 10) / kk)) * f_array[i - 1];
+                }
+                else
+                {
+                    if (k_array[i] == RandomValueType.Slope)
+                    {
+                        y_array[i] = Math.Pow(10, y_array[i] / 10 * Math.Log(f_array[i] / f_array[i - 1], 2)) * y_array[i - 1];
+                        k_array[i] = 0;
+                    }
+                }
+            }
+
+            // 验证结果值
+            double[] k_exam = new double[n - 1];
+            for (int i = 0; i < n; i++)
+            {
+                if (i < n - 1)
+                {
+                    k_exam[i] = 10 * Math.Log(y_array[i + 1] / y_array[i], 10) / Math.Log(f_array[i + 1] / f_array[i], 2);
+                }
+            }
 
+            // 计算圆整后频率对应的谱值
+            for (int i = 0; i < n; i++)
+            {
+                if (round_f[i] == f_array[i])
+                {
+                    round_y[i] = y_array[i];
+                }
+
+                if (i < n - 1)
+                {
+                    if (round_f[i] > f_array[i])
+                    {
+                        round_y[i] = Math.Pow(10, k_exam[i] / 10 * Math.Log(round_f[i] / f_array[i], 2)) * y_array[i];
+                    }
+                }
+
+                if (i == n - 1)
+                {
+                    round_y[i] = Math.Pow(10, k_exam[i - 1] / 10 * Math.Log(round_f[i] / f_array[i], 2)) * y_array[i];
+                }
+
+                if (round_f[i] < f_array[i])
+                {
+                    round_y[i] = Math.Pow(10, k_exam[i - 1] / 10 * Math.Log(f_array[i] / round_f[i], 2)) * y_array[i];
+                }
+            }
+
+            int parts = k_exam.Length; // 将谱按斜率分成几段,parts为总的段数\
+            f = Enumerable.Range(0, (int)((round_f[n - 1] - round_f[0]) / deltaf) + 1).Select(x => x * deltaf + round_f[0]).ToArray();
+            fy_array = new double[f.Length];
+            fy_array[0] = round_y[0];
+            fy_array[^1] = round_y[^1];
+            int part_begin = 0;
+
+            for (int i = 0; i < parts; i++)
+            {
+                fy_array[part_begin] = round_y[i];
+                int n_part = (int)Math.Round((round_f[i + 1] - round_f[i]) / deltaf);
+
+                if (k_exam[i] == 0)
+                {
+                    for (int k = part_begin + 1; k <= part_begin + n_part; k++)
+                    {
+                        fy_array[k] = fy_array[k - 1];
+                    }
+                }
+                else
+                {
+                    if (n_part > 0)
+                    {
+                        for (int k = part_begin + 1; k <= part_begin + n_part; k++)
+                        {
+                            fy_array[k] = Math.Pow(10, k_exam[i] / 10 * Math.Log(f[k] / f[k - 1], 2)) * fy_array[k - 1];
+                        }
+                    }
+                }
+
+                part_begin += n_part;
+            }
+        }
         public static void CalcAmpt(this SweepConfigModel model, double freq,ref double value,ref double upstop,ref double upwarn,ref double downstop,ref double downwarn)
         {
             int index = model.FindFrequencyIndex(freq);
@@ -265,7 +417,11 @@ namespace Shaker.Models.Tools
         /// <param name="rowcount"></param>
         /// <param name="colnumcount"></param>
         public static void Deinterweaving<T>(ref T source, ref T destination, int rowcount, int colnumcount,int maxcolnumcount) => ArrayTranspose(ref source, ref destination, rowcount, colnumcount,maxcolnumcount);
-
+        /// <summary>
+        /// 压缩数据包
+        /// </summary>
+        /// <param name="arrays"></param>
+        /// <returns></returns>
         public static byte[] CompressionBytes(byte[] arrays)
         {
             if (arrays == null || arrays.Length == 0) return new byte[0];
@@ -278,6 +434,11 @@ namespace Shaker.Models.Tools
                 return ms.ToArray();
             }
         }
+        /// <summary>
+        /// 解压数据包
+        /// </summary>
+        /// <param name="arrays"></param>
+        /// <returns></returns>
         public static byte[] DecompressionBytes(byte[] arrays)
         {
             if (arrays == null || arrays.Length == 0) return new byte[0];

+ 2 - 0
Shaker.Model/Topic.cs

@@ -49,5 +49,7 @@ namespace Shaker.Models
         /// 连接后的初始消息
         /// </summary>
         public const string SERVICERESULT = "ServiceResult";
+        public const string POWEROFF = "Poweroff";
+        public const string REBOOT = "Reboot";
     }
 }

+ 433 - 0
Shaker/NISyscfg.NET.cs

@@ -0,0 +1,433 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace nisyscfg
+{
+    public class NISyscfg
+    {
+        private bool isinit = false;
+        private nint expertEnumHandle = 0;
+        private nint sessionHandle = 0;
+        private NISysCfgStatus status;
+        public NISyscfg(string targetName="localhost", string username="", string password="",NISysCfgLocale language = NISysCfgLocale.NISysCfgLocaleDefault, bool forcePropertyRefresh = true, uint connectTimeoutMsec = 4000)
+        {
+            TargetName = targetName;
+            UserName = username;
+            Password = password;
+            Language = language;
+            ForcePropertyRefresh = forcePropertyRefresh;
+            ConnectTimeoutMsec = connectTimeoutMsec;
+        }
+        public void Init()
+        {
+            if (isinit) return;
+            status = NativeMethods.NISysCfgInitializeSession(TargetName, UserName, Password, Language, ForcePropertyRefresh, ConnectTimeoutMsec, ref expertEnumHandle, ref sessionHandle);
+            if (status != NISysCfgStatus.NISysCfg_OK) return;
+            Filter = NISysFilter.CreateFilter(sessionHandle);
+        }
+        [AllowNull]
+        public NISysFilter Filter { get; private set; }
+        public List<NIHardware> SearchHardware(NISysCfgFilterMode mode = NISysCfgFilterMode.NISysCfgFilterModeMatchValuesAll)
+        {
+            nint resourceEnumHandle = 0;
+            NativeMethods.NISysCfgFindHardware(sessionHandle, mode, Filter.Handle, string.Empty, ref resourceEnumHandle);
+            List<NIHardware> hardwares = new List<NIHardware>();
+            if (resourceEnumHandle == 0) return hardwares;
+            nint h = 0;
+            while(NativeMethods.NISysCfgNextResource(sessionHandle, resourceEnumHandle, ref h) == NISysCfgStatus.NISysCfg_OK)
+            {
+                hardwares.Add(new NIHardware(h));
+            }
+            NativeMethods.NISysCfgCloseHandle(resourceEnumHandle);
+            return hardwares;
+        }
+        public string TargetName { get; private set; }
+        public string UserName { get; private set; }
+        public string Password { get; private set; }
+        public NISysCfgLocale Language { get; private set; }
+        public bool ForcePropertyRefresh { get; private set; }
+        public uint ConnectTimeoutMsec { get; private set; }
+        public void Close()
+        {
+            NativeMethods.NISysCfgCloseHandle(sessionHandle);
+            NativeMethods.NISysCfgCloseHandle(expertEnumHandle);
+            if(Filter!=null)
+            {
+                NativeMethods.NISysCfgCloseHandle(Filter.Handle);
+            }
+        }
+    }
+
+
+    public class NIHardware:NISyscfgBase
+    {
+        [AttributeUsage(AttributeTargets.Property)]
+        class HardwarePropertyAttribute:Attribute
+        {
+            public HardwarePropertyAttribute(NISysCfgResourceProperty property)
+            {
+                Property = property;
+            }
+
+            public NISysCfgResourceProperty Property { get; }
+        }
+        internal NIHardware(nint ptr):base(ptr)
+        {
+            typeof(NIHardware).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)
+                .Where(x => x.GetCustomAttribute<HardwarePropertyAttribute>() != null)
+                .ToList()
+                .ForEach(x =>
+                {
+                    var pro = x.GetCustomAttribute<HardwarePropertyAttribute>()?.Property;
+                    if (pro == null) return;
+                    if(x.PropertyType == typeof(bool))
+                    {
+                        bool temp = false;
+                        NativeMethods.NISysCfgGetResourceProperty(ptr, pro.Value, ref temp);
+                        x.SetValue(this, temp);
+                    }
+                    else if(x.PropertyType == typeof(int) || x.PropertyType.IsEnum)
+                    {
+                        int temp = 0;
+                        NativeMethods.NISysCfgGetResourceProperty(ptr, pro.Value, ref temp);
+                        x.SetValue(this, temp);
+                    }
+                    else if(x.PropertyType == typeof(uint))
+                    {
+                        uint temp = 0;
+                        NativeMethods.NISysCfgGetResourceProperty(ptr, pro.Value, ref temp);
+                        x.SetValue(this, temp);
+                    }
+                    else if(x.PropertyType == typeof(string))
+                    {
+                        StringBuilder stringBuilder = new StringBuilder(1024);
+                        NativeMethods.NISysCfgGetResourceProperty(ptr, pro.Value, stringBuilder);
+                        x.SetValue(this, stringBuilder.ToString());
+                    }
+                    else if (x.PropertyType == typeof(double))
+                    {
+                        double temp = 0;
+                        NativeMethods.NISysCfgGetResourceProperty(ptr, pro.Value, ref Unsafe.As<double,byte>(ref temp));
+                        x.SetValue(this, temp);
+                    }
+                });
+            StringBuilder stringBuilder = new StringBuilder(1024);
+            NativeMethods.NISysCfgGetResourceIndexedProperty(ptr, NISysCfgIndexedProperty.NISysCfgIndexedPropertyExpertName, 0, stringBuilder);
+            ExpertName = stringBuilder.ToString();
+            stringBuilder = new StringBuilder(1024);
+            NativeMethods.NISysCfgGetResourceIndexedProperty(ptr, NISysCfgIndexedProperty.NISysCfgIndexedPropertyExpertResourceName, 0, stringBuilder);
+            ExpertResourceName = stringBuilder.ToString(); 
+            stringBuilder = new StringBuilder(1024);
+            NativeMethods.NISysCfgGetResourceIndexedProperty(ptr, NISysCfgIndexedProperty.NISysCfgIndexedPropertyExpertUserAlias, 0, stringBuilder);
+            ExpertUserAlias = stringBuilder.ToString();
+        }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyIsDevice)]
+        public bool IsDevice { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyIsChassis)]
+        public bool IsChassis { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertyConnectsToBusType)]
+        public NISysCfgBusType ConnectsToBusType { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyVendorId)]
+        public uint VendorId { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertyVendorName)]
+        public string VendorName { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertyProductId)]
+        public uint ProductId { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertyProductName)]
+        public string ProductName { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertySerialNumber)]
+        public string SerialNumber { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertyFirmwareRevision)]
+        public string FirmwareRevision { get; private set; }
+        [HardwareProperty( NISysCfgResourceProperty.NISysCfgResourcePropertyIsNIProduct)]
+        public bool IsNIProduct { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyIsSimulated)]
+        public bool IsSimulated { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyConnectsToLinkName)]
+        public string ConnectsToLinkName { get;private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyHasDriver)]
+        public bool HasDriver { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyIsPresent)]
+        public bool IsPresent { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertySlotNumber)]
+        public int SlotNumber { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertySupportsInternalCalibration)]
+        public bool SupportsInternalCalibration { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertySupportsExternalCalibration)]
+        public bool SupportsExternalCalibration { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyCurrentTemp)]
+        public double CurrentTemp { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyProvidesBusType)]
+        public NISysCfgBusType ProvidesBusType { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyProvidesLinkName)]
+        public string ProvidesLinkName { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyNumberOfSlots)]
+        public int NumberOfSlots { get; private set; }
+        [HardwareProperty(NISysCfgResourceProperty.NISysCfgResourcePropertyHardwareRevision)]
+        public string HardwareRevision { get; private set; }
+        public string ExpertName { get; private set; }
+        public string ExpertUserAlias { get; private set; }
+        public string ExpertResourceName { get; private set; }
+    }
+    public class NISysFilter:NISyscfgBase
+    {
+        private bool isDevice = false;
+        private bool isChassis = false;
+        private NISysCfgServiceType serviceType = NISysCfgServiceType.NISysCfgServiceTypemDnsNiSysapi;
+        private NISysFilter(nint filterhandle):base(filterhandle)
+        {
+
+        }
+        public static NISysFilter CreateFilter(nint session)
+        {
+            nint filter = 0;
+            NativeMethods.NISysCfgCreateFilter(session, ref filter);
+            return new NISysFilter(filter);
+        }
+        public bool IsDevice
+        {
+            get => isDevice;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyIsDevice, value);
+                isDevice = value;
+            }
+        }
+        public bool IsChassis
+        {
+            get => isChassis;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle,NISysCfgFilterProperty.NISysCfgFilterPropertyIsChassis, value);
+                isChassis = value;
+            }
+        }
+        public NISysCfgServiceType ServiceType
+        {
+            get => serviceType;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyServiceType, (int)value);
+                serviceType = value;
+            }
+        }
+        private NISysCfgBusType connBusType = NISysCfgBusType.NISysCfgBusTypeBuiltIn;
+        public NISysCfgBusType ConnBusType
+        {
+            get => connBusType;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyConnectsToBusType, (int)value);
+                connBusType = value;
+            }
+        }
+        private string connectsToLinkName = "";
+        public string ConnectsToLinkName
+        {
+            get => connectsToLinkName;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyConnectsToLinkName, value);
+                connectsToLinkName = value;
+            }
+        }
+        private NISysCfgBusType providesBusType = NISysCfgBusType.NISysCfgBusTypeBuiltIn;
+        public NISysCfgBusType ProvidesBusType
+        {
+            get => providesBusType;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyProvidesBusType, (int)value);
+                providesBusType = value;
+            }
+        }
+        private uint vendorId = 0;
+        public uint VendorId
+        {
+            get => vendorId;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyVendorId, value);
+                vendorId = value;
+            }
+        }
+        private uint productId = 0;
+        public uint ProductId
+        {
+            get => productId;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyProductId, value);
+                productId = value;
+            }
+        }
+        private string serialNumber = "";
+        public string SerialNumber
+        {
+            get => serialNumber;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertySerialNumber, value);
+                serialNumber = value;
+            }
+        }
+        private bool isNIProduct = false;
+        public bool IsNIProduct
+        {
+            get => isNIProduct;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyIsNIProduct, value);
+                isNIProduct = value;
+            }
+        }
+        private bool isSimulated = false;
+        public bool IsSimulated
+        {
+            get => isSimulated;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyIsSimulated, value);
+                isSimulated = value;
+            }
+        }
+        private int slotNumber = 0;
+        public int SlotNumber
+        {
+            get => slotNumber;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertySlotNumber, value);
+                slotNumber = value;
+            }
+        }
+        private bool hasDriver = false;
+        public bool HasDriver
+        {
+            get => hasDriver;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyHasDriver, value);
+                hasDriver = value;
+            }
+        }
+        private bool isPresent = false;
+        public bool IsPresent
+        {
+            get => isPresent;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyIsPresent, value);
+                isPresent = value;
+            }
+        }
+        private bool supportsCalibration = false;
+        public bool SupportsCalibration
+        {
+            get => supportsCalibration;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertySupportsCalibration, value);
+                supportsCalibration = value;
+            }
+        }
+        private bool supportsFirmwareUpdate = false;
+        public bool SupportsFirmwareUpdate
+        {
+            get => supportsFirmwareUpdate;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertySupportsFirmwareUpdate, value);
+                supportsFirmwareUpdate = value;
+            }
+        }
+        private string providesLinkName = "";
+        public string ProvidesLinkName
+        {
+            get => providesLinkName;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyProvidesLinkName, value);
+                providesLinkName = value;
+            }
+        }
+        private string expertName = "";
+        public string ExpertName
+        {
+            get => expertName;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyExpertName, value);
+                expertName = value;
+            }
+        }
+        private string resourceName = "";
+        public string ResourceName
+        {
+            get => resourceName;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyResourceName, value);
+                resourceName = value;
+            }
+        }
+
+        public string UserAlias 
+        {
+            get => userAlias;
+            set
+            {
+                NativeMethods.NISysCfgSetFilterProperty(handle, NISysCfgFilterProperty.NISysCfgFilterPropertyUserAlias, value);
+                userAlias = value;
+            }
+        }
+
+        private string userAlias = "";
+    }
+    public abstract class NISyscfgBase : IDisposable
+    {
+        internal nint Handle => handle;
+        private protected nint handle = 0;
+        public NISyscfgBase(nint ptr)
+        {
+            handle = ptr;
+        }
+        private bool disposedValue;
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (!disposedValue)
+            {
+                if (disposing)
+                {
+                    // TODO: 释放托管状态(托管对象)
+                }
+                NativeMethods.NISysCfgCloseHandle(handle);
+                // TODO: 释放未托管的资源(未托管的对象)并重写终结器
+                // TODO: 将大型字段设置为 null
+                disposedValue = true;
+            }
+        }
+
+        // // TODO: 仅当“Dispose(bool disposing)”拥有用于释放未托管资源的代码时才替代终结器
+        // ~NISyscfgBase()
+        // {
+        //     // 不要更改此代码。请将清理代码放入“Dispose(bool disposing)”方法中
+        //     Dispose(disposing: false);
+        // }
+
+        public void Dispose()
+        {
+            // 不要更改此代码。请将清理代码放入“Dispose(bool disposing)”方法中
+            Dispose(disposing: true);
+            GC.SuppressFinalize(this);
+        }
+    }
+}

+ 1 - 0
Shaker/Program.cs

@@ -1,6 +1,7 @@
 using FxpConvert.Common;
 using Microsoft.CodeAnalysis;
 using ShakerService.Tools;
+using ShakerService.ViewModel;
 using System.Diagnostics;
 using System.Numerics;
 using System.Reflection;

+ 20 - 2
Shaker/Service.cs

@@ -18,6 +18,7 @@ namespace ShakerService
 {
     internal partial class Service
     {
+        private string fpgename = "";
         public Service()
         {
             var path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
@@ -34,7 +35,24 @@ namespace ShakerService
                     .FirstOrDefault(y => y.PropertyType == x)?.GetValue(null, null);
                 });
             InitControl();
-            
+            nisyscfg.NISyscfg syscfg = new nisyscfg.NISyscfg();
+            syscfg.Init();
+            syscfg.Filter.IsDevice = true;
+            syscfg.Filter.IsChassis = false;
+            syscfg.Filter.IsSimulated = false;
+            syscfg.Filter.IsNIProduct = true;
+            syscfg.Filter.IsPresent = true;
+            syscfg.Filter.ServiceType = NISysCfgServiceType.NISysCfgServiceTypeLocalFpga;
+            var h = syscfg.SearchHardware();
+            if(h.Count>0)
+            {
+                fpgename = h.First().ExpertUserAlias;
+            }
+            else
+            {
+                fpgename = "RIOO";
+            }
+                syscfg.Close();
             ServiceShakerConfigViewModel.Instance.CreateTime = dateTime;
         }
 
@@ -124,7 +142,7 @@ namespace ShakerService
             OilSource.OilSource.Default.Init();
             string path = System.IO.Directory.GetFiles(AppDomain.CurrentDomain.BaseDirectory, "*.lvbitx").FirstOrDefault()?? "Shaker.lvbitx";
             ShakerFpga.CreateFpga(new SIMDFxpConvert.SIMDFxpConverter());
-            ShakerFpga.Instance.Open(path, "RIO0", NIFPGA.NiFpga_OpenAttribute.NiFpga_OpenAttribute_NoRun| NIFPGA.NiFpga_OpenAttribute.NiFpga_OpenAttribute_BitfilePathIsUTF8);
+            ShakerFpga.Instance.Open(path,fpgename, NIFPGA.NiFpga_OpenAttribute.NiFpga_OpenAttribute_NoRun| NIFPGA.NiFpga_OpenAttribute.NiFpga_OpenAttribute_BitfilePathIsUTF8);
             ServiceShakerConfigViewModel.Instance.BitfileVersion = ShakerFpga.Instance.BitstreamVersion;
             ServiceShakerConfigViewModel.Instance.BitstreamMD5 = ShakerFpga.Instance.BitstreamMD5;
             ServiceShakerConfigViewModel.Instance.BitstreamVersion = ShakerFpga.Instance.BitstreamVersion;

+ 16 - 0
Shaker/ShakerService.Control.cs

@@ -178,6 +178,22 @@ namespace ShakerService
                 StopService();
             });
         }
+        [PropertyInit]
+        private void Reboot()
+        {
+            Communication.Instance.Context.GetEvent(Topic.REBOOT)?.Subscrip((_, _) =>
+            {
+
+            });
+        }
+        [PropertyInit]
+        private void Poweroff()
+        {
+            Communication.Instance.Context.GetEvent(Topic.POWEROFF)?.Subscrip((_, _) =>
+            {
+
+            });
+        }
         private void SendData(byte[] data,uint rowcount,uint colnumcount)
         {
             //异步发送数据

+ 2 - 2
Shaker/ShakerService.ReadConfig.cs

@@ -42,11 +42,11 @@ namespace ShakerService
             double[] real = ShakerFpga.Instance.AccelerationData.Value;
             int div = real.Length >> 1;
             double[] img = new double[real.Length];
-            ServiceDataCacheViewModel.Instance.Calc.FFT.FFT(real, img);
+            Shaker.Models.Tools.Tools.Calc.FFT.FFT(real, img);
             double fftacc = Math.Sqrt(real[1] * real[1] + img[1] * img[1])/div;
             real = ShakerFpga.Instance.DisplacementData.Value;
             img = new double[real.Length];
-            ServiceDataCacheViewModel.Instance.Calc.FFT.FFT(real, img);
+            Shaker.Models.Tools.Tools.Calc.FFT.FFT(real, img);
             double fftdisp =DispToAcc(Math.Sqrt(real[1] * real[1] + img[1] * img[1]) / div, currentfreq);
             double identifyacc = ShakerFpga.Instance.IdentifyAcceleration.Value;
             double identifydisp = DispToAcc(ShakerFpga.Instance.IdentifyDisplacement.Value,currentfreq);

+ 2 - 2
Shaker/ShakerService.ReadFifo.cs

@@ -46,10 +46,10 @@ namespace ShakerService
                 }
                 if (ServiceDataCacheViewModel.Instance.SensitivityValues[i] == 0)
                 {
-                    ServiceDataCacheViewModel.Instance.Calc.Fill(ref ServiceDataCacheViewModel.Instance.GetDataCachePin(i, 0), 0, ServiceShakerConfigViewModel.Instance.SampleRate * readcount);
+                    Shaker.Models.Tools.Tools.Calc.Fill(ref ServiceDataCacheViewModel.Instance.GetDataCachePin(i, 0), 0, ServiceShakerConfigViewModel.Instance.SampleRate * readcount);
                     continue;
                 }
-                ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref ServiceDataCacheViewModel.Instance.DataCache[i, 0], ServiceDataCacheViewModel.Instance.SensitivityValues[i], ServiceShakerConfigViewModel.Instance.SampleRate * readcount);
+                Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref ServiceDataCacheViewModel.Instance.DataCache[i, 0], ServiceDataCacheViewModel.Instance.SensitivityValues[i], ServiceShakerConfigViewModel.Instance.SampleRate * readcount);
                 Unsafe.CopyBlock(ref temp[i * ServiceShakerConfigViewModel.Instance.SampleRate * readcount * Unsafe.SizeOf<float>()], ref Unsafe.As<float, byte>(ref ServiceDataCacheViewModel.Instance.GetDataCachePin(i, 0)), (uint)(ServiceShakerConfigViewModel.Instance.SampleRate * readcount * Unsafe.SizeOf<float>()));
             }
             SendData(temp, (uint)ServiceConfigViewModel.Instance.AnalogCount, ServiceShakerConfigViewModel.Instance.SampleRate * readcount);

+ 0 - 1
Shaker/ShakerService.csproj

@@ -19,7 +19,6 @@
   </ItemGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\Calc\SIMDFxpConvert\SIMDFxpConvert.csproj" />
     <ProjectReference Include="..\Communication\LocalCommunication\LocalCommunication.csproj" />
     <ProjectReference Include="..\DBHelper\DBHelper.csproj" />
     <ProjectReference Include="..\EventBroker\EventBroker\EventBroker.csproj" />

+ 38 - 19
Shaker/ViewModel/PSDCache.cs

@@ -1,4 +1,6 @@
 using System.Net.Http.Headers;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 namespace ShakerService.ViewModel
 {
@@ -6,61 +8,78 @@ namespace ShakerService.ViewModel
     {
         private List<double[]> LinearAverageCache = new List<double[]>();
         public List<double[]> ExponentialAverageCache= new List<double[]>();
+        private double[] lastresultdata = new double[0];
         public void Clear()
         {
             LinearAverageCache.Clear();
             ExponentialAverageCache.Clear();
+            lastresultdata = new double[0];
         }
-        public double[] AveragePSD(double[] data, bool avg = true)
+        public double[] AveragePSD([In]double[] data, bool avg = true)
         {
             if(data ==null || data.Length ==0)return new double[0];
             if (!avg) return data;
+            bool needappenddata = false;
             if (ServiceRandomConfigViewModel.Instance.LinearAverage > 1)
             {
+                LinearAverageCache.Add(new double[data.Length]);
+                Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref LinearAverageCache[^1][0]), ref Unsafe.As<double, byte>(ref data[0]), (uint)(data.Length * Marshal.SizeOf(data[0])));
                 if (LinearAverageCache.Count == ServiceRandomConfigViewModel.Instance.LinearAverage)
                 {
-                    for(int i=0;i<LinearAverageCache.Count-1;i++)
+                    for (int i = 0; i < LinearAverageCache.Count - 1; i++)
                     {
                         if (i == 0)
                         {
-                            ServiceDataCacheViewModel.Instance.Calc.Add.Add(ref LinearAverageCache[i][0], ref LinearAverageCache[i + 1][0], (uint)data.Length, ref data[0]);
+                            Shaker.Models.Tools.Tools.Calc.Add.Add(ref LinearAverageCache[i][0], ref LinearAverageCache[i + 1][0], (uint)data.Length, ref data[0]);
                         }
                         else
                         {
-                            ServiceDataCacheViewModel.Instance.Calc.Add.Add(ref data[0], ref LinearAverageCache[i + 1][0], (uint)data.Length);
+                            Shaker.Models.Tools.Tools.Calc.Add.Add(ref data[0], ref LinearAverageCache[i + 1][0], (uint)data.Length);
                         }
                     }
-                    ServiceDataCacheViewModel.Instance.Calc.Division.Division(ref data[0], LinearAverageCache.Count, (uint)data.Length);
-                    LinearAverageCache.Clear();                    
-                }
-                else
-                {
-                    LinearAverageCache.Add(data);
+                    Shaker.Models.Tools.Tools.Calc.Division.Division(ref data[0], LinearAverageCache.Count, (uint)data.Length);
+                    needappenddata = true;
+                    LinearAverageCache.Clear();
                 }
             }
-            if (ServiceRandomConfigViewModel.Instance.ExponentialAverage > 1)
+            if (ServiceRandomConfigViewModel.Instance.ExponentialAverage > 1 && needappenddata)
             {
-                ExponentialAverageCache.Add(data);
+                ExponentialAverageCache.Add(new double[data.Length]);
+                Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref ExponentialAverageCache[^1][0]), ref Unsafe.As<double, byte>(ref data[0]), (uint)(data.Length * Marshal.SizeOf(data[0])));
                 if (ExponentialAverageCache.Count > ServiceRandomConfigViewModel.Instance.ExponentialAverage)
                 {
                     ExponentialAverageCache.RemoveRange(0, (int)(ExponentialAverageCache.Count - ServiceRandomConfigViewModel.Instance.ExponentialAverage));
                 }
-                if (ExponentialAverageCache.Count == 0 || ExponentialAverageCache.Count == 1) return data;
-                for (int i = 0; i < ExponentialAverageCache.Count - 2; i++)
+                if (ExponentialAverageCache.Count == 0 || ExponentialAverageCache.Count == 1)
+                {
+                    lastresultdata = new double[data.Length];
+                    Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref lastresultdata[0]), ref Unsafe.As<double, byte>(ref data[0]), (uint)(data.Length * Marshal.SizeOf(data[0])));
+                    return lastresultdata;
+                }
+                for (int i = 0; i < ExponentialAverageCache.Count - 1; i++)
                 {
                     if (i == 0)
                     {
-                        ServiceDataCacheViewModel.Instance.Calc.Add.Add(ref ExponentialAverageCache[i][0], ref ExponentialAverageCache[i + 1][0], (uint)data.Length, ref ExponentialAverageCache[^1][0]);
+                        Shaker.Models.Tools.Tools.Calc.Add.Add(ref ExponentialAverageCache[i][0], ref ExponentialAverageCache[i + 1][0], (uint)data.Length, ref data[0]);
                     }
                     else
                     {
-                        ServiceDataCacheViewModel.Instance.Calc.Add.Add(ref ExponentialAverageCache[^1][0], ref ExponentialAverageCache[i + 1][0], (uint)data.Length);
+                        Shaker.Models.Tools.Tools.Calc.Add.Add(ref data[0], ref ExponentialAverageCache[i + 1][0], (uint)data.Length);
                     }
                 }
-                ServiceDataCacheViewModel.Instance.Calc.Division.Division(ref ExponentialAverageCache[^1][0], ExponentialAverageCache.Count, (uint)data.Length);
-                return ExponentialAverageCache[^1];
+                Shaker.Models.Tools.Tools.Calc.Division.Division(ref data[0], ExponentialAverageCache.Count, (uint)data.Length);
+                lastresultdata = new double[data.Length];
+                Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref lastresultdata[0]), ref Unsafe.As<double, byte>(ref data[0]), (uint)(data.Length * Marshal.SizeOf(data[0])));
+            }
+            else
+            {
+            }
+            if(lastresultdata.Length!=data.Length)
+            {
+                lastresultdata = new double[data.Length];
+                Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref lastresultdata[0]), ref Unsafe.As<double, byte>(ref data[0]), (uint)(data.Length * Marshal.SizeOf(data[0])));
             }
-            else return data;
+            return lastresultdata;
         }
     }
 }

+ 0 - 1
Shaker/ViewModel/ServiceDataCacheViewModel.cs

@@ -18,7 +18,6 @@ namespace ShakerService.ViewModel
         static ServiceDataCacheViewModel()
         {
         }
-        public FxpConvert.Common.ICalc Calc { get; } = new SIMDFxpConvert.SIMDCalc();
         public int GetLength(int index)
         {
             return DataCache.GetLength(index);

+ 7 - 3
Shaker/ViewModel/ServiceRandomConfigViewModel.cs

@@ -15,7 +15,11 @@ namespace ShakerService.ViewModel
 
         public double[] BilateralPSDWindow { get; private set; } = new double[0];
         public double[] PSDWindow { get;private set;} = new double[0];
-        public double[] FixedWindow { get; private set; } = new double[0];
+        public double[] FixedWindow  = new double[0];
+        /// <summary>
+        /// 均衡系数
+        /// </summary>
+        public double EquilibriumCoefficient => Model.EquilibriumCoefficient;
         public double HanningWindowCompensationCoefficient => Model.HanningWindowCompensationCoefficient;
         public uint LinearAverage => Model.LinearAverage;
         public uint ExponentialAverage => Model.ExponentialAverage;
@@ -73,11 +77,11 @@ namespace ShakerService.ViewModel
         }
         public double SpectrumRMS(double[] psd)
         {
-            return Math.Sqrt(ServiceDataCacheViewModel.Instance.Calc.Sum.Sum(ref psd[0], (uint)psd.Length) * FrequencyResolution);
+            return Math.Sqrt(Shaker.Models.Tools.Tools.Calc.Sum.Sum(ref psd[0], (uint)psd.Length) * FrequencyResolution);
         }
         public double TimeDomain(double[] data)
         {
-            return ServiceDataCacheViewModel.Instance.Calc.Sum.Rms(ref data[0], (uint)data.Length);
+            return Shaker.Models.Tools.Tools.Calc.Sum.Rms(ref data[0], (uint)data.Length);
         }
         static ServiceRandomConfigViewModel()
         {

+ 103 - 44
Shaker/ViewModel/ServiceRandomDataViewModel.cs

@@ -2,11 +2,19 @@
 using ShakerService.Tools;
 using System.Numerics;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 namespace ShakerService.ViewModel
 {
     internal class ServiceRandomDataViewModel : BaseServiceViewModel<RandomDataModel>, IData
     {
+        private double[] LastDrivePSD = new double[0];
+        private double[] CurrentTargetPSD = new double[0];
+        private double changedlevel = 0;
+        private double[] fy_array = new double[0];
+        private double[] f = new double[0];
+        private double[] turningfreq = new double[0];
+
         public void CalcRandomTestDriver(ref bool isstop,ref double[] driver)
         {
             isstop = GetNextLevel();
@@ -19,23 +27,55 @@ namespace ShakerService.ViewModel
         public void InitRandomTest()
         {
             if (ServiceRandomConfigViewModel.Instance.PlanItems.Count == 0) return;
+
             CurrentTestLevel = ServiceRandomConfigViewModel.Instance.PlanItems.First().Level;
+            changedlevel = 0;
             CurrentLevelIndex = 0;
             CurrentTestTime = 0;
             TestTotalRunTime = 0;
+            TestIndex = 0;
             CurrentLevelTestMaxTime = ServiceRandomConfigViewModel.Instance.PlanItems.First().Time;
+
+            Shaker.Models.Tools.Tools.CalcRefSpectrum(ServiceRandomConfigViewModel.Instance.Model.SpectrumItems.Select(x => x.Frequency).ToArray()
+                , ServiceRandomConfigViewModel.Instance.Model.SpectrumItems.Select(x => x.Value).ToArray()
+                , ServiceRandomConfigViewModel.Instance.Model.SpectrumItems.Select(x => x.ValueType).ToArray()
+                , ServiceRandomConfigViewModel.Instance.FrequencyResolution
+                , out fy_array, out f, out turningfreq);
+            LastDrivePSD = new double[ServiceRandomConfigViewModel.Instance.FFTHalfFrameLength];
+            Shaker.Models.Tools.Tools.CalcItemSpectrum(Enumerable.Repeat(CurrentTestLevel, ServiceRandomConfigViewModel.Instance.SpectralTables.Count).ToArray(), f, fy_array, ServiceRandomConfigViewModel.Instance.FrequencyResolution, turningfreq, ref LastDrivePSD[0]);
+            CurrentTargetPSD = new double[LastDrivePSD.Length];
+            Unsafe.CopyBlock(ref Unsafe.As<double, byte>(ref CurrentTargetPSD[0]), ref Unsafe.As<double, byte>(ref LastDrivePSD[0]), (uint)(LastDrivePSD.Length * Marshal.SizeOf(LastDrivePSD[0])));
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref LastDrivePSD[0], ref Model.TransferFunction[0], (uint)LastDrivePSD.Length);
+            for(int i=0;i<LastDrivePSD.Length;i++)
+            {
+                if (double.IsNaN(LastDrivePSD[i]) || double.IsInfinity(LastDrivePSD[i]))
+                {
+                    LastDrivePSD[i] = 1E-20;
+                }
+            }
+            LastDrivePSD = Shaker.Models.Tools.Tools.UnilateralSpectrumToBilateralSpectrum(LastDrivePSD);
         }
         private bool GetNextLevel()
         {
+            TestIndex++;
             if (CurrentLevelIndex >= ServiceRandomConfigViewModel.Instance.PlanItems.Count - 1)
             {
+                changedlevel = 0;
                 return CurrentTestTime>=CurrentLevelTestMaxTime;
             }
-            if (CurrentTestTime < CurrentLevelTestMaxTime) return false;
+            if (CurrentTestTime < CurrentLevelTestMaxTime)
+            {
+                changedlevel = 0;
+                return false;
+            }
+            double lastlevel = CurrentTestLevel;
+            DriverCache.Clear();
+            AccelerationPSDCache.ForEach(x => x.Clear());
             CurrentLevelIndex++;
             CurrentLevelTestMaxTime = ServiceRandomConfigViewModel.Instance.PlanItems[CurrentLevelIndex].Time;
             CurrentTestLevel = ServiceRandomConfigViewModel.Instance.PlanItems[CurrentLevelIndex].Level;
-            CurrentTestTime = 0;
+            changedlevel = CurrentTestLevel - lastlevel;
+            Shaker.Models.Tools.Tools.CalcItemSpectrum(Enumerable.Repeat(CurrentTestLevel, ServiceRandomConfigViewModel.Instance.SpectralTables.Count).ToArray(), f, fy_array, ServiceRandomConfigViewModel.Instance.FrequencyResolution, turningfreq, ref CurrentTargetPSD[0]);
             return false;
         }
 
@@ -64,6 +104,7 @@ namespace ShakerService.ViewModel
         public double DriverSpectrumRMS { get=>Model.DriverSpectrumRMS;  set=>Model.DriverSpectrumRMS= value; }
         public int CurrentLevelIndex { get=>Model.CurrentLevelIndex; set=>Model.CurrentLevelIndex = value; }
         public double CurrentTestLevel { get => Model.CurrentTestLevel; set => Model.CurrentTestLevel = value; }
+        public uint TestIndex { get => Model.TestIndex; set => Model.TestIndex = value; }
         public uint CurrentTestTime { get => Model.CurrentTestTime; set => Model.CurrentTestTime = value; }
         public uint CurrentLevelTestMaxTime { get => Model.CurrentLevelTestMaxTime; set => Model.CurrentLevelTestMaxTime = value; }
         public RandomStatus RandomStatus { get => Model.RandomStatus; set => Model.RandomStatus = value; }
@@ -74,7 +115,7 @@ namespace ShakerService.ViewModel
             {
                 TransferFunction = new double[DriverPSD.Length];
             }
-            ServiceDataCacheViewModel.Instance.Calc.Division.Division(ref CurrentAccelerationSynthesisPSD[0], ref DriverPSD[0], (uint)TransferFunction.Length, ref TransferFunction[0]);
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref CurrentAccelerationSynthesisPSD[0], ref DriverPSD[0], (uint)TransferFunction.Length, ref TransferFunction[0]);
             Communication.Instance.Context?.GetEvent(nameof(RandomDataModel.TransferFunction))?.Publish(this, null, TransferFunction);
         }
         public double[] AddAccelerationPSD(int index, double[] accpsd, bool avg = true)
@@ -95,7 +136,7 @@ namespace ShakerService.ViewModel
                         CurrentIdentifyRms = CurrentAccelerationSpectrumRMS[index];
                         var anadata = ServiceDataCacheViewModel.Instance.GetAnalogData(Enumerable.Range(0, ServiceConfigViewModel.Instance.AnalogCount).Where(x => ServiceShakerConfigViewModel.Instance.AnalogSignals[x].AnalogType == AnalogType.DivideAcceleration).ToArray()[index]);
 
-                        TimeDomainRMS = ServiceDataCacheViewModel.Instance.Calc.Sum.Rms(ref anadata[0], (uint)anadata.Length);
+                        TimeDomainRMS = Shaker.Models.Tools.Tools.Calc.Sum.Rms(ref anadata[0], (uint)anadata.Length);
                     }
                     break;
                 case AccelerationSynthesisType.Min:
@@ -105,7 +146,7 @@ namespace ShakerService.ViewModel
                         CurrentIdentifyRms = CurrentAccelerationSpectrumRMS[index];
                         var anadata = ServiceDataCacheViewModel.Instance.GetAnalogData(Enumerable.Range(0, ServiceConfigViewModel.Instance.AnalogCount).Where(x => ServiceShakerConfigViewModel.Instance.AnalogSignals[x].AnalogType == AnalogType.DivideAcceleration).ToArray()[index]);
 
-                        TimeDomainRMS = ServiceDataCacheViewModel.Instance.Calc.Sum.Rms(ref anadata[0], (uint)anadata.Length);
+                        TimeDomainRMS = Shaker.Models.Tools.Tools.Calc.Sum.Rms(ref anadata[0], (uint)anadata.Length);
                     }
                     break;
                 case AccelerationSynthesisType.Synthesis:
@@ -118,13 +159,13 @@ namespace ShakerService.ViewModel
                         for (int i = 0; i < ServiceConfigViewModel.Instance.AccelerationCount; i++)
                         {
                             float[] onetempanadta = new float[tempana.Length];
-                            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref CurrentAccelerationPSD[i][0], ServiceShakerConfigViewModel.Instance.Accelerations[i].Weight, (uint)temp.Length,ref temp[0]);
-                            ServiceDataCacheViewModel.Instance.Calc.Add.Add(ref Model.CurrentAccelerationSynthesisPSD[0], ref temp[0], (uint)temp.Length);
-                            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref ServiceDataCacheViewModel.Instance.GetAnalogData(accindexs[i])[0], ServiceShakerConfigViewModel.Instance.Accelerations[i].Weight, (uint)tempana.Length,ref onetempanadta[0]);
-                            ServiceDataCacheViewModel.Instance.Calc.Add.Add(ref tempana[0], ref onetempanadta[0], (uint)tempana.Length);
+                            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref CurrentAccelerationPSD[i][0], ServiceShakerConfigViewModel.Instance.Accelerations[i].Weight, (uint)temp.Length,ref temp[0]);
+                            Shaker.Models.Tools.Tools.Calc.Add.Add(ref Model.CurrentAccelerationSynthesisPSD[0], ref temp[0], (uint)temp.Length);
+                            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref ServiceDataCacheViewModel.Instance.GetAnalogData(accindexs[i])[0], ServiceShakerConfigViewModel.Instance.Accelerations[i].Weight, (uint)tempana.Length,ref onetempanadta[0]);
+                            Shaker.Models.Tools.Tools.Calc.Add.Add(ref tempana[0], ref onetempanadta[0], (uint)tempana.Length);
 
                         }
-                        TimeDomainRMS = ServiceDataCacheViewModel.Instance.Calc.Sum.Rms(ref tempana[0], (uint)tempana.Length);
+                        TimeDomainRMS = Shaker.Models.Tools.Tools.Calc.Sum.Rms(ref tempana[0], (uint)tempana.Length);
                         CurrentIdentifyRms = ServiceRandomConfigViewModel.Instance.SpectrumRMS(CurrentAccelerationSynthesisPSD);
                     }
                     break;
@@ -158,7 +199,6 @@ namespace ShakerService.ViewModel
         }
         public double[] CalcIdentifyFirstDriver()
         {
-            //if (HastIdentifyFirstDriver) return IdentifyFirstDriver;
             Random rdm = new Random();
             int n_down = 0;
             int n_up = 0;
@@ -196,9 +236,9 @@ namespace ShakerService.ViewModel
             }
             double[] real = value.Select(x => x.Real).ToArray();
             double[] img = value.Select(x => x.Imaginary).ToArray();
-            ViewModel.ServiceDataCacheViewModel.Instance.Calc.FFT.IFFT(real, img);
-            ViewModel.ServiceDataCacheViewModel.Instance.Calc.Division.Division(ref real[0], real.Length, (uint)real.Length);
-            ViewModel.ServiceDataCacheViewModel.Instance.Calc.Division.Division(ref img[0], img.Length, (uint)img.Length);
+            Shaker.Models.Tools.Tools.Calc.FFT.IFFT(real, img);
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref real[0], real.Length, (uint)real.Length);
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref img[0], img.Length, (uint)img.Length);
             IdentifyFirstDriver = real;
             HastIdentifyFirstDriver = true;
             return IdentifyFirstDriver;
@@ -209,15 +249,15 @@ namespace ShakerService.ViewModel
             switch (step)
             {
                 case RandomTestStep.Start:
-                    ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref driver[0], ref ServiceRandomConfigViewModel.Instance.StartWindow[0], (uint)driver.Length);
+                    Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref driver[0], ref ServiceRandomConfigViewModel.Instance.StartWindow[0], (uint)driver.Length);
                     break;
                 case RandomTestStep.Stop:
-                    ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref driver[0], ref ServiceRandomConfigViewModel.Instance.StartWindow[0], (uint)driver.Length);
+                    Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref driver[0], ref ServiceRandomConfigViewModel.Instance.StartWindow[0], (uint)driver.Length);
                     break;
             }
             double dispvalue = Shaker.Models.Tools.Tools.QuantitiesToVoltage(level, ServiceShakerConfigViewModel.Instance.DisplacementSensitivity);
             double max = Math.Max(Math.Abs(driver.Max()), Math.Abs(driver.Min()));
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref driver[0], dispvalue / max, (uint)driver.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref driver[0], dispvalue / max, (uint)driver.Length);
             double[] result = new double[driver.Length * ServiceShakerConfigViewModel.Instance.SampleRate / ServiceRandomConfigViewModel.Instance.RandomSampleRate];
             var linear = MathNet.Numerics.Interpolate.Linear(Enumerable.Range(0, driver.Length).Select(x => (double)x), driver);
             for (int i = 0; i < result.Length; i++)
@@ -228,29 +268,48 @@ namespace ShakerService.ViewModel
         }
         private void CalcRandomTestDriver(double level,ref double[] result)
         {
-            double[] tempreal = new double[TransferFunction.Length];
-            double[] img = new double[TransferFunction.Length];
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref Model.TransferFunction[0], ref Model.CurrentAccelerationSynthesisPSD[0], (uint)TransferFunction.Length,ref tempreal[0]);
-            for(int i=0;i<tempreal.Length;i++)
+            if(TestIndex<=4)
             {
-                tempreal[i] = (double.IsNaN(tempreal[i]) || double.IsInfinity(tempreal[i]) || tempreal[i] == 0) ? 8E-14 : tempreal[i];
+
             }
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref tempreal[0], level, (uint)tempreal.Length);
-            double[] real = Shaker.Models.Tools.Tools.UnilateralSpectrumToBilateralSpectrum(tempreal);
-            double[] whitenoise = CalcWhiteNoiseFFT().Select(x=>x.Real).ToArray();
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref real[0], ref whitenoise[0], (uint)real.Length);
-            double rms = Math.Abs(ServiceDataCacheViewModel.Instance.Calc.Sum.Rms(ref real[0], (uint)real.Length))*ServiceRandomConfigViewModel.Instance.Sigma;
-            ServiceDataCacheViewModel.Instance.Calc.Clamp.Clamp(ref real[0], -rms, rms, (uint)real.Length);
-            img = new double[result.Length];
-            ServiceDataCacheViewModel.Instance.Calc.FFT.IFFT(real, img);
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref real[0], ref ServiceRandomConfigViewModel.Instance.BilateralPSDWindow[0], (uint)real.Length);
-            ServiceDataCacheViewModel.Instance.Calc.FFT.FFT(real, img);
-            result = new double[real.Length * ServiceShakerConfigViewModel.Instance.SampleRate / ServiceRandomConfigViewModel.Instance.RandomSampleRate];
-            var linear = MathNet.Numerics.Interpolate.Linear(Enumerable.Range(0, real.Length).Select(x => (double)x), real);
+            else
+            {
+                /*
+                 * 更新修正窗函数
+                 */
+                var tempfixwindow = new double[ServiceRandomConfigViewModel.Instance.FixedWindow.Length];
+                Shaker.Models.Tools.Tools.Calc.Division.Division(ref CurrentTargetPSD[0], ref Model.CurrentAccelerationSynthesisPSD[0], (uint)CurrentTargetPSD.Length, ref tempfixwindow[0]);
+                for(int i=0;i<tempfixwindow.Length;i++)
+                {
+                    tempfixwindow[i] = Math.Pow(tempfixwindow[0], ServiceRandomConfigViewModel.Instance.EquilibriumCoefficient);
+                }
+                Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref ServiceRandomConfigViewModel.Instance.FixedWindow[0], ref tempfixwindow[0], (uint)tempfixwindow.Length);
+
+                Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref LastDrivePSD[0], ref ServiceRandomConfigViewModel.Instance.FixedWindow[0], (uint)LastDrivePSD.Length);
+            }
+            if(changedlevel!=0)
+            {
+                for(int i=0;i<LastDrivePSD.Length;i++)
+                {
+                    LastDrivePSD[i] = Shaker.Models.Tools.Tools.CalcLevel(LastDrivePSD[i], changedlevel);
+                }
+                changedlevel = 0;
+            }
+            var whitenoise = CalcWhiteNoiseFFT().ToArray();
+            var realnoise = whitenoise.Select(x => x.Real).ToArray();
+            var imgnoise = whitenoise.Select(x => x.Imaginary).ToArray();
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref realnoise[0], ref LastDrivePSD[0], (uint)LastDrivePSD.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref imgnoise[0], ref LastDrivePSD[0], (uint)LastDrivePSD.Length);
+            Shaker.Models.Tools.Tools.Calc.FFT.IFFT(realnoise, imgnoise);
+            var rms = Shaker.Models.Tools.Tools.Calc.Sum.Rms(ref realnoise[0], (uint)realnoise.Length);
+            rms *= ServiceRandomConfigViewModel.Instance.Sigma;
+            Shaker.Models.Tools.Tools.Calc.Clamp.Clamp(ref realnoise[0], -rms, rms, (uint)realnoise.Length);
+            result = new double[realnoise.Length * 2];
+            var linear = MathNet.Numerics.Interpolate.Linear(Enumerable.Range(0, realnoise.Length).Select(x => (double)x), realnoise);
             for (int i = 0; i < result.Length; i++)
             {
-                result[i] = linear.Interpolate((double)i / result.Length * real.Length);
-            };
+                result[i] = linear.Interpolate((double)i / result.Length * realnoise.Length);
+            }
         }
         public Complex[] CalcWhiteNoiseFFT()
         {
@@ -258,9 +317,9 @@ namespace ShakerService.ViewModel
             Random rdm = new Random();
             for (int i = 0; i < ServiceRandomConfigViewModel.Instance.FFTHalfFrameLength; i++)
             {
-                data[i] = Complex.FromPolarCoordinates(1, (0.5 - rdm.NextDouble()) * 2 * Math.PI) * ServiceRandomConfigViewModel.Instance.FFTFrameLength;
+                data[i] = Complex.FromPolarCoordinates(1, (0.5 - rdm.NextDouble()) * 2 * Math.PI);
                 if (i == 0) continue;
-                data[^i] = Complex.FromPolarCoordinates(data[i].Magnitude, -data[i].Phase) * ServiceRandomConfigViewModel.Instance.FFTFrameLength;
+                data[^i] = Complex.FromPolarCoordinates(data[i].Magnitude, -data[i].Phase);
             }
             data[0] = new Complex(1E-12 * ServiceRandomConfigViewModel.Instance.FFTFrameLength, 0);
             data[ServiceRandomConfigViewModel.Instance.FFTHalfFrameLength] = data[0];
@@ -273,14 +332,14 @@ namespace ShakerService.ViewModel
             {
                 result[i] = data[i * ServiceShakerConfigViewModel.Instance.SampleRate / ServiceRandomConfigViewModel.Instance.RandomSampleRate];
             }
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref result[0], ref ServiceRandomConfigViewModel.Instance.HanningWindow[0], (uint)result.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref result[0], ref ServiceRandomConfigViewModel.Instance.HanningWindow[0], (uint)result.Length);
             double[] img = new double[result.Length];
-            ServiceDataCacheViewModel.Instance.Calc.FFT.FFT(result, img);
+            Shaker.Models.Tools.Tools.Calc.FFT.FFT(result, img);
             result = result.Take((int)ServiceRandomConfigViewModel.Instance.FFTHalfFrameLength).ToArray();
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref result[0], 1.4142135624 / result.Length, (uint)result.Length);
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref result[0], ref result[0], (uint)result.Length);
-            ServiceDataCacheViewModel.Instance.Calc.Division.Division(ref result[0], ServiceRandomConfigViewModel.Instance.FrequencyResolution * ServiceRandomConfigViewModel.Instance.HanningWindowCompensationCoefficient, (uint)result.Length);
-            ServiceDataCacheViewModel.Instance.Calc.Multiply.Multiply(ref result[0], ref ServiceRandomConfigViewModel.Instance.PSDWindow[0], (uint)result.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref result[0], 1.4142135624 / result.Length, (uint)result.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref result[0], ref result[0], (uint)result.Length);
+            Shaker.Models.Tools.Tools.Calc.Division.Division(ref result[0], ServiceRandomConfigViewModel.Instance.FrequencyResolution * ServiceRandomConfigViewModel.Instance.HanningWindowCompensationCoefficient, (uint)result.Length);
+            Shaker.Models.Tools.Tools.Calc.Multiply.Multiply(ref result[0], ref ServiceRandomConfigViewModel.Instance.PSDWindow[0], (uint)result.Length);
             return result;
         }
         public void ReadFpgaData()

+ 2566 - 0
Shaker/nisyscfg.cs

@@ -0,0 +1,2566 @@
+
+using System.Numerics;
+using System.Text;
+
+public partial class NativeConstants
+{
+    /// NISYSCFG_SIMPLE_STRING_LENGTH -> 1024
+    public const int NISYSCFG_SIMPLE_STRING_LENGTH = 1024;
+
+    /// NISYSCFG_REBOOT_DEFAULT_TIMEOUT_MSEC -> 180000
+    public const int NISYSCFG_REBOOT_DEFAULT_TIMEOUT_MSEC = 180000;
+
+    /// NISYSCFG_REMOTE_DEFAULT_TIMEOUT_MSEC -> 300000
+    public const int NISYSCFG_REMOTE_DEFAULT_TIMEOUT_MSEC = 300000;
+
+    /// NISysCfgBusTypeFlexAdapter -> NISysCfgBusTypeAccessory
+    public const NISysCfgBusType NISysCfgBusTypeFlexAdapter = NISysCfgBusType.NISysCfgBusTypeAccessory;
+
+    /// NISysCfgFilterModeAll -> NISysCfgFilterModeMatchValuesAll
+    public const NISysCfgFilterMode NISysCfgFilterModeAll = NISysCfgFilterMode.NISysCfgFilterModeMatchValuesAll;
+
+    /// NISysCfgFilterModeAny -> NISysCfgFilterModeMatchValuesAny
+    public const NISysCfgFilterMode NISysCfgFilterModeAny = NISysCfgFilterMode.NISysCfgFilterModeMatchValuesAny;
+
+    /// NISysCfgFilterModeNone -> NISysCfgFilterModeMatchValuesNone
+    public const NISysCfgFilterMode NISysCfgFilterModeNone = NISysCfgFilterMode.NISysCfgFilterModeMatchValuesNone;
+
+    /// NISysCfgPacketDetectionInterrupt -> NISysCfgPacketDetectionLineInterrupt
+    public const NISysCfgPacketDetection NISysCfgPacketDetectionInterrupt = NISysCfgPacketDetection.NISysCfgPacketDetectionLineInterrupt;
+
+    /// NISysCfgResourcePropertyWlanAvailableCount -> NISysCfgResourcePropertyNumberOfDiscoveredAccessPoints
+    public const NISysCfgResourceProperty NISysCfgResourcePropertyWlanAvailableCount = NISysCfgResourceProperty.NISysCfgResourcePropertyNumberOfDiscoveredAccessPoints;
+
+    /// NISysCfgResetPrimaryDisableOthers -> NISysCfgResetPrimaryResetOthers
+    public const NISysCfgNetworkInterfaceSettings NISysCfgResetPrimaryDisableOthers = NISysCfgNetworkInterfaceSettings.NISysCfgResetPrimaryResetOthers;
+
+    /// NISysCfgPreservePrimaryDisableOthers -> NISysCfgPreservePrimaryResetOthers
+    public const NISysCfgNetworkInterfaceSettings NISysCfgPreservePrimaryDisableOthers = NISysCfgNetworkInterfaceSettings.NISysCfgPreservePrimaryResetOthers;
+
+    /// NISysCfgApplyPrimaryDisableOthers -> NISysCfgApplyPrimaryResetOthers
+    public const NISysCfgNetworkInterfaceSettings NISysCfgApplyPrimaryDisableOthers = NISysCfgNetworkInterfaceSettings.NISysCfgApplyPrimaryResetOthers;
+
+}
+
+
+public enum NISysCfgStatus
+{
+
+    /// NISysCfg_OK -> 0L
+    NISysCfg_OK = 0,
+
+    /// NISysCfg_EndOfEnum -> 1L
+    NISysCfg_EndOfEnum = 1,
+
+    /// NISysCfg_SelfTestBasicOnly -> 263024L
+    NISysCfg_SelfTestBasicOnly = 263024,
+
+    /// NISysCfg_FoundCachedOfflineSystem -> 263168L
+    NISysCfg_FoundCachedOfflineSystem = 263168,
+
+    /// NISysCfg_RestartLocalhostInitiated -> 263169L
+    NISysCfg_RestartLocalhostInitiated = 263169,
+
+    /// NISysCfg_ChangedPropertyNotSaved -> 263170L
+    NISysCfg_ChangedPropertyNotSaved = 263170,
+
+    /// NISysCfg_NotImplemented -> -2147467263L
+    NISysCfg_NotImplemented = -2147467263,
+
+    /// NISysCfg_NullPointer -> -2147467261L
+    NISysCfg_NullPointer = -2147467261,
+
+    /// NISysCfg_Fail -> -2147467259L
+    NISysCfg_Fail = -2147467259,
+
+    /// NISysCfg_Unexpected -> -2147418113L
+    NISysCfg_Unexpected = -2147418113,
+
+    /// NISysCfg_OutOfMemory -> -2147024882L
+    NISysCfg_OutOfMemory = -2147024882,
+
+    /// NISysCfg_InvalidArg -> -2147024809L
+    NISysCfg_InvalidArg = -2147024809,
+
+    /// NISysCfg_OperationTimedOut -> -2147220448L
+    NISysCfg_OperationTimedOut = -2147220448,
+
+    /// NISysCfg_FileNotFound -> -2147220322L
+    NISysCfg_FileNotFound = -2147220322,
+
+    /// NISysCfg_InvalidMACFormat -> -2147220278L
+    NISysCfg_InvalidMACFormat = -2147220278,
+
+    /// NISysCfg_PropMismatch -> -2147220624L
+    NISysCfg_PropMismatch = -2147220624,
+
+    /// NISysCfg_PropDoesNotExist -> -2147220623L
+    NISysCfg_PropDoesNotExist = -2147220623,
+
+    /// NISysCfg_UriIllegalSyntax -> -2147220622L
+    NISysCfg_UriIllegalSyntax = -2147220622,
+
+    /// NISysCfg_UriTargetDoesNotExist -> -2147220621L
+    NISysCfg_UriTargetDoesNotExist = -2147220621,
+
+    /// NISysCfg_UriExpertDoesNotExist -> -2147220620L
+    NISysCfg_UriExpertDoesNotExist = -2147220620,
+
+    /// NISysCfg_ItemDoesNotExist -> -2147220619L
+    NISysCfg_ItemDoesNotExist = -2147220619,
+
+    /// NISysCfg_InvalidMode -> -2147220618L
+    NISysCfg_InvalidMode = -2147220618,
+
+    /// NISysCfg_SysConfigAPINotInstalled -> -2147220616L
+    NISysCfg_SysConfigAPINotInstalled = -2147220616,
+
+    /// NISysCfg_NameSyntaxIllegal -> -2147220614L
+    NISysCfg_NameSyntaxIllegal = -2147220614,
+
+    /// NISysCfg_NameCollision -> -2147220613L
+    NISysCfg_NameCollision = -2147220613,
+
+    /// NISysCfg_NoPropValidated -> -2147220612L
+    NISysCfg_NoPropValidated = -2147220612,
+
+    /// NISysCfg_UriUnauthorized -> -2147220611L
+    NISysCfg_UriUnauthorized = -2147220611,
+
+    /// NISysCfg_RenameResourceDependencies -> -2147220610L
+    NISysCfg_RenameResourceDependencies = -2147220610,
+
+    /// NISysCfg_ValueInvalid -> -2147220609L
+    NISysCfg_ValueInvalid = -2147220609,
+
+    /// NISysCfg_ValuesInconsistent -> -2147220608L
+    NISysCfg_ValuesInconsistent = -2147220608,
+
+    /// NISysCfg_Canceled -> -2147220607L
+    NISysCfg_Canceled = -2147220607,
+
+    /// NISysCfg_ResponseSyntax -> -2147220606L
+    NISysCfg_ResponseSyntax = -2147220606,
+
+    /// NISysCfg_ResourceIsNotPresent -> -2147220605L
+    NISysCfg_ResourceIsNotPresent = -2147220605,
+
+    /// NISysCfg_ResourceIsSimulated -> -2147220604L
+    NISysCfg_ResourceIsSimulated = -2147220604,
+
+    /// NISysCfg_NotInFirmwareUpdateState -> -2147220603L
+    NISysCfg_NotInFirmwareUpdateState = -2147220603,
+
+    /// NISysCfg_FirmwareImageDeviceMismatch -> -2147220602L
+    NISysCfg_FirmwareImageDeviceMismatch = -2147220602,
+
+    /// NISysCfg_FirmwareImageCorrupt -> -2147220601L
+    NISysCfg_FirmwareImageCorrupt = -2147220601,
+
+    /// NISysCfg_InvalidFirmwareVersion -> -2147220600L
+    NISysCfg_InvalidFirmwareVersion = -2147220600,
+
+    /// NISysCfg_OlderFirmwareVersion -> -2147220599L
+    NISysCfg_OlderFirmwareVersion = -2147220599,
+
+    /// NISysCfg_InvalidLoginCredentials -> -2147220598L
+    NISysCfg_InvalidLoginCredentials = -2147220598,
+
+    /// NISysCfg_FirmwareUpdateAttemptFailed -> -2147220597L
+    NISysCfg_FirmwareUpdateAttemptFailed = -2147220597,
+
+    /// NISysCfg_EncryptionFailed -> -2147220596L
+    NISysCfg_EncryptionFailed = -2147220596,
+
+    /// NISysCfg_SomePropsNotValidated -> -2147220595L
+    NISysCfg_SomePropsNotValidated = -2147220595,
+
+    /// NISysCfg_InvalidCalibrationCredentials -> -2147220594L
+    NISysCfg_InvalidCalibrationCredentials = -2147220594,
+
+    /// NISysCfg_CannotDeletePresentResource -> -2147220593L
+    NISysCfg_CannotDeletePresentResource = -2147220593,
+
+    /// NISysCfg_UriTargetTransmitError -> -2147220592L
+    NISysCfg_UriTargetTransmitError = -2147220592,
+
+    /// NISysCfg_DecryptionFailed -> -2147220591L
+    NISysCfg_DecryptionFailed = -2147220591,
+
+    /// NISysCfg_FirmwareExpertVersionMismatch -> -2147220590L
+    NISysCfg_FirmwareExpertVersionMismatch = -2147220590,
+
+    /// NISysCfg_AmbiguousImportAction -> -2147220589L
+    NISysCfg_AmbiguousImportAction = -2147220589,
+
+    /// NISysCfg_RequiredItemFailedImport -> -2147220588L
+    NISysCfg_RequiredItemFailedImport = -2147220588,
+
+    /// NISysCfg_ItemInUse -> -2147220587L
+    NISysCfg_ItemInUse = -2147220587,
+
+    /// NISysCfg_ItemTypeNotSupported -> -2147220586L
+    NISysCfg_ItemTypeNotSupported = -2147220586,
+
+    /// NISysCfg_PermissionDenied -> -2147220560L
+    NISysCfg_PermissionDenied = -2147220560,
+
+    /// NISysCfg_SystemNotFound -> -2147220559L
+    NISysCfg_SystemNotFound = -2147220559,
+
+    /// NISysCfg_TransformFailed -> -2147220558L
+    NISysCfg_TransformFailed = -2147220558,
+
+    /// NISysCfg_NotInstalled -> -2147220557L
+    NISysCfg_NotInstalled = -2147220557,
+
+    /// NISysCfg_LaunchFailure -> -2147220556L
+    NISysCfg_LaunchFailure = -2147220556,
+
+    /// NISysCfg_InternalTimeout -> -2147220555L
+    NISysCfg_InternalTimeout = -2147220555,
+
+    /// NISysCfg_MissingTransform -> -2147220554L
+    NISysCfg_MissingTransform = -2147220554,
+
+    /// NISysCfg_IncorrectExtension -> -2147220553L
+    NISysCfg_IncorrectExtension = -2147220553,
+
+    /// NISysCfg_FileReadOnly -> -2147220552L
+    NISysCfg_FileReadOnly = -2147220552,
+
+    /// NISysCfg_ReportOverwrite -> -2147220551L
+    NISysCfg_ReportOverwrite = -2147220551,
+
+    /// NISysCfg_DirectoryError -> -2147220550L
+    NISysCfg_DirectoryError = -2147220550,
+
+    /// NISysCfg_CannotOpenFile -> -2147220480L
+    NISysCfg_CannotOpenFile = -2147220480,
+
+    /// NISysCfg_InsufficientPermissions -> -2147220479L
+    NISysCfg_InsufficientPermissions = -2147220479,
+
+    /// NISysCfg_NCECopierFailed -> -2147220478L
+    NISysCfg_NCECopierFailed = -2147220478,
+
+    /// NISysCfg_FileOperationFailed -> -2147220477L
+    NISysCfg_FileOperationFailed = -2147220477,
+
+    /// NISysCfg_NameCollisionError -> -2147220476L
+    NISysCfg_NameCollisionError = -2147220476,
+
+    /// NISysCfg_UnexpectedError -> -2147220475L
+    NISysCfg_UnexpectedError = -2147220475,
+
+    /// NISysCfg_NCENoStreamError -> -2147220474L
+    NISysCfg_NCENoStreamError = -2147220474,
+
+    /// NISysCfg_NCECompressionError -> -2147220473L
+    NISysCfg_NCECompressionError = -2147220473,
+
+    /// NISysCfg_NCEStreamReadError -> -2147220472L
+    NISysCfg_NCEStreamReadError = -2147220472,
+
+    /// NISysCfg_NCEStreamWriteError -> -2147220471L
+    NISysCfg_NCEStreamWriteError = -2147220471,
+
+    /// NISysCfg_NCEStreamSeekError -> -2147220470L
+    NISysCfg_NCEStreamSeekError = -2147220470,
+
+    /// NISysCfg_NCERepoNotReady -> -2147220469L
+    NISysCfg_NCERepoNotReady = -2147220469,
+
+    /// NISysCfg_NCERepoInvalid -> -2147220468L
+    NISysCfg_NCERepoInvalid = -2147220468,
+
+    /// NISysCfg_NCERepoIncompat -> -2147220467L
+    NISysCfg_NCERepoIncompat = -2147220467,
+
+    /// NISysCfg_NCENoImportStorage -> -2147220466L
+    NISysCfg_NCENoImportStorage = -2147220466,
+
+    /// NISysCfg_NCENoExportStorage -> -2147220465L
+    NISysCfg_NCENoExportStorage = -2147220465,
+
+    /// NISysCfg_NCENoObjCopier -> -2147220464L
+    NISysCfg_NCENoObjCopier = -2147220464,
+
+    /// NISysCfg_CopyInProgress -> -2147220463L
+    NISysCfg_CopyInProgress = -2147220463,
+
+    /// NISysCfg_FileNotRecognized -> -2147220462L
+    NISysCfg_FileNotRecognized = -2147220462,
+
+    /// NISysCfg_SystemNotSupported -> -2147220461L
+    NISysCfg_SystemNotSupported = -2147220461,
+
+    /// NISysCfg_SystemNotReachable -> -2147220460L
+    NISysCfg_SystemNotReachable = -2147220460,
+
+    /// NISysCfg_ProductSoftwareNotInstalled -> -2147220459L
+    NISysCfg_ProductSoftwareNotInstalled = -2147220459,
+
+    /// NISysCfg_ProductSoftwareTooOld -> -2147220458L
+    NISysCfg_ProductSoftwareTooOld = -2147220458,
+
+    /// NISysCfg_ProductSoftwareTooNew -> -2147220457L
+    NISysCfg_ProductSoftwareTooNew = -2147220457,
+
+    /// NISysCfg_DataTooOld -> -2147220456L
+    NISysCfg_DataTooOld = -2147220456,
+
+    /// NISysCfg_DataTooNew -> -2147220455L
+    NISysCfg_DataTooNew = -2147220455,
+
+    /// NISysCfg_NoItemsToCopy -> -2147220454L
+    NISysCfg_NoItemsToCopy = -2147220454,
+
+    /// NISysCfg_OrphanItems -> -2147220453L
+    NISysCfg_OrphanItems = -2147220453,
+
+    /// NISysCfg_DirtyItems -> -2147220452L
+    NISysCfg_DirtyItems = -2147220452,
+
+    /// NISysCfg_FileOverwrite -> -2147220451L
+    NISysCfg_FileOverwrite = -2147220451,
+
+    /// NISysCfg_ItemOverwrite -> -2147220450L
+    NISysCfg_ItemOverwrite = -2147220450,
+
+    /// NISysCfg_MissingDependency -> -2147220449L
+    NISysCfg_MissingDependency = -2147220449,
+
+    /// NISysCfg_OperationCanceled -> -2147220447L
+    NISysCfg_OperationCanceled = -2147220447,
+
+    /// NISysCfg_WarningConflicts -> -2147220446L
+    NISysCfg_WarningConflicts = -2147220446,
+
+    /// NISysCfg_ErrorConflicts -> -2147220445L
+    NISysCfg_ErrorConflicts = -2147220445,
+
+    /// NISysCfg_ItemsRequireUserInput -> -2147220444L
+    NISysCfg_ItemsRequireUserInput = -2147220444,
+
+    /// NISysCfg_ProductExpertNotReady -> -2147220443L
+    NISysCfg_ProductExpertNotReady = -2147220443,
+
+    /// NISysCfg_OrphanFiles -> -2147220442L
+    NISysCfg_OrphanFiles = -2147220442,
+
+    /// NISysCfg_IsConst -> -2147220441L
+    NISysCfg_IsConst = -2147220441,
+
+    /// NISysCfg_UnsupportedProductMode -> -2147220440L
+    NISysCfg_UnsupportedProductMode = -2147220440,
+
+    /// NISysCfg_HostSoftwareTooOld -> -2147220385L
+    NISysCfg_HostSoftwareTooOld = -2147220385,
+
+    /// NISysCfg_OpkgUpdateFeedFailure -> -2147220384L
+    NISysCfg_OpkgUpdateFeedFailure = -2147220384,
+
+    /// NISysCfg_FeedNotFound -> -2147220383L
+    NISysCfg_FeedNotFound = -2147220383,
+
+    /// NISysCfg_FeedAlreadyExists -> -2147220382L
+    NISysCfg_FeedAlreadyExists = -2147220382,
+
+    /// NISysCfg_InstallOptionNotSupported -> -2147220381L
+    NISysCfg_InstallOptionNotSupported = -2147220381,
+
+    /// NISysCfg_FirmwareTooOld -> -2147220380L
+    NISysCfg_FirmwareTooOld = -2147220380,
+
+    /// NISysCfg_SoftwareTooOld -> -2147220379L
+    NISysCfg_SoftwareTooOld = -2147220379,
+
+    /// NISysCfg_RequiresSSH -> -2147220378L
+    NISysCfg_RequiresSSH = -2147220378,
+
+    /// NISysCfg_OpkgResponseSyntax -> -2147220377L
+    NISysCfg_OpkgResponseSyntax = -2147220377,
+
+    /// NISysCfg_WrongSoftwareSetType -> -2147220376L
+    NISysCfg_WrongSoftwareSetType = -2147220376,
+
+    /// NISysCfg_RequiresOpkg -> -2147220375L
+    NISysCfg_RequiresOpkg = -2147220375,
+
+    /// NISysCfg_HDFormatEncryptNotSupported -> -2147220374L
+    NISysCfg_HDFormatEncryptNotSupported = -2147220374,
+
+    /// NISysCfg_HDFormatNoRecoveryKeyDevice -> -2147220373L
+    NISysCfg_HDFormatNoRecoveryKeyDevice = -2147220373,
+
+    /// NISysCfg_RestartLocalhostAmbiguous -> -2147220372L
+    NISysCfg_RestartLocalhostAmbiguous = -2147220372,
+
+    /// NISysCfg_ImageInvalidCorrupt -> -2147220371L
+    NISysCfg_ImageInvalidCorrupt = -2147220371,
+
+    /// NISysCfg_SafeOrInstallModeRequired -> -2147220370L
+    NISysCfg_SafeOrInstallModeRequired = -2147220370,
+
+    /// NISysCfg_EncryptPhraseMismatch -> -2147220369L
+    NISysCfg_EncryptPhraseMismatch = -2147220369,
+
+    /// NISysCfg_InvalidIP -> -2147220368L
+    NISysCfg_InvalidIP = -2147220368,
+
+    /// NISysCfg_InvalidGateway -> -2147220367L
+    NISysCfg_InvalidGateway = -2147220367,
+
+    /// NISysCfg_InvalidDNS -> -2147220366L
+    NISysCfg_InvalidDNS = -2147220366,
+
+    /// NISysCfg_InvalidSubnet -> -2147220365L
+    NISysCfg_InvalidSubnet = -2147220365,
+
+    /// NISysCfg_CmdNotSupported -> -2147220364L
+    NISysCfg_CmdNotSupported = -2147220364,
+
+    /// NISysCfg_ConfigFailed -> -2147220363L
+    NISysCfg_ConfigFailed = -2147220363,
+
+    /// NISysCfg_Locked -> -2147220362L
+    NISysCfg_Locked = -2147220362,
+
+    /// NISysCfg_BadPassword -> -2147220361L
+    NISysCfg_BadPassword = -2147220361,
+
+    /// NISysCfg_NotConfigurable -> -2147220360L
+    NISysCfg_NotConfigurable = -2147220360,
+
+    /// NISysCfg_UnlockFailed -> -2147220359L
+    NISysCfg_UnlockFailed = -2147220359,
+
+    /// NISysCfg_LockFailed -> -2147220358L
+    NISysCfg_LockFailed = -2147220358,
+
+    /// NISysCfg_InstallFailed -> -2147220357L
+    NISysCfg_InstallFailed = -2147220357,
+
+    /// NISysCfg_InstallationCorrupt -> -2147220356L
+    NISysCfg_InstallationCorrupt = -2147220356,
+
+    /// NISysCfg_EmptyFile -> -2147220355L
+    NISysCfg_EmptyFile = -2147220355,
+
+    /// NISysCfg_UnconfiguredIP -> -2147220354L
+    NISysCfg_UnconfiguredIP = -2147220354,
+
+    /// NISysCfg_InstallationGenericFailure -> -2147220352L
+    NISysCfg_InstallationGenericFailure = -2147220352,
+
+    /// NISysCfg_DownloadAlreadyStarted -> -2147220350L
+    NISysCfg_DownloadAlreadyStarted = -2147220350,
+
+    /// NISysCfg_Aborted -> -2147220349L
+    NISysCfg_Aborted = -2147220349,
+
+    /// NISysCfg_DiskFull -> -2147220338L
+    NISysCfg_DiskFull = -2147220338,
+
+    /// NISysCfg_HDFormatFailed -> -2147220337L
+    NISysCfg_HDFormatFailed = -2147220337,
+
+    /// NISysCfg_HDFormatNotSafeMode -> -2147220336L
+    NISysCfg_HDFormatNotSafeMode = -2147220336,
+
+    /// NISysCfg_HDFormatRebootFailed -> -2147220335L
+    NISysCfg_HDFormatRebootFailed = -2147220335,
+
+    /// NISysCfg_ConnectionRefused -> -2147220334L
+    NISysCfg_ConnectionRefused = -2147220334,
+
+    /// NISysCfg_GetRemoteFilesFailed -> -2147220331L
+    NISysCfg_GetRemoteFilesFailed = -2147220331,
+
+    /// NISysCfg_PutRemoteFilesFailed -> -2147220330L
+    NISysCfg_PutRemoteFilesFailed = -2147220330,
+
+    /// NISysCfg_InvalidImage -> -2147220329L
+    NISysCfg_InvalidImage = -2147220329,
+
+    /// NISysCfg_ImageDeviceCodeMismatch -> -2147220328L
+    NISysCfg_ImageDeviceCodeMismatch = -2147220328,
+
+    /// NISysCfg_SystemMismatch -> -2147220327L
+    NISysCfg_SystemMismatch = -2147220327,
+
+    /// NISysCfg_HDFormatWrongFS -> -2147220326L
+    NISysCfg_HDFormatWrongFS = -2147220326,
+
+    /// NISysCfg_CustomInstallNotSupported -> -2147220325L
+    NISysCfg_CustomInstallNotSupported = -2147220325,
+
+    /// NISysCfg_FTPFailed -> -2147220324L
+    NISysCfg_FTPFailed = -2147220324,
+
+    /// NISysCfg_Timeout -> -2147220323L
+    NISysCfg_Timeout = -2147220323,
+
+    /// NISysCfg_DirNotFound -> -2147220321L
+    NISysCfg_DirNotFound = -2147220321,
+
+    /// NISysCfg_PathNotFound -> -2147220320L
+    NISysCfg_PathNotFound = -2147220320,
+
+    /// NISysCfg_NoSoftwareAvailable -> -2147220319L
+    NISysCfg_NoSoftwareAvailable = -2147220319,
+
+    /// NISysCfg_OverwriteError -> -2147220318L
+    NISysCfg_OverwriteError = -2147220318,
+
+    /// NISysCfg_HDFormatCannotKeepCfg -> -2147220317L
+    NISysCfg_HDFormatCannotKeepCfg = -2147220317,
+
+    /// NISysCfg_FileOrPathTooLong -> -2147220316L
+    NISysCfg_FileOrPathTooLong = -2147220316,
+
+    /// NISysCfg_DDPInternalTimeout -> -2147220315L
+    NISysCfg_DDPInternalTimeout = -2147220315,
+
+    /// NISysCfg_IOPermissionDenied -> -2147220314L
+    NISysCfg_IOPermissionDenied = -2147220314,
+
+    /// NISysCfg_PathAlreadyExists -> -2147220313L
+    NISysCfg_PathAlreadyExists = -2147220313,
+
+    /// NISysCfg_ExecutionFailure -> -2147220312L
+    NISysCfg_ExecutionFailure = -2147220312,
+
+    /// NISysCfg_DownloadError -> -2147220311L
+    NISysCfg_DownloadError = -2147220311,
+
+    /// NISysCfg_NetSendFailed -> -2147220309L
+    NISysCfg_NetSendFailed = -2147220309,
+
+    /// NISysCfg_ContactHostDisconnected -> -2147220308L
+    NISysCfg_ContactHostDisconnected = -2147220308,
+
+    /// NISysCfg_NetSvcDown -> -2147220307L
+    NISysCfg_NetSvcDown = -2147220307,
+
+    /// NISysCfg_NotConfirmed -> -2147220306L
+    NISysCfg_NotConfirmed = -2147220306,
+
+    /// NISysCfg_HostNotResolved -> -2147220305L
+    NISysCfg_HostNotResolved = -2147220305,
+
+    /// NISysCfg_RebootTimeout -> -2147220304L
+    NISysCfg_RebootTimeout = -2147220304,
+
+    /// NISysCfg_NoConfirmationFP1600 -> -2147220303L
+    NISysCfg_NoConfirmationFP1600 = -2147220303,
+
+    /// NISysCfg_DuplicateStartup -> -2147220300L
+    NISysCfg_DuplicateStartup = -2147220300,
+
+    /// NISysCfg_RemoteInvalidArgument -> -2147220299L
+    NISysCfg_RemoteInvalidArgument = -2147220299,
+
+    /// NISysCfg_NotUninstallable -> -2147220298L
+    NISysCfg_NotUninstallable = -2147220298,
+
+    /// NISysCfg_DuplicatesNotAllowed -> -2147220297L
+    NISysCfg_DuplicatesNotAllowed = -2147220297,
+
+    /// NISysCfg_NotInstallable -> -2147220296L
+    NISysCfg_NotInstallable = -2147220296,
+
+    /// NISysCfg_WrongDevice -> -2147220295L
+    NISysCfg_WrongDevice = -2147220295,
+
+    /// NISysCfg_WrongOS -> -2147220294L
+    NISysCfg_WrongOS = -2147220294,
+
+    /// NISysCfg_OSVersionTooOld -> -2147220293L
+    NISysCfg_OSVersionTooOld = -2147220293,
+
+    /// NISysCfg_IOError -> -2147220292L
+    NISysCfg_IOError = -2147220292,
+
+    /// NISysCfg_CorruptConfig -> -2147220291L
+    NISysCfg_CorruptConfig = -2147220291,
+
+    /// NISysCfg_BufferOverflow -> -2147220290L
+    NISysCfg_BufferOverflow = -2147220290,
+
+    /// NISysCfg_UnsupportedCDFVersion -> -2147220289L
+    NISysCfg_UnsupportedCDFVersion = -2147220289,
+
+    /// NISysCfg_InvalidStack -> -2147220288L
+    NISysCfg_InvalidStack = -2147220288,
+
+    /// NISysCfg_IncompleteStack -> -2147220287L
+    NISysCfg_IncompleteStack = -2147220287,
+
+    /// NISysCfg_StackItemMissing -> -2147220286L
+    NISysCfg_StackItemMissing = -2147220286,
+
+    /// NISysCfg_TopLevelHiddenComponentError -> -2147220285L
+    NISysCfg_TopLevelHiddenComponentError = -2147220285,
+
+    /// NISysCfg_InvalidAddon -> -2147220284L
+    NISysCfg_InvalidAddon = -2147220284,
+
+    /// NISysCfg_NoRTImagesFolder -> -2147220283L
+    NISysCfg_NoRTImagesFolder = -2147220283,
+
+    /// NISysCfg_NoRTImagesRegistry -> -2147220282L
+    NISysCfg_NoRTImagesRegistry = -2147220282,
+
+    /// NISysCfg_NoRTS2CDF -> -2147220281L
+    NISysCfg_NoRTS2CDF = -2147220281,
+
+    /// NISysCfg_UnsupportedOS -> -2147220280L
+    NISysCfg_UnsupportedOS = -2147220280,
+
+    /// NISysCfg_ExactVersionRequired -> -2147220279L
+    NISysCfg_ExactVersionRequired = -2147220279,
+
+    /// NISysCfg_InvalidStartup -> -2147220277L
+    NISysCfg_InvalidStartup = -2147220277,
+}
+
+[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+public struct NISysCfgTimestampUTC
+{
+
+    /// unsigned int[4]
+    [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 4, ArraySubType = System.Runtime.InteropServices.UnmanagedType.U4)]
+    public uint[] u32Data;
+}
+
+public enum NISysCfgIncludeCachedResults
+{
+
+    /// NISysCfgIncludeCachedResultsNone -> 0
+    NISysCfgIncludeCachedResultsNone = 0,
+
+    /// NISysCfgIncludeCachedResultsOnlyIfOnline -> 1
+    NISysCfgIncludeCachedResultsOnlyIfOnline = 1,
+
+    /// NISysCfgIncludeCachedResultsAll -> 3
+    NISysCfgIncludeCachedResultsAll = 3,
+}
+
+public enum NISysCfgSystemNameFormat
+{
+
+    /// NISysCfgSystemNameFormatHostname -> 0x10
+    NISysCfgSystemNameFormatHostname = 16,
+
+    /// NISysCfgSystemNameFormatHostnameIp -> 0x12
+    NISysCfgSystemNameFormatHostnameIp = 18,
+
+    /// NISysCfgSystemNameFormatHostnameMac -> 0x13
+    NISysCfgSystemNameFormatHostnameMac = 19,
+
+    /// NISysCfgSystemNameFormatIp -> 0x20
+    NISysCfgSystemNameFormatIp = 32,
+
+    /// NISysCfgSystemNameFormatIpHostname -> 0x21
+    NISysCfgSystemNameFormatIpHostname = 33,
+
+    /// NISysCfgSystemNameFormatIpMac -> 0x23
+    NISysCfgSystemNameFormatIpMac = 35,
+
+    /// NISysCfgSystemNameFormatMac -> 0x30
+    NISysCfgSystemNameFormatMac = 48,
+
+    /// NISysCfgSystemNameFormatMacHostname -> 0x31
+    NISysCfgSystemNameFormatMacHostname = 49,
+
+    /// NISysCfgSystemNameFormatMacIp -> 0x32
+    NISysCfgSystemNameFormatMacIp = 50,
+}
+
+public enum NISysCfgFileSystemMode
+{
+
+    /// NISysCfgFileSystemDefault -> 0x0000
+    NISysCfgFileSystemDefault = 0,
+
+    /// NISysCfgFileSystemFat -> 0x0001
+    NISysCfgFileSystemFat = 1,
+
+    /// NISysCfgFileSystemReliance -> 0x0002
+    NISysCfgFileSystemReliance = 2,
+
+    /// NISysCfgFileSystemUBIFS -> 0x4000
+    NISysCfgFileSystemUBIFS = 16384,
+
+    /// NISysCfgFileSystemExt4 -> 0x8000
+    NISysCfgFileSystemExt4 = 32768,
+}
+
+public enum NISysCfgNetworkInterfaceSettings
+{
+
+    /// NISysCfgResetPrimaryResetOthers -> 0
+    NISysCfgResetPrimaryResetOthers = 0,
+
+    /// NISysCfgPreservePrimaryResetOthers -> 1
+    NISysCfgPreservePrimaryResetOthers = 1,
+
+    /// NISysCfgPreservePrimaryPreserveOthers -> 2
+    NISysCfgPreservePrimaryPreserveOthers = 2,
+
+    /// NISysCfgPreservePrimaryApplyOthers -> 3
+    NISysCfgPreservePrimaryApplyOthers = 3,
+
+    /// NISysCfgApplyPrimaryResetOthers -> 4
+    NISysCfgApplyPrimaryResetOthers = 4,
+
+    /// NISysCfgApplyPrimaryPreserveOthers -> 5
+    NISysCfgApplyPrimaryPreserveOthers = 5,
+
+    /// NISysCfgApplyPrimaryApplyOthers -> 6
+    NISysCfgApplyPrimaryApplyOthers = 6,
+}
+
+public enum NISysCfgComponentType
+{
+
+    /// NISysCfgItemTypeStandard -> 0
+    NISysCfgItemTypeStandard = 0,
+
+    /// NISysCfgItemTypeHidden -> 1
+    NISysCfgItemTypeHidden = 1,
+
+    /// NISysCfgItemTypeSystem -> 2
+    NISysCfgItemTypeSystem = 2,
+
+    /// NISysCfgItemTypeUnknown -> 3
+    NISysCfgItemTypeUnknown = 3,
+
+    /// NISysCfgItemTypeStartup -> 4
+    NISysCfgItemTypeStartup = 4,
+
+    /// NISysCfgItemTypeImage -> 5
+    NISysCfgItemTypeImage = 5,
+
+    /// NISysCfgItemTypeEssential -> 6
+    NISysCfgItemTypeEssential = 6,
+}
+
+public enum NISysCfgIncludeComponentTypes
+{
+
+    /// NISysCfgIncludeItemsAllVisible -> 0x0000
+    NISysCfgIncludeItemsAllVisible = 0,
+
+    /// NISysCfgIncludeItemsAllVisibleAndHidden -> 0x0001
+    NISysCfgIncludeItemsAllVisibleAndHidden = 1,
+
+    /// NISysCfgIncludeItemsOnlyStandard -> 0x0002
+    NISysCfgIncludeItemsOnlyStandard = 2,
+
+    /// NISysCfgIncludeItemsOnlyStartup -> 0x0003
+    NISysCfgIncludeItemsOnlyStartup = 3,
+}
+
+public enum NISysCfgVersionSelectionMode
+{
+
+    /// NISysCfgVersionSelectionHighest -> 0
+    NISysCfgVersionSelectionHighest = 0,
+
+    /// NISysCfgVersionSelectionExact -> 1
+    NISysCfgVersionSelectionExact = 1,
+}
+
+public enum NISysCfgImportMode
+{
+
+    /// NISysCfgImportMergeItems -> 0
+    NISysCfgImportMergeItems = 0,
+
+    /// NISysCfgImportDeleteConfigFirst -> 0x100000
+    NISysCfgImportDeleteConfigFirst = 1048576,
+
+    /// NISysCfgImportPreserveConflictItems -> 0x200000
+    NISysCfgImportPreserveConflictItems = 2097152,
+}
+
+public enum NISysCfgReportType
+{
+
+    /// NISysCfgReportXml -> 0
+    NISysCfgReportXml = 0,
+
+    /// NISysCfgReportHtml -> 1
+    NISysCfgReportHtml = 1,
+
+    /// NISysCfgReportTechnicalSupportZip -> 2
+    NISysCfgReportTechnicalSupportZip = 2,
+}
+
+public enum NISysCfgBusType
+{
+
+    /// NISysCfgBusTypeBuiltIn -> 0
+    NISysCfgBusTypeBuiltIn = 0,
+
+    /// NISysCfgBusTypePciPxi -> 1
+    NISysCfgBusTypePciPxi = 1,
+
+    /// NISysCfgBusTypeUsb -> 2
+    NISysCfgBusTypeUsb = 2,
+
+    /// NISysCfgBusTypeGpib -> 3
+    NISysCfgBusTypeGpib = 3,
+
+    /// NISysCfgBusTypeVxi -> 4
+    NISysCfgBusTypeVxi = 4,
+
+    /// NISysCfgBusTypeSerial -> 5
+    NISysCfgBusTypeSerial = 5,
+
+    /// NISysCfgBusTypeTcpIp -> 6
+    NISysCfgBusTypeTcpIp = 6,
+
+    /// NISysCfgBusTypeCompactRio -> 7
+    NISysCfgBusTypeCompactRio = 7,
+
+    /// NISysCfgBusTypeScxi -> 8
+    NISysCfgBusTypeScxi = 8,
+
+    /// NISysCfgBusTypeCompactDaq -> 9
+    NISysCfgBusTypeCompactDaq = 9,
+
+    /// NISysCfgBusTypeSwitchBlock -> 10
+    NISysCfgBusTypeSwitchBlock = 10,
+
+    /// NISysCfgBusTypeScc -> 11
+    NISysCfgBusTypeScc = 11,
+
+    /// NISysCfgBusTypeFireWire -> 12
+    NISysCfgBusTypeFireWire = 12,
+
+    /// NISysCfgBusTypeAccessory -> 13
+    NISysCfgBusTypeAccessory = 13,
+
+    /// NISysCfgBusTypeCan -> 14
+    NISysCfgBusTypeCan = 14,
+
+    /// NISysCfgBusTypeSwitchBlockDevice -> 15
+    NISysCfgBusTypeSwitchBlockDevice = 15,
+}
+
+public enum NISysCfgHasDriverType
+{
+
+    /// NISysCfgHasDriverTypeUnknown -> -1
+    NISysCfgHasDriverTypeUnknown = -1,
+
+    /// NISysCfgHasDriverTypeNotInstalled -> 0
+    NISysCfgHasDriverTypeNotInstalled = 0,
+
+    /// NISysCfgHasDriverTypeInstalled -> 1
+    NISysCfgHasDriverTypeInstalled = 1,
+}
+
+public enum NISysCfgIsPresentType
+{
+
+    /// NISysCfgIsPresentTypeInitializing -> -2
+    NISysCfgIsPresentTypeInitializing = -2,
+
+    /// NISysCfgIsPresentTypeUnknown -> -1
+    NISysCfgIsPresentTypeUnknown = -1,
+
+    /// NISysCfgIsPresentTypeNotPresent -> 0
+    NISysCfgIsPresentTypeNotPresent = 0,
+
+    /// NISysCfgIsPresentTypePresent -> 1
+    NISysCfgIsPresentTypePresent = 1,
+}
+
+public enum NISysCfgIpAddressMode
+{
+
+    /// NISysCfgIpAddressModeStatic -> 1
+    NISysCfgIpAddressModeStatic = 1,
+
+    /// NISysCfgIpAddressModeDhcpOrLinkLocal -> 2
+    NISysCfgIpAddressModeDhcpOrLinkLocal = 2,
+
+    /// NISysCfgIpAddressModeLinkLocalOnly -> 4
+    NISysCfgIpAddressModeLinkLocalOnly = 4,
+
+    /// NISysCfgIpAddressModeDhcpOnly -> 8
+    NISysCfgIpAddressModeDhcpOnly = 8,
+}
+
+
+public enum NISysCfgLocale
+{
+
+    /// NISysCfgLocaleDefault -> 0
+    NISysCfgLocaleDefault = 0,
+
+    /// NISysCfgLocaleChineseSimplified -> 2052
+    NISysCfgLocaleChineseSimplified = 2052,
+
+    /// NISysCfgLocaleEnglish -> 1033
+    NISysCfgLocaleEnglish = 1033,
+
+    /// NISysCfgLocaleFrench -> 1036
+    NISysCfgLocaleFrench = 1036,
+
+    /// NISysCfgLocaleGerman -> 1031
+    NISysCfgLocaleGerman = 1031,
+
+    /// NISysCfgLocaleJapanese -> 1041
+    NISysCfgLocaleJapanese = 1041,
+
+    /// NISysCfgLocaleKorean -> 1042
+    NISysCfgLocaleKorean = 1042,
+}
+
+public enum NISysCfgFilterMode
+{
+
+    /// NISysCfgFilterModeMatchValuesAll -> 1
+    NISysCfgFilterModeMatchValuesAll = 1,
+
+    /// NISysCfgFilterModeMatchValuesAny -> 2
+    NISysCfgFilterModeMatchValuesAny = 2,
+
+    /// NISysCfgFilterModeMatchValuesNone -> 3
+    NISysCfgFilterModeMatchValuesNone = 3,
+
+    /// NISysCfgFilterModeAllPropertiesExist -> 4
+    NISysCfgFilterModeAllPropertiesExist = 4,
+}
+
+public enum NISysCfgServiceType
+{
+
+    /// NISysCfgServiceTypemDnsNiTcp -> 0
+    NISysCfgServiceTypemDnsNiTcp = 0,
+
+    /// NISysCfgServiceTypemDnsNiRealtime -> 1
+    NISysCfgServiceTypemDnsNiRealtime = 1,
+
+    /// NISysCfgServiceTypemDnsNiSysapi -> 2
+    NISysCfgServiceTypemDnsNiSysapi = 2,
+
+    /// NISysCfgServiceTypemDnsNiHttp -> 3
+    NISysCfgServiceTypemDnsNiHttp = 3,
+
+    /// NISysCfgServiceTypeLocalSystem -> 4
+    NISysCfgServiceTypeLocalSystem = 4,
+
+    /// NISysCfgServiceTypeLocalNetInterface -> 5
+    NISysCfgServiceTypeLocalNetInterface = 5,
+
+    /// NISysCfgServiceTypeLocalTimeKeeper -> 6
+    NISysCfgServiceTypeLocalTimeKeeper = 6,
+
+    /// NISysCfgServiceTypeLocalTimeSource -> 7
+    NISysCfgServiceTypeLocalTimeSource = 7,
+
+    /// NISysCfgServiceTypemDnsLxi -> 8
+    NISysCfgServiceTypemDnsLxi = 8,
+
+    /// NISysCfgServiceTypeLocalFpga -> 9
+    NISysCfgServiceTypeLocalFpga = 9,
+}
+
+public enum NISysCfgAdapterType
+{
+
+    /// NISysCfgAdapterTypeEthernet -> 1
+    NISysCfgAdapterTypeEthernet = 1,
+
+    /// NISysCfgAdapterTypeWlan -> 2
+    NISysCfgAdapterTypeWlan = 2,
+}
+
+public enum NISysCfgAdapterMode
+{
+
+    /// NISysCfgAdapterModeDisabled -> 1
+    NISysCfgAdapterModeDisabled = 1,
+
+    /// NISysCfgAdapterModeTcpIpEthernet -> 2
+    NISysCfgAdapterModeTcpIpEthernet = 2,
+
+    /// NISysCfgAdapterModeDeterministic -> 4
+    NISysCfgAdapterModeDeterministic = 4,
+
+    /// NISysCfgAdapterModeEtherCat -> 8
+    NISysCfgAdapterModeEtherCat = 8,
+
+    /// NISysCfgAdapterModeTcpIpWlan -> 32
+    NISysCfgAdapterModeTcpIpWlan = 32,
+
+    /// NISysCfgAdapterModeTcpIpAccessPoint -> 64
+    NISysCfgAdapterModeTcpIpAccessPoint = 64,
+}
+
+public enum NISysCfgLinkSpeed
+{
+
+    /// NISysCfgLinkSpeedNone -> 0
+    NISysCfgLinkSpeedNone = 0,
+
+    /// NISysCfgLinkSpeedAuto -> 1
+    NISysCfgLinkSpeedAuto = 1,
+
+    /// NISysCfgLinkSpeed10mbHalf -> 2
+    NISysCfgLinkSpeed10mbHalf = 2,
+
+    /// NISysCfgLinkSpeed10mbFull -> 4
+    NISysCfgLinkSpeed10mbFull = 4,
+
+    /// NISysCfgLinkSpeed100mbHalf -> 8
+    NISysCfgLinkSpeed100mbHalf = 8,
+
+    /// NISysCfgLinkSpeed100mbFull -> 16
+    NISysCfgLinkSpeed100mbFull = 16,
+
+    /// NISysCfgLinkSpeedGigabitHalf -> 32
+    NISysCfgLinkSpeedGigabitHalf = 32,
+
+    /// NISysCfgLinkSpeedGigabitFull -> 64
+    NISysCfgLinkSpeedGigabitFull = 64,
+
+    /// NISysCfgLinkSpeedWlan80211a -> 131072
+    NISysCfgLinkSpeedWlan80211a = 131072,
+
+    /// NISysCfgLinkSpeedWlan80211b -> 262144
+    NISysCfgLinkSpeedWlan80211b = 262144,
+
+    /// NISysCfgLinkSpeedWlan80211g -> 524288
+    NISysCfgLinkSpeedWlan80211g = 524288,
+
+    /// NISysCfgLinkSpeedWlan80211n -> 1048576
+    NISysCfgLinkSpeedWlan80211n = 1048576,
+
+    /// NISysCfgLinkSpeedWlan80211n5GHz -> 2097152
+    NISysCfgLinkSpeedWlan80211n5GHz = 2097152,
+}
+
+public enum NISysCfgPacketDetection
+{
+
+    /// NISysCfgPacketDetectionNone -> 0
+    NISysCfgPacketDetectionNone = 0,
+
+    /// NISysCfgPacketDetectionLineInterrupt -> 1
+    NISysCfgPacketDetectionLineInterrupt = 1,
+
+    /// NISysCfgPacketDetectionPolling -> 2
+    NISysCfgPacketDetectionPolling = 2,
+
+    /// NISysCfgPacketDetectionSignaledInterrupt -> 4
+    NISysCfgPacketDetectionSignaledInterrupt = 4,
+}
+
+public enum NISysCfgConnectionType
+{
+
+    /// NISysCfgConnectionTypeNone -> 0
+    NISysCfgConnectionTypeNone = 0,
+
+    /// NISysCfgConnectionTypeInfrastructure -> 1
+    NISysCfgConnectionTypeInfrastructure = 1,
+
+    /// NISysCfgConnectionTypeAdHoc -> 2
+    NISysCfgConnectionTypeAdHoc = 2,
+}
+
+public enum NISysCfgSecurityType
+{
+
+    /// NISysCfgSecurityTypeNone -> 0
+    NISysCfgSecurityTypeNone = 0,
+
+    /// NISysCfgSecurityTypeNotSupported -> 1
+    NISysCfgSecurityTypeNotSupported = 1,
+
+    /// NISysCfgSecurityTypeOpen -> 2
+    NISysCfgSecurityTypeOpen = 2,
+
+    /// NISysCfgSecurityTypeWep -> 4
+    NISysCfgSecurityTypeWep = 4,
+
+    /// NISysCfgSecurityTypeWpaPsk -> 8
+    NISysCfgSecurityTypeWpaPsk = 8,
+
+    /// NISysCfgSecurityTypeWpaEap -> 16
+    NISysCfgSecurityTypeWpaEap = 16,
+
+    /// NISysCfgSecurityTypeWpa2Psk -> 32
+    NISysCfgSecurityTypeWpa2Psk = 32,
+
+    /// NISysCfgSecurityTypeWpa2Eap -> 64
+    NISysCfgSecurityTypeWpa2Eap = 64,
+}
+
+public enum NISysCfgEapType
+{
+
+    /// NISysCfgEapTypeNone -> 0
+    NISysCfgEapTypeNone = 0,
+
+    /// NISysCfgEapTypeEapTls -> 1
+    NISysCfgEapTypeEapTls = 1,
+
+    /// NISysCfgEapTypeEapTtls -> 2
+    NISysCfgEapTypeEapTtls = 2,
+
+    /// NISysCfgEapTypeEapFast -> 4
+    NISysCfgEapTypeEapFast = 4,
+
+    /// NISysCfgEapTypeLeap -> 8
+    NISysCfgEapTypeLeap = 8,
+
+    /// NISysCfgEapTypePeap -> 16
+    NISysCfgEapTypePeap = 16,
+}
+
+public enum NISysCfgFirmwareStatus
+{
+
+    /// NISysCfgFirmwareReadyPendingAutoRestart -> -4
+    NISysCfgFirmwareReadyPendingAutoRestart = -4,
+
+    /// NISysCfgFirmwareVerifyingNewImage -> -3
+    NISysCfgFirmwareVerifyingNewImage = -3,
+
+    /// NISysCfgFirmwareWritingFlashingNewImage -> -2
+    NISysCfgFirmwareWritingFlashingNewImage = -2,
+
+    /// NISysCfgFirmwareUpdateModeWaitingForImage -> -1
+    NISysCfgFirmwareUpdateModeWaitingForImage = -1,
+
+    /// NISysCfgFirmwareCorruptCannotRun -> 0
+    NISysCfgFirmwareCorruptCannotRun = 0,
+
+    /// NISysCfgFirmwareNoneInstalled -> 1
+    NISysCfgFirmwareNoneInstalled = 1,
+
+    /// NISysCfgFirmwareInstalledNormalOperation -> 2
+    NISysCfgFirmwareInstalledNormalOperation = 2,
+
+    /// NISysCfgFirmwareReadyPendingUserRestart -> 3
+    NISysCfgFirmwareReadyPendingUserRestart = 3,
+
+    /// NISysCfgFirmwareReadyPendingUserAction -> 4
+    NISysCfgFirmwareReadyPendingUserAction = 4,
+
+    /// NISysCfgFirmwareUpdateAttemptFailed -> 5
+    NISysCfgFirmwareUpdateAttemptFailed = 5,
+}
+
+public enum NISysCfgDeleteValidationMode
+{
+
+    /// NISysCfgValidateButDoNotDelete -> -1
+    NISysCfgValidateButDoNotDelete = -1,
+
+    /// NISysCfgDeleteIfNoDependenciesExist -> 0
+    NISysCfgDeleteIfNoDependenciesExist = 0,
+
+    /// NISysCfgDeleteItemAndAnyDependencies -> 1
+    NISysCfgDeleteItemAndAnyDependencies = 1,
+
+    /// NISysCfgDeleteItemButKeepDependencies -> 2
+    NISysCfgDeleteItemButKeepDependencies = 2,
+}
+
+public enum NISysCfgAccessType
+{
+
+    /// NISysCfgAccessTypeLocalOnly -> 0
+    NISysCfgAccessTypeLocalOnly = 0,
+
+    /// NISysCfgAccessTypeLocalAndRemote -> 1
+    NISysCfgAccessTypeLocalAndRemote = 1,
+}
+
+public enum NISysCfgLedState
+{
+
+    /// NISysCfgLedStateOff -> 0
+    NISysCfgLedStateOff = 0,
+
+    /// NISysCfgLedStateSolidGreen -> 1
+    NISysCfgLedStateSolidGreen = 1,
+
+    /// NISysCfgLedStateSolidYellow -> 2
+    NISysCfgLedStateSolidYellow = 2,
+
+    /// NISysCfgLedStateBlinkingGreen -> 4
+    NISysCfgLedStateBlinkingGreen = 4,
+
+    /// NISysCfgLedStateBlinkingYellow -> 8
+    NISysCfgLedStateBlinkingYellow = 8,
+}
+
+public enum NISysCfgSwitchState
+{
+
+    /// NISysCfgSwitchStateDisabled -> 0
+    NISysCfgSwitchStateDisabled = 0,
+
+    /// NISysCfgSwitchStateEnabled -> 1
+    NISysCfgSwitchStateEnabled = 1,
+}
+
+public enum NISysCfgFirmwareUpdateMode
+{
+
+    /// NISysCfgFirmwareUpdateModeNone -> 0
+    NISysCfgFirmwareUpdateModeNone = 0,
+
+    /// NISysCfgFirmwareUpdateModeManual -> 1
+    NISysCfgFirmwareUpdateModeManual = 1,
+
+    /// NISysCfgFirmwareUpdateModeDriverManaged -> 2
+    NISysCfgFirmwareUpdateModeDriverManaged = 2,
+}
+
+public enum NISysCfgModuleProgramMode
+{
+
+    /// NISysCfgModuleProgramModeNone -> 0
+    NISysCfgModuleProgramModeNone = 0,
+
+    /// NISysCfgModuleProgramModeRealtimeCpu -> 1
+    NISysCfgModuleProgramModeRealtimeCpu = 1,
+
+    /// NISysCfgModuleProgramModeRealtimeScan -> 2
+    NISysCfgModuleProgramModeRealtimeScan = 2,
+
+    /// NISysCfgModuleProgramModeLabVIEWFpga -> 4
+    NISysCfgModuleProgramModeLabVIEWFpga = 4,
+}
+
+public enum NISysCfgResourceProperty
+{
+
+    /// NISysCfgResourcePropertyIsDevice -> 16781312
+    NISysCfgResourcePropertyIsDevice = 16781312,
+
+    /// NISysCfgResourcePropertyIsChassis -> 16941056
+    NISysCfgResourcePropertyIsChassis = 16941056,
+
+    /// NISysCfgResourcePropertyConnectsToBusType -> 16785408
+    NISysCfgResourcePropertyConnectsToBusType = 16785408,
+
+    /// NISysCfgResourcePropertyVendorId -> 16789504
+    NISysCfgResourcePropertyVendorId = 16789504,
+
+    /// NISysCfgResourcePropertyVendorName -> 16793600
+    NISysCfgResourcePropertyVendorName = 16793600,
+
+    /// NISysCfgResourcePropertyProductId -> 16797696
+    NISysCfgResourcePropertyProductId = 16797696,
+
+    /// NISysCfgResourcePropertyProductName -> 16801792
+    NISysCfgResourcePropertyProductName = 16801792,
+
+    /// NISysCfgResourcePropertySerialNumber -> 16805888
+    NISysCfgResourcePropertySerialNumber = 16805888,
+
+    /// NISysCfgResourcePropertyFirmwareRevision -> 16969728
+    NISysCfgResourcePropertyFirmwareRevision = 16969728,
+
+    /// NISysCfgResourcePropertyIsNIProduct -> 16809984
+    NISysCfgResourcePropertyIsNIProduct = 16809984,
+
+    /// NISysCfgResourcePropertyIsSimulated -> 16814080
+    NISysCfgResourcePropertyIsSimulated = 16814080,
+
+    /// NISysCfgResourcePropertyConnectsToLinkName -> 16818176
+    NISysCfgResourcePropertyConnectsToLinkName = 16818176,
+
+    /// NISysCfgResourcePropertyHasDriver -> 16920576
+    NISysCfgResourcePropertyHasDriver = 16920576,
+
+    /// NISysCfgResourcePropertyIsPresent -> 16924672
+    NISysCfgResourcePropertyIsPresent = 16924672,
+
+    /// NISysCfgResourcePropertySlotNumber -> 16822272
+    NISysCfgResourcePropertySlotNumber = 16822272,
+
+    /// NISysCfgResourcePropertySupportsInternalCalibration -> 16842752
+    NISysCfgResourcePropertySupportsInternalCalibration = 16842752,
+
+    /// NISysCfgResourcePropertyInternalCalibrationLastTime -> 16846848
+    NISysCfgResourcePropertyInternalCalibrationLastTime = 16846848,
+
+    /// NISysCfgResourcePropertyInternalCalibrationLastTemp -> 16850944
+    NISysCfgResourcePropertyInternalCalibrationLastTemp = 16850944,
+
+    /// NISysCfgResourcePropertySupportsExternalCalibration -> 16859136
+    NISysCfgResourcePropertySupportsExternalCalibration = 16859136,
+
+    /// NISysCfgResourcePropertyExternalCalibrationLastTemp -> 16867328
+    NISysCfgResourcePropertyExternalCalibrationLastTemp = 16867328,
+
+    /// NISysCfgResourcePropertyCalibrationComments -> 16961536
+    NISysCfgResourcePropertyCalibrationComments = 16961536,
+
+    /// NISysCfgResourcePropertyInternalCalibrationLastLimited -> 17420288
+    NISysCfgResourcePropertyInternalCalibrationLastLimited = 17420288,
+
+    /// NISysCfgResourcePropertyExternalCalibrationChecksum -> 17432576
+    NISysCfgResourcePropertyExternalCalibrationChecksum = 17432576,
+
+    /// NISysCfgResourcePropertyCurrentTemp -> 16965632
+    NISysCfgResourcePropertyCurrentTemp = 16965632,
+
+    /// NISysCfgResourcePropertyPxiPciBusNumber -> 16875520
+    NISysCfgResourcePropertyPxiPciBusNumber = 16875520,
+
+    /// NISysCfgResourcePropertyPxiPciDeviceNumber -> 16879616
+    NISysCfgResourcePropertyPxiPciDeviceNumber = 16879616,
+
+    /// NISysCfgResourcePropertyPxiPciFunctionNumber -> 16883712
+    NISysCfgResourcePropertyPxiPciFunctionNumber = 16883712,
+
+    /// NISysCfgResourcePropertyPxiPciLinkWidth -> 16973824
+    NISysCfgResourcePropertyPxiPciLinkWidth = 16973824,
+
+    /// NISysCfgResourcePropertyPxiPciMaxLinkWidth -> 16977920
+    NISysCfgResourcePropertyPxiPciMaxLinkWidth = 16977920,
+
+    /// NISysCfgResourcePropertyUsbInterface -> 16887808
+    NISysCfgResourcePropertyUsbInterface = 16887808,
+
+    /// NISysCfgResourcePropertyTcpHostName -> 16928768
+    NISysCfgResourcePropertyTcpHostName = 16928768,
+
+    /// NISysCfgResourcePropertyTcpMacAddress -> 16986112
+    NISysCfgResourcePropertyTcpMacAddress = 16986112,
+
+    /// NISysCfgResourcePropertyTcpIpAddress -> 16957440
+    NISysCfgResourcePropertyTcpIpAddress = 16957440,
+
+    /// NISysCfgResourcePropertyTcpDeviceClass -> 17022976
+    NISysCfgResourcePropertyTcpDeviceClass = 17022976,
+
+    /// NISysCfgResourcePropertyGpibPrimaryAddress -> 16994304
+    NISysCfgResourcePropertyGpibPrimaryAddress = 16994304,
+
+    /// NISysCfgResourcePropertyGpibSecondaryAddress -> 16998400
+    NISysCfgResourcePropertyGpibSecondaryAddress = 16998400,
+
+    /// NISysCfgResourcePropertySerialPortBinding -> 17076224
+    NISysCfgResourcePropertySerialPortBinding = 17076224,
+
+    /// NISysCfgResourcePropertyProvidesBusType -> 16932864
+    NISysCfgResourcePropertyProvidesBusType = 16932864,
+
+    /// NISysCfgResourcePropertyProvidesLinkName -> 16936960
+    NISysCfgResourcePropertyProvidesLinkName = 16936960,
+
+    /// NISysCfgResourcePropertyNumberOfSlots -> 16826368
+    NISysCfgResourcePropertyNumberOfSlots = 16826368,
+
+    /// NISysCfgResourcePropertySupportsFirmwareUpdate -> 17080320
+    NISysCfgResourcePropertySupportsFirmwareUpdate = 17080320,
+
+    /// NISysCfgResourcePropertyFirmwareFilePattern -> 17084416
+    NISysCfgResourcePropertyFirmwareFilePattern = 17084416,
+
+    /// NISysCfgResourcePropertyRecommendedCalibrationInterval -> 17207296
+    NISysCfgResourcePropertyRecommendedCalibrationInterval = 17207296,
+
+    /// NISysCfgResourcePropertySupportsCalibrationWrite -> 17215488
+    NISysCfgResourcePropertySupportsCalibrationWrite = 17215488,
+
+    /// NISysCfgResourcePropertyHardwareRevision -> 17256448
+    NISysCfgResourcePropertyHardwareRevision = 17256448,
+
+    /// NISysCfgResourcePropertyCpuModelName -> 17313792
+    NISysCfgResourcePropertyCpuModelName = 17313792,
+
+    /// NISysCfgResourcePropertyCpuSteppingRevision -> 17317888
+    NISysCfgResourcePropertyCpuSteppingRevision = 17317888,
+
+    /// NISysCfgResourcePropertyModelNameNumber -> 17436672
+    NISysCfgResourcePropertyModelNameNumber = 17436672,
+
+    /// NISysCfgResourcePropertyModuleProgramMode -> 17440768
+    NISysCfgResourcePropertyModuleProgramMode = 17440768,
+
+    /// NISysCfgResourcePropertyConnectsToNumSlots -> 17072128
+    NISysCfgResourcePropertyConnectsToNumSlots = 17072128,
+
+    /// NISysCfgResourcePropertySlotOffsetLeft -> 17276928
+    NISysCfgResourcePropertySlotOffsetLeft = 17276928,
+
+    /// NISysCfgResourcePropertyInternalCalibrationValuesInRange -> 17489920
+    NISysCfgResourcePropertyInternalCalibrationValuesInRange = 17489920,
+
+    /// NISysCfgResourcePropertyFirmwareUpdateMode -> 17354752
+    NISysCfgResourcePropertyFirmwareUpdateMode = 17354752,
+
+    /// NISysCfgResourcePropertyExternalCalibrationLastTime -> 16863232
+    NISysCfgResourcePropertyExternalCalibrationLastTime = 16863232,
+
+    /// NISysCfgResourcePropertyRecommendedNextCalibrationTime -> 16871424
+    NISysCfgResourcePropertyRecommendedNextCalibrationTime = 16871424,
+
+    /// NISysCfgResourcePropertyExternalCalibrationLastLimited -> 17428480
+    NISysCfgResourcePropertyExternalCalibrationLastLimited = 17428480,
+
+    /// NISysCfgResourcePropertyCalibrationCurrentPassword -> 17223680
+    NISysCfgResourcePropertyCalibrationCurrentPassword = 17223680,
+
+    /// NISysCfgResourcePropertyCalibrationNewPassword -> 17227776
+    NISysCfgResourcePropertyCalibrationNewPassword = 17227776,
+
+    /// NISysCfgResourcePropertySysCfgAccess -> 219504640
+    NISysCfgResourcePropertySysCfgAccess = 219504640,
+
+    /// NISysCfgResourcePropertyAdapterType -> 219332608
+    NISysCfgResourcePropertyAdapterType = 219332608,
+
+    /// NISysCfgResourcePropertyMacAddress -> 219168768
+    NISysCfgResourcePropertyMacAddress = 219168768,
+
+    /// NISysCfgResourcePropertyAdapterMode -> 219160576
+    NISysCfgResourcePropertyAdapterMode = 219160576,
+
+    /// NISysCfgResourcePropertyTcpIpRequestMode -> 219172864
+    NISysCfgResourcePropertyTcpIpRequestMode = 219172864,
+
+    /// NISysCfgResourcePropertyTcpIpv4Address -> 219181056
+    NISysCfgResourcePropertyTcpIpv4Address = 219181056,
+
+    /// NISysCfgResourcePropertyTcpIpv4Subnet -> 219189248
+    NISysCfgResourcePropertyTcpIpv4Subnet = 219189248,
+
+    /// NISysCfgResourcePropertyTcpIpv4Gateway -> 219193344
+    NISysCfgResourcePropertyTcpIpv4Gateway = 219193344,
+
+    /// NISysCfgResourcePropertyTcpIpv4DnsServer -> 219197440
+    NISysCfgResourcePropertyTcpIpv4DnsServer = 219197440,
+
+    /// NISysCfgResourcePropertyTcpPreferredLinkSpeed -> 219213824
+    NISysCfgResourcePropertyTcpPreferredLinkSpeed = 219213824,
+
+    /// NISysCfgResourcePropertyTcpCurrentLinkSpeed -> 219222016
+    NISysCfgResourcePropertyTcpCurrentLinkSpeed = 219222016,
+
+    /// NISysCfgResourcePropertyTcpPacketDetection -> 219258880
+    NISysCfgResourcePropertyTcpPacketDetection = 219258880,
+
+    /// NISysCfgResourcePropertyTcpPollingInterval -> 219262976
+    NISysCfgResourcePropertyTcpPollingInterval = 219262976,
+
+    /// NISysCfgResourcePropertyIsPrimaryAdapter -> 219308032
+    NISysCfgResourcePropertyIsPrimaryAdapter = 219308032,
+
+    /// NISysCfgResourcePropertyEtherCatMasterId -> 219250688
+    NISysCfgResourcePropertyEtherCatMasterId = 219250688,
+
+    /// NISysCfgResourcePropertyEtherCatMasterRedundancy -> 219500544
+    NISysCfgResourcePropertyEtherCatMasterRedundancy = 219500544,
+
+    /// NISysCfgResourcePropertyWlanBssid -> 219398144
+    NISysCfgResourcePropertyWlanBssid = 219398144,
+
+    /// NISysCfgResourcePropertyWlanCurrentLinkQuality -> 219394048
+    NISysCfgResourcePropertyWlanCurrentLinkQuality = 219394048,
+
+    /// NISysCfgResourcePropertyWlanCurrentSsid -> 219377664
+    NISysCfgResourcePropertyWlanCurrentSsid = 219377664,
+
+    /// NISysCfgResourcePropertyWlanCurrentConnectionType -> 219381760
+    NISysCfgResourcePropertyWlanCurrentConnectionType = 219381760,
+
+    /// NISysCfgResourcePropertyWlanCurrentSecurityType -> 219385856
+    NISysCfgResourcePropertyWlanCurrentSecurityType = 219385856,
+
+    /// NISysCfgResourcePropertyWlanCurrentEapType -> 219389952
+    NISysCfgResourcePropertyWlanCurrentEapType = 219389952,
+
+    /// NISysCfgResourcePropertyWlanCountryCode -> 219406336
+    NISysCfgResourcePropertyWlanCountryCode = 219406336,
+
+    /// NISysCfgResourcePropertyWlanChannelNumber -> 219410432
+    NISysCfgResourcePropertyWlanChannelNumber = 219410432,
+
+    /// NISysCfgResourcePropertyWlanClientCertificate -> 219422720
+    NISysCfgResourcePropertyWlanClientCertificate = 219422720,
+
+    /// NISysCfgResourcePropertyWlanSecurityIdentity -> 219414528
+    NISysCfgResourcePropertyWlanSecurityIdentity = 219414528,
+
+    /// NISysCfgResourcePropertyWlanSecurityKey -> 219418624
+    NISysCfgResourcePropertyWlanSecurityKey = 219418624,
+
+    /// NISysCfgResourcePropertySystemStartTime -> 17108992
+    NISysCfgResourcePropertySystemStartTime = 17108992,
+
+    /// NISysCfgResourcePropertyCurrentTime -> 219279360
+    NISysCfgResourcePropertyCurrentTime = 219279360,
+
+    /// NISysCfgResourcePropertyTimeZone -> 219471872
+    NISysCfgResourcePropertyTimeZone = 219471872,
+
+    /// NISysCfgResourcePropertyUserDirectedSafeModeSwitch -> 219537408
+    NISysCfgResourcePropertyUserDirectedSafeModeSwitch = 219537408,
+
+    /// NISysCfgResourcePropertyConsoleOutSwitch -> 219541504
+    NISysCfgResourcePropertyConsoleOutSwitch = 219541504,
+
+    /// NISysCfgResourcePropertyIpResetSwitch -> 219545600
+    NISysCfgResourcePropertyIpResetSwitch = 219545600,
+
+    NISysCfgResourcePropertyPxiPciSlotLinkWidth= 16982016,
+    /// NISysCfgResourcePropertyNumberOfDiscoveredAccessPoints -> 219365376
+    NISysCfgResourcePropertyNumberOfDiscoveredAccessPoints = 219365376,
+
+    /// NISysCfgResourcePropertyNumberOfExperts -> 16891904
+    NISysCfgResourcePropertyNumberOfExperts = 16891904,
+
+    /// NISysCfgResourcePropertyNumberOfServices -> 17010688
+    NISysCfgResourcePropertyNumberOfServices = 17010688,
+
+    /// NISysCfgResourcePropertyNumberOfAvailableFirmwareVersions -> 17088512
+    NISysCfgResourcePropertyNumberOfAvailableFirmwareVersions = 17088512,
+
+    /// NISysCfgResourcePropertyNumberOfCpus -> 17137664
+    NISysCfgResourcePropertyNumberOfCpus = 17137664,
+
+    /// NISysCfgResourcePropertyNumberOfFans -> 17174528
+    NISysCfgResourcePropertyNumberOfFans = 17174528,
+
+    /// NISysCfgResourcePropertyNumberOfPowerSensors -> 17448960
+    NISysCfgResourcePropertyNumberOfPowerSensors = 17448960,
+
+    /// NISysCfgResourcePropertyNumberOfTemperatureSensors -> 17186816
+    NISysCfgResourcePropertyNumberOfTemperatureSensors = 17186816,
+
+    /// NISysCfgResourcePropertyNumberOfVoltageSensors -> 17149952
+    NISysCfgResourcePropertyNumberOfVoltageSensors = 17149952,
+
+    /// NISysCfgResourcePropertyNumberOfUserLedIndicators -> 17281024
+    NISysCfgResourcePropertyNumberOfUserLedIndicators = 17281024,
+
+    /// NISysCfgResourcePropertyNumberOfUserSwitches -> 17293312
+    NISysCfgResourcePropertyNumberOfUserSwitches = 17293312,
+}
+
+public enum NISysCfgIndexedProperty
+{
+
+    /// NISysCfgIndexedPropertyServiceType -> 17014784
+    NISysCfgIndexedPropertyServiceType = 17014784,
+
+    /// NISysCfgIndexedPropertyAvailableFirmwareVersion -> 17092608
+    NISysCfgIndexedPropertyAvailableFirmwareVersion = 17092608,
+
+    /// NISysCfgIndexedPropertyWlanAvailableSsid -> 219336704
+    NISysCfgIndexedPropertyWlanAvailableSsid = 219336704,
+
+    /// NISysCfgIndexedPropertyWlanAvailableBssid -> 219443200
+    NISysCfgIndexedPropertyWlanAvailableBssid = 219443200,
+
+    /// NISysCfgIndexedPropertyWlanAvailableConnectionType -> 219340800
+    NISysCfgIndexedPropertyWlanAvailableConnectionType = 219340800,
+
+    /// NISysCfgIndexedPropertyWlanAvailableSecurityType -> 219344896
+    NISysCfgIndexedPropertyWlanAvailableSecurityType = 219344896,
+
+    /// NISysCfgIndexedPropertyWlanAvailableLinkQuality -> 219353088
+    NISysCfgIndexedPropertyWlanAvailableLinkQuality = 219353088,
+
+    /// NISysCfgIndexedPropertyWlanAvailableChannelNumber -> 219357184
+    NISysCfgIndexedPropertyWlanAvailableChannelNumber = 219357184,
+
+    /// NISysCfgIndexedPropertyWlanAvailableLinkSpeed -> 219361280
+    NISysCfgIndexedPropertyWlanAvailableLinkSpeed = 219361280,
+
+    /// NISysCfgIndexedPropertyCpuTotalLoad -> 17141760
+    NISysCfgIndexedPropertyCpuTotalLoad = 17141760,
+
+    /// NISysCfgIndexedPropertyCpuInterruptLoad -> 17145856
+    NISysCfgIndexedPropertyCpuInterruptLoad = 17145856,
+
+    /// NISysCfgIndexedPropertyCpuSpeed -> 17309696
+    NISysCfgIndexedPropertyCpuSpeed = 17309696,
+
+    /// NISysCfgIndexedPropertyFanName -> 17178624
+    NISysCfgIndexedPropertyFanName = 17178624,
+
+    /// NISysCfgIndexedPropertyFanReading -> 17182720
+    NISysCfgIndexedPropertyFanReading = 17182720,
+
+    /// NISysCfgIndexedPropertyPowerName -> 17453056
+    NISysCfgIndexedPropertyPowerName = 17453056,
+
+    /// NISysCfgIndexedPropertyPowerReading -> 17457152
+    NISysCfgIndexedPropertyPowerReading = 17457152,
+
+    /// NISysCfgIndexedPropertyPowerUpperCritical -> 17461248
+    NISysCfgIndexedPropertyPowerUpperCritical = 17461248,
+
+    /// NISysCfgIndexedPropertyTemperatureName -> 17190912
+    NISysCfgIndexedPropertyTemperatureName = 17190912,
+
+    /// NISysCfgIndexedPropertyTemperatureReading -> 16965632
+    NISysCfgIndexedPropertyTemperatureReading = 16965632,
+
+    /// NISysCfgIndexedPropertyTemperatureLowerCritical -> 17195008
+    NISysCfgIndexedPropertyTemperatureLowerCritical = 17195008,
+
+    /// NISysCfgIndexedPropertyTemperatureUpperCritical -> 17199104
+    NISysCfgIndexedPropertyTemperatureUpperCritical = 17199104,
+
+    /// NISysCfgIndexedPropertyVoltageName -> 17154048
+    NISysCfgIndexedPropertyVoltageName = 17154048,
+
+    /// NISysCfgIndexedPropertyVoltageReading -> 17158144
+    NISysCfgIndexedPropertyVoltageReading = 17158144,
+
+    /// NISysCfgIndexedPropertyVoltageNominal -> 17162240
+    NISysCfgIndexedPropertyVoltageNominal = 17162240,
+
+    /// NISysCfgIndexedPropertyVoltageLowerCritical -> 17166336
+    NISysCfgIndexedPropertyVoltageLowerCritical = 17166336,
+
+    /// NISysCfgIndexedPropertyVoltageUpperCritical -> 17170432
+    NISysCfgIndexedPropertyVoltageUpperCritical = 17170432,
+
+    /// NISysCfgIndexedPropertyUserLedName -> 17285120
+    NISysCfgIndexedPropertyUserLedName = 17285120,
+
+    /// NISysCfgIndexedPropertyUserSwitchName -> 17297408
+    NISysCfgIndexedPropertyUserSwitchName = 17297408,
+
+    /// NISysCfgIndexedPropertyUserSwitchState -> 17301504
+    NISysCfgIndexedPropertyUserSwitchState = 17301504,
+
+    /// NISysCfgIndexedPropertyUserLedState -> 17289216
+    NISysCfgIndexedPropertyUserLedState = 17289216,
+
+    /// NISysCfgIndexedPropertyExpertName -> 16900096
+    NISysCfgIndexedPropertyExpertName = 16900096,
+
+    /// NISysCfgIndexedPropertyExpertResourceName -> 16896000
+    NISysCfgIndexedPropertyExpertResourceName = 16896000,
+
+    /// NISysCfgIndexedPropertyExpertUserAlias -> 16904192
+    NISysCfgIndexedPropertyExpertUserAlias = 16904192,
+}
+
+public enum NISysCfgSystemProperty
+{
+
+    /// NISysCfgSystemPropertyDeviceClass -> 16941057
+    NISysCfgSystemPropertyDeviceClass = 16941057,
+
+    /// NISysCfgSystemPropertyProductId -> 16941058
+    NISysCfgSystemPropertyProductId = 16941058,
+
+    /// NISysCfgSystemPropertyFileSystem -> 16941060
+    NISysCfgSystemPropertyFileSystem = 16941060,
+
+    /// NISysCfgSystemPropertyFirmwareRevision -> 16941061
+    NISysCfgSystemPropertyFirmwareRevision = 16941061,
+
+    /// NISysCfgSystemPropertyIsFactoryResetSupported -> 16941067
+    NISysCfgSystemPropertyIsFactoryResetSupported = 16941067,
+
+    /// NISysCfgSystemPropertyIsFirmwareUpdateSupported -> 16941068
+    NISysCfgSystemPropertyIsFirmwareUpdateSupported = 16941068,
+
+    /// NISysCfgSystemPropertyIsLocked -> 16941069
+    NISysCfgSystemPropertyIsLocked = 16941069,
+
+    /// NISysCfgSystemPropertyIsLockingSupported -> 16941070
+    NISysCfgSystemPropertyIsLockingSupported = 16941070,
+
+    /// NISysCfgSystemPropertyIsOnLocalSubnet -> 16941072
+    NISysCfgSystemPropertyIsOnLocalSubnet = 16941072,
+
+    /// NISysCfgSystemPropertyIsRestartSupported -> 16941076
+    NISysCfgSystemPropertyIsRestartSupported = 16941076,
+
+    /// NISysCfgSystemPropertyMacAddress -> 16941077
+    NISysCfgSystemPropertyMacAddress = 16941077,
+
+    /// NISysCfgSystemPropertyProductName -> 16941078
+    NISysCfgSystemPropertyProductName = 16941078,
+
+    /// NISysCfgSystemPropertyOperatingSystem -> 16941079
+    NISysCfgSystemPropertyOperatingSystem = 16941079,
+
+    /// NISysCfgSystemPropertyOperatingSystemVersion -> 17100800
+    NISysCfgSystemPropertyOperatingSystemVersion = 17100800,
+
+    /// NISysCfgSystemPropertyOperatingSystemDescription -> 17104896
+    NISysCfgSystemPropertyOperatingSystemDescription = 17104896,
+
+    /// NISysCfgSystemPropertySerialNumber -> 16941080
+    NISysCfgSystemPropertySerialNumber = 16941080,
+
+    /// NISysCfgSystemPropertySystemState -> 16941082
+    NISysCfgSystemPropertySystemState = 16941082,
+
+    /// NISysCfgSystemPropertyMemoryPhysTotal -> 219480064
+    NISysCfgSystemPropertyMemoryPhysTotal = 219480064,
+
+    /// NISysCfgSystemPropertyMemoryPhysFree -> 219484160
+    NISysCfgSystemPropertyMemoryPhysFree = 219484160,
+
+    /// NISysCfgSystemPropertyMemoryLargestBlock -> 219488256
+    NISysCfgSystemPropertyMemoryLargestBlock = 219488256,
+
+    /// NISysCfgSystemPropertyMemoryVirtTotal -> 219492352
+    NISysCfgSystemPropertyMemoryVirtTotal = 219492352,
+
+    /// NISysCfgSystemPropertyMemoryVirtFree -> 219496448
+    NISysCfgSystemPropertyMemoryVirtFree = 219496448,
+
+    /// NISysCfgSystemPropertyPrimaryDiskTotal -> 219291648
+    NISysCfgSystemPropertyPrimaryDiskTotal = 219291648,
+
+    /// NISysCfgSystemPropertyPrimaryDiskFree -> 219295744
+    NISysCfgSystemPropertyPrimaryDiskFree = 219295744,
+
+    /// NISysCfgSystemPropertySystemResourceHandle -> 16941086
+    NISysCfgSystemPropertySystemResourceHandle = 16941086,
+
+    /// NISysCfgSystemPropertyImageDescription -> 219516928
+    NISysCfgSystemPropertyImageDescription = 219516928,
+
+    /// NISysCfgSystemPropertyImageId -> 219521024
+    NISysCfgSystemPropertyImageId = 219521024,
+
+    /// NISysCfgSystemPropertyImageTitle -> 219525120
+    NISysCfgSystemPropertyImageTitle = 219525120,
+
+    /// NISysCfgSystemPropertyImageVersion -> 219529216
+    NISysCfgSystemPropertyImageVersion = 219529216,
+
+    /// NISysCfgSystemPropertyInstalledApiVersion -> 16941087
+    NISysCfgSystemPropertyInstalledApiVersion = 16941087,
+
+    /// NISysCfgSystemPropertyIsDst -> 16941066
+    NISysCfgSystemPropertyIsDst = 16941066,
+
+    /// NISysCfgSystemPropertyIsRestartProtected -> 16941073
+    NISysCfgSystemPropertyIsRestartProtected = 16941073,
+
+    /// NISysCfgSystemPropertyHaltOnError -> 16941074
+    NISysCfgSystemPropertyHaltOnError = 16941074,
+
+    /// NISysCfgSystemPropertyRepositoryLocation -> 16941084
+    NISysCfgSystemPropertyRepositoryLocation = 16941084,
+
+    /// NISysCfgSystemPropertySystemComment -> 16941081
+    NISysCfgSystemPropertySystemComment = 16941081,
+
+    /// NISysCfgSystemPropertyAutoRestartTimeout -> 16941085
+    NISysCfgSystemPropertyAutoRestartTimeout = 16941085,
+
+    /// NISysCfgSystemPropertyDnsServer -> 16941059
+    NISysCfgSystemPropertyDnsServer = 16941059,
+
+    /// NISysCfgSystemPropertyGateway -> 16941062
+    NISysCfgSystemPropertyGateway = 16941062,
+
+    /// NISysCfgSystemPropertyHostname -> 16941063
+    NISysCfgSystemPropertyHostname = 16941063,
+
+    /// NISysCfgSystemPropertyIpAddress -> 16941064
+    NISysCfgSystemPropertyIpAddress = 16941064,
+
+    /// NISysCfgSystemPropertyIpAddressMode -> 16941065
+    NISysCfgSystemPropertyIpAddressMode = 16941065,
+
+    /// NISysCfgSystemPropertySubnetMask -> 16941083
+    NISysCfgSystemPropertySubnetMask = 16941083,
+}
+
+public enum NISysCfgFilterProperty
+{
+
+    /// NISysCfgFilterPropertyIsDevice -> 16781312
+    NISysCfgFilterPropertyIsDevice = 16781312,
+
+    /// NISysCfgFilterPropertyIsChassis -> 16941056
+    NISysCfgFilterPropertyIsChassis = 16941056,
+
+    /// NISysCfgFilterPropertyServiceType -> 17014784
+    NISysCfgFilterPropertyServiceType = 17014784,
+
+    /// NISysCfgFilterPropertyConnectsToBusType -> 16785408
+    NISysCfgFilterPropertyConnectsToBusType = 16785408,
+
+    /// NISysCfgFilterPropertyConnectsToLinkName -> 16818176
+    NISysCfgFilterPropertyConnectsToLinkName = 16818176,
+
+    /// NISysCfgFilterPropertyProvidesBusType -> 16932864
+    NISysCfgFilterPropertyProvidesBusType = 16932864,
+
+    /// NISysCfgFilterPropertyVendorId -> 16789504
+    NISysCfgFilterPropertyVendorId = 16789504,
+
+    /// NISysCfgFilterPropertyProductId -> 16797696
+    NISysCfgFilterPropertyProductId = 16797696,
+
+    /// NISysCfgFilterPropertySerialNumber -> 16805888
+    NISysCfgFilterPropertySerialNumber = 16805888,
+
+    /// NISysCfgFilterPropertyIsNIProduct -> 16809984
+    NISysCfgFilterPropertyIsNIProduct = 16809984,
+
+    /// NISysCfgFilterPropertyIsSimulated -> 16814080
+    NISysCfgFilterPropertyIsSimulated = 16814080,
+
+    /// NISysCfgFilterPropertySlotNumber -> 16822272
+    NISysCfgFilterPropertySlotNumber = 16822272,
+
+    /// NISysCfgFilterPropertyHasDriver -> 16920576
+    NISysCfgFilterPropertyHasDriver = 16920576,
+
+    /// NISysCfgFilterPropertyIsPresent -> 16924672
+    NISysCfgFilterPropertyIsPresent = 16924672,
+
+    /// NISysCfgFilterPropertySupportsCalibration -> 16908288
+    NISysCfgFilterPropertySupportsCalibration = 16908288,
+
+    /// NISysCfgFilterPropertySupportsFirmwareUpdate -> 17080320
+    NISysCfgFilterPropertySupportsFirmwareUpdate = 17080320,
+
+    /// NISysCfgFilterPropertyProvidesLinkName -> 16936960
+    NISysCfgFilterPropertyProvidesLinkName = 16936960,
+
+    /// NISysCfgFilterPropertyExpertName -> 16900096
+    NISysCfgFilterPropertyExpertName = 16900096,
+
+    /// NISysCfgFilterPropertyResourceName -> 16896000
+    NISysCfgFilterPropertyResourceName = 16896000,
+
+    /// NISysCfgFilterPropertyUserAlias -> 16904192
+    NISysCfgFilterPropertyUserAlias = 16904192,
+}
+
+public enum NISysCfgPropertyType
+{
+
+    /// NISysCfgPropertyTypeBool -> 1
+    NISysCfgPropertyTypeBool = 1,
+
+    /// NISysCfgPropertyTypeInt -> 2
+    NISysCfgPropertyTypeInt = 2,
+
+    /// NISysCfgPropertyTypeUnsignedInt -> 3
+    NISysCfgPropertyTypeUnsignedInt = 3,
+
+    /// NISysCfgPropertyTypeDouble -> 4
+    NISysCfgPropertyTypeDouble = 4,
+
+    /// NISysCfgPropertyTypeString -> 6
+    NISysCfgPropertyTypeString = 6,
+
+    /// NISysCfgPropertyTypeTimestamp -> 7
+    NISysCfgPropertyTypeTimestamp = 7,
+}
+
+public partial class NativeMethods
+{
+    public const string DllPath = "/usr/lib/x86_64-linux-gnu/libnisyscfg.so";
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetResourceProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetResourceProperty(IntPtr resourceHandle, NISysCfgResourceProperty propertyID, bool value);
+    
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///targetName: char*
+    ///username: char*
+    ///password: char*
+    ///language: NISysCfgLocale->Anonymous_6b77a695_aff2_47b5_be5f_e2b54f832681
+    ///forcePropertyRefresh: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///connectTimeoutMsec: unsigned int
+    ///expertEnumHandle: NISysCfgEnumExpertHandle*
+    ///sessionHandle: NISysCfgSessionHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgInitializeSession", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgInitializeSession([System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string targetName, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string username, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string password, NISysCfgLocale language, bool forcePropertyRefresh, uint connectTimeoutMsec, ref System.IntPtr expertEnumHandle, ref System.IntPtr sessionHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///syscfgHandle: void*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgCloseHandle", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgCloseHandle(System.IntPtr syscfgHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///expertNames: char*
+    ///expertEnumHandle: NISysCfgEnumExpertHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetSystemExperts", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetSystemExperts(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string expertNames, ref System.IntPtr expertEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///remoteTimeoutMsec: unsigned int
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetRemoteTimeout", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetRemoteTimeout(System.IntPtr sessionHandle, uint remoteTimeoutMsec);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///filterMode: NISysCfgFilterMode->Anonymous_1b02b28e_f4c6_4426_a724_58488642c538
+    ///filterHandle: NISysCfgFilterHandle->void*
+    ///expertNames: char*
+    ///resourceEnumHandle: NISysCfgEnumResourceHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgFindHardware", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgFindHardware(System.IntPtr sessionHandle, NISysCfgFilterMode filterMode, System.IntPtr filterHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string expertNames, ref System.IntPtr resourceEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///deviceClass: char*
+    ///detectOnlineSystems: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///cacheMode: NISysCfgIncludeCachedResults->Anonymous_de762b02_4c2b_4ee2_a28e_913850ee6a4b
+    ///findOutputMode: NISysCfgSystemNameFormat->Anonymous_5a4961c3_46b5_4caf_9472_394579eb7b57
+    ///timeoutMsec: unsigned int
+    ///onlyInstallableSystems: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///systemEnumHandle: NISysCfgEnumSystemHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgFindSystems", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgFindSystems(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string deviceClass, bool detectOnlineSystems, NISysCfgIncludeCachedResults cacheMode, NISysCfgSystemNameFormat findOutputMode, uint timeoutMsec, bool onlyInstallableSystems, ref System.IntPtr systemEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///mode: unsigned int
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSelfTestHardware", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSelfTestHardware(System.IntPtr resourceHandle, uint mode, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSelfCalibrateHardware", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSelfCalibrateHardware(System.IntPtr resourceHandle, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///mode: unsigned int
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgResetHardware", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgResetHardware(System.IntPtr resourceHandle, uint mode);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///newName: char*
+    ///overwriteConflict: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///updateDependencies: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///nameAlreadyExisted: bool*
+    ///overwrittenResourceHandle: NISysCfgResourceHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgRenameResource", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgRenameResource(System.IntPtr resourceHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string newName, bool overwriteConflict, bool updateDependencies, ref bool nameAlreadyExisted, ref System.IntPtr overwrittenResourceHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///mode: NISysCfgDeleteValidationMode->Anonymous_fff97e42_f444_49ae_a8e9_52f1be2c3f2f
+    ///dependentItemsDeleted: bool*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgDeleteResource", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgDeleteResource(System.IntPtr resourceHandle, NISysCfgDeleteValidationMode mode, ref bool dependentItemsDeleted, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///propertyID: NISysCfgResourceProperty->Anonymous_d3db61d7_d9e9_4692_9a4a_7780997c95af
+    ///value: void*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceProperty(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, ref byte value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceProperty(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, StringBuilder value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceProperty(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, ref bool value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceProperty(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, ref int value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceProperty(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, ref uint value);
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///propertyID: NISysCfgResourceProperty->Anonymous_d3db61d7_d9e9_4692_9a4a_7780997c95af
+    ///args: va_list->char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetResourcePropertyV", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetResourcePropertyV(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, System.IntPtr args);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///propertyID: NISysCfgResourceProperty->Anonymous_d3db61d7_d9e9_4692_9a4a_7780997c95af
+    ///propertyType: NISysCfgPropertyType->Anonymous_8aa785cf_2d14_4add_b29e_245f3eb155e7
+    ///args: va_list->char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetResourcePropertyWithTypeV", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetResourcePropertyWithTypeV(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, NISysCfgPropertyType propertyType, System.IntPtr args);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetResourcePropertyWithType", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetResourcePropertyWithType(System.IntPtr resourceHandle, NISysCfgResourceProperty propertyID, NISysCfgPropertyType propertyType, bool value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetSystemProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetSystemProperty(System.IntPtr sessionHandle, NISysCfgSystemProperty propertyID, bool value);
+
+
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterProperty(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, bool value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterPropertyWithType", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterPropertyWithType(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, NISysCfgPropertyType propertyType, bool value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterProperty(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, int value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterProperty(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, uint value);
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterProperty(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string value);
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///propertyID: NISysCfgIndexedProperty->Anonymous_d8faf768_daea_422c_8870_27af051e093c
+    ///index: unsigned int
+    ///value: void*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceIndexedProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceIndexedProperty(System.IntPtr resourceHandle, NISysCfgIndexedProperty propertyID, uint index, System.IntPtr value);
+
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetResourceIndexedProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetResourceIndexedProperty(System.IntPtr resourceHandle, NISysCfgIndexedProperty propertyID, uint index, StringBuilder value);
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///changesRequireRestart: bool*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSaveResourceChanges", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSaveResourceChanges(System.IntPtr resourceHandle, ref bool changesRequireRestart, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///propertyID: NISysCfgSystemProperty->Anonymous_25b765e7_ed92_4b66_94c2_a7fc6991d6b3
+    ///value: void*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetSystemProperty", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetSystemProperty(System.IntPtr sessionHandle, NISysCfgSystemProperty propertyID, System.IntPtr value);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///propertyID: NISysCfgSystemProperty->Anonymous_25b765e7_ed92_4b66_94c2_a7fc6991d6b3
+    ///args: va_list->char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetSystemPropertyV", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetSystemPropertyV(System.IntPtr sessionHandle, NISysCfgSystemProperty propertyID, System.IntPtr args);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///changesRequireRestart: bool*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSaveSystemChanges", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSaveSystemChanges(System.IntPtr sessionHandle, ref bool changesRequireRestart, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///filterHandle: NISysCfgFilterHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgCreateFilter", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgCreateFilter(System.IntPtr sessionHandle, ref System.IntPtr filterHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///filterHandle: NISysCfgFilterHandle->void*
+    ///propertyID: NISysCfgFilterProperty->Anonymous_6714dee2_567f_48b7_a874_881046c12d7f
+    ///args: va_list->char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterPropertyV", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterPropertyV(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, System.IntPtr args);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///filterHandle: NISysCfgFilterHandle->void*
+    ///propertyID: NISysCfgFilterProperty->Anonymous_6714dee2_567f_48b7_a874_881046c12d7f
+    ///propertyType: NISysCfgPropertyType->Anonymous_8aa785cf_2d14_4add_b29e_245f3eb155e7
+    ///args: va_list->char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetFilterPropertyWithTypeV", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetFilterPropertyWithTypeV(System.IntPtr filterHandle, NISysCfgFilterProperty propertyID, NISysCfgPropertyType propertyType, System.IntPtr args);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///firmwareFile: char*
+    ///autoStopTasks: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///alwaysOverwrite: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///waitForOperationToFinish: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///firmwareStatus: NISysCfgFirmwareStatus*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgUpgradeFirmwareFromFile", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgUpgradeFirmwareFromFile(System.IntPtr resourceHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string firmwareFile, bool autoStopTasks, bool alwaysOverwrite, bool waitForOperationToFinish, ref NISysCfgFirmwareStatus firmwareStatus, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///firmwareVersion: char*
+    ///autoStopTasks: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///alwaysOverwrite: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///waitForOperationToFinish: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///firmwareStatus: NISysCfgFirmwareStatus*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgUpgradeFirmwareVersion", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgUpgradeFirmwareVersion(System.IntPtr resourceHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string firmwareVersion, bool autoStopTasks, bool alwaysOverwrite, bool waitForOperationToFinish, ref NISysCfgFirmwareStatus firmwareStatus, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///autoStopTasks: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///firmwareStatus: NISysCfgFirmwareStatus*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgEraseFirmware", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgEraseFirmware(System.IntPtr resourceHandle, bool autoStopTasks, ref NISysCfgFirmwareStatus firmwareStatus, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///resourceHandle: NISysCfgResourceHandle->void*
+    ///percentComplete: int*
+    ///firmwareStatus: NISysCfgFirmwareStatus*
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgCheckFirmwareStatus", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgCheckFirmwareStatus(System.IntPtr resourceHandle, ref int percentComplete, ref NISysCfgFirmwareStatus firmwareStatus, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///forceSafeMode: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///restartAfterFormat: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///fileSystem: NISysCfgFileSystemMode->Anonymous_68c26b98_82d2_4a88_b56e_a07fdd698343
+    ///networkSettings: NISysCfgNetworkInterfaceSettings->Anonymous_bd6c85a2_af11_4321_8d12_7cb16ccefe91
+    ///timeoutMsec: unsigned int
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgFormat", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgFormat(System.IntPtr sessionHandle, bool forceSafeMode, bool restartAfterFormat, NISysCfgFileSystemMode fileSystem, NISysCfgNetworkInterfaceSettings networkSettings, uint timeoutMsec);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///fileSystem: NISysCfgFileSystemMode->Anonymous_68c26b98_82d2_4a88_b56e_a07fdd698343
+    ///networkSettings: NISysCfgNetworkInterfaceSettings->Anonymous_bd6c85a2_af11_4321_8d12_7cb16ccefe91
+    ///systemImageID: char*
+    ///systemImageVersion: char*
+    ///timeoutMsec: unsigned int
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgFormatWithBaseSystemImage", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgFormatWithBaseSystemImage(System.IntPtr sessionHandle, bool autoRestart, NISysCfgFileSystemMode fileSystem, NISysCfgNetworkInterfaceSettings networkSettings, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string systemImageID, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string systemImageVersion, uint timeoutMsec);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///waitForRestartToFinish: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///installMode: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///flushDNS: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///timeoutMsec: unsigned int
+    ///newIpAddress: char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgRestart", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgRestart(System.IntPtr sessionHandle, bool waitForRestartToFinish, bool installMode, bool flushDNS, uint timeoutMsec, System.IntPtr newIpAddress);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///itemTypes: NISysCfgIncludeComponentTypes->Anonymous_46037982_b9c0_4d97_958a_fffef4a4c1dd
+    ///componentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetAvailableSoftwareComponents", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetAvailableSoftwareComponents(System.IntPtr sessionHandle, NISysCfgIncludeComponentTypes itemTypes, ref System.IntPtr componentEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///setEnumHandle: NISysCfgEnumSoftwareSetHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetAvailableSoftwareSets", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetAvailableSoftwareSets(System.IntPtr sessionHandle, ref System.IntPtr setEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///repositoryPath: char*
+    ///deviceClass: char*
+    ///operatingSystem: char*
+    ///productID: unsigned int
+    ///itemTypes: NISysCfgIncludeComponentTypes->Anonymous_46037982_b9c0_4d97_958a_fffef4a4c1dd
+    ///componentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetFilteredSoftwareComponents", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetFilteredSoftwareComponents([System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string repositoryPath, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string deviceClass, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string operatingSystem, uint productID, NISysCfgIncludeComponentTypes itemTypes, ref System.IntPtr componentEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///repositoryPath: char*
+    ///deviceClass: char*
+    ///operatingSystem: char*
+    ///productID: unsigned int
+    ///setEnumHandle: NISysCfgEnumSoftwareSetHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetFilteredSoftwareSets", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetFilteredSoftwareSets([System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string repositoryPath, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string deviceClass, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string operatingSystem, uint productID, ref System.IntPtr setEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///repositoryPath: char*
+    ///deviceClass: char*
+    ///operatingSystem: char*
+    ///productID: unsigned int
+    ///systemImageEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetFilteredBaseSystemImages", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetFilteredBaseSystemImages([System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string repositoryPath, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string deviceClass, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string operatingSystem, uint productID, ref System.IntPtr systemImageEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///itemTypes: NISysCfgIncludeComponentTypes->Anonymous_46037982_b9c0_4d97_958a_fffef4a4c1dd
+    ///cached: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///componentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetInstalledSoftwareComponents", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetInstalledSoftwareComponents(System.IntPtr sessionHandle, NISysCfgIncludeComponentTypes itemTypes, bool cached, ref System.IntPtr componentEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///cached: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///setHandle: NISysCfgSoftwareSetHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetInstalledSoftwareSet", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetInstalledSoftwareSet(System.IntPtr sessionHandle, bool cached, ref System.IntPtr setHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///destinationFolder: char*
+    ///encryptionPassphrase: char*
+    ///overwriteIfExists: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///installedSoftwareOnly: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetSystemImageAsFolder", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetSystemImageAsFolder(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string destinationFolder, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string encryptionPassphrase, bool overwriteIfExists, bool installedSoftwareOnly, bool autoRestart);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///destinationFolder: char*
+    ///encryptionPassphrase: char*
+    ///numBlacklistEntries: unsigned int
+    ///blacklistFilesDirectories: char**
+    ///overwriteIfExists: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///installedSoftwareOnly: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetSystemImageAsFolder2", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetSystemImageAsFolder2(System.IntPtr sessionHandle, bool autoRestart, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string destinationFolder, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string encryptionPassphrase, uint numBlacklistEntries, ref System.IntPtr blacklistFilesDirectories, bool overwriteIfExists, bool installedSoftwareOnly);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///imageTitle: char*
+    ///imageID: char*
+    ///imageVersion: char*
+    ///imageDescription: char*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///destinationFolder: char*
+    ///encryptionPassphrase: char*
+    ///numBlacklistEntries: unsigned int
+    ///blacklistFilesDirectories: char**
+    ///overwriteIfExists: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgCreateSystemImageAsFolder", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgCreateSystemImageAsFolder(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageTitle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageID, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageVersion, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string imageDescription, bool autoRestart, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string destinationFolder, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string encryptionPassphrase, uint numBlacklistEntries, ref System.IntPtr blacklistFilesDirectories, bool overwriteIfExists);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///sourceFolder: char*
+    ///encryptionPassphrase: char*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///originalSystemOnly: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetSystemImageFromFolder", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetSystemImageFromFolder(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sourceFolder, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string encryptionPassphrase, bool autoRestart, bool originalSystemOnly);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///sourceFolder: char*
+    ///encryptionPassphrase: char*
+    ///numBlacklistEntries: unsigned int
+    ///blacklistFilesDirectories: char**
+    ///originalSystemOnly: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///networkSettings: NISysCfgNetworkInterfaceSettings->Anonymous_bd6c85a2_af11_4321_8d12_7cb16ccefe91
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgSetSystemImageFromFolder2", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgSetSystemImageFromFolder2(System.IntPtr sessionHandle, bool autoRestart, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sourceFolder, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string encryptionPassphrase, uint numBlacklistEntries, ref System.IntPtr blacklistFilesDirectories, bool originalSystemOnly, NISysCfgNetworkInterfaceSettings networkSettings);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///deselectConflicts: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///installedComponentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    ///brokenDependencyEnumHandle: NISysCfgEnumDependencyHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgInstallAll", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgInstallAll(System.IntPtr sessionHandle, bool autoRestart, bool deselectConflicts, ref System.IntPtr installedComponentEnumHandle, ref System.IntPtr brokenDependencyEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///autoSelectDependencies: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///componentToInstallEnumHandle: NISysCfgEnumSoftwareComponentHandle->void*
+    ///numComponentsToUninstall: unsigned int
+    ///componentIDsToUninstall: char**
+    ///brokenDependencyEnumHandle: NISysCfgEnumDependencyHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgInstallUninstallComponents", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgInstallUninstallComponents(System.IntPtr sessionHandle, bool autoRestart, bool autoSelectDependencies, System.IntPtr componentToInstallEnumHandle, uint numComponentsToUninstall, ref System.IntPtr componentIDsToUninstall, ref System.IntPtr brokenDependencyEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///autoSelectDependencies: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///autoSelectRecommends: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///componentToInstallEnumHandle: NISysCfgEnumSoftwareComponentHandle->void*
+    ///numComponentsToUninstall: unsigned int
+    ///componentIDsToUninstall: char**
+    ///brokenDependencyEnumHandle: NISysCfgEnumDependencyHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgInstallUninstallComponents2", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgInstallUninstallComponents2(System.IntPtr sessionHandle, bool autoRestart, bool autoSelectDependencies, bool autoSelectRecommends, System.IntPtr componentToInstallEnumHandle, uint numComponentsToUninstall, ref System.IntPtr componentIDsToUninstall, ref System.IntPtr brokenDependencyEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///softwareSetID: char*
+    ///version: char*
+    ///addonEnumHandle: NISysCfgEnumSoftwareComponentHandle->void*
+    ///brokenDependencyEnumHandle: NISysCfgEnumDependencyHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgInstallSoftwareSet", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgInstallSoftwareSet(System.IntPtr sessionHandle, bool autoRestart, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string softwareSetID, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string version, System.IntPtr addonEnumHandle, ref System.IntPtr brokenDependencyEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///startupEnumHandle: NISysCfgEnumSoftwareComponentHandle->void*
+    ///uninstallConflicts: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///installedComponentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    ///uninstalledComponentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    ///brokenDependencyEnumHandle: NISysCfgEnumDependencyHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgInstallStartup", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgInstallStartup(System.IntPtr sessionHandle, bool autoRestart, System.IntPtr startupEnumHandle, bool uninstallConflicts, ref System.IntPtr installedComponentEnumHandle, ref System.IntPtr uninstalledComponentEnumHandle, ref System.IntPtr brokenDependencyEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///autoRestart: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgUninstallAll", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgUninstallAll(System.IntPtr sessionHandle, bool autoRestart);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///feedEnumHandle: NISysCfgEnumSoftwareFeedHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetSoftwareFeeds", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetSoftwareFeeds(System.IntPtr sessionHandle, ref System.IntPtr feedEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///feedName: char*
+    ///uri: char*
+    ///enabled: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///trusted: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgAddSoftwareFeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgAddSoftwareFeed(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string feedName, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string uri, bool enabled, bool trusted);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///feedName: char*
+    ///newFeedName: char*
+    ///uri: char*
+    ///enabled: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///trusted: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgModifySoftwareFeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgModifySoftwareFeed(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string feedName, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string newFeedName, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string uri, bool enabled, bool trusted);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///feedName: char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgRemoveSoftwareFeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgRemoveSoftwareFeed(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string feedName);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///newPassword: char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgChangeAdministratorPassword", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgChangeAdministratorPassword(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string newPassword);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///destinationFile: char*
+    ///expertNames: char*
+    ///overwriteIfExists: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgExportConfiguration", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgExportConfiguration(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string destinationFile, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string expertNames, bool overwriteIfExists);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///sourceFile: char*
+    ///expertNames: char*
+    ///importMode: NISysCfgImportMode->Anonymous_b308083c_b40e_487c_9313_8b7af8718f6f
+    ///detailedResult: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgImportConfiguration", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgImportConfiguration(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string sourceFile, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string expertNames, NISysCfgImportMode importMode, ref System.IntPtr detailedResult);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///outputFilename: char*
+    ///reportType: NISysCfgReportType->Anonymous_a5a9ecae_b751_48c1_96b8_6969d15a2bd0
+    ///overwriteIfExists: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGenerateMAXReport", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGenerateMAXReport(System.IntPtr sessionHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string outputFilename, NISysCfgReportType reportType, bool overwriteIfExists);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///componentEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgCreateComponentsEnum", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgCreateComponentsEnum(ref System.IntPtr componentEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///componentEnumHandle: NISysCfgEnumSoftwareComponentHandle->void*
+    ///ID: char*
+    ///version: char*
+    ///mode: NISysCfgVersionSelectionMode->Anonymous_7ac31e93_9d7f_48e8_8fe8_58ce858f7bac
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgAddComponentToEnum", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgAddComponentToEnum(System.IntPtr componentEnumHandle, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string ID, [System.Runtime.InteropServices.InAttribute()][System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)] string version, NISysCfgVersionSelectionMode mode);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///str: char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgFreeDetailedString", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgFreeDetailedString(System.IntPtr str);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///resourceEnumHandle: NISysCfgEnumResourceHandle->void*
+    ///resourceHandle: NISysCfgResourceHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextResource", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextResource(System.IntPtr sessionHandle, System.IntPtr resourceEnumHandle, ref System.IntPtr resourceHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///systemEnumHandle: NISysCfgEnumSystemHandle->void*
+    ///system: char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextSystemInfo", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextSystemInfo(System.IntPtr systemEnumHandle, System.IntPtr system);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///expertEnumHandle: NISysCfgEnumExpertHandle->void*
+    ///expertName: char*
+    ///displayName: char*
+    ///version: char*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextExpertInfo", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextExpertInfo(System.IntPtr expertEnumHandle, System.IntPtr expertName, System.IntPtr displayName, System.IntPtr version);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///componentEnumHandle: NISysCfgEnumSoftwareComponentHandle->void*
+    ///ID: char*
+    ///version: char*
+    ///title: char*
+    ///itemType: NISysCfgComponentType*
+    ///detailedDescription: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextComponentInfo", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextComponentInfo(System.IntPtr componentEnumHandle, System.IntPtr ID, System.IntPtr version, System.IntPtr title, ref NISysCfgComponentType itemType, ref System.IntPtr detailedDescription);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///setEnumHandle: NISysCfgEnumSoftwareSetHandle->void*
+    ///setHandle: NISysCfgSoftwareSetHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextSoftwareSet", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextSoftwareSet(System.IntPtr setEnumHandle, ref System.IntPtr setHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///setHandle: NISysCfgSoftwareSetHandle->void*
+    ///itemTypes: NISysCfgIncludeComponentTypes->Anonymous_46037982_b9c0_4d97_958a_fffef4a4c1dd
+    ///includeAddOnDeps: bool->Anonymous_6bc07c82_c570_4a7c_a925_b8a90465e2d9
+    ///ID: char*
+    ///version: char*
+    ///title: char*
+    ///setType: NISysCfgComponentType*
+    ///detailedDescription: char**
+    ///addOnEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    ///itemEnumHandle: NISysCfgEnumSoftwareComponentHandle*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetSoftwareSetInfo", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetSoftwareSetInfo(System.IntPtr setHandle, NISysCfgIncludeComponentTypes itemTypes, bool includeAddOnDeps, System.IntPtr ID, System.IntPtr version, System.IntPtr title, ref NISysCfgComponentType setType, ref System.IntPtr detailedDescription, ref System.IntPtr addOnEnumHandle, ref System.IntPtr itemEnumHandle);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///dependencyEnumHandle: NISysCfgEnumDependencyHandle->void*
+    ///dependerID: char*
+    ///dependerVersion: char*
+    ///dependerTitle: char*
+    ///dependerDetailedDescription: char**
+    ///dependeeID: char*
+    ///dependeeVersion: char*
+    ///dependeeTitle: char*
+    ///dependeeDetailedDescription: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextDependencyInfo", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextDependencyInfo(System.IntPtr dependencyEnumHandle, System.IntPtr dependerID, System.IntPtr dependerVersion, System.IntPtr dependerTitle, ref System.IntPtr dependerDetailedDescription, System.IntPtr dependeeID, System.IntPtr dependeeVersion, System.IntPtr dependeeTitle, ref System.IntPtr dependeeDetailedDescription);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///feedEnumHandle: NISysCfgEnumSoftwareFeedHandle->void*
+    ///feedName: char*
+    ///uri: char*
+    ///enabled: bool*
+    ///trusted: bool*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgNextSoftwareFeed", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgNextSoftwareFeed(System.IntPtr feedEnumHandle, System.IntPtr feedName, System.IntPtr uri, ref bool enabled, ref bool trusted);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///enumHandle: void*
+    ///count: unsigned int*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgResetEnumeratorGetCount", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgResetEnumeratorGetCount(System.IntPtr enumHandle, ref uint count);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///sessionHandle: NISysCfgSessionHandle->void*
+    ///status: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///detailedDescription: char**
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgGetStatusDescription", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgGetStatusDescription(System.IntPtr sessionHandle, NISysCfgStatus status, ref System.IntPtr detailedDescription);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///secondsSinceEpoch1970: NISysCfgUInt64->unsigned __int64
+    ///fractionalSeconds: double
+    ///timestamp: NISysCfgTimestampUTC*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgTimestampFromValues", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgTimestampFromValues(ulong secondsSinceEpoch1970, double fractionalSeconds, ref NISysCfgTimestampUTC timestamp);
+
+
+    /// Return Type: NISysCfgStatus->Anonymous_ba11bbda_cbcd_4f3b_a9fa_e865704c8791
+    ///timestamp: NISysCfgTimestampUTC*
+    ///secondsSinceEpoch1970: NISysCfgUInt64*
+    ///fractionalSeconds: double*
+    [System.Runtime.InteropServices.DllImportAttribute(DllPath, EntryPoint = "NISysCfgValuesFromTimestamp", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
+    public static extern NISysCfgStatus NISysCfgValuesFromTimestamp(ref NISysCfgTimestampUTC timestamp, ref ulong secondsSinceEpoch1970, ref double fractionalSeconds);
+
+}