#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 Activity profile message.
///
public class ActivityMesg : Mesg
{
#region Fields
#endregion
#region Constructors
public ActivityMesg() : base(Profile.GetMesg(MesgNum.Activity))
{
}
public ActivityMesg(Mesg mesg) : base(mesg)
{
}
#endregion // Constructors
#region Methods
///
/// Retrieves the Timestamp field
/// Returns DateTime representing the Timestamp field
public DateTime GetTimestamp()
{
return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
}
///
/// Set Timestamp field
/// Nullable field value to be set
public void SetTimestamp(DateTime timestamp_)
{
SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
}
///
/// Retrieves the TotalTimerTime field
/// Units: s
/// Comment: Exclude pauses
/// Returns nullable float representing the TotalTimerTime field
public float? GetTotalTimerTime()
{
return (float?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
}
///
/// Set TotalTimerTime field
/// Units: s
/// Comment: Exclude pauses
/// Nullable field value to be set
public void SetTotalTimerTime(float? totalTimerTime_)
{
SetFieldValue(0, 0, totalTimerTime_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the NumSessions field
/// Returns nullable ushort representing the NumSessions field
public ushort? GetNumSessions()
{
return (ushort?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
}
///
/// Set NumSessions field
/// Nullable field value to be set
public void SetNumSessions(ushort? numSessions_)
{
SetFieldValue(1, 0, numSessions_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Type field
/// Returns nullable Activity enum representing the Type field
new public Activity? GetType()
{
object obj = GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
Activity? value = obj == null ? (Activity?)null : (Activity)obj;
return value;
}
///
/// Set Type field
/// Nullable field value to be set
public void SetType(Activity? type_)
{
SetFieldValue(2, 0, type_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Event field
/// Returns nullable Event enum representing the Event field
public Event? GetEvent()
{
object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
Event? value = obj == null ? (Event?)null : (Event)obj;
return value;
}
///
/// Set Event field
/// Nullable field value to be set
public void SetEvent(Event? event_)
{
SetFieldValue(3, 0, event_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the EventType field
/// Returns nullable EventType enum representing the EventType field
public EventType? GetEventType()
{
object obj = GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
EventType? value = obj == null ? (EventType?)null : (EventType)obj;
return value;
}
///
/// Set EventType field
/// Nullable field value to be set
public void SetEventType(EventType? eventType_)
{
SetFieldValue(4, 0, eventType_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the LocalTimestamp field
/// Comment: timestamp epoch expressed in local time, used to convert activity timestamps to local time
/// Returns nullable uint representing the LocalTimestamp field
public uint? GetLocalTimestamp()
{
return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
}
///
/// Set LocalTimestamp field
/// Comment: timestamp epoch expressed in local time, used to convert activity timestamps to local time
/// Nullable field value to be set
public void SetLocalTimestamp(uint? localTimestamp_)
{
SetFieldValue(5, 0, localTimestamp_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the EventGroup field
/// Returns nullable byte representing the EventGroup field
public byte? GetEventGroup()
{
return (byte?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
}
///
/// Set EventGroup field
/// Nullable field value to be set
public void SetEventGroup(byte? eventGroup_)
{
SetFieldValue(6, 0, eventGroup_, Fit.SubfieldIndexMainField);
}
#endregion // Methods
} // Class
} // namespace