123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- #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 Hr profile message.
- /// </summary>
- public class HrMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public HrMesg() : base(Profile.GetMesg(MesgNum.Hr))
- {
- }
- public HrMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the Timestamp field</summary>
- /// <returns>Returns DateTime representing the Timestamp field</returns>
- public DateTime GetTimestamp()
- {
- return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
- }
-
-
- /// <summary>
- /// Set Timestamp field</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 FractionalTimestamp field
- /// Units: s</summary>
- /// <returns>Returns nullable float representing the FractionalTimestamp field</returns>
- public float? GetFractionalTimestamp()
- {
- return (float?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set FractionalTimestamp field
- /// Units: s</summary>
- /// <param name="fractionalTimestamp_">Nullable field value to be set</param>
- public void SetFractionalTimestamp(float? fractionalTimestamp_)
- {
- SetFieldValue(0, 0, fractionalTimestamp_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Time256 field
- /// Units: s</summary>
- /// <returns>Returns nullable float representing the Time256 field</returns>
- public float? GetTime256()
- {
- return (float?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set Time256 field
- /// Units: s</summary>
- /// <param name="time256_">Nullable field value to be set</param>
- public void SetTime256(float? time256_)
- {
- SetFieldValue(1, 0, time256_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field FilteredBpm</returns>
- public int GetNumFilteredBpm()
- {
- return GetNumFieldValues(6, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the FilteredBpm field
- /// Units: bpm</summary>
- /// <param name="index">0 based index of FilteredBpm element to retrieve</param>
- /// <returns>Returns nullable byte representing the FilteredBpm field</returns>
- public byte? GetFilteredBpm(int index)
- {
- return (byte?)GetFieldValue(6, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set FilteredBpm field
- /// Units: bpm</summary>
- /// <param name="index">0 based index of filtered_bpm</param>
- /// <param name="filteredBpm_">Nullable field value to be set</param>
- public void SetFilteredBpm(int index, byte? filteredBpm_)
- {
- SetFieldValue(6, index, filteredBpm_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field EventTimestamp</returns>
- public int GetNumEventTimestamp()
- {
- return GetNumFieldValues(9, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the EventTimestamp field
- /// Units: s</summary>
- /// <param name="index">0 based index of EventTimestamp element to retrieve</param>
- /// <returns>Returns nullable float representing the EventTimestamp field</returns>
- public float? GetEventTimestamp(int index)
- {
- return (float?)GetFieldValue(9, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set EventTimestamp field
- /// Units: s</summary>
- /// <param name="index">0 based index of event_timestamp</param>
- /// <param name="eventTimestamp_">Nullable field value to be set</param>
- public void SetEventTimestamp(int index, float? eventTimestamp_)
- {
- SetFieldValue(9, index, eventTimestamp_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field EventTimestamp12</returns>
- public int GetNumEventTimestamp12()
- {
- return GetNumFieldValues(10, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the EventTimestamp12 field</summary>
- /// <param name="index">0 based index of EventTimestamp12 element to retrieve</param>
- /// <returns>Returns nullable byte representing the EventTimestamp12 field</returns>
- public byte? GetEventTimestamp12(int index)
- {
- return (byte?)GetFieldValue(10, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set EventTimestamp12 field</summary>
- /// <param name="index">0 based index of event_timestamp_12</param>
- /// <param name="eventTimestamp12_">Nullable field value to be set</param>
- public void SetEventTimestamp12(int index, byte? eventTimestamp12_)
- {
- SetFieldValue(10, index, eventTimestamp12_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|