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