private void LoadAnalogZeroOffset(C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("ANALOG", "OFFSET"))
     {
         this._analogZeroOffset = this.LoadFromArray <Int16>(dictionary["ANALOG", "OFFSET"], this._analogChannelCount);
     }
     else
     {
         this._analogZeroOffset = null;
     }
 }
 private void LoadAnalogGeneralScale(C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("ANALOG", "GEN_SCALE"))
     {
         this._analogGeneralScale = Convert.ToSingle(dictionary["ANALOG", "GEN_SCALE"].GetData(0));
     }
     else
     {
         this._analogGeneralScale = C3DConstants.DEFAULT_ANALOG_GEN_SCALE;
     }
 }
 private void LoadAnalogChannelScale(C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("ANALOG", "SCALE"))
     {
         this._analogChannelScale = this.LoadFromArray <Single>(dictionary["ANALOG", "SCALE"], this._analogChannelCount);
     }
     else
     {
         this._analogChannelScale = null;
     }
 }
 private void LoadAnalogChannelCount(C3DHeader header, C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("ANALOG", "USED"))
     {
         this._analogChannelCount = (UInt16)Convert.ToInt16(dictionary["ANALOG", "USED"].GetData(0));
     }
     else if (header != null)
     {
         this._analogChannelCount = (UInt16)(header.AnalogSamplesPerFrame != 0 ? header.AnalogMeasurementCount / header.AnalogSamplesPerFrame : 0);
     }
     else
     {
         this._analogChannelCount = C3DConstants.DEFAULT_ANALOG_USED;
     }
 }
 private void LoadAnalogSamplesPerFrame(C3DHeader header, C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("ANALOG", "RATE"))
     {
         this._analogSamplesPerFrame = (UInt16)(Convert.ToSingle(dictionary["ANALOG", "RATE"].GetData(0)) / this._frameRate);
     }
     else if (header != null)
     {
         this._analogSamplesPerFrame = header.AnalogSamplesPerFrame;
     }
     else
     {
         this._analogSamplesPerFrame = (UInt16)(C3DConstants.DEFAULT_ANALOG_RATE / C3DConstants.DEFAULT_POINT_RATE);
     }
 }
 private void LoadFrameRate(C3DHeader header, C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("POINT", "RATE"))
     {
         this._frameRate = Convert.ToSingle(dictionary["POINT", "RATE"].GetData(0));
     }
     else if (header != null)
     {
         this._frameRate = header.FrameRate;
     }
     else
     {
         this._frameRate = C3DConstants.DEFAULT_POINT_RATE;
     }
 }
 private void LoadFrameCount(C3DHeader header, C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("POINT", "FRAMES"))
     {
         this._frameCount = (UInt16)Convert.ToInt16(dictionary["POINT", "FRAMES"].GetData(0));
     }
     else if (header != null)
     {
         this._frameCount = (UInt16)(header.LastFrameIndex - header.FirstFrameIndex + 1);
     }
     else
     {
         this._frameCount = C3DConstants.DEFAULT_POINT_LAST_FRAME - C3DConstants.DEFAULT_POINT_FIRST_FRAME + 1;
     }
 }
 private void LoadScaleFactor(C3DHeader header, C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("POINT", "SCALE"))
     {
         this._scaleFactor = Convert.ToSingle(dictionary["POINT", "SCALE"].GetData(0));
     }
     else if (header != null)
     {
         this._scaleFactor = header.ScaleFactor;
     }
     else
     {
         this._scaleFactor = C3DConstants.DEFAULT_POINT_SCALE;
     }
 }
 private void LoadPointCount(C3DHeader header, C3DParameterDictionary dictionary)
 {
     if (dictionary != null && dictionary.ContainsParameter("POINT", "USED"))
     {
         this._pointCount = (UInt16)Convert.ToInt16(dictionary["POINT", "USED"].GetData(0));
     }
     else if (header != null)
     {
         this._pointCount = header.PointCount;
     }
     else
     {
         this._pointCount = C3DConstants.DEFAULT_POINT_USED;
     }
 }
Exemple #10
0
        private void LoadFirstDataBlockPosition(C3DHeader header, C3DParameterDictionary dictionary)
        {
            this._firstDataBlockPosition = 0;

            if (dictionary != null && dictionary.ContainsParameter("POINT", "DATA_START"))
            {
                this._firstDataBlockPosition = ((UInt16)Convert.ToInt16(dictionary["POINT", "DATA_START"].GetData(0)) - 1) * C3DConstants.FILE_SECTION_SIZE;
            }

            if (header != null && this._firstDataBlockPosition <= 0)
            {
                this._firstDataBlockPosition = (header.FirstDataSectionID - 1) * C3DConstants.FILE_SECTION_SIZE;
            }

            if (this._firstDataBlockPosition <= 0)
            {
                this._firstDataBlockPosition = (C3DConstants.FILE_DEFAULT_FIRST_PARAM_SECTION - 1) * C3DConstants.FILE_SECTION_SIZE;
            }
        }