123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- #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
- {
- /// <summary>
- /// Implements the GyroscopeData profile message.
- /// </summary>
- public class GyroscopeDataMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public GyroscopeDataMesg() : base(Profile.GetMesg(MesgNum.GyroscopeData))
- {
- }
- public GyroscopeDataMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the Timestamp field
- /// Units: s
- /// Comment: Whole second part of the timestamp</summary>
- /// <returns>Returns DateTime representing the Timestamp field</returns>
- public DateTime GetTimestamp()
- {
- return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
- }
-
-
- /// <summary>
- /// Set Timestamp field
- /// Units: s
- /// Comment: Whole second part of the timestamp</summary>
- /// <param name="timestamp_">Nullable field value to be set</param>
- public void SetTimestamp(DateTime timestamp_)
- {
- SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the TimestampMs field
- /// Units: ms
- /// Comment: Millisecond part of the timestamp.</summary>
- /// <returns>Returns nullable ushort representing the TimestampMs field</returns>
- public ushort? GetTimestampMs()
- {
- return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set TimestampMs field
- /// Units: ms
- /// Comment: Millisecond part of the timestamp.</summary>
- /// <param name="timestampMs_">Nullable field value to be set</param>
- public void SetTimestampMs(ushort? timestampMs_)
- {
- SetFieldValue(0, 0, timestampMs_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field SampleTimeOffset</returns>
- public int GetNumSampleTimeOffset()
- {
- return GetNumFieldValues(1, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the SampleTimeOffset field
- /// Units: ms
- /// Comment: Each time in the array describes the time at which the gyro 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 gyro_x and gyro_y and gyro_z</summary>
- /// <param name="index">0 based index of SampleTimeOffset element to retrieve</param>
- /// <returns>Returns nullable ushort representing the SampleTimeOffset field</returns>
- public ushort? GetSampleTimeOffset(int index)
- {
- return (ushort?)GetFieldValue(1, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set SampleTimeOffset field
- /// Units: ms
- /// Comment: Each time in the array describes the time at which the gyro 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 gyro_x and gyro_y and gyro_z</summary>
- /// <param name="index">0 based index of sample_time_offset</param>
- /// <param name="sampleTimeOffset_">Nullable field value to be set</param>
- public void SetSampleTimeOffset(int index, ushort? sampleTimeOffset_)
- {
- SetFieldValue(1, index, sampleTimeOffset_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field GyroX</returns>
- public int GetNumGyroX()
- {
- return GetNumFieldValues(2, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the GyroX 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.</summary>
- /// <param name="index">0 based index of GyroX element to retrieve</param>
- /// <returns>Returns nullable ushort representing the GyroX field</returns>
- public ushort? GetGyroX(int index)
- {
- return (ushort?)GetFieldValue(2, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set GyroX 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.</summary>
- /// <param name="index">0 based index of gyro_x</param>
- /// <param name="gyroX_">Nullable field value to be set</param>
- public void SetGyroX(int index, ushort? gyroX_)
- {
- SetFieldValue(2, index, gyroX_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field GyroY</returns>
- public int GetNumGyroY()
- {
- return GetNumFieldValues(3, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the GyroY 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.</summary>
- /// <param name="index">0 based index of GyroY element to retrieve</param>
- /// <returns>Returns nullable ushort representing the GyroY field</returns>
- public ushort? GetGyroY(int index)
- {
- return (ushort?)GetFieldValue(3, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set GyroY 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.</summary>
- /// <param name="index">0 based index of gyro_y</param>
- /// <param name="gyroY_">Nullable field value to be set</param>
- public void SetGyroY(int index, ushort? gyroY_)
- {
- SetFieldValue(3, index, gyroY_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field GyroZ</returns>
- public int GetNumGyroZ()
- {
- return GetNumFieldValues(4, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the GyroZ 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.</summary>
- /// <param name="index">0 based index of GyroZ element to retrieve</param>
- /// <returns>Returns nullable ushort representing the GyroZ field</returns>
- public ushort? GetGyroZ(int index)
- {
- return (ushort?)GetFieldValue(4, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set GyroZ 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.</summary>
- /// <param name="index">0 based index of gyro_z</param>
- /// <param name="gyroZ_">Nullable field value to be set</param>
- public void SetGyroZ(int index, ushort? gyroZ_)
- {
- SetFieldValue(4, index, gyroZ_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field CalibratedGyroX</returns>
- public int GetNumCalibratedGyroX()
- {
- return GetNumFieldValues(5, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the CalibratedGyroX field
- /// Units: deg/s
- /// Comment: Calibrated gyro reading</summary>
- /// <param name="index">0 based index of CalibratedGyroX element to retrieve</param>
- /// <returns>Returns nullable float representing the CalibratedGyroX field</returns>
- public float? GetCalibratedGyroX(int index)
- {
- return (float?)GetFieldValue(5, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set CalibratedGyroX field
- /// Units: deg/s
- /// Comment: Calibrated gyro reading</summary>
- /// <param name="index">0 based index of calibrated_gyro_x</param>
- /// <param name="calibratedGyroX_">Nullable field value to be set</param>
- public void SetCalibratedGyroX(int index, float? calibratedGyroX_)
- {
- SetFieldValue(5, index, calibratedGyroX_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field CalibratedGyroY</returns>
- public int GetNumCalibratedGyroY()
- {
- return GetNumFieldValues(6, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the CalibratedGyroY field
- /// Units: deg/s
- /// Comment: Calibrated gyro reading</summary>
- /// <param name="index">0 based index of CalibratedGyroY element to retrieve</param>
- /// <returns>Returns nullable float representing the CalibratedGyroY field</returns>
- public float? GetCalibratedGyroY(int index)
- {
- return (float?)GetFieldValue(6, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set CalibratedGyroY field
- /// Units: deg/s
- /// Comment: Calibrated gyro reading</summary>
- /// <param name="index">0 based index of calibrated_gyro_y</param>
- /// <param name="calibratedGyroY_">Nullable field value to be set</param>
- public void SetCalibratedGyroY(int index, float? calibratedGyroY_)
- {
- SetFieldValue(6, index, calibratedGyroY_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field CalibratedGyroZ</returns>
- public int GetNumCalibratedGyroZ()
- {
- return GetNumFieldValues(7, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the CalibratedGyroZ field
- /// Units: deg/s
- /// Comment: Calibrated gyro reading</summary>
- /// <param name="index">0 based index of CalibratedGyroZ element to retrieve</param>
- /// <returns>Returns nullable float representing the CalibratedGyroZ field</returns>
- public float? GetCalibratedGyroZ(int index)
- {
- return (float?)GetFieldValue(7, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set CalibratedGyroZ field
- /// Units: deg/s
- /// Comment: Calibrated gyro reading</summary>
- /// <param name="index">0 based index of calibrated_gyro_z</param>
- /// <param name="calibratedGyroZ_">Nullable field value to be set</param>
- public void SetCalibratedGyroZ(int index, float? calibratedGyroZ_)
- {
- SetFieldValue(7, index, calibratedGyroZ_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|