#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 WorkoutStep profile message.
///
public class WorkoutStepMesg : Mesg
{
#region Fields
static class DurationValueSubfield
{
public static ushort DurationTime = 0;
public static ushort DurationDistance = 1;
public static ushort DurationHr = 2;
public static ushort DurationCalories = 3;
public static ushort DurationStep = 4;
public static ushort DurationPower = 5;
public static ushort Subfields = 6;
public static ushort Active = Fit.SubfieldIndexActiveSubfield;
public static ushort MainField = Fit.SubfieldIndexMainField;
}
static class TargetValueSubfield
{
public static ushort TargetHrZone = 0;
public static ushort TargetPowerZone = 1;
public static ushort RepeatSteps = 2;
public static ushort RepeatTime = 3;
public static ushort RepeatDistance = 4;
public static ushort RepeatCalories = 5;
public static ushort RepeatHr = 6;
public static ushort RepeatPower = 7;
public static ushort Subfields = 8;
public static ushort Active = Fit.SubfieldIndexActiveSubfield;
public static ushort MainField = Fit.SubfieldIndexMainField;
}
static class CustomTargetValueLowSubfield
{
public static ushort CustomTargetSpeedLow = 0;
public static ushort CustomTargetHeartRateLow = 1;
public static ushort CustomTargetCadenceLow = 2;
public static ushort CustomTargetPowerLow = 3;
public static ushort Subfields = 4;
public static ushort Active = Fit.SubfieldIndexActiveSubfield;
public static ushort MainField = Fit.SubfieldIndexMainField;
}
static class CustomTargetValueHighSubfield
{
public static ushort CustomTargetSpeedHigh = 0;
public static ushort CustomTargetHeartRateHigh = 1;
public static ushort CustomTargetCadenceHigh = 2;
public static ushort CustomTargetPowerHigh = 3;
public static ushort Subfields = 4;
public static ushort Active = Fit.SubfieldIndexActiveSubfield;
public static ushort MainField = Fit.SubfieldIndexMainField;
}
#endregion
#region Constructors
public WorkoutStepMesg() : base(Profile.GetMesg(MesgNum.WorkoutStep))
{
}
public WorkoutStepMesg(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 WktStepName field
/// Returns byte[] representing the WktStepName field
public byte[] GetWktStepName()
{
return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the WktStepName field
/// Returns String representing the WktStepName field
public String GetWktStepNameAsString()
{
return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
}
///
/// Set WktStepName field
/// field value to be set
public void SetWktStepName(String wktStepName_)
{
SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(wktStepName_), Fit.SubfieldIndexMainField);
}
///
/// Set WktStepName field
/// field value to be set
public void SetWktStepName(byte[] wktStepName_)
{
SetFieldValue(0, 0, wktStepName_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the DurationType field
/// Returns nullable WktStepDuration enum representing the DurationType field
public WktStepDuration? GetDurationType()
{
object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
WktStepDuration? value = obj == null ? (WktStepDuration?)null : (WktStepDuration)obj;
return value;
}
///
/// Set DurationType field
/// Nullable field value to be set
public void SetDurationType(WktStepDuration? durationType_)
{
SetFieldValue(1, 0, durationType_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the DurationValue field
/// Returns nullable uint representing the DurationValue field
public uint? GetDurationValue()
{
return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
}
///
/// Set DurationValue field
/// Nullable field value to be set
public void SetDurationValue(uint? durationValue_)
{
SetFieldValue(2, 0, durationValue_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the DurationTime subfield
/// Units: s
/// Nullable float representing the DurationTime subfield
public float? GetDurationTime()
{
return (float?)GetFieldValue(2, 0, DurationValueSubfield.DurationTime);
}
///
///
/// Set DurationTime subfield
/// Units: s
/// Subfield value to be set
public void SetDurationTime(float? durationTime)
{
SetFieldValue(2, 0, durationTime, DurationValueSubfield.DurationTime);
}
///
/// Retrieves the DurationDistance subfield
/// Units: m
/// Nullable float representing the DurationDistance subfield
public float? GetDurationDistance()
{
return (float?)GetFieldValue(2, 0, DurationValueSubfield.DurationDistance);
}
///
///
/// Set DurationDistance subfield
/// Units: m
/// Subfield value to be set
public void SetDurationDistance(float? durationDistance)
{
SetFieldValue(2, 0, durationDistance, DurationValueSubfield.DurationDistance);
}
///
/// Retrieves the DurationHr subfield
/// Units: % or bpm
/// Nullable uint representing the DurationHr subfield
public uint? GetDurationHr()
{
return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationHr);
}
///
///
/// Set DurationHr subfield
/// Units: % or bpm
/// Subfield value to be set
public void SetDurationHr(uint? durationHr)
{
SetFieldValue(2, 0, durationHr, DurationValueSubfield.DurationHr);
}
///
/// Retrieves the DurationCalories subfield
/// Units: calories
/// Nullable uint representing the DurationCalories subfield
public uint? GetDurationCalories()
{
return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationCalories);
}
///
///
/// Set DurationCalories subfield
/// Units: calories
/// Subfield value to be set
public void SetDurationCalories(uint? durationCalories)
{
SetFieldValue(2, 0, durationCalories, DurationValueSubfield.DurationCalories);
}
///
/// Retrieves the DurationStep subfield
/// Comment: message_index of step to loop back to. Steps are assumed to be in the order by message_index. custom_name and intensity members are undefined for this duration type.
/// Nullable uint representing the DurationStep subfield
public uint? GetDurationStep()
{
return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationStep);
}
///
///
/// Set DurationStep subfield
/// Comment: message_index of step to loop back to. Steps are assumed to be in the order by message_index. custom_name and intensity members are undefined for this duration type.
/// Subfield value to be set
public void SetDurationStep(uint? durationStep)
{
SetFieldValue(2, 0, durationStep, DurationValueSubfield.DurationStep);
}
///
/// Retrieves the DurationPower subfield
/// Units: % or watts
/// Nullable uint representing the DurationPower subfield
public uint? GetDurationPower()
{
return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationPower);
}
///
///
/// Set DurationPower subfield
/// Units: % or watts
/// Subfield value to be set
public void SetDurationPower(uint? durationPower)
{
SetFieldValue(2, 0, durationPower, DurationValueSubfield.DurationPower);
}
///
/// Retrieves the TargetType field
/// Returns nullable WktStepTarget enum representing the TargetType field
public WktStepTarget? GetTargetType()
{
object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
WktStepTarget? value = obj == null ? (WktStepTarget?)null : (WktStepTarget)obj;
return value;
}
///
/// Set TargetType field
/// Nullable field value to be set
public void SetTargetType(WktStepTarget? targetType_)
{
SetFieldValue(3, 0, targetType_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the TargetValue field
/// Returns nullable uint representing the TargetValue field
public uint? GetTargetValue()
{
return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
}
///
/// Set TargetValue field
/// Nullable field value to be set
public void SetTargetValue(uint? targetValue_)
{
SetFieldValue(4, 0, targetValue_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the TargetHrZone subfield
/// Comment: hr zone (1-5);Custom =0;
/// Nullable uint representing the TargetHrZone subfield
public uint? GetTargetHrZone()
{
return (uint?)GetFieldValue(4, 0, TargetValueSubfield.TargetHrZone);
}
///
///
/// Set TargetHrZone subfield
/// Comment: hr zone (1-5);Custom =0;
/// Subfield value to be set
public void SetTargetHrZone(uint? targetHrZone)
{
SetFieldValue(4, 0, targetHrZone, TargetValueSubfield.TargetHrZone);
}
///
/// Retrieves the TargetPowerZone subfield
/// Comment: Power Zone ( 1-7); Custom = 0;
/// Nullable uint representing the TargetPowerZone subfield
public uint? GetTargetPowerZone()
{
return (uint?)GetFieldValue(4, 0, TargetValueSubfield.TargetPowerZone);
}
///
///
/// Set TargetPowerZone subfield
/// Comment: Power Zone ( 1-7); Custom = 0;
/// Subfield value to be set
public void SetTargetPowerZone(uint? targetPowerZone)
{
SetFieldValue(4, 0, targetPowerZone, TargetValueSubfield.TargetPowerZone);
}
///
/// Retrieves the RepeatSteps subfield
/// Comment: # of repetitions
/// Nullable uint representing the RepeatSteps subfield
public uint? GetRepeatSteps()
{
return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatSteps);
}
///
///
/// Set RepeatSteps subfield
/// Comment: # of repetitions
/// Subfield value to be set
public void SetRepeatSteps(uint? repeatSteps)
{
SetFieldValue(4, 0, repeatSteps, TargetValueSubfield.RepeatSteps);
}
///
/// Retrieves the RepeatTime subfield
/// Units: s
/// Nullable float representing the RepeatTime subfield
public float? GetRepeatTime()
{
return (float?)GetFieldValue(4, 0, TargetValueSubfield.RepeatTime);
}
///
///
/// Set RepeatTime subfield
/// Units: s
/// Subfield value to be set
public void SetRepeatTime(float? repeatTime)
{
SetFieldValue(4, 0, repeatTime, TargetValueSubfield.RepeatTime);
}
///
/// Retrieves the RepeatDistance subfield
/// Units: m
/// Nullable float representing the RepeatDistance subfield
public float? GetRepeatDistance()
{
return (float?)GetFieldValue(4, 0, TargetValueSubfield.RepeatDistance);
}
///
///
/// Set RepeatDistance subfield
/// Units: m
/// Subfield value to be set
public void SetRepeatDistance(float? repeatDistance)
{
SetFieldValue(4, 0, repeatDistance, TargetValueSubfield.RepeatDistance);
}
///
/// Retrieves the RepeatCalories subfield
/// Units: calories
/// Nullable uint representing the RepeatCalories subfield
public uint? GetRepeatCalories()
{
return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatCalories);
}
///
///
/// Set RepeatCalories subfield
/// Units: calories
/// Subfield value to be set
public void SetRepeatCalories(uint? repeatCalories)
{
SetFieldValue(4, 0, repeatCalories, TargetValueSubfield.RepeatCalories);
}
///
/// Retrieves the RepeatHr subfield
/// Units: % or bpm
/// Nullable uint representing the RepeatHr subfield
public uint? GetRepeatHr()
{
return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatHr);
}
///
///
/// Set RepeatHr subfield
/// Units: % or bpm
/// Subfield value to be set
public void SetRepeatHr(uint? repeatHr)
{
SetFieldValue(4, 0, repeatHr, TargetValueSubfield.RepeatHr);
}
///
/// Retrieves the RepeatPower subfield
/// Units: % or watts
/// Nullable uint representing the RepeatPower subfield
public uint? GetRepeatPower()
{
return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatPower);
}
///
///
/// Set RepeatPower subfield
/// Units: % or watts
/// Subfield value to be set
public void SetRepeatPower(uint? repeatPower)
{
SetFieldValue(4, 0, repeatPower, TargetValueSubfield.RepeatPower);
}
///
/// Retrieves the CustomTargetValueLow field
/// Returns nullable uint representing the CustomTargetValueLow field
public uint? GetCustomTargetValueLow()
{
return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
}
///
/// Set CustomTargetValueLow field
/// Nullable field value to be set
public void SetCustomTargetValueLow(uint? customTargetValueLow_)
{
SetFieldValue(5, 0, customTargetValueLow_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the CustomTargetSpeedLow subfield
/// Units: m/s
/// Nullable float representing the CustomTargetSpeedLow subfield
public float? GetCustomTargetSpeedLow()
{
return (float?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetSpeedLow);
}
///
///
/// Set CustomTargetSpeedLow subfield
/// Units: m/s
/// Subfield value to be set
public void SetCustomTargetSpeedLow(float? customTargetSpeedLow)
{
SetFieldValue(5, 0, customTargetSpeedLow, CustomTargetValueLowSubfield.CustomTargetSpeedLow);
}
///
/// Retrieves the CustomTargetHeartRateLow subfield
/// Units: % or bpm
/// Nullable uint representing the CustomTargetHeartRateLow subfield
public uint? GetCustomTargetHeartRateLow()
{
return (uint?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetHeartRateLow);
}
///
///
/// Set CustomTargetHeartRateLow subfield
/// Units: % or bpm
/// Subfield value to be set
public void SetCustomTargetHeartRateLow(uint? customTargetHeartRateLow)
{
SetFieldValue(5, 0, customTargetHeartRateLow, CustomTargetValueLowSubfield.CustomTargetHeartRateLow);
}
///
/// Retrieves the CustomTargetCadenceLow subfield
/// Units: rpm
/// Nullable uint representing the CustomTargetCadenceLow subfield
public uint? GetCustomTargetCadenceLow()
{
return (uint?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetCadenceLow);
}
///
///
/// Set CustomTargetCadenceLow subfield
/// Units: rpm
/// Subfield value to be set
public void SetCustomTargetCadenceLow(uint? customTargetCadenceLow)
{
SetFieldValue(5, 0, customTargetCadenceLow, CustomTargetValueLowSubfield.CustomTargetCadenceLow);
}
///
/// Retrieves the CustomTargetPowerLow subfield
/// Units: % or watts
/// Nullable uint representing the CustomTargetPowerLow subfield
public uint? GetCustomTargetPowerLow()
{
return (uint?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetPowerLow);
}
///
///
/// Set CustomTargetPowerLow subfield
/// Units: % or watts
/// Subfield value to be set
public void SetCustomTargetPowerLow(uint? customTargetPowerLow)
{
SetFieldValue(5, 0, customTargetPowerLow, CustomTargetValueLowSubfield.CustomTargetPowerLow);
}
///
/// Retrieves the CustomTargetValueHigh field
/// Returns nullable uint representing the CustomTargetValueHigh field
public uint? GetCustomTargetValueHigh()
{
return (uint?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
}
///
/// Set CustomTargetValueHigh field
/// Nullable field value to be set
public void SetCustomTargetValueHigh(uint? customTargetValueHigh_)
{
SetFieldValue(6, 0, customTargetValueHigh_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the CustomTargetSpeedHigh subfield
/// Units: m/s
/// Nullable float representing the CustomTargetSpeedHigh subfield
public float? GetCustomTargetSpeedHigh()
{
return (float?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetSpeedHigh);
}
///
///
/// Set CustomTargetSpeedHigh subfield
/// Units: m/s
/// Subfield value to be set
public void SetCustomTargetSpeedHigh(float? customTargetSpeedHigh)
{
SetFieldValue(6, 0, customTargetSpeedHigh, CustomTargetValueHighSubfield.CustomTargetSpeedHigh);
}
///
/// Retrieves the CustomTargetHeartRateHigh subfield
/// Units: % or bpm
/// Nullable uint representing the CustomTargetHeartRateHigh subfield
public uint? GetCustomTargetHeartRateHigh()
{
return (uint?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetHeartRateHigh);
}
///
///
/// Set CustomTargetHeartRateHigh subfield
/// Units: % or bpm
/// Subfield value to be set
public void SetCustomTargetHeartRateHigh(uint? customTargetHeartRateHigh)
{
SetFieldValue(6, 0, customTargetHeartRateHigh, CustomTargetValueHighSubfield.CustomTargetHeartRateHigh);
}
///
/// Retrieves the CustomTargetCadenceHigh subfield
/// Units: rpm
/// Nullable uint representing the CustomTargetCadenceHigh subfield
public uint? GetCustomTargetCadenceHigh()
{
return (uint?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetCadenceHigh);
}
///
///
/// Set CustomTargetCadenceHigh subfield
/// Units: rpm
/// Subfield value to be set
public void SetCustomTargetCadenceHigh(uint? customTargetCadenceHigh)
{
SetFieldValue(6, 0, customTargetCadenceHigh, CustomTargetValueHighSubfield.CustomTargetCadenceHigh);
}
///
/// Retrieves the CustomTargetPowerHigh subfield
/// Units: % or watts
/// Nullable uint representing the CustomTargetPowerHigh subfield
public uint? GetCustomTargetPowerHigh()
{
return (uint?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetPowerHigh);
}
///
///
/// Set CustomTargetPowerHigh subfield
/// Units: % or watts
/// Subfield value to be set
public void SetCustomTargetPowerHigh(uint? customTargetPowerHigh)
{
SetFieldValue(6, 0, customTargetPowerHigh, CustomTargetValueHighSubfield.CustomTargetPowerHigh);
}
///
/// Retrieves the Intensity field
/// Returns nullable Intensity enum representing the Intensity field
public Intensity? GetIntensity()
{
object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
Intensity? value = obj == null ? (Intensity?)null : (Intensity)obj;
return value;
}
///
/// Set Intensity field
/// Nullable field value to be set
public void SetIntensity(Intensity? intensity_)
{
SetFieldValue(7, 0, intensity_, Fit.SubfieldIndexMainField);
}
#endregion // Methods
} // Class
} // namespace