#region Copyright //////////////////////////////////////////////////////////////////////////////// // The following FIT Protocol software provided may be used with FIT protocol // devices only and remains the copyrighted property of Dynastream Innovations Inc. // The software is being provided on an "as-is" basis and as an accommodation, // and therefore all warranties, representations, or guarantees of any kind // (whether express, implied or statutory) including, without limitation, // warranties of merchantability, non-infringement, or fitness for a particular // purpose, are specifically disclaimed. // // Copyright 2016 Dynastream Innovations Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. // Profile Version = 16.60Release // Tag = production-akw-16.60.00-0-g5d3d436 //////////////////////////////////////////////////////////////////////////////// #endregion using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.IO; namespace Dynastream.Fit { /// /// Implements the ThreeDSensorCalibration profile message. /// public class ThreeDSensorCalibrationMesg : Mesg { #region Fields static class CalibrationFactorSubfield { public static ushort AccelCalFactor = 0; public static ushort GyroCalFactor = 1; public static ushort Subfields = 2; public static ushort Active = Fit.SubfieldIndexActiveSubfield; public static ushort MainField = Fit.SubfieldIndexMainField; } #endregion #region Constructors public ThreeDSensorCalibrationMesg() : base(Profile.GetMesg(MesgNum.ThreeDSensorCalibration)) { } public ThreeDSensorCalibrationMesg(Mesg mesg) : base(mesg) { } #endregion // Constructors #region Methods /// /// Retrieves the Timestamp field /// Units: s /// Comment: Whole second part of the timestamp /// Returns DateTime representing the Timestamp field public DateTime GetTimestamp() { return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField)); } /// /// Set Timestamp field /// Units: s /// Comment: Whole second part of the timestamp /// Nullable field value to be set public void SetTimestamp(DateTime timestamp_) { SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField); } /// /// Retrieves the SensorType field /// Comment: Indicates which sensor the calibration is for /// Returns nullable SensorType enum representing the SensorType field public SensorType? GetSensorType() { object obj = GetFieldValue(0, 0, Fit.SubfieldIndexMainField); SensorType? value = obj == null ? (SensorType?)null : (SensorType)obj; return value; } /// /// Set SensorType field /// Comment: Indicates which sensor the calibration is for /// Nullable field value to be set public void SetSensorType(SensorType? sensorType_) { SetFieldValue(0, 0, sensorType_, Fit.SubfieldIndexMainField); } /// /// Retrieves the CalibrationFactor field /// Comment: Calibration factor used to convert from raw ADC value to degrees, g, etc. /// Returns nullable uint representing the CalibrationFactor field public uint? GetCalibrationFactor() { return (uint?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField); } /// /// Set CalibrationFactor field /// Comment: Calibration factor used to convert from raw ADC value to degrees, g, etc. /// Nullable field value to be set public void SetCalibrationFactor(uint? calibrationFactor_) { SetFieldValue(1, 0, calibrationFactor_, Fit.SubfieldIndexMainField); } /// /// Retrieves the AccelCalFactor subfield /// Units: g /// Comment: Accelerometer calibration factor /// Nullable uint representing the AccelCalFactor subfield public uint? GetAccelCalFactor() { return (uint?)GetFieldValue(1, 0, CalibrationFactorSubfield.AccelCalFactor); } /// /// /// Set AccelCalFactor subfield /// Units: g /// Comment: Accelerometer calibration factor /// Subfield value to be set public void SetAccelCalFactor(uint? accelCalFactor) { SetFieldValue(1, 0, accelCalFactor, CalibrationFactorSubfield.AccelCalFactor); } /// /// Retrieves the GyroCalFactor subfield /// Units: deg/s /// Comment: Gyro calibration factor /// Nullable uint representing the GyroCalFactor subfield public uint? GetGyroCalFactor() { return (uint?)GetFieldValue(1, 0, CalibrationFactorSubfield.GyroCalFactor); } /// /// /// Set GyroCalFactor subfield /// Units: deg/s /// Comment: Gyro calibration factor /// Subfield value to be set public void SetGyroCalFactor(uint? gyroCalFactor) { SetFieldValue(1, 0, gyroCalFactor, CalibrationFactorSubfield.GyroCalFactor); } /// /// Retrieves the CalibrationDivisor field /// Units: counts /// Comment: Calibration factor divisor /// Returns nullable uint representing the CalibrationDivisor field public uint? GetCalibrationDivisor() { return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField); } /// /// Set CalibrationDivisor field /// Units: counts /// Comment: Calibration factor divisor /// Nullable field value to be set public void SetCalibrationDivisor(uint? calibrationDivisor_) { SetFieldValue(2, 0, calibrationDivisor_, Fit.SubfieldIndexMainField); } /// /// Retrieves the LevelShift field /// Comment: Level shift value used to shift the ADC value back into range /// Returns nullable uint representing the LevelShift field public uint? GetLevelShift() { return (uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField); } /// /// Set LevelShift field /// Comment: Level shift value used to shift the ADC value back into range /// Nullable field value to be set public void SetLevelShift(uint? levelShift_) { SetFieldValue(3, 0, levelShift_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field OffsetCal public int GetNumOffsetCal() { return GetNumFieldValues(4, Fit.SubfieldIndexMainField); } /// /// Retrieves the OffsetCal field /// Comment: Internal calibration factors, one for each: xy, yx, zx /// 0 based index of OffsetCal element to retrieve /// Returns nullable int representing the OffsetCal field public int? GetOffsetCal(int index) { return (int?)GetFieldValue(4, index, Fit.SubfieldIndexMainField); } /// /// Set OffsetCal field /// Comment: Internal calibration factors, one for each: xy, yx, zx /// 0 based index of offset_cal /// Nullable field value to be set public void SetOffsetCal(int index, int? offsetCal_) { SetFieldValue(4, index, offsetCal_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field OrientationMatrix public int GetNumOrientationMatrix() { return GetNumFieldValues(5, Fit.SubfieldIndexMainField); } /// /// Retrieves the OrientationMatrix field /// Comment: 3 x 3 rotation matrix (row major) /// 0 based index of OrientationMatrix element to retrieve /// Returns nullable float representing the OrientationMatrix field public float? GetOrientationMatrix(int index) { return (float?)GetFieldValue(5, index, Fit.SubfieldIndexMainField); } /// /// Set OrientationMatrix field /// Comment: 3 x 3 rotation matrix (row major) /// 0 based index of orientation_matrix /// Nullable field value to be set public void SetOrientationMatrix(int index, float? orientationMatrix_) { SetFieldValue(5, index, orientationMatrix_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace