#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 Totals profile message.
///
public class TotalsMesg : Mesg
{
#region Fields
#endregion
#region Constructors
public TotalsMesg() : base(Profile.GetMesg(MesgNum.Totals))
{
}
public TotalsMesg(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
/// Units: s
/// Returns DateTime representing the Timestamp field
public DateTime GetTimestamp()
{
return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
}
///
/// Set Timestamp field
/// Units: s
/// Nullable field value to be set
public void SetTimestamp(DateTime timestamp_)
{
SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
}
///
/// Retrieves the TimerTime field
/// Units: s
/// Comment: Excludes pauses
/// Returns nullable uint representing the TimerTime field
public uint? GetTimerTime()
{
return (uint?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
}
///
/// Set TimerTime field
/// Units: s
/// Comment: Excludes pauses
/// Nullable field value to be set
public void SetTimerTime(uint? timerTime_)
{
SetFieldValue(0, 0, timerTime_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Distance field
/// Units: m
/// Returns nullable uint representing the Distance field
public uint? GetDistance()
{
return (uint?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
}
///
/// Set Distance field
/// Units: m
/// Nullable field value to be set
public void SetDistance(uint? distance_)
{
SetFieldValue(1, 0, distance_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Calories field
/// Units: kcal
/// Returns nullable uint representing the Calories field
public uint? GetCalories()
{
return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
}
///
/// Set Calories field
/// Units: kcal
/// Nullable field value to be set
public void SetCalories(uint? calories_)
{
SetFieldValue(2, 0, calories_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Sport field
/// Returns nullable Sport enum representing the Sport field
public Sport? GetSport()
{
object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
Sport? value = obj == null ? (Sport?)null : (Sport)obj;
return value;
}
///
/// Set Sport field
/// Nullable field value to be set
public void SetSport(Sport? sport_)
{
SetFieldValue(3, 0, sport_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the ElapsedTime field
/// Units: s
/// Comment: Includes pauses
/// Returns nullable uint representing the ElapsedTime field
public uint? GetElapsedTime()
{
return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
}
///
/// Set ElapsedTime field
/// Units: s
/// Comment: Includes pauses
/// Nullable field value to be set
public void SetElapsedTime(uint? elapsedTime_)
{
SetFieldValue(4, 0, elapsedTime_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Sessions field
/// Returns nullable ushort representing the Sessions field
public ushort? GetSessions()
{
return (ushort?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
}
///
/// Set Sessions field
/// Nullable field value to be set
public void SetSessions(ushort? sessions_)
{
SetFieldValue(5, 0, sessions_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the ActiveTime field
/// Units: s
/// Returns nullable uint representing the ActiveTime field
public uint? GetActiveTime()
{
return (uint?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
}
///
/// Set ActiveTime field
/// Units: s
/// Nullable field value to be set
public void SetActiveTime(uint? activeTime_)
{
SetFieldValue(6, 0, activeTime_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the SportIndex field
/// Returns nullable byte representing the SportIndex field
public byte? GetSportIndex()
{
return (byte?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField);
}
///
/// Set SportIndex field
/// Nullable field value to be set
public void SetSportIndex(byte? sportIndex_)
{
SetFieldValue(9, 0, sportIndex_, Fit.SubfieldIndexMainField);
}
#endregion // Methods
} // Class
} // namespace