123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- #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 CoursePoint profile message.
- /// </summary>
- public class CoursePointMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public CoursePointMesg() : base(Profile.GetMesg(MesgNum.CoursePoint))
- {
- }
- public CoursePointMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the MessageIndex field</summary>
- /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
- public ushort? GetMessageIndex()
- {
- return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set MessageIndex field</summary>
- /// <param name="messageIndex_">Nullable field value to be set</param>
- public void SetMessageIndex(ushort? messageIndex_)
- {
- SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Timestamp field</summary>
- /// <returns>Returns DateTime representing the Timestamp field</returns>
- public DateTime GetTimestamp()
- {
- return TimestampToDateTime((uint?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
- }
-
-
- /// <summary>
- /// Set Timestamp field</summary>
- /// <param name="timestamp_">Nullable field value to be set</param>
- public void SetTimestamp(DateTime timestamp_)
- {
- SetFieldValue(1, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the PositionLat field
- /// Units: semicircles</summary>
- /// <returns>Returns nullable int representing the PositionLat field</returns>
- public int? GetPositionLat()
- {
- return (int?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set PositionLat field
- /// Units: semicircles</summary>
- /// <param name="positionLat_">Nullable field value to be set</param>
- public void SetPositionLat(int? positionLat_)
- {
- SetFieldValue(2, 0, positionLat_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the PositionLong field
- /// Units: semicircles</summary>
- /// <returns>Returns nullable int representing the PositionLong field</returns>
- public int? GetPositionLong()
- {
- return (int?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set PositionLong field
- /// Units: semicircles</summary>
- /// <param name="positionLong_">Nullable field value to be set</param>
- public void SetPositionLong(int? positionLong_)
- {
- SetFieldValue(3, 0, positionLong_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Distance field
- /// Units: m</summary>
- /// <returns>Returns nullable float representing the Distance field</returns>
- public float? GetDistance()
- {
- return (float?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set Distance field
- /// Units: m</summary>
- /// <param name="distance_">Nullable field value to be set</param>
- public void SetDistance(float? distance_)
- {
- SetFieldValue(4, 0, distance_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Type field</summary>
- /// <returns>Returns nullable CoursePoint enum representing the Type field</returns>
- new public CoursePoint? GetType()
- {
- object obj = GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
- CoursePoint? value = obj == null ? (CoursePoint?)null : (CoursePoint)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set Type field</summary>
- /// <param name="type_">Nullable field value to be set</param>
- public void SetType(CoursePoint? type_)
- {
- SetFieldValue(5, 0, type_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Name field</summary>
- /// <returns>Returns byte[] representing the Name field</returns>
- public byte[] GetName()
- {
- return (byte[])GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Name field</summary>
- /// <returns>Returns String representing the Name field</returns>
- public String GetNameAsString()
- {
- return Encoding.UTF8.GetString((byte[])GetFieldValue(6, 0, Fit.SubfieldIndexMainField));
- }
-
-
- ///<summary>
- /// Set Name field</summary>
- /// <param name="name_"> field value to be set</param>
- public void SetName(String name_)
- {
- SetFieldValue(6, 0, System.Text.Encoding.UTF8.GetBytes(name_), Fit.SubfieldIndexMainField);
- }
-
- /// <summary>
- /// Set Name field</summary>
- /// <param name="name_">field value to be set</param>
- public void SetName(byte[] name_)
- {
- SetFieldValue(6, 0, name_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Favorite field</summary>
- /// <returns>Returns nullable Bool enum representing the Favorite field</returns>
- public Bool? GetFavorite()
- {
- object obj = GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
- Bool? value = obj == null ? (Bool?)null : (Bool)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set Favorite field</summary>
- /// <param name="favorite_">Nullable field value to be set</param>
- public void SetFavorite(Bool? favorite_)
- {
- SetFieldValue(8, 0, favorite_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|