Beispiel #1
0
        public CountingStruct(int countingSize, int[] pageValue, CfgOptions cfgOptions)
        {
            _cfgOptions         = cfgOptions;
            this._countingArray = new int[countingSize][];
            int m = 0;
            int n = 0;

            //Общее количество отсчётов
            _count = pageValue.Length / countingSize;
            //Инициализация массива
            for (int i = 0; i < countingSize; i++)
            {
                this._countingArray[i] = new int[_count];
            }
            foreach (var value in pageValue)
            {
                this._countingArray[n][m] = value;
                n++;
                if (n == countingSize)
                {
                    m++;
                    n = 0;
                }
            }
        }
Beispiel #2
0
 public CfgFile(CfgOptions options, int size, List <AnalogChannelConfiguration> analogChannelConfigurations, List <DiscretChannelConfiguration> discretChannelConfigurations) : this()
 {
     this._deviceId      = options.DeviceId;
     this._deviceName    = options.DeviceName;
     this._frequency     = options.Frequency;
     this._run           = options.Run;
     this._samplingCount = options.SamplingCount;
     this._samplingRate  = options.SamplingRate;
     this._start         = options.Start;
     this._analogChannelConfigurations  = analogChannelConfigurations;
     this._discretChannelConfigurations = discretChannelConfigurations;
     this._size             = size;
     this._analogChannels   = analogChannelConfigurations.Count;
     this._discretChannels  = discretChannelConfigurations.Count;
     this._allChannelsCount = this._analogChannels + this._discretChannels;
     this.CalcRunOsc();
 }
Beispiel #3
0
 public CountingStruct(int countingSize, ushort[] pageValue, CfgOptions cfgOptions) :
     this(countingSize, pageValue.Select(o => (int)o).ToArray(), cfgOptions)
 {
 }