#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 GyroscopeData profile message.
///
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
///
/// 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 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
/// 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 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
/// 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 GyroX
public int GetNumGyroX()
{
return GetNumFieldValues(2, Fit.SubfieldIndexMainField);
}
///
/// 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.
/// 0 based index of GyroX element to retrieve
/// Returns nullable ushort representing the GyroX field
public ushort? GetGyroX(int index)
{
return (ushort?)GetFieldValue(2, index, Fit.SubfieldIndexMainField);
}
///
/// 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.
/// 0 based index of gyro_x
/// Nullable field value to be set
public void SetGyroX(int index, ushort? gyroX_)
{
SetFieldValue(2, index, gyroX_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field GyroY
public int GetNumGyroY()
{
return GetNumFieldValues(3, Fit.SubfieldIndexMainField);
}
///
/// 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.
/// 0 based index of GyroY element to retrieve
/// Returns nullable ushort representing the GyroY field
public ushort? GetGyroY(int index)
{
return (ushort?)GetFieldValue(3, index, Fit.SubfieldIndexMainField);
}
///
/// 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.
/// 0 based index of gyro_y
/// Nullable field value to be set
public void SetGyroY(int index, ushort? gyroY_)
{
SetFieldValue(3, index, gyroY_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field GyroZ
public int GetNumGyroZ()
{
return GetNumFieldValues(4, Fit.SubfieldIndexMainField);
}
///
/// 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.
/// 0 based index of GyroZ element to retrieve
/// Returns nullable ushort representing the GyroZ field
public ushort? GetGyroZ(int index)
{
return (ushort?)GetFieldValue(4, index, Fit.SubfieldIndexMainField);
}
///
/// 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.
/// 0 based index of gyro_z
/// Nullable field value to be set
public void SetGyroZ(int index, ushort? gyroZ_)
{
SetFieldValue(4, index, gyroZ_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field CalibratedGyroX
public int GetNumCalibratedGyroX()
{
return GetNumFieldValues(5, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the CalibratedGyroX field
/// Units: deg/s
/// Comment: Calibrated gyro reading
/// 0 based index of CalibratedGyroX element to retrieve
/// Returns nullable float representing the CalibratedGyroX field
public float? GetCalibratedGyroX(int index)
{
return (float?)GetFieldValue(5, index, Fit.SubfieldIndexMainField);
}
///
/// Set CalibratedGyroX field
/// Units: deg/s
/// Comment: Calibrated gyro reading
/// 0 based index of calibrated_gyro_x
/// Nullable field value to be set
public void SetCalibratedGyroX(int index, float? calibratedGyroX_)
{
SetFieldValue(5, index, calibratedGyroX_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field CalibratedGyroY
public int GetNumCalibratedGyroY()
{
return GetNumFieldValues(6, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the CalibratedGyroY field
/// Units: deg/s
/// Comment: Calibrated gyro reading
/// 0 based index of CalibratedGyroY element to retrieve
/// Returns nullable float representing the CalibratedGyroY field
public float? GetCalibratedGyroY(int index)
{
return (float?)GetFieldValue(6, index, Fit.SubfieldIndexMainField);
}
///
/// Set CalibratedGyroY field
/// Units: deg/s
/// Comment: Calibrated gyro reading
/// 0 based index of calibrated_gyro_y
/// Nullable field value to be set
public void SetCalibratedGyroY(int index, float? calibratedGyroY_)
{
SetFieldValue(6, index, calibratedGyroY_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field CalibratedGyroZ
public int GetNumCalibratedGyroZ()
{
return GetNumFieldValues(7, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the CalibratedGyroZ field
/// Units: deg/s
/// Comment: Calibrated gyro reading
/// 0 based index of CalibratedGyroZ element to retrieve
/// Returns nullable float representing the CalibratedGyroZ field
public float? GetCalibratedGyroZ(int index)
{
return (float?)GetFieldValue(7, index, Fit.SubfieldIndexMainField);
}
///
/// Set CalibratedGyroZ field
/// Units: deg/s
/// Comment: Calibrated gyro reading
/// 0 based index of calibrated_gyro_z
/// Nullable field value to be set
public void SetCalibratedGyroZ(int index, float? calibratedGyroZ_)
{
SetFieldValue(7, index, calibratedGyroZ_, Fit.SubfieldIndexMainField);
}
#endregion // Methods
} // Class
} // namespace