#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 AccelerometerData profile message. /// public class AccelerometerDataMesg : Mesg { #region Fields #endregion #region Constructors public AccelerometerDataMesg() : base(Profile.GetMesg(MesgNum.AccelerometerData)) { } public AccelerometerDataMesg(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 TimestampMs field /// Units: ms /// Comment: Millisecond part of the timestamp. /// Returns nullable ushort representing the TimestampMs field public ushort? GetTimestampMs() { return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField); } /// /// Set TimestampMs field /// Units: ms /// Comment: Millisecond part of the timestamp. /// Nullable field value to be set public void SetTimestampMs(ushort? timestampMs_) { SetFieldValue(0, 0, timestampMs_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field SampleTimeOffset public int GetNumSampleTimeOffset() { return GetNumFieldValues(1, Fit.SubfieldIndexMainField); } /// /// Retrieves the SampleTimeOffset field /// Units: ms /// Comment: Each time in the array describes the time at which the accelerometer sample with the corrosponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in accel_x and accel_y and accel_z /// 0 based index of SampleTimeOffset element to retrieve /// Returns nullable ushort representing the SampleTimeOffset field public ushort? GetSampleTimeOffset(int index) { return (ushort?)GetFieldValue(1, index, Fit.SubfieldIndexMainField); } /// /// Set SampleTimeOffset field /// Units: ms /// Comment: Each time in the array describes the time at which the accelerometer sample with the corrosponding index was taken. Limited to 30 samples in each message. The samples may span across seconds. Array size must match the number of samples in accel_x and accel_y and accel_z /// 0 based index of sample_time_offset /// Nullable field value to be set public void SetSampleTimeOffset(int index, ushort? sampleTimeOffset_) { SetFieldValue(1, index, sampleTimeOffset_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field AccelX public int GetNumAccelX() { return GetNumFieldValues(2, Fit.SubfieldIndexMainField); } /// /// Retrieves the AccelX field /// Units: counts /// Comment: These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read. /// 0 based index of AccelX element to retrieve /// Returns nullable ushort representing the AccelX field public ushort? GetAccelX(int index) { return (ushort?)GetFieldValue(2, index, Fit.SubfieldIndexMainField); } /// /// Set AccelX field /// Units: counts /// Comment: These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read. /// 0 based index of accel_x /// Nullable field value to be set public void SetAccelX(int index, ushort? accelX_) { SetFieldValue(2, index, accelX_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field AccelY public int GetNumAccelY() { return GetNumFieldValues(3, Fit.SubfieldIndexMainField); } /// /// Retrieves the AccelY field /// Units: counts /// Comment: These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read. /// 0 based index of AccelY element to retrieve /// Returns nullable ushort representing the AccelY field public ushort? GetAccelY(int index) { return (ushort?)GetFieldValue(3, index, Fit.SubfieldIndexMainField); } /// /// Set AccelY field /// Units: counts /// Comment: These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read. /// 0 based index of accel_y /// Nullable field value to be set public void SetAccelY(int index, ushort? accelY_) { SetFieldValue(3, index, accelY_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field AccelZ public int GetNumAccelZ() { return GetNumFieldValues(4, Fit.SubfieldIndexMainField); } /// /// Retrieves the AccelZ field /// Units: counts /// Comment: These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read. /// 0 based index of AccelZ element to retrieve /// Returns nullable ushort representing the AccelZ field public ushort? GetAccelZ(int index) { return (ushort?)GetFieldValue(4, index, Fit.SubfieldIndexMainField); } /// /// Set AccelZ field /// Units: counts /// Comment: These are the raw ADC reading. Maximum number of samples is 30 in each message. The samples may span across seconds. A conversion will need to be done on this data once read. /// 0 based index of accel_z /// Nullable field value to be set public void SetAccelZ(int index, ushort? accelZ_) { SetFieldValue(4, index, accelZ_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field CalibratedAccelX public int GetNumCalibratedAccelX() { return GetNumFieldValues(5, Fit.SubfieldIndexMainField); } /// /// Retrieves the CalibratedAccelX field /// Units: g /// Comment: Calibrated accel reading /// 0 based index of CalibratedAccelX element to retrieve /// Returns nullable float representing the CalibratedAccelX field public float? GetCalibratedAccelX(int index) { return (float?)GetFieldValue(5, index, Fit.SubfieldIndexMainField); } /// /// Set CalibratedAccelX field /// Units: g /// Comment: Calibrated accel reading /// 0 based index of calibrated_accel_x /// Nullable field value to be set public void SetCalibratedAccelX(int index, float? calibratedAccelX_) { SetFieldValue(5, index, calibratedAccelX_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field CalibratedAccelY public int GetNumCalibratedAccelY() { return GetNumFieldValues(6, Fit.SubfieldIndexMainField); } /// /// Retrieves the CalibratedAccelY field /// Units: g /// Comment: Calibrated accel reading /// 0 based index of CalibratedAccelY element to retrieve /// Returns nullable float representing the CalibratedAccelY field public float? GetCalibratedAccelY(int index) { return (float?)GetFieldValue(6, index, Fit.SubfieldIndexMainField); } /// /// Set CalibratedAccelY field /// Units: g /// Comment: Calibrated accel reading /// 0 based index of calibrated_accel_y /// Nullable field value to be set public void SetCalibratedAccelY(int index, float? calibratedAccelY_) { SetFieldValue(6, index, calibratedAccelY_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field CalibratedAccelZ public int GetNumCalibratedAccelZ() { return GetNumFieldValues(7, Fit.SubfieldIndexMainField); } /// /// Retrieves the CalibratedAccelZ field /// Units: g /// Comment: Calibrated accel reading /// 0 based index of CalibratedAccelZ element to retrieve /// Returns nullable float representing the CalibratedAccelZ field public float? GetCalibratedAccelZ(int index) { return (float?)GetFieldValue(7, index, Fit.SubfieldIndexMainField); } /// /// Set CalibratedAccelZ field /// Units: g /// Comment: Calibrated accel reading /// 0 based index of calibrated_accel_z /// Nullable field value to be set public void SetCalibratedAccelZ(int index, float? calibratedAccelZ_) { SetFieldValue(7, index, calibratedAccelZ_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace