#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 Monitoring profile message. /// public class MonitoringMesg : Mesg { #region Fields static class CyclesSubfield { public static ushort Steps = 0; public static ushort Strokes = 1; public static ushort Subfields = 2; public static ushort Active = Fit.SubfieldIndexActiveSubfield; public static ushort MainField = Fit.SubfieldIndexMainField; } #endregion #region Constructors public MonitoringMesg() : base(Profile.GetMesg(MesgNum.Monitoring)) { } public MonitoringMesg(Mesg mesg) : base(mesg) { } #endregion // Constructors #region Methods /// /// Retrieves the Timestamp field /// Units: s /// Comment: Must align to logging interval, for example, time must be 00:00:00 for daily log. /// Returns DateTime representing the Timestamp field public DateTime GetTimestamp() { return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField)); } /// /// Set Timestamp field /// Units: s /// Comment: Must align to logging interval, for example, time must be 00:00:00 for daily log. /// Nullable field value to be set public void SetTimestamp(DateTime timestamp_) { SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField); } /// /// Retrieves the DeviceIndex field /// Comment: Associates this data to device_info message. Not required for file with single device (sensor). /// Returns nullable byte representing the DeviceIndex field public byte? GetDeviceIndex() { return (byte?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField); } /// /// Set DeviceIndex field /// Comment: Associates this data to device_info message. Not required for file with single device (sensor). /// Nullable field value to be set public void SetDeviceIndex(byte? deviceIndex_) { SetFieldValue(0, 0, deviceIndex_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Calories field /// Units: kcal /// Comment: Accumulated total calories. Maintained by MonitoringReader for each activity_type. See SDK documentation /// Returns nullable ushort representing the Calories field public ushort? GetCalories() { return (ushort?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField); } /// /// Set Calories field /// Units: kcal /// Comment: Accumulated total calories. Maintained by MonitoringReader for each activity_type. See SDK documentation /// Nullable field value to be set public void SetCalories(ushort? calories_) { SetFieldValue(1, 0, calories_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Distance field /// Units: m /// Comment: Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation. /// Returns nullable float representing the Distance field public float? GetDistance() { return (float?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField); } /// /// Set Distance field /// Units: m /// Comment: Accumulated distance. Maintained by MonitoringReader for each activity_type. See SDK documentation. /// Nullable field value to be set public void SetDistance(float? distance_) { SetFieldValue(2, 0, distance_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Cycles field /// Units: cycles /// Comment: Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation. /// Returns nullable float representing the Cycles field public float? GetCycles() { return (float?)GetFieldValue(3, 0, Fit.SubfieldIndexMainField); } /// /// Set Cycles field /// Units: cycles /// Comment: Accumulated cycles. Maintained by MonitoringReader for each activity_type. See SDK documentation. /// Nullable field value to be set public void SetCycles(float? cycles_) { SetFieldValue(3, 0, cycles_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Steps subfield /// Units: steps /// Nullable uint representing the Steps subfield public uint? GetSteps() { return (uint?)GetFieldValue(3, 0, CyclesSubfield.Steps); } /// /// /// Set Steps subfield /// Units: steps /// Subfield value to be set public void SetSteps(uint? steps) { SetFieldValue(3, 0, steps, CyclesSubfield.Steps); } /// /// Retrieves the Strokes subfield /// Units: strokes /// Nullable float representing the Strokes subfield public float? GetStrokes() { return (float?)GetFieldValue(3, 0, CyclesSubfield.Strokes); } /// /// /// Set Strokes subfield /// Units: strokes /// Subfield value to be set public void SetStrokes(float? strokes) { SetFieldValue(3, 0, strokes, CyclesSubfield.Strokes); } /// /// Retrieves the ActiveTime field /// Units: s /// Returns nullable float representing the ActiveTime field public float? GetActiveTime() { return (float?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField); } /// /// Set ActiveTime field /// Units: s /// Nullable field value to be set public void SetActiveTime(float? activeTime_) { SetFieldValue(4, 0, activeTime_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivityType field /// Returns nullable ActivityType enum representing the ActivityType field public ActivityType? GetActivityType() { object obj = GetFieldValue(5, 0, Fit.SubfieldIndexMainField); ActivityType? value = obj == null ? (ActivityType?)null : (ActivityType)obj; return value; } /// /// Set ActivityType field /// Nullable field value to be set public void SetActivityType(ActivityType? activityType_) { SetFieldValue(5, 0, activityType_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivitySubtype field /// Returns nullable ActivitySubtype enum representing the ActivitySubtype field public ActivitySubtype? GetActivitySubtype() { object obj = GetFieldValue(6, 0, Fit.SubfieldIndexMainField); ActivitySubtype? value = obj == null ? (ActivitySubtype?)null : (ActivitySubtype)obj; return value; } /// /// Set ActivitySubtype field /// Nullable field value to be set public void SetActivitySubtype(ActivitySubtype? activitySubtype_) { SetFieldValue(6, 0, activitySubtype_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivityLevel field /// Returns nullable ActivityLevel enum representing the ActivityLevel field public ActivityLevel? GetActivityLevel() { object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField); ActivityLevel? value = obj == null ? (ActivityLevel?)null : (ActivityLevel)obj; return value; } /// /// Set ActivityLevel field /// Nullable field value to be set public void SetActivityLevel(ActivityLevel? activityLevel_) { SetFieldValue(7, 0, activityLevel_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Distance16 field /// Units: 100 * m /// Returns nullable ushort representing the Distance16 field public ushort? GetDistance16() { return (ushort?)GetFieldValue(8, 0, Fit.SubfieldIndexMainField); } /// /// Set Distance16 field /// Units: 100 * m /// Nullable field value to be set public void SetDistance16(ushort? distance16_) { SetFieldValue(8, 0, distance16_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Cycles16 field /// Units: 2 * cycles (steps) /// Returns nullable ushort representing the Cycles16 field public ushort? GetCycles16() { return (ushort?)GetFieldValue(9, 0, Fit.SubfieldIndexMainField); } /// /// Set Cycles16 field /// Units: 2 * cycles (steps) /// Nullable field value to be set public void SetCycles16(ushort? cycles16_) { SetFieldValue(9, 0, cycles16_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActiveTime16 field /// Units: s /// Returns nullable ushort representing the ActiveTime16 field public ushort? GetActiveTime16() { return (ushort?)GetFieldValue(10, 0, Fit.SubfieldIndexMainField); } /// /// Set ActiveTime16 field /// Units: s /// Nullable field value to be set public void SetActiveTime16(ushort? activeTime16_) { SetFieldValue(10, 0, activeTime16_, Fit.SubfieldIndexMainField); } /// /// Retrieves the LocalTimestamp field /// Comment: Must align to logging interval, for example, time must be 00:00:00 for daily log. /// Returns nullable uint representing the LocalTimestamp field public uint? GetLocalTimestamp() { return (uint?)GetFieldValue(11, 0, Fit.SubfieldIndexMainField); } /// /// Set LocalTimestamp field /// Comment: Must align to logging interval, for example, time must be 00:00:00 for daily log. /// Nullable field value to be set public void SetLocalTimestamp(uint? localTimestamp_) { SetFieldValue(11, 0, localTimestamp_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Temperature field /// Units: C /// Comment: Avg temperature during the logging interval ended at timestamp /// Returns nullable float representing the Temperature field public float? GetTemperature() { return (float?)GetFieldValue(12, 0, Fit.SubfieldIndexMainField); } /// /// Set Temperature field /// Units: C /// Comment: Avg temperature during the logging interval ended at timestamp /// Nullable field value to be set public void SetTemperature(float? temperature_) { SetFieldValue(12, 0, temperature_, Fit.SubfieldIndexMainField); } /// /// Retrieves the TemperatureMin field /// Units: C /// Comment: Min temperature during the logging interval ended at timestamp /// Returns nullable float representing the TemperatureMin field public float? GetTemperatureMin() { return (float?)GetFieldValue(14, 0, Fit.SubfieldIndexMainField); } /// /// Set TemperatureMin field /// Units: C /// Comment: Min temperature during the logging interval ended at timestamp /// Nullable field value to be set public void SetTemperatureMin(float? temperatureMin_) { SetFieldValue(14, 0, temperatureMin_, Fit.SubfieldIndexMainField); } /// /// Retrieves the TemperatureMax field /// Units: C /// Comment: Max temperature during the logging interval ended at timestamp /// Returns nullable float representing the TemperatureMax field public float? GetTemperatureMax() { return (float?)GetFieldValue(15, 0, Fit.SubfieldIndexMainField); } /// /// Set TemperatureMax field /// Units: C /// Comment: Max temperature during the logging interval ended at timestamp /// Nullable field value to be set public void SetTemperatureMax(float? temperatureMax_) { SetFieldValue(15, 0, temperatureMax_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field ActivityTime public int GetNumActivityTime() { return GetNumFieldValues(16, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActivityTime field /// Units: minutes /// Comment: Indexed using minute_activity_level enum /// 0 based index of ActivityTime element to retrieve /// Returns nullable ushort representing the ActivityTime field public ushort? GetActivityTime(int index) { return (ushort?)GetFieldValue(16, index, Fit.SubfieldIndexMainField); } /// /// Set ActivityTime field /// Units: minutes /// Comment: Indexed using minute_activity_level enum /// 0 based index of activity_time /// Nullable field value to be set public void SetActivityTime(int index, ushort? activityTime_) { SetFieldValue(16, index, activityTime_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ActiveCalories field /// Units: kcal /// Returns nullable ushort representing the ActiveCalories field public ushort? GetActiveCalories() { return (ushort?)GetFieldValue(19, 0, Fit.SubfieldIndexMainField); } /// /// Set ActiveCalories field /// Units: kcal /// Nullable field value to be set public void SetActiveCalories(ushort? activeCalories_) { SetFieldValue(19, 0, activeCalories_, Fit.SubfieldIndexMainField); } /// /// Retrieves the CurrentActivityTypeIntensity field /// Comment: Indicates single type / intensity for duration since last monitoring message. /// Returns nullable byte representing the CurrentActivityTypeIntensity field public byte? GetCurrentActivityTypeIntensity() { return (byte?)GetFieldValue(24, 0, Fit.SubfieldIndexMainField); } /// /// Set CurrentActivityTypeIntensity field /// Comment: Indicates single type / intensity for duration since last monitoring message. /// Nullable field value to be set public void SetCurrentActivityTypeIntensity(byte? currentActivityTypeIntensity_) { SetFieldValue(24, 0, currentActivityTypeIntensity_, Fit.SubfieldIndexMainField); } /// /// Retrieves the TimestampMin8 field /// Units: min /// Returns nullable byte representing the TimestampMin8 field public byte? GetTimestampMin8() { return (byte?)GetFieldValue(25, 0, Fit.SubfieldIndexMainField); } /// /// Set TimestampMin8 field /// Units: min /// Nullable field value to be set public void SetTimestampMin8(byte? timestampMin8_) { SetFieldValue(25, 0, timestampMin8_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Timestamp16 field /// Units: s /// Returns nullable ushort representing the Timestamp16 field public ushort? GetTimestamp16() { return (ushort?)GetFieldValue(26, 0, Fit.SubfieldIndexMainField); } /// /// Set Timestamp16 field /// Units: s /// Nullable field value to be set public void SetTimestamp16(ushort? timestamp16_) { SetFieldValue(26, 0, timestamp16_, Fit.SubfieldIndexMainField); } /// /// Retrieves the HeartRate field /// Units: bpm /// Returns nullable byte representing the HeartRate field public byte? GetHeartRate() { return (byte?)GetFieldValue(27, 0, Fit.SubfieldIndexMainField); } /// /// Set HeartRate field /// Units: bpm /// Nullable field value to be set public void SetHeartRate(byte? heartRate_) { SetFieldValue(27, 0, heartRate_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Intensity field /// Returns nullable float representing the Intensity field public float? GetIntensity() { return (float?)GetFieldValue(28, 0, Fit.SubfieldIndexMainField); } /// /// Set Intensity field /// Nullable field value to be set public void SetIntensity(float? intensity_) { SetFieldValue(28, 0, intensity_, Fit.SubfieldIndexMainField); } /// /// Retrieves the DurationMin field /// Units: min /// Returns nullable ushort representing the DurationMin field public ushort? GetDurationMin() { return (ushort?)GetFieldValue(29, 0, Fit.SubfieldIndexMainField); } /// /// Set DurationMin field /// Units: min /// Nullable field value to be set public void SetDurationMin(ushort? durationMin_) { SetFieldValue(29, 0, durationMin_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Duration field /// Units: s /// Returns nullable uint representing the Duration field public uint? GetDuration() { return (uint?)GetFieldValue(30, 0, Fit.SubfieldIndexMainField); } /// /// Set Duration field /// Units: s /// Nullable field value to be set public void SetDuration(uint? duration_) { SetFieldValue(30, 0, duration_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Ascent field /// Units: m /// Returns nullable float representing the Ascent field public float? GetAscent() { return (float?)GetFieldValue(31, 0, Fit.SubfieldIndexMainField); } /// /// Set Ascent field /// Units: m /// Nullable field value to be set public void SetAscent(float? ascent_) { SetFieldValue(31, 0, ascent_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Descent field /// Units: m /// Returns nullable float representing the Descent field public float? GetDescent() { return (float?)GetFieldValue(32, 0, Fit.SubfieldIndexMainField); } /// /// Set Descent field /// Units: m /// Nullable field value to be set public void SetDescent(float? descent_) { SetFieldValue(32, 0, descent_, Fit.SubfieldIndexMainField); } /// /// Retrieves the ModerateActivityMinutes field /// Units: minutes /// Returns nullable ushort representing the ModerateActivityMinutes field public ushort? GetModerateActivityMinutes() { return (ushort?)GetFieldValue(33, 0, Fit.SubfieldIndexMainField); } /// /// Set ModerateActivityMinutes field /// Units: minutes /// Nullable field value to be set public void SetModerateActivityMinutes(ushort? moderateActivityMinutes_) { SetFieldValue(33, 0, moderateActivityMinutes_, Fit.SubfieldIndexMainField); } /// /// Retrieves the VigorousActivityMinutes field /// Units: minutes /// Returns nullable ushort representing the VigorousActivityMinutes field public ushort? GetVigorousActivityMinutes() { return (ushort?)GetFieldValue(34, 0, Fit.SubfieldIndexMainField); } /// /// Set VigorousActivityMinutes field /// Units: minutes /// Nullable field value to be set public void SetVigorousActivityMinutes(ushort? vigorousActivityMinutes_) { SetFieldValue(34, 0, vigorousActivityMinutes_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace