#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 SegmentLeaderboardEntry profile message. /// public class SegmentLeaderboardEntryMesg : Mesg { #region Fields #endregion #region Constructors public SegmentLeaderboardEntryMesg() : base(Profile.GetMesg(MesgNum.SegmentLeaderboardEntry)) { } public SegmentLeaderboardEntryMesg(Mesg mesg) : base(mesg) { } #endregion // Constructors #region Methods /// /// Retrieves the MessageIndex field /// Returns nullable ushort representing the MessageIndex field public ushort? GetMessageIndex() { return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField); } /// /// Set MessageIndex field /// Nullable field value to be set public void SetMessageIndex(ushort? messageIndex_) { SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Name field /// Comment: Friendly name assigned to leader /// Returns byte[] representing the Name field public byte[] GetName() { return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField); } /// /// Retrieves the Name field /// Comment: Friendly name assigned to leader /// Returns String representing the Name field public String GetNameAsString() { return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField)); } /// /// Set Name field /// Comment: Friendly name assigned to leader /// field value to be set public void SetName(String name_) { SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(name_), Fit.SubfieldIndexMainField); } /// /// Set Name field /// Comment: Friendly name assigned to leader /// field value to be set public void SetName(byte[] name_) { SetFieldValue(0, 0, name_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Type field /// Comment: Leader classification /// Returns nullable SegmentLeaderboardType enum representing the Type field new public SegmentLeaderboardType? GetType() { object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField); SegmentLeaderboardType? value = obj == null ? (SegmentLeaderboardType?)null : (SegmentLeaderboardType)obj; return value; } /// /// Set Type field /// Comment: Leader classification /// Nullable field value to be set public void SetType(SegmentLeaderboardType? type_) { SetFieldValue(1, 0, type_, Fit.SubfieldIndexMainField); } /// /// Retrieves the GroupPrimaryKey field /// Comment: Primary user ID of this leader /// Returns nullable uint representing the GroupPrimaryKey field public uint? GetGroupPrimaryKey() { return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField); } /// /// Set GroupPrimaryKey field /// Comment: Primary user ID of this leader /// Nullable field value to be set public void SetGroupPrimaryKey(uint? groupPrimaryKey_) { SetFieldValue(2, 0, groupPrimaryKey_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivityId field /// Comment: ID of the activity associated with this leader time /// Returns nullable uint representing the ActivityId field public uint? GetActivityId() { return (uint?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField); } /// /// Set ActivityId field /// Comment: ID of the activity associated with this leader time /// Nullable field value to be set public void SetActivityId(uint? activityId_) { SetFieldValue(3, 0, activityId_, Fit.SubfieldIndexMainField); } /// /// Retrieves the SegmentTime field /// Units: s /// Comment: Segment Time (includes pauses) /// Returns nullable float representing the SegmentTime field public float? GetSegmentTime() { return (float?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField); } /// /// Set SegmentTime field /// Units: s /// Comment: Segment Time (includes pauses) /// Nullable field value to be set public void SetSegmentTime(float? segmentTime_) { SetFieldValue(4, 0, segmentTime_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivityIdString field /// Comment: String version of the activity_id. 21 characters long, express in decimal /// Returns byte[] representing the ActivityIdString field public byte[] GetActivityIdString() { return (byte[])GetFieldValue(5, 0, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivityIdString field /// Comment: String version of the activity_id. 21 characters long, express in decimal /// Returns String representing the ActivityIdString field public String GetActivityIdStringAsString() { return Encoding.UTF8.GetString((byte[])GetFieldValue(5, 0, Fit.SubfieldIndexMainField)); } /// /// Set ActivityIdString field /// Comment: String version of the activity_id. 21 characters long, express in decimal /// field value to be set public void SetActivityIdString(String activityIdString_) { SetFieldValue(5, 0, System.Text.Encoding.UTF8.GetBytes(activityIdString_), Fit.SubfieldIndexMainField); } /// /// Set ActivityIdString field /// Comment: String version of the activity_id. 21 characters long, express in decimal /// field value to be set public void SetActivityIdString(byte[] activityIdString_) { SetFieldValue(5, 0, activityIdString_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace