12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558 |
- #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
- {
- /// <summary>
- /// Represents the Fit Profile including message, field and type definition.
- /// </summary>
- public static class Profile
- {
- #region Fields
- [Obsolete("This field will be made private in version 18.00; Use GetMesg() instead;")]
- public static List<Mesg> mesgs = new List<Mesg>();
- private static readonly Dictionary<ushort, Mesg> m_mesgLookup = new Dictionary<ushort, Mesg>();
- #region Profile Mesg Indices
- // These are the indices into the mesgs array
- public readonly static ushort FileIdIndex;
- public readonly static ushort FileCreatorIndex;
- public readonly static ushort TimestampCorrelationIndex;
- public readonly static ushort SoftwareIndex;
- public readonly static ushort SlaveDeviceIndex;
- public readonly static ushort CapabilitiesIndex;
- public readonly static ushort FileCapabilitiesIndex;
- public readonly static ushort MesgCapabilitiesIndex;
- public readonly static ushort FieldCapabilitiesIndex;
- public readonly static ushort DeviceSettingsIndex;
- public readonly static ushort UserProfileIndex;
- public readonly static ushort HrmProfileIndex;
- public readonly static ushort SdmProfileIndex;
- public readonly static ushort BikeProfileIndex;
- public readonly static ushort ZonesTargetIndex;
- public readonly static ushort SportIndex;
- public readonly static ushort HrZoneIndex;
- public readonly static ushort SpeedZoneIndex;
- public readonly static ushort CadenceZoneIndex;
- public readonly static ushort PowerZoneIndex;
- public readonly static ushort MetZoneIndex;
- public readonly static ushort GoalIndex;
- public readonly static ushort ActivityIndex;
- public readonly static ushort SessionIndex;
- public readonly static ushort LapIndex;
- public readonly static ushort LengthIndex;
- public readonly static ushort RecordIndex;
- public readonly static ushort EventIndex;
- public readonly static ushort DeviceInfoIndex;
- public readonly static ushort TrainingFileIndex;
- public readonly static ushort HrvIndex;
- public readonly static ushort CameraEventIndex;
- public readonly static ushort GyroscopeDataIndex;
- public readonly static ushort AccelerometerDataIndex;
- public readonly static ushort ThreeDSensorCalibrationIndex;
- public readonly static ushort VideoFrameIndex;
- public readonly static ushort ObdiiDataIndex;
- public readonly static ushort NmeaSentenceIndex;
- public readonly static ushort AviationAttitudeIndex;
- public readonly static ushort VideoIndex;
- public readonly static ushort VideoTitleIndex;
- public readonly static ushort VideoDescriptionIndex;
- public readonly static ushort VideoClipIndex;
- public readonly static ushort CourseIndex;
- public readonly static ushort CoursePointIndex;
- public readonly static ushort SegmentIdIndex;
- public readonly static ushort SegmentLeaderboardEntryIndex;
- public readonly static ushort SegmentPointIndex;
- public readonly static ushort SegmentLapIndex;
- public readonly static ushort SegmentFileIndex;
- public readonly static ushort WorkoutIndex;
- public readonly static ushort WorkoutStepIndex;
- public readonly static ushort ScheduleIndex;
- public readonly static ushort TotalsIndex;
- public readonly static ushort WeightScaleIndex;
- public readonly static ushort BloodPressureIndex;
- public readonly static ushort MonitoringInfoIndex;
- public readonly static ushort MonitoringIndex;
- public readonly static ushort HrIndex;
- public readonly static ushort MemoGlobIndex;
- public readonly static ushort AntChannelIdIndex;
- public readonly static ushort AntRxIndex;
- public readonly static ushort AntTxIndex;
- public readonly static ushort PadIndex;
-
- //public readonly static ushort InvalidIndex;
- #endregion// Profile Mesg Indices
- #endregion // Fields
- #region Properties
- #endregion
- #region Constructors
- /// <summary>
- /// Static constructor to build the profile object
- /// </summary>
- static Profile()
- {
- // Disable the Obsolete Warning that is raised by using mesgs
- #pragma warning disable 0618
- ushort mesgIndex = 0;
- ushort fieldIndex, subfieldIndex;
- // FileId
- Mesg fileIdMesg = new Mesg("FileId", MesgNum.FileId);
- fieldIndex = 0;
- fileIdMesg.SetField(new Field("Type", 0, 0, 1, 0, "", false));
- fieldIndex++;
- fileIdMesg.SetField(new Field("Manufacturer", 1, 132, 1, 0, "", false));
- fieldIndex++;
- fileIdMesg.SetField(new Field("Product", 2, 132, 1, 0, "", false));
- subfieldIndex = 0;
- fileIdMesg.fields[fieldIndex].subfields.Add(new Subfield("GarminProduct", 132, 1, 0, ""));
- fileIdMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 1);
- fileIdMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 15);
- fileIdMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 13);
- subfieldIndex++;
- fieldIndex++;
- fileIdMesg.SetField(new Field("SerialNumber", 3, 140, 1, 0, "", false));
- fieldIndex++;
- fileIdMesg.SetField(new Field("TimeCreated", 4, 134, 1, 0, "", false));
- fieldIndex++;
- fileIdMesg.SetField(new Field("Number", 5, 132, 1, 0, "", false));
- fieldIndex++;
- fileIdMesg.SetField(new Field("ProductName", 8, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(fileIdMesg);
- FileIdIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.FileId, fileIdMesg);
- mesgIndex++;
-
- // FileCreator
- Mesg fileCreatorMesg = new Mesg("FileCreator", MesgNum.FileCreator);
- fieldIndex = 0;
- fileCreatorMesg.SetField(new Field("SoftwareVersion", 0, 132, 1, 0, "", false));
- fieldIndex++;
- fileCreatorMesg.SetField(new Field("HardwareVersion", 1, 2, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(fileCreatorMesg);
- FileCreatorIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.FileCreator, fileCreatorMesg);
- mesgIndex++;
-
- // TimestampCorrelation
- Mesg timestampCorrelationMesg = new Mesg("TimestampCorrelation", MesgNum.TimestampCorrelation);
- fieldIndex = 0;
- timestampCorrelationMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- timestampCorrelationMesg.SetField(new Field("FractionalTimestamp", 0, 132, 32768, 0, "s", false));
- fieldIndex++;
- timestampCorrelationMesg.SetField(new Field("SystemTimestamp", 1, 134, 1, 0, "s", false));
- fieldIndex++;
- timestampCorrelationMesg.SetField(new Field("FractionalSystemTimestamp", 2, 132, 32768, 0, "s", false));
- fieldIndex++;
- timestampCorrelationMesg.SetField(new Field("LocalTimestamp", 3, 134, 1, 0, "s", false));
- fieldIndex++;
- timestampCorrelationMesg.SetField(new Field("TimestampMs", 4, 132, 1, 0, "ms", false));
- fieldIndex++;
- timestampCorrelationMesg.SetField(new Field("SystemTimestampMs", 5, 132, 1, 0, "ms", false));
- fieldIndex++;
- mesgs.Add(timestampCorrelationMesg);
- TimestampCorrelationIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.TimestampCorrelation, timestampCorrelationMesg);
- mesgIndex++;
-
- // Software
- Mesg softwareMesg = new Mesg("Software", MesgNum.Software);
- fieldIndex = 0;
- softwareMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- softwareMesg.SetField(new Field("Version", 3, 132, 100, 0, "", false));
- fieldIndex++;
- softwareMesg.SetField(new Field("PartNumber", 5, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(softwareMesg);
- SoftwareIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Software, softwareMesg);
- mesgIndex++;
-
- // SlaveDevice
- Mesg slaveDeviceMesg = new Mesg("SlaveDevice", MesgNum.SlaveDevice);
- fieldIndex = 0;
- slaveDeviceMesg.SetField(new Field("Manufacturer", 0, 132, 1, 0, "", false));
- fieldIndex++;
- slaveDeviceMesg.SetField(new Field("Product", 1, 132, 1, 0, "", false));
- subfieldIndex = 0;
- slaveDeviceMesg.fields[fieldIndex].subfields.Add(new Subfield("GarminProduct", 132, 1, 0, ""));
- slaveDeviceMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 1);
- slaveDeviceMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 15);
- slaveDeviceMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 13);
- subfieldIndex++;
- fieldIndex++;
- mesgs.Add(slaveDeviceMesg);
- SlaveDeviceIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SlaveDevice, slaveDeviceMesg);
- mesgIndex++;
-
- // Capabilities
- Mesg capabilitiesMesg = new Mesg("Capabilities", MesgNum.Capabilities);
- fieldIndex = 0;
- capabilitiesMesg.SetField(new Field("Languages", 0, 10, 1, 0, "", false));
- fieldIndex++;
- capabilitiesMesg.SetField(new Field("Sports", 1, 10, 1, 0, "", false));
- fieldIndex++;
- capabilitiesMesg.SetField(new Field("WorkoutsSupported", 21, 140, 1, 0, "", false));
- fieldIndex++;
- capabilitiesMesg.SetField(new Field("ConnectivitySupported", 23, 140, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(capabilitiesMesg);
- CapabilitiesIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Capabilities, capabilitiesMesg);
- mesgIndex++;
-
- // FileCapabilities
- Mesg fileCapabilitiesMesg = new Mesg("FileCapabilities", MesgNum.FileCapabilities);
- fieldIndex = 0;
- fileCapabilitiesMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- fileCapabilitiesMesg.SetField(new Field("Type", 0, 0, 1, 0, "", false));
- fieldIndex++;
- fileCapabilitiesMesg.SetField(new Field("Flags", 1, 10, 1, 0, "", false));
- fieldIndex++;
- fileCapabilitiesMesg.SetField(new Field("Directory", 2, 7, 1, 0, "", false));
- fieldIndex++;
- fileCapabilitiesMesg.SetField(new Field("MaxCount", 3, 132, 1, 0, "", false));
- fieldIndex++;
- fileCapabilitiesMesg.SetField(new Field("MaxSize", 4, 134, 1, 0, "bytes", false));
- fieldIndex++;
- mesgs.Add(fileCapabilitiesMesg);
- FileCapabilitiesIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.FileCapabilities, fileCapabilitiesMesg);
- mesgIndex++;
-
- // MesgCapabilities
- Mesg mesgCapabilitiesMesg = new Mesg("MesgCapabilities", MesgNum.MesgCapabilities);
- fieldIndex = 0;
- mesgCapabilitiesMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- mesgCapabilitiesMesg.SetField(new Field("File", 0, 0, 1, 0, "", false));
- fieldIndex++;
- mesgCapabilitiesMesg.SetField(new Field("MesgNum", 1, 132, 1, 0, "", false));
- fieldIndex++;
- mesgCapabilitiesMesg.SetField(new Field("CountType", 2, 0, 1, 0, "", false));
- fieldIndex++;
- mesgCapabilitiesMesg.SetField(new Field("Count", 3, 132, 1, 0, "", false));
- subfieldIndex = 0;
- mesgCapabilitiesMesg.fields[fieldIndex].subfields.Add(new Subfield("NumPerFile", 132, 1, 0, ""));
- mesgCapabilitiesMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(2, 0);
- subfieldIndex++;
- mesgCapabilitiesMesg.fields[fieldIndex].subfields.Add(new Subfield("MaxPerFile", 132, 1, 0, ""));
- mesgCapabilitiesMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(2, 1);
- subfieldIndex++;
- mesgCapabilitiesMesg.fields[fieldIndex].subfields.Add(new Subfield("MaxPerFileType", 132, 1, 0, ""));
- mesgCapabilitiesMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(2, 2);
- subfieldIndex++;
- fieldIndex++;
- mesgs.Add(mesgCapabilitiesMesg);
- MesgCapabilitiesIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.MesgCapabilities, mesgCapabilitiesMesg);
- mesgIndex++;
-
- // FieldCapabilities
- Mesg fieldCapabilitiesMesg = new Mesg("FieldCapabilities", MesgNum.FieldCapabilities);
- fieldIndex = 0;
- fieldCapabilitiesMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- fieldCapabilitiesMesg.SetField(new Field("File", 0, 0, 1, 0, "", false));
- fieldIndex++;
- fieldCapabilitiesMesg.SetField(new Field("MesgNum", 1, 132, 1, 0, "", false));
- fieldIndex++;
- fieldCapabilitiesMesg.SetField(new Field("FieldNum", 2, 2, 1, 0, "", false));
- fieldIndex++;
- fieldCapabilitiesMesg.SetField(new Field("Count", 3, 132, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(fieldCapabilitiesMesg);
- FieldCapabilitiesIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.FieldCapabilities, fieldCapabilitiesMesg);
- mesgIndex++;
-
- // DeviceSettings
- Mesg deviceSettingsMesg = new Mesg("DeviceSettings", MesgNum.DeviceSettings);
- fieldIndex = 0;
- deviceSettingsMesg.SetField(new Field("ActiveTimeZone", 0, 2, 1, 0, "", false));
- fieldIndex++;
- deviceSettingsMesg.SetField(new Field("UtcOffset", 1, 134, 1, 0, "", false));
- fieldIndex++;
- deviceSettingsMesg.SetField(new Field("TimeOffset", 2, 134, 1, 0, "s", false));
- fieldIndex++;
- deviceSettingsMesg.SetField(new Field("TimeZoneOffset", 5, 1, 4, 0, "hr", false));
- fieldIndex++;
- mesgs.Add(deviceSettingsMesg);
- DeviceSettingsIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.DeviceSettings, deviceSettingsMesg);
- mesgIndex++;
-
- // UserProfile
- Mesg userProfileMesg = new Mesg("UserProfile", MesgNum.UserProfile);
- fieldIndex = 0;
- userProfileMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("FriendlyName", 0, 7, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("Gender", 1, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("Age", 2, 2, 1, 0, "years", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("Height", 3, 2, 100, 0, "m", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("Weight", 4, 132, 10, 0, "kg", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("Language", 5, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("ElevSetting", 6, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("WeightSetting", 7, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("RestingHeartRate", 8, 2, 1, 0, "bpm", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("DefaultMaxRunningHeartRate", 9, 2, 1, 0, "bpm", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("DefaultMaxBikingHeartRate", 10, 2, 1, 0, "bpm", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("DefaultMaxHeartRate", 11, 2, 1, 0, "bpm", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("HrSetting", 12, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("SpeedSetting", 13, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("DistSetting", 14, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("PowerSetting", 16, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("ActivityClass", 17, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("PositionSetting", 18, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("TemperatureSetting", 21, 0, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("LocalId", 22, 132, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("GlobalId", 23, 13, 1, 0, "", false));
- fieldIndex++;
- userProfileMesg.SetField(new Field("HeightSetting", 30, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(userProfileMesg);
- UserProfileIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.UserProfile, userProfileMesg);
- mesgIndex++;
-
- // HrmProfile
- Mesg hrmProfileMesg = new Mesg("HrmProfile", MesgNum.HrmProfile);
- fieldIndex = 0;
- hrmProfileMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- hrmProfileMesg.SetField(new Field("Enabled", 0, 0, 1, 0, "", false));
- fieldIndex++;
- hrmProfileMesg.SetField(new Field("HrmAntId", 1, 139, 1, 0, "", false));
- fieldIndex++;
- hrmProfileMesg.SetField(new Field("LogHrv", 2, 0, 1, 0, "", false));
- fieldIndex++;
- hrmProfileMesg.SetField(new Field("HrmAntIdTransType", 3, 10, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(hrmProfileMesg);
- HrmProfileIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.HrmProfile, hrmProfileMesg);
- mesgIndex++;
-
- // SdmProfile
- Mesg sdmProfileMesg = new Mesg("SdmProfile", MesgNum.SdmProfile);
- fieldIndex = 0;
- sdmProfileMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("Enabled", 0, 0, 1, 0, "", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("SdmAntId", 1, 139, 1, 0, "", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("SdmCalFactor", 2, 132, 10, 0, "%", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("Odometer", 3, 134, 100, 0, "m", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("SpeedSource", 4, 0, 1, 0, "", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("SdmAntIdTransType", 5, 10, 1, 0, "", false));
- fieldIndex++;
- sdmProfileMesg.SetField(new Field("OdometerRollover", 7, 2, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(sdmProfileMesg);
- SdmProfileIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SdmProfile, sdmProfileMesg);
- mesgIndex++;
-
- // BikeProfile
- Mesg bikeProfileMesg = new Mesg("BikeProfile", MesgNum.BikeProfile);
- fieldIndex = 0;
- bikeProfileMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("Name", 0, 7, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("Sport", 1, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("SubSport", 2, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("Odometer", 3, 134, 100, 0, "m", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeSpdAntId", 4, 139, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeCadAntId", 5, 139, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeSpdcadAntId", 6, 139, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikePowerAntId", 7, 139, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("CustomWheelsize", 8, 132, 1000, 0, "m", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("AutoWheelsize", 9, 132, 1000, 0, "m", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeWeight", 10, 132, 10, 0, "kg", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("PowerCalFactor", 11, 132, 10, 0, "%", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("AutoWheelCal", 12, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("AutoPowerZero", 13, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("Id", 14, 2, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("SpdEnabled", 15, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("CadEnabled", 16, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("SpdcadEnabled", 17, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("PowerEnabled", 18, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("CrankLength", 19, 2, 2, -110, "mm", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("Enabled", 20, 0, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeSpdAntIdTransType", 21, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeCadAntIdTransType", 22, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikeSpdcadAntIdTransType", 23, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("BikePowerAntIdTransType", 24, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("OdometerRollover", 37, 2, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("FrontGearNum", 38, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("FrontGear", 39, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("RearGearNum", 40, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("RearGear", 41, 10, 1, 0, "", false));
- fieldIndex++;
- bikeProfileMesg.SetField(new Field("ShimanoDi2Enabled", 44, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(bikeProfileMesg);
- BikeProfileIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.BikeProfile, bikeProfileMesg);
- mesgIndex++;
-
- // ZonesTarget
- Mesg zonesTargetMesg = new Mesg("ZonesTarget", MesgNum.ZonesTarget);
- fieldIndex = 0;
- zonesTargetMesg.SetField(new Field("MaxHeartRate", 1, 2, 1, 0, "", false));
- fieldIndex++;
- zonesTargetMesg.SetField(new Field("ThresholdHeartRate", 2, 2, 1, 0, "", false));
- fieldIndex++;
- zonesTargetMesg.SetField(new Field("FunctionalThresholdPower", 3, 132, 1, 0, "", false));
- fieldIndex++;
- zonesTargetMesg.SetField(new Field("HrCalcType", 5, 0, 1, 0, "", false));
- fieldIndex++;
- zonesTargetMesg.SetField(new Field("PwrCalcType", 7, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(zonesTargetMesg);
- ZonesTargetIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.ZonesTarget, zonesTargetMesg);
- mesgIndex++;
-
- // Sport
- Mesg sportMesg = new Mesg("Sport", MesgNum.Sport);
- fieldIndex = 0;
- sportMesg.SetField(new Field("Sport", 0, 0, 1, 0, "", false));
- fieldIndex++;
- sportMesg.SetField(new Field("SubSport", 1, 0, 1, 0, "", false));
- fieldIndex++;
- sportMesg.SetField(new Field("Name", 3, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(sportMesg);
- SportIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Sport, sportMesg);
- mesgIndex++;
-
- // HrZone
- Mesg hrZoneMesg = new Mesg("HrZone", MesgNum.HrZone);
- fieldIndex = 0;
- hrZoneMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- hrZoneMesg.SetField(new Field("HighBpm", 1, 2, 1, 0, "bpm", false));
- fieldIndex++;
- hrZoneMesg.SetField(new Field("Name", 2, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(hrZoneMesg);
- HrZoneIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.HrZone, hrZoneMesg);
- mesgIndex++;
-
- // SpeedZone
- Mesg speedZoneMesg = new Mesg("SpeedZone", MesgNum.SpeedZone);
- fieldIndex = 0;
- speedZoneMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- speedZoneMesg.SetField(new Field("HighValue", 0, 132, 1000, 0, "m/s", false));
- fieldIndex++;
- speedZoneMesg.SetField(new Field("Name", 1, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(speedZoneMesg);
- SpeedZoneIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SpeedZone, speedZoneMesg);
- mesgIndex++;
-
- // CadenceZone
- Mesg cadenceZoneMesg = new Mesg("CadenceZone", MesgNum.CadenceZone);
- fieldIndex = 0;
- cadenceZoneMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- cadenceZoneMesg.SetField(new Field("HighValue", 0, 2, 1, 0, "rpm", false));
- fieldIndex++;
- cadenceZoneMesg.SetField(new Field("Name", 1, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(cadenceZoneMesg);
- CadenceZoneIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.CadenceZone, cadenceZoneMesg);
- mesgIndex++;
-
- // PowerZone
- Mesg powerZoneMesg = new Mesg("PowerZone", MesgNum.PowerZone);
- fieldIndex = 0;
- powerZoneMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- powerZoneMesg.SetField(new Field("HighValue", 1, 132, 1, 0, "watts", false));
- fieldIndex++;
- powerZoneMesg.SetField(new Field("Name", 2, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(powerZoneMesg);
- PowerZoneIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.PowerZone, powerZoneMesg);
- mesgIndex++;
-
- // MetZone
- Mesg metZoneMesg = new Mesg("MetZone", MesgNum.MetZone);
- fieldIndex = 0;
- metZoneMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- metZoneMesg.SetField(new Field("HighBpm", 1, 2, 1, 0, "", false));
- fieldIndex++;
- metZoneMesg.SetField(new Field("Calories", 2, 132, 10, 0, "kcal / min", false));
- fieldIndex++;
- metZoneMesg.SetField(new Field("FatCalories", 3, 2, 10, 0, "kcal / min", false));
- fieldIndex++;
- mesgs.Add(metZoneMesg);
- MetZoneIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.MetZone, metZoneMesg);
- mesgIndex++;
-
- // Goal
- Mesg goalMesg = new Mesg("Goal", MesgNum.Goal);
- fieldIndex = 0;
- goalMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("Sport", 0, 0, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("SubSport", 1, 0, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("StartDate", 2, 134, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("EndDate", 3, 134, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("Type", 4, 0, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("Value", 5, 134, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("Repeat", 6, 0, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("TargetValue", 7, 134, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("Recurrence", 8, 0, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("RecurrenceValue", 9, 132, 1, 0, "", false));
- fieldIndex++;
- goalMesg.SetField(new Field("Enabled", 10, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(goalMesg);
- GoalIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Goal, goalMesg);
- mesgIndex++;
-
- // Activity
- Mesg activityMesg = new Mesg("Activity", MesgNum.Activity);
- fieldIndex = 0;
- activityMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "", false));
- fieldIndex++;
- activityMesg.SetField(new Field("TotalTimerTime", 0, 134, 1000, 0, "s", false));
- fieldIndex++;
- activityMesg.SetField(new Field("NumSessions", 1, 132, 1, 0, "", false));
- fieldIndex++;
- activityMesg.SetField(new Field("Type", 2, 0, 1, 0, "", false));
- fieldIndex++;
- activityMesg.SetField(new Field("Event", 3, 0, 1, 0, "", false));
- fieldIndex++;
- activityMesg.SetField(new Field("EventType", 4, 0, 1, 0, "", false));
- fieldIndex++;
- activityMesg.SetField(new Field("LocalTimestamp", 5, 134, 1, 0, "", false));
- fieldIndex++;
- activityMesg.SetField(new Field("EventGroup", 6, 2, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(activityMesg);
- ActivityIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Activity, activityMesg);
- mesgIndex++;
-
- // Session
- Mesg sessionMesg = new Mesg("Session", MesgNum.Session);
- fieldIndex = 0;
- sessionMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("Event", 0, 0, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EventType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("StartTime", 2, 134, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("StartPositionLat", 3, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("StartPositionLong", 4, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("Sport", 5, 0, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("SubSport", 6, 0, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalElapsedTime", 7, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalTimerTime", 8, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalDistance", 9, 134, 100, 0, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalCycles", 10, 134, 1, 0, "cycles", false));
- subfieldIndex = 0;
- sessionMesg.fields[fieldIndex].subfields.Add(new Subfield("TotalStrides", 134, 1, 0, "strides"));
- sessionMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 1);
- sessionMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 11);
- subfieldIndex++;
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalCalories", 11, 132, 1, 0, "kcal", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalFatCalories", 13, 132, 1, 0, "kcal", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgSpeed", 14, 132, 1000, 0, "m/s", false));
- sessionMesg.fields[fieldIndex].components.Add(new FieldComponent(124, false, 16, 1000, 0)); // enhanced_avg_speed
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxSpeed", 15, 132, 1000, 0, "m/s", false));
- sessionMesg.fields[fieldIndex].components.Add(new FieldComponent(125, false, 16, 1000, 0)); // enhanced_max_speed
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgHeartRate", 16, 2, 1, 0, "bpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxHeartRate", 17, 2, 1, 0, "bpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgCadence", 18, 2, 1, 0, "rpm", false));
- subfieldIndex = 0;
- sessionMesg.fields[fieldIndex].subfields.Add(new Subfield("AvgRunningCadence", 2, 1, 0, "strides/min"));
- sessionMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 1);
- subfieldIndex++;
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxCadence", 19, 2, 1, 0, "rpm", false));
- subfieldIndex = 0;
- sessionMesg.fields[fieldIndex].subfields.Add(new Subfield("MaxRunningCadence", 2, 1, 0, "strides/min"));
- sessionMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 1);
- subfieldIndex++;
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgPower", 20, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxPower", 21, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalAscent", 22, 132, 1, 0, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalDescent", 23, 132, 1, 0, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalTrainingEffect", 24, 2, 10, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("FirstLapIndex", 25, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("NumLaps", 26, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EventGroup", 27, 2, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("Trigger", 28, 0, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("NecLat", 29, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("NecLong", 30, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("SwcLat", 31, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("SwcLong", 32, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("NormalizedPower", 34, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TrainingStressScore", 35, 132, 10, 0, "tss", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("IntensityFactor", 36, 132, 1000, 0, "if", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("LeftRightBalance", 37, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgStrokeCount", 41, 134, 10, 0, "strokes/lap", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgStrokeDistance", 42, 132, 100, 0, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("SwimStroke", 43, 0, 1, 0, "swim_stroke", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("PoolLength", 44, 132, 100, 0, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("ThresholdPower", 45, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("PoolLengthUnit", 46, 0, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("NumActiveLengths", 47, 132, 1, 0, "lengths", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalWork", 48, 134, 1, 0, "J", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgAltitude", 49, 132, 5, 500, "m", false));
- sessionMesg.fields[fieldIndex].components.Add(new FieldComponent(126, false, 16, 5, 500)); // enhanced_avg_altitude
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxAltitude", 50, 132, 5, 500, "m", false));
- sessionMesg.fields[fieldIndex].components.Add(new FieldComponent(128, false, 16, 5, 500)); // enhanced_max_altitude
- fieldIndex++;
- sessionMesg.SetField(new Field("GpsAccuracy", 51, 2, 1, 0, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgGrade", 52, 131, 100, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgPosGrade", 53, 131, 100, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgNegGrade", 54, 131, 100, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxPosGrade", 55, 131, 100, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxNegGrade", 56, 131, 100, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgTemperature", 57, 1, 1, 0, "C", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxTemperature", 58, 1, 1, 0, "C", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalMovingTime", 59, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgPosVerticalSpeed", 60, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgNegVerticalSpeed", 61, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxPosVerticalSpeed", 62, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxNegVerticalSpeed", 63, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MinHeartRate", 64, 2, 1, 0, "bpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TimeInHrZone", 65, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TimeInSpeedZone", 66, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TimeInCadenceZone", 67, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TimeInPowerZone", 68, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLapTime", 69, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("BestLapIndex", 70, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MinAltitude", 71, 132, 5, 500, "m", false));
- sessionMesg.fields[fieldIndex].components.Add(new FieldComponent(127, false, 16, 5, 500)); // enhanced_min_altitude
- fieldIndex++;
- sessionMesg.SetField(new Field("PlayerScore", 82, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("OpponentScore", 83, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("OpponentName", 84, 7, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("StrokeCount", 85, 132, 1, 0, "counts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("ZoneCount", 86, 132, 1, 0, "counts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxBallSpeed", 87, 132, 100, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgBallSpeed", 88, 132, 100, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgVerticalOscillation", 89, 132, 10, 0, "mm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgStanceTimePercent", 90, 132, 100, 0, "percent", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgStanceTime", 91, 132, 10, 0, "ms", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgFractionalCadence", 92, 2, 128, 0, "rpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxFractionalCadence", 93, 2, 128, 0, "rpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TotalFractionalCycles", 94, 2, 128, 0, "cycles", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgTotalHemoglobinConc", 95, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MinTotalHemoglobinConc", 96, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxTotalHemoglobinConc", 97, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgSaturatedHemoglobinPercent", 98, 132, 10, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MinSaturatedHemoglobinPercent", 99, 132, 10, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxSaturatedHemoglobinPercent", 100, 132, 10, 0, "%", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLeftTorqueEffectiveness", 101, 2, 2, 0, "percent", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgRightTorqueEffectiveness", 102, 2, 2, 0, "percent", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLeftPedalSmoothness", 103, 2, 2, 0, "percent", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgRightPedalSmoothness", 104, 2, 2, 0, "percent", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgCombinedPedalSmoothness", 105, 2, 2, 0, "percent", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("SportIndex", 111, 2, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("TimeStanding", 112, 134, 1000, 0, "s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("StandCount", 113, 132, 1, 0, "", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLeftPco", 114, 1, 1, 0, "mm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgRightPco", 115, 1, 1, 0, "mm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLeftPowerPhase", 116, 2, 1, 0, "degrees", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLeftPowerPhasePeak", 117, 2, 1, 0, "degrees", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgRightPowerPhase", 118, 2, 1, 0, "degrees", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgRightPowerPhasePeak", 119, 2, 1, 0, "degrees", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgPowerPosition", 120, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxPowerPosition", 121, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgCadencePosition", 122, 2, 1, 0, "rpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxCadencePosition", 123, 2, 1, 0, "rpm", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EnhancedAvgSpeed", 124, 134, 1000, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EnhancedMaxSpeed", 125, 134, 1000, 0, "m/s", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EnhancedAvgAltitude", 126, 134, 5, 500, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EnhancedMinAltitude", 127, 134, 5, 500, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("EnhancedMaxAltitude", 128, 134, 5, 500, "m", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("AvgLevMotorPower", 129, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("MaxLevMotorPower", 130, 132, 1, 0, "watts", false));
- fieldIndex++;
- sessionMesg.SetField(new Field("LevBatteryConsumption", 131, 2, 2, 0, "percent", false));
- fieldIndex++;
- mesgs.Add(sessionMesg);
- SessionIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Session, sessionMesg);
- mesgIndex++;
-
- // Lap
- Mesg lapMesg = new Mesg("Lap", MesgNum.Lap);
- fieldIndex = 0;
- lapMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("Event", 0, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EventType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("StartTime", 2, 134, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("StartPositionLat", 3, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- lapMesg.SetField(new Field("StartPositionLong", 4, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EndPositionLat", 5, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EndPositionLong", 6, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalElapsedTime", 7, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalTimerTime", 8, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalDistance", 9, 134, 100, 0, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalCycles", 10, 134, 1, 0, "cycles", false));
- subfieldIndex = 0;
- lapMesg.fields[fieldIndex].subfields.Add(new Subfield("TotalStrides", 134, 1, 0, "strides"));
- lapMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(25, 1);
- lapMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(25, 11);
- subfieldIndex++;
- fieldIndex++;
- lapMesg.SetField(new Field("TotalCalories", 11, 132, 1, 0, "kcal", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalFatCalories", 12, 132, 1, 0, "kcal", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgSpeed", 13, 132, 1000, 0, "m/s", false));
- lapMesg.fields[fieldIndex].components.Add(new FieldComponent(110, false, 16, 1000, 0)); // enhanced_avg_speed
- fieldIndex++;
- lapMesg.SetField(new Field("MaxSpeed", 14, 132, 1000, 0, "m/s", false));
- lapMesg.fields[fieldIndex].components.Add(new FieldComponent(111, false, 16, 1000, 0)); // enhanced_max_speed
- fieldIndex++;
- lapMesg.SetField(new Field("AvgHeartRate", 15, 2, 1, 0, "bpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxHeartRate", 16, 2, 1, 0, "bpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgCadence", 17, 2, 1, 0, "rpm", false));
- subfieldIndex = 0;
- lapMesg.fields[fieldIndex].subfields.Add(new Subfield("AvgRunningCadence", 2, 1, 0, "strides/min"));
- lapMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(25, 1);
- subfieldIndex++;
- fieldIndex++;
- lapMesg.SetField(new Field("MaxCadence", 18, 2, 1, 0, "rpm", false));
- subfieldIndex = 0;
- lapMesg.fields[fieldIndex].subfields.Add(new Subfield("MaxRunningCadence", 2, 1, 0, "strides/min"));
- lapMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(25, 1);
- subfieldIndex++;
- fieldIndex++;
- lapMesg.SetField(new Field("AvgPower", 19, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxPower", 20, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalAscent", 21, 132, 1, 0, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalDescent", 22, 132, 1, 0, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("Intensity", 23, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("LapTrigger", 24, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("Sport", 25, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EventGroup", 26, 2, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("NumLengths", 32, 132, 1, 0, "lengths", false));
- fieldIndex++;
- lapMesg.SetField(new Field("NormalizedPower", 33, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("LeftRightBalance", 34, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("FirstLengthIndex", 35, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgStrokeDistance", 37, 132, 100, 0, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("SwimStroke", 38, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("SubSport", 39, 0, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("NumActiveLengths", 40, 132, 1, 0, "lengths", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalWork", 41, 134, 1, 0, "J", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgAltitude", 42, 132, 5, 500, "m", false));
- lapMesg.fields[fieldIndex].components.Add(new FieldComponent(112, false, 16, 5, 500)); // enhanced_avg_altitude
- fieldIndex++;
- lapMesg.SetField(new Field("MaxAltitude", 43, 132, 5, 500, "m", false));
- lapMesg.fields[fieldIndex].components.Add(new FieldComponent(114, false, 16, 5, 500)); // enhanced_max_altitude
- fieldIndex++;
- lapMesg.SetField(new Field("GpsAccuracy", 44, 2, 1, 0, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgGrade", 45, 131, 100, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgPosGrade", 46, 131, 100, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgNegGrade", 47, 131, 100, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxPosGrade", 48, 131, 100, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxNegGrade", 49, 131, 100, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgTemperature", 50, 1, 1, 0, "C", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxTemperature", 51, 1, 1, 0, "C", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalMovingTime", 52, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgPosVerticalSpeed", 53, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgNegVerticalSpeed", 54, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxPosVerticalSpeed", 55, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxNegVerticalSpeed", 56, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TimeInHrZone", 57, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TimeInSpeedZone", 58, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TimeInCadenceZone", 59, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TimeInPowerZone", 60, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("RepetitionNum", 61, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MinAltitude", 62, 132, 5, 500, "m", false));
- lapMesg.fields[fieldIndex].components.Add(new FieldComponent(113, false, 16, 5, 500)); // enhanced_min_altitude
- fieldIndex++;
- lapMesg.SetField(new Field("MinHeartRate", 63, 2, 1, 0, "bpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("WktStepIndex", 71, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("OpponentScore", 74, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("StrokeCount", 75, 132, 1, 0, "counts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("ZoneCount", 76, 132, 1, 0, "counts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgVerticalOscillation", 77, 132, 10, 0, "mm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgStanceTimePercent", 78, 132, 100, 0, "percent", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgStanceTime", 79, 132, 10, 0, "ms", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgFractionalCadence", 80, 2, 128, 0, "rpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxFractionalCadence", 81, 2, 128, 0, "rpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TotalFractionalCycles", 82, 2, 128, 0, "cycles", false));
- fieldIndex++;
- lapMesg.SetField(new Field("PlayerScore", 83, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgTotalHemoglobinConc", 84, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MinTotalHemoglobinConc", 85, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxTotalHemoglobinConc", 86, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgSaturatedHemoglobinPercent", 87, 132, 10, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MinSaturatedHemoglobinPercent", 88, 132, 10, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxSaturatedHemoglobinPercent", 89, 132, 10, 0, "%", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgLeftTorqueEffectiveness", 91, 2, 2, 0, "percent", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgRightTorqueEffectiveness", 92, 2, 2, 0, "percent", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgLeftPedalSmoothness", 93, 2, 2, 0, "percent", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgRightPedalSmoothness", 94, 2, 2, 0, "percent", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgCombinedPedalSmoothness", 95, 2, 2, 0, "percent", false));
- fieldIndex++;
- lapMesg.SetField(new Field("TimeStanding", 98, 134, 1000, 0, "s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("StandCount", 99, 132, 1, 0, "", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgLeftPco", 100, 1, 1, 0, "mm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgRightPco", 101, 1, 1, 0, "mm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgLeftPowerPhase", 102, 2, 1, 0, "degrees", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgLeftPowerPhasePeak", 103, 2, 1, 0, "degrees", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgRightPowerPhase", 104, 2, 1, 0, "degrees", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgRightPowerPhasePeak", 105, 2, 1, 0, "degrees", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgPowerPosition", 106, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxPowerPosition", 107, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgCadencePosition", 108, 2, 1, 0, "rpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxCadencePosition", 109, 2, 1, 0, "rpm", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EnhancedAvgSpeed", 110, 134, 1000, 0, "m/s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EnhancedMaxSpeed", 111, 134, 1000, 0, "m/s", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EnhancedAvgAltitude", 112, 134, 5, 500, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EnhancedMinAltitude", 113, 134, 5, 500, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("EnhancedMaxAltitude", 114, 134, 5, 500, "m", false));
- fieldIndex++;
- lapMesg.SetField(new Field("AvgLevMotorPower", 115, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("MaxLevMotorPower", 116, 132, 1, 0, "watts", false));
- fieldIndex++;
- lapMesg.SetField(new Field("LevBatteryConsumption", 117, 2, 2, 0, "percent", false));
- fieldIndex++;
- mesgs.Add(lapMesg);
- LapIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Lap, lapMesg);
- mesgIndex++;
-
- // Length
- Mesg lengthMesg = new Mesg("Length", MesgNum.Length);
- fieldIndex = 0;
- lengthMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("Event", 0, 0, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("EventType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("StartTime", 2, 134, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("TotalElapsedTime", 3, 134, 1000, 0, "s", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("TotalTimerTime", 4, 134, 1000, 0, "s", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("TotalStrokes", 5, 132, 1, 0, "strokes", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("AvgSpeed", 6, 132, 1000, 0, "m/s", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("SwimStroke", 7, 0, 1, 0, "swim_stroke", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("AvgSwimmingCadence", 9, 2, 1, 0, "strokes/min", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("EventGroup", 10, 2, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("TotalCalories", 11, 132, 1, 0, "kcal", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("LengthType", 12, 0, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("PlayerScore", 18, 132, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("OpponentScore", 19, 132, 1, 0, "", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("StrokeCount", 20, 132, 1, 0, "counts", false));
- fieldIndex++;
- lengthMesg.SetField(new Field("ZoneCount", 21, 132, 1, 0, "counts", false));
- fieldIndex++;
- mesgs.Add(lengthMesg);
- LengthIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Length, lengthMesg);
- mesgIndex++;
-
- // Record
- Mesg recordMesg = new Mesg("Record", MesgNum.Record);
- fieldIndex = 0;
- recordMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("PositionLat", 0, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- recordMesg.SetField(new Field("PositionLong", 1, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Altitude", 2, 132, 5, 500, "m", false));
- recordMesg.fields[fieldIndex].components.Add(new FieldComponent(78, false, 16, 5, 500)); // enhanced_altitude
- fieldIndex++;
- recordMesg.SetField(new Field("HeartRate", 3, 2, 1, 0, "bpm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Cadence", 4, 2, 1, 0, "rpm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Distance", 5, 134, 100, 0, "m", true));
- fieldIndex++;
- recordMesg.SetField(new Field("Speed", 6, 132, 1000, 0, "m/s", false));
- recordMesg.fields[fieldIndex].components.Add(new FieldComponent(73, false, 16, 1000, 0)); // enhanced_speed
- fieldIndex++;
- recordMesg.SetField(new Field("Power", 7, 132, 1, 0, "watts", false));
- fieldIndex++;
- recordMesg.SetField(new Field("CompressedSpeedDistance", 8, 13, 1, 0, "", false));
- recordMesg.fields[fieldIndex].components.Add(new FieldComponent(6, false, 12, 100, 0)); // speed
- recordMesg.fields[fieldIndex].components.Add(new FieldComponent(5, true, 12, 16, 0)); // distance
- fieldIndex++;
- recordMesg.SetField(new Field("Grade", 9, 131, 100, 0, "%", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Resistance", 10, 2, 1, 0, "", false));
- fieldIndex++;
- recordMesg.SetField(new Field("TimeFromCourse", 11, 133, 1000, 0, "s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("CycleLength", 12, 2, 100, 0, "m", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Temperature", 13, 1, 1, 0, "C", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Speed1s", 17, 2, 16, 0, "m/s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Cycles", 18, 2, 1, 0, "cycles", false));
- recordMesg.fields[fieldIndex].components.Add(new FieldComponent(19, true, 8, 1, 0)); // total_cycles
- fieldIndex++;
- recordMesg.SetField(new Field("TotalCycles", 19, 134, 1, 0, "cycles", true));
- fieldIndex++;
- recordMesg.SetField(new Field("CompressedAccumulatedPower", 28, 132, 1, 0, "watts", false));
- recordMesg.fields[fieldIndex].components.Add(new FieldComponent(29, true, 16, 1, 0)); // accumulated_power
- fieldIndex++;
- recordMesg.SetField(new Field("AccumulatedPower", 29, 134, 1, 0, "watts", true));
- fieldIndex++;
- recordMesg.SetField(new Field("LeftRightBalance", 30, 2, 1, 0, "", false));
- fieldIndex++;
- recordMesg.SetField(new Field("GpsAccuracy", 31, 2, 1, 0, "m", false));
- fieldIndex++;
- recordMesg.SetField(new Field("VerticalSpeed", 32, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Calories", 33, 132, 1, 0, "kcal", false));
- fieldIndex++;
- recordMesg.SetField(new Field("VerticalOscillation", 39, 132, 10, 0, "mm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("StanceTimePercent", 40, 132, 100, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("StanceTime", 41, 132, 10, 0, "ms", false));
- fieldIndex++;
- recordMesg.SetField(new Field("ActivityType", 42, 0, 1, 0, "", false));
- fieldIndex++;
- recordMesg.SetField(new Field("LeftTorqueEffectiveness", 43, 2, 2, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("RightTorqueEffectiveness", 44, 2, 2, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("LeftPedalSmoothness", 45, 2, 2, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("RightPedalSmoothness", 46, 2, 2, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("CombinedPedalSmoothness", 47, 2, 2, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Time128", 48, 2, 128, 0, "s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("StrokeType", 49, 0, 1, 0, "", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Zone", 50, 2, 1, 0, "", false));
- fieldIndex++;
- recordMesg.SetField(new Field("BallSpeed", 51, 132, 100, 0, "m/s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("Cadence256", 52, 132, 256, 0, "rpm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("FractionalCadence", 53, 2, 128, 0, "rpm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("TotalHemoglobinConc", 54, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- recordMesg.SetField(new Field("TotalHemoglobinConcMin", 55, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- recordMesg.SetField(new Field("TotalHemoglobinConcMax", 56, 132, 100, 0, "g/dL", false));
- fieldIndex++;
- recordMesg.SetField(new Field("SaturatedHemoglobinPercent", 57, 132, 10, 0, "%", false));
- fieldIndex++;
- recordMesg.SetField(new Field("SaturatedHemoglobinPercentMin", 58, 132, 10, 0, "%", false));
- fieldIndex++;
- recordMesg.SetField(new Field("SaturatedHemoglobinPercentMax", 59, 132, 10, 0, "%", false));
- fieldIndex++;
- recordMesg.SetField(new Field("DeviceIndex", 62, 2, 1, 0, "", false));
- fieldIndex++;
- recordMesg.SetField(new Field("LeftPco", 67, 1, 1, 0, "mm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("RightPco", 68, 1, 1, 0, "mm", false));
- fieldIndex++;
- recordMesg.SetField(new Field("LeftPowerPhase", 69, 2, 1, 0, "degrees", false));
- fieldIndex++;
- recordMesg.SetField(new Field("LeftPowerPhasePeak", 70, 2, 1, 0, "degrees", false));
- fieldIndex++;
- recordMesg.SetField(new Field("RightPowerPhase", 71, 2, 1, 0, "degrees", false));
- fieldIndex++;
- recordMesg.SetField(new Field("RightPowerPhasePeak", 72, 2, 1, 0, "degrees", false));
- fieldIndex++;
- recordMesg.SetField(new Field("EnhancedSpeed", 73, 134, 1000, 0, "m/s", false));
- fieldIndex++;
- recordMesg.SetField(new Field("EnhancedAltitude", 78, 134, 5, 500, "m", false));
- fieldIndex++;
- recordMesg.SetField(new Field("BatterySoc", 81, 2, 2, 0, "percent", false));
- fieldIndex++;
- recordMesg.SetField(new Field("MotorPower", 82, 132, 1, 0, "watts", false));
- fieldIndex++;
- mesgs.Add(recordMesg);
- RecordIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Record, recordMesg);
- mesgIndex++;
-
- // Event
- Mesg eventMesg = new Mesg("Event", MesgNum.Event);
- fieldIndex = 0;
- eventMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- eventMesg.SetField(new Field("Event", 0, 0, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("EventType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("Data16", 2, 132, 1, 0, "", false));
- eventMesg.fields[fieldIndex].components.Add(new FieldComponent(3, false, 16, 1, 0)); // data
- fieldIndex++;
- eventMesg.SetField(new Field("Data", 3, 134, 1, 0, "", false));
- subfieldIndex = 0;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("TimerTrigger", 0, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 0);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("CoursePointIndex", 132, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 10);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("BatteryLevel", 132, 1000, 0, "V"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 11);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("VirtualPartnerSpeed", 132, 1000, 0, "m/s"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 12);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("HrHighAlert", 2, 1, 0, "bpm"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 13);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("HrLowAlert", 2, 1, 0, "bpm"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 14);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("SpeedHighAlert", 134, 1000, 0, "m/s"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 15);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("SpeedLowAlert", 134, 1000, 0, "m/s"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 16);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("CadHighAlert", 132, 1, 0, "rpm"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 17);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("CadLowAlert", 132, 1, 0, "rpm"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 18);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("PowerHighAlert", 132, 1, 0, "watts"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 19);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("PowerLowAlert", 132, 1, 0, "watts"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 20);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("TimeDurationAlert", 134, 1000, 0, "s"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 23);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("DistanceDurationAlert", 134, 100, 0, "m"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 24);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("CalorieDurationAlert", 134, 1, 0, "calories"));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 25);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("FitnessEquipmentState", 0, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 27);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("SportPoint", 134, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 33);
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddComponent(new FieldComponent(7, false, 16, 1, 0)); // score
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddComponent(new FieldComponent(8, false, 16, 1, 0)); // opponent_score
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("GearChangeData", 134, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 42);
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 43);
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddComponent(new FieldComponent(11, false, 8, 1, 0)); // rear_gear_num
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddComponent(new FieldComponent(12, false, 8, 1, 0)); // rear_gear
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddComponent(new FieldComponent(9, false, 8, 1, 0)); // front_gear_num
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddComponent(new FieldComponent(10, false, 8, 1, 0)); // front_gear
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("RiderPosition", 0, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 44);
- subfieldIndex++;
- eventMesg.fields[fieldIndex].subfields.Add(new Subfield("CommTimeout", 132, 1, 0, ""));
- eventMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 47);
- subfieldIndex++;
- fieldIndex++;
- eventMesg.SetField(new Field("EventGroup", 4, 2, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("Score", 7, 132, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("OpponentScore", 8, 132, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("FrontGearNum", 9, 10, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("FrontGear", 10, 10, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("RearGearNum", 11, 10, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("RearGear", 12, 10, 1, 0, "", false));
- fieldIndex++;
- eventMesg.SetField(new Field("DeviceIndex", 13, 2, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(eventMesg);
- EventIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Event, eventMesg);
- mesgIndex++;
-
- // DeviceInfo
- Mesg deviceInfoMesg = new Mesg("DeviceInfo", MesgNum.DeviceInfo);
- fieldIndex = 0;
- deviceInfoMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("DeviceIndex", 0, 2, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("DeviceType", 1, 2, 1, 0, "", false));
- subfieldIndex = 0;
- deviceInfoMesg.fields[fieldIndex].subfields.Add(new Subfield("AntplusDeviceType", 2, 1, 0, ""));
- deviceInfoMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(25, 1);
- subfieldIndex++;
- deviceInfoMesg.fields[fieldIndex].subfields.Add(new Subfield("AntDeviceType", 2, 1, 0, ""));
- deviceInfoMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(25, 0);
- subfieldIndex++;
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("Manufacturer", 2, 132, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("SerialNumber", 3, 140, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("Product", 4, 132, 1, 0, "", false));
- subfieldIndex = 0;
- deviceInfoMesg.fields[fieldIndex].subfields.Add(new Subfield("GarminProduct", 132, 1, 0, ""));
- deviceInfoMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(2, 1);
- deviceInfoMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(2, 15);
- deviceInfoMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(2, 13);
- subfieldIndex++;
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("SoftwareVersion", 5, 132, 100, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("HardwareVersion", 6, 2, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("CumOperatingTime", 7, 134, 1, 0, "s", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("BatteryVoltage", 10, 132, 256, 0, "V", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("BatteryStatus", 11, 2, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("SensorPosition", 18, 0, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("Descriptor", 19, 7, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("AntTransmissionType", 20, 10, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("AntDeviceNumber", 21, 139, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("AntNetwork", 22, 0, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("SourceType", 25, 0, 1, 0, "", false));
- fieldIndex++;
- deviceInfoMesg.SetField(new Field("ProductName", 27, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(deviceInfoMesg);
- DeviceInfoIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.DeviceInfo, deviceInfoMesg);
- mesgIndex++;
-
- // TrainingFile
- Mesg trainingFileMesg = new Mesg("TrainingFile", MesgNum.TrainingFile);
- fieldIndex = 0;
- trainingFileMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "", false));
- fieldIndex++;
- trainingFileMesg.SetField(new Field("Type", 0, 0, 1, 0, "", false));
- fieldIndex++;
- trainingFileMesg.SetField(new Field("Manufacturer", 1, 132, 1, 0, "", false));
- fieldIndex++;
- trainingFileMesg.SetField(new Field("Product", 2, 132, 1, 0, "", false));
- subfieldIndex = 0;
- trainingFileMesg.fields[fieldIndex].subfields.Add(new Subfield("GarminProduct", 132, 1, 0, ""));
- trainingFileMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 1);
- trainingFileMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 15);
- trainingFileMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 13);
- subfieldIndex++;
- fieldIndex++;
- trainingFileMesg.SetField(new Field("SerialNumber", 3, 140, 1, 0, "", false));
- fieldIndex++;
- trainingFileMesg.SetField(new Field("TimeCreated", 4, 134, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(trainingFileMesg);
- TrainingFileIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.TrainingFile, trainingFileMesg);
- mesgIndex++;
-
- // Hrv
- Mesg hrvMesg = new Mesg("Hrv", MesgNum.Hrv);
- fieldIndex = 0;
- hrvMesg.SetField(new Field("Time", 0, 132, 1000, 0, "s", false));
- fieldIndex++;
- mesgs.Add(hrvMesg);
- HrvIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Hrv, hrvMesg);
- mesgIndex++;
-
- // CameraEvent
- Mesg cameraEventMesg = new Mesg("CameraEvent", MesgNum.CameraEvent);
- fieldIndex = 0;
- cameraEventMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- cameraEventMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- cameraEventMesg.SetField(new Field("CameraEventType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- cameraEventMesg.SetField(new Field("CameraFileUuid", 2, 7, 1, 0, "", false));
- fieldIndex++;
- cameraEventMesg.SetField(new Field("CameraOrientation", 3, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(cameraEventMesg);
- CameraEventIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.CameraEvent, cameraEventMesg);
- mesgIndex++;
-
- // GyroscopeData
- Mesg gyroscopeDataMesg = new Mesg("GyroscopeData", MesgNum.GyroscopeData);
- fieldIndex = 0;
- gyroscopeDataMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("SampleTimeOffset", 1, 132, 1, 0, "ms", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("GyroX", 2, 132, 1, 0, "counts", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("GyroY", 3, 132, 1, 0, "counts", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("GyroZ", 4, 132, 1, 0, "counts", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("CalibratedGyroX", 5, 136, 1, 0, "deg/s", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("CalibratedGyroY", 6, 136, 1, 0, "deg/s", false));
- fieldIndex++;
- gyroscopeDataMesg.SetField(new Field("CalibratedGyroZ", 7, 136, 1, 0, "deg/s", false));
- fieldIndex++;
- mesgs.Add(gyroscopeDataMesg);
- GyroscopeDataIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.GyroscopeData, gyroscopeDataMesg);
- mesgIndex++;
-
- // AccelerometerData
- Mesg accelerometerDataMesg = new Mesg("AccelerometerData", MesgNum.AccelerometerData);
- fieldIndex = 0;
- accelerometerDataMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("SampleTimeOffset", 1, 132, 1, 0, "ms", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("AccelX", 2, 132, 1, 0, "counts", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("AccelY", 3, 132, 1, 0, "counts", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("AccelZ", 4, 132, 1, 0, "counts", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("CalibratedAccelX", 5, 136, 1, 0, "g", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("CalibratedAccelY", 6, 136, 1, 0, "g", false));
- fieldIndex++;
- accelerometerDataMesg.SetField(new Field("CalibratedAccelZ", 7, 136, 1, 0, "g", false));
- fieldIndex++;
- mesgs.Add(accelerometerDataMesg);
- AccelerometerDataIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.AccelerometerData, accelerometerDataMesg);
- mesgIndex++;
-
- // ThreeDSensorCalibration
- Mesg threeDSensorCalibrationMesg = new Mesg("ThreeDSensorCalibration", MesgNum.ThreeDSensorCalibration);
- fieldIndex = 0;
- threeDSensorCalibrationMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- threeDSensorCalibrationMesg.SetField(new Field("SensorType", 0, 0, 1, 0, "", false));
- fieldIndex++;
- threeDSensorCalibrationMesg.SetField(new Field("CalibrationFactor", 1, 134, 1, 0, "", false));
- subfieldIndex = 0;
- threeDSensorCalibrationMesg.fields[fieldIndex].subfields.Add(new Subfield("AccelCalFactor", 134, 1, 0, "g"));
- threeDSensorCalibrationMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 0);
- subfieldIndex++;
- threeDSensorCalibrationMesg.fields[fieldIndex].subfields.Add(new Subfield("GyroCalFactor", 134, 1, 0, "deg/s"));
- threeDSensorCalibrationMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 1);
- subfieldIndex++;
- fieldIndex++;
- threeDSensorCalibrationMesg.SetField(new Field("CalibrationDivisor", 2, 134, 1, 0, "counts", false));
- fieldIndex++;
- threeDSensorCalibrationMesg.SetField(new Field("LevelShift", 3, 134, 1, 0, "", false));
- fieldIndex++;
- threeDSensorCalibrationMesg.SetField(new Field("OffsetCal", 4, 133, 1, 0, "", false));
- fieldIndex++;
- threeDSensorCalibrationMesg.SetField(new Field("OrientationMatrix", 5, 133, 65535, 0, "", false));
- fieldIndex++;
- mesgs.Add(threeDSensorCalibrationMesg);
- ThreeDSensorCalibrationIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.ThreeDSensorCalibration, threeDSensorCalibrationMesg);
- mesgIndex++;
-
- // VideoFrame
- Mesg videoFrameMesg = new Mesg("VideoFrame", MesgNum.VideoFrame);
- fieldIndex = 0;
- videoFrameMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- videoFrameMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- videoFrameMesg.SetField(new Field("FrameNumber", 1, 134, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(videoFrameMesg);
- VideoFrameIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.VideoFrame, videoFrameMesg);
- mesgIndex++;
-
- // ObdiiData
- Mesg obdiiDataMesg = new Mesg("ObdiiData", MesgNum.ObdiiData);
- fieldIndex = 0;
- obdiiDataMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("TimeOffset", 1, 132, 1, 0, "ms", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("Pid", 2, 13, 1, 0, "", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("RawData", 3, 13, 1, 0, "", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("PidDataSize", 4, 2, 1, 0, "", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("SystemTime", 5, 134, 1, 0, "", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("StartTimestamp", 6, 134, 1, 0, "", false));
- fieldIndex++;
- obdiiDataMesg.SetField(new Field("StartTimestampMs", 7, 132, 1, 0, "ms", false));
- fieldIndex++;
- mesgs.Add(obdiiDataMesg);
- ObdiiDataIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.ObdiiData, obdiiDataMesg);
- mesgIndex++;
-
- // NmeaSentence
- Mesg nmeaSentenceMesg = new Mesg("NmeaSentence", MesgNum.NmeaSentence);
- fieldIndex = 0;
- nmeaSentenceMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- nmeaSentenceMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- nmeaSentenceMesg.SetField(new Field("Sentence", 1, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(nmeaSentenceMesg);
- NmeaSentenceIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.NmeaSentence, nmeaSentenceMesg);
- mesgIndex++;
-
- // AviationAttitude
- Mesg aviationAttitudeMesg = new Mesg("AviationAttitude", MesgNum.AviationAttitude);
- fieldIndex = 0;
- aviationAttitudeMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("TimestampMs", 0, 132, 1, 0, "ms", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("SystemTime", 1, 134, 1, 0, "ms", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("Pitch", 2, 131, 1, 0, "radians", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("Roll", 3, 131, 1, 0, "radians", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("AccelLateral", 4, 131, 100, 0, "m/s^2", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("AccelNormal", 5, 131, 100, 0, "m/s^2", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("TurnRate", 6, 131, 1024, 0, "radians/second", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("Stage", 7, 0, 1, 0, "", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("AttitudeStageComplete", 8, 2, 1, 0, "%", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("Track", 9, 132, 1, 0, "radians", false));
- fieldIndex++;
- aviationAttitudeMesg.SetField(new Field("Validity", 10, 132, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(aviationAttitudeMesg);
- AviationAttitudeIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.AviationAttitude, aviationAttitudeMesg);
- mesgIndex++;
-
- // Video
- Mesg videoMesg = new Mesg("Video", MesgNum.Video);
- fieldIndex = 0;
- videoMesg.SetField(new Field("Url", 0, 7, 1, 0, "", false));
- fieldIndex++;
- videoMesg.SetField(new Field("HostingProvider", 1, 7, 1, 0, "", false));
- fieldIndex++;
- videoMesg.SetField(new Field("Duration", 2, 134, 1, 0, "ms", false));
- fieldIndex++;
- mesgs.Add(videoMesg);
- VideoIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Video, videoMesg);
- mesgIndex++;
-
- // VideoTitle
- Mesg videoTitleMesg = new Mesg("VideoTitle", MesgNum.VideoTitle);
- fieldIndex = 0;
- videoTitleMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- videoTitleMesg.SetField(new Field("MessageCount", 0, 132, 1, 0, "", false));
- fieldIndex++;
- videoTitleMesg.SetField(new Field("Text", 1, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(videoTitleMesg);
- VideoTitleIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.VideoTitle, videoTitleMesg);
- mesgIndex++;
-
- // VideoDescription
- Mesg videoDescriptionMesg = new Mesg("VideoDescription", MesgNum.VideoDescription);
- fieldIndex = 0;
- videoDescriptionMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- videoDescriptionMesg.SetField(new Field("MessageCount", 0, 132, 1, 0, "", false));
- fieldIndex++;
- videoDescriptionMesg.SetField(new Field("Text", 1, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(videoDescriptionMesg);
- VideoDescriptionIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.VideoDescription, videoDescriptionMesg);
- mesgIndex++;
-
- // VideoClip
- Mesg videoClipMesg = new Mesg("VideoClip", MesgNum.VideoClip);
- fieldIndex = 0;
- videoClipMesg.SetField(new Field("ClipNumber", 0, 132, 1, 0, "", false));
- fieldIndex++;
- videoClipMesg.SetField(new Field("StartTimestamp", 1, 134, 1, 0, "", false));
- fieldIndex++;
- videoClipMesg.SetField(new Field("StartTimestampMs", 2, 132, 1, 0, "", false));
- fieldIndex++;
- videoClipMesg.SetField(new Field("EndTimestamp", 3, 134, 1, 0, "", false));
- fieldIndex++;
- videoClipMesg.SetField(new Field("EndTimestampMs", 4, 132, 1, 0, "", false));
- fieldIndex++;
- videoClipMesg.SetField(new Field("ClipStart", 6, 134, 1, 0, "ms", false));
- fieldIndex++;
- videoClipMesg.SetField(new Field("ClipEnd", 7, 134, 1, 0, "ms", false));
- fieldIndex++;
- mesgs.Add(videoClipMesg);
- VideoClipIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.VideoClip, videoClipMesg);
- mesgIndex++;
-
- // Course
- Mesg courseMesg = new Mesg("Course", MesgNum.Course);
- fieldIndex = 0;
- courseMesg.SetField(new Field("Sport", 4, 0, 1, 0, "", false));
- fieldIndex++;
- courseMesg.SetField(new Field("Name", 5, 7, 1, 0, "", false));
- fieldIndex++;
- courseMesg.SetField(new Field("Capabilities", 6, 140, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(courseMesg);
- CourseIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Course, courseMesg);
- mesgIndex++;
-
- // CoursePoint
- Mesg coursePointMesg = new Mesg("CoursePoint", MesgNum.CoursePoint);
- fieldIndex = 0;
- coursePointMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("Timestamp", 1, 134, 1, 0, "", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("PositionLat", 2, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("PositionLong", 3, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("Distance", 4, 134, 100, 0, "m", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("Type", 5, 0, 1, 0, "", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("Name", 6, 7, 1, 0, "", false));
- fieldIndex++;
- coursePointMesg.SetField(new Field("Favorite", 8, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(coursePointMesg);
- CoursePointIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.CoursePoint, coursePointMesg);
- mesgIndex++;
-
- // SegmentId
- Mesg segmentIdMesg = new Mesg("SegmentId", MesgNum.SegmentId);
- fieldIndex = 0;
- segmentIdMesg.SetField(new Field("Name", 0, 7, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("Uuid", 1, 7, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("Sport", 2, 0, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("Enabled", 3, 0, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("UserProfilePrimaryKey", 4, 134, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("DeviceId", 5, 134, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("DefaultRaceLeader", 6, 2, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("DeleteStatus", 7, 0, 1, 0, "", false));
- fieldIndex++;
- segmentIdMesg.SetField(new Field("SelectionType", 8, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(segmentIdMesg);
- SegmentIdIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SegmentId, segmentIdMesg);
- mesgIndex++;
-
- // SegmentLeaderboardEntry
- Mesg segmentLeaderboardEntryMesg = new Mesg("SegmentLeaderboardEntry", MesgNum.SegmentLeaderboardEntry);
- fieldIndex = 0;
- segmentLeaderboardEntryMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLeaderboardEntryMesg.SetField(new Field("Name", 0, 7, 1, 0, "", false));
- fieldIndex++;
- segmentLeaderboardEntryMesg.SetField(new Field("Type", 1, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLeaderboardEntryMesg.SetField(new Field("GroupPrimaryKey", 2, 134, 1, 0, "", false));
- fieldIndex++;
- segmentLeaderboardEntryMesg.SetField(new Field("ActivityId", 3, 134, 1, 0, "", false));
- fieldIndex++;
- segmentLeaderboardEntryMesg.SetField(new Field("SegmentTime", 4, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLeaderboardEntryMesg.SetField(new Field("ActivityIdString", 5, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(segmentLeaderboardEntryMesg);
- SegmentLeaderboardEntryIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SegmentLeaderboardEntry, segmentLeaderboardEntryMesg);
- mesgIndex++;
-
- // SegmentPoint
- Mesg segmentPointMesg = new Mesg("SegmentPoint", MesgNum.SegmentPoint);
- fieldIndex = 0;
- segmentPointMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- segmentPointMesg.SetField(new Field("PositionLat", 1, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentPointMesg.SetField(new Field("PositionLong", 2, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentPointMesg.SetField(new Field("Distance", 3, 134, 100, 0, "m", false));
- fieldIndex++;
- segmentPointMesg.SetField(new Field("Altitude", 4, 132, 5, 500, "m", false));
- fieldIndex++;
- segmentPointMesg.SetField(new Field("LeaderTime", 5, 134, 1000, 0, "s", false));
- fieldIndex++;
- mesgs.Add(segmentPointMesg);
- SegmentPointIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SegmentPoint, segmentPointMesg);
- mesgIndex++;
-
- // SegmentLap
- Mesg segmentLapMesg = new Mesg("SegmentLap", MesgNum.SegmentLap);
- fieldIndex = 0;
- segmentLapMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("Event", 0, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("EventType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("StartTime", 2, 134, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("StartPositionLat", 3, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("StartPositionLong", 4, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("EndPositionLat", 5, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("EndPositionLong", 6, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalElapsedTime", 7, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalTimerTime", 8, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalDistance", 9, 134, 100, 0, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalCycles", 10, 134, 1, 0, "cycles", false));
- subfieldIndex = 0;
- segmentLapMesg.fields[fieldIndex].subfields.Add(new Subfield("TotalStrokes", 134, 1, 0, "strokes"));
- segmentLapMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(23, 2);
- subfieldIndex++;
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalCalories", 11, 132, 1, 0, "kcal", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalFatCalories", 12, 132, 1, 0, "kcal", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgSpeed", 13, 132, 1000, 0, "m/s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxSpeed", 14, 132, 1000, 0, "m/s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgHeartRate", 15, 2, 1, 0, "bpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxHeartRate", 16, 2, 1, 0, "bpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgCadence", 17, 2, 1, 0, "rpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxCadence", 18, 2, 1, 0, "rpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgPower", 19, 132, 1, 0, "watts", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxPower", 20, 132, 1, 0, "watts", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalAscent", 21, 132, 1, 0, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalDescent", 22, 132, 1, 0, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("Sport", 23, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("EventGroup", 24, 2, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("NecLat", 25, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("NecLong", 26, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("SwcLat", 27, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("SwcLong", 28, 133, 1, 0, "semicircles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("Name", 29, 7, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("NormalizedPower", 30, 132, 1, 0, "watts", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("LeftRightBalance", 31, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("SubSport", 32, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalWork", 33, 134, 1, 0, "J", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgAltitude", 34, 132, 5, 500, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxAltitude", 35, 132, 5, 500, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("GpsAccuracy", 36, 2, 1, 0, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgGrade", 37, 131, 100, 0, "%", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgPosGrade", 38, 131, 100, 0, "%", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgNegGrade", 39, 131, 100, 0, "%", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxPosGrade", 40, 131, 100, 0, "%", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxNegGrade", 41, 131, 100, 0, "%", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgTemperature", 42, 1, 1, 0, "C", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxTemperature", 43, 1, 1, 0, "C", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalMovingTime", 44, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgPosVerticalSpeed", 45, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgNegVerticalSpeed", 46, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxPosVerticalSpeed", 47, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxNegVerticalSpeed", 48, 131, 1000, 0, "m/s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TimeInHrZone", 49, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TimeInSpeedZone", 50, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TimeInCadenceZone", 51, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TimeInPowerZone", 52, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("RepetitionNum", 53, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MinAltitude", 54, 132, 5, 500, "m", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MinHeartRate", 55, 2, 1, 0, "bpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("ActiveTime", 56, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("WktStepIndex", 57, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("SportEvent", 58, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgLeftTorqueEffectiveness", 59, 2, 2, 0, "percent", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgRightTorqueEffectiveness", 60, 2, 2, 0, "percent", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgLeftPedalSmoothness", 61, 2, 2, 0, "percent", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgRightPedalSmoothness", 62, 2, 2, 0, "percent", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgCombinedPedalSmoothness", 63, 2, 2, 0, "percent", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("Status", 64, 0, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("Uuid", 65, 7, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgFractionalCadence", 66, 2, 128, 0, "rpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxFractionalCadence", 67, 2, 128, 0, "rpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TotalFractionalCycles", 68, 2, 128, 0, "cycles", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("FrontGearShiftCount", 69, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("RearGearShiftCount", 70, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("TimeStanding", 71, 134, 1000, 0, "s", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("StandCount", 72, 132, 1, 0, "", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgLeftPco", 73, 1, 1, 0, "mm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgRightPco", 74, 1, 1, 0, "mm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgLeftPowerPhase", 75, 2, 1, 0, "degrees", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgLeftPowerPhasePeak", 76, 2, 1, 0, "degrees", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgRightPowerPhase", 77, 2, 1, 0, "degrees", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgRightPowerPhasePeak", 78, 2, 1, 0, "degrees", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgPowerPosition", 79, 132, 1, 0, "watts", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxPowerPosition", 80, 132, 1, 0, "watts", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("AvgCadencePosition", 81, 2, 1, 0, "rpm", false));
- fieldIndex++;
- segmentLapMesg.SetField(new Field("MaxCadencePosition", 82, 2, 1, 0, "rpm", false));
- fieldIndex++;
- mesgs.Add(segmentLapMesg);
- SegmentLapIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SegmentLap, segmentLapMesg);
- mesgIndex++;
-
- // SegmentFile
- Mesg segmentFileMesg = new Mesg("SegmentFile", MesgNum.SegmentFile);
- fieldIndex = 0;
- segmentFileMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("FileUuid", 1, 7, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("Enabled", 3, 0, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("UserProfilePrimaryKey", 4, 134, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("LeaderType", 7, 0, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("LeaderGroupPrimaryKey", 8, 134, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("LeaderActivityId", 9, 134, 1, 0, "", false));
- fieldIndex++;
- segmentFileMesg.SetField(new Field("LeaderActivityIdString", 10, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(segmentFileMesg);
- SegmentFileIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.SegmentFile, segmentFileMesg);
- mesgIndex++;
-
- // Workout
- Mesg workoutMesg = new Mesg("Workout", MesgNum.Workout);
- fieldIndex = 0;
- workoutMesg.SetField(new Field("Sport", 4, 0, 1, 0, "", false));
- fieldIndex++;
- workoutMesg.SetField(new Field("Capabilities", 5, 140, 1, 0, "", false));
- fieldIndex++;
- workoutMesg.SetField(new Field("NumValidSteps", 6, 132, 1, 0, "", false));
- fieldIndex++;
- workoutMesg.SetField(new Field("WktName", 8, 7, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(workoutMesg);
- WorkoutIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Workout, workoutMesg);
- mesgIndex++;
-
- // WorkoutStep
- Mesg workoutStepMesg = new Mesg("WorkoutStep", MesgNum.WorkoutStep);
- fieldIndex = 0;
- workoutStepMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- workoutStepMesg.SetField(new Field("WktStepName", 0, 7, 1, 0, "", false));
- fieldIndex++;
- workoutStepMesg.SetField(new Field("DurationType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- workoutStepMesg.SetField(new Field("DurationValue", 2, 134, 1, 0, "", false));
- subfieldIndex = 0;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("DurationTime", 134, 1000, 0, "s"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 0);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 28);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("DurationDistance", 134, 100, 0, "m"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 1);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("DurationHr", 134, 1, 0, "% or bpm"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 2);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 3);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("DurationCalories", 134, 1, 0, "calories"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 4);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("DurationStep", 134, 1, 0, ""));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 6);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 7);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 8);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 9);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 10);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 11);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 12);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 13);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("DurationPower", 134, 1, 0, "% or watts"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 14);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 15);
- subfieldIndex++;
- fieldIndex++;
- workoutStepMesg.SetField(new Field("TargetType", 3, 0, 1, 0, "", false));
- fieldIndex++;
- workoutStepMesg.SetField(new Field("TargetValue", 4, 134, 1, 0, "", false));
- subfieldIndex = 0;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("TargetHrZone", 134, 1, 0, ""));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 1);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("TargetPowerZone", 134, 1, 0, ""));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 4);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("RepeatSteps", 134, 1, 0, ""));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 6);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("RepeatTime", 134, 1000, 0, "s"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 7);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("RepeatDistance", 134, 100, 0, "m"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 8);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("RepeatCalories", 134, 1, 0, "calories"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 9);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("RepeatHr", 134, 1, 0, "% or bpm"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 10);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 11);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("RepeatPower", 134, 1, 0, "% or watts"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 12);
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(1, 13);
- subfieldIndex++;
- fieldIndex++;
- workoutStepMesg.SetField(new Field("CustomTargetValueLow", 5, 134, 1, 0, "", false));
- subfieldIndex = 0;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetSpeedLow", 134, 1000, 0, "m/s"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 0);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetHeartRateLow", 134, 1, 0, "% or bpm"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 1);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetCadenceLow", 134, 1, 0, "rpm"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 3);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetPowerLow", 134, 1, 0, "% or watts"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 4);
- subfieldIndex++;
- fieldIndex++;
- workoutStepMesg.SetField(new Field("CustomTargetValueHigh", 6, 134, 1, 0, "", false));
- subfieldIndex = 0;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetSpeedHigh", 134, 1000, 0, "m/s"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 0);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetHeartRateHigh", 134, 1, 0, "% or bpm"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 1);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetCadenceHigh", 134, 1, 0, "rpm"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 3);
- subfieldIndex++;
- workoutStepMesg.fields[fieldIndex].subfields.Add(new Subfield("CustomTargetPowerHigh", 134, 1, 0, "% or watts"));
- workoutStepMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(3, 4);
- subfieldIndex++;
- fieldIndex++;
- workoutStepMesg.SetField(new Field("Intensity", 7, 0, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(workoutStepMesg);
- WorkoutStepIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.WorkoutStep, workoutStepMesg);
- mesgIndex++;
-
- // Schedule
- Mesg scheduleMesg = new Mesg("Schedule", MesgNum.Schedule);
- fieldIndex = 0;
- scheduleMesg.SetField(new Field("Manufacturer", 0, 132, 1, 0, "", false));
- fieldIndex++;
- scheduleMesg.SetField(new Field("Product", 1, 132, 1, 0, "", false));
- subfieldIndex = 0;
- scheduleMesg.fields[fieldIndex].subfields.Add(new Subfield("GarminProduct", 132, 1, 0, ""));
- scheduleMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 1);
- scheduleMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 15);
- scheduleMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(0, 13);
- subfieldIndex++;
- fieldIndex++;
- scheduleMesg.SetField(new Field("SerialNumber", 2, 140, 1, 0, "", false));
- fieldIndex++;
- scheduleMesg.SetField(new Field("TimeCreated", 3, 134, 1, 0, "", false));
- fieldIndex++;
- scheduleMesg.SetField(new Field("Completed", 4, 0, 1, 0, "", false));
- fieldIndex++;
- scheduleMesg.SetField(new Field("Type", 5, 0, 1, 0, "", false));
- fieldIndex++;
- scheduleMesg.SetField(new Field("ScheduledTime", 6, 134, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(scheduleMesg);
- ScheduleIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Schedule, scheduleMesg);
- mesgIndex++;
-
- // Totals
- Mesg totalsMesg = new Mesg("Totals", MesgNum.Totals);
- fieldIndex = 0;
- totalsMesg.SetField(new Field("MessageIndex", 254, 132, 1, 0, "", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("TimerTime", 0, 134, 1, 0, "s", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("Distance", 1, 134, 1, 0, "m", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("Calories", 2, 134, 1, 0, "kcal", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("Sport", 3, 0, 1, 0, "", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("ElapsedTime", 4, 134, 1, 0, "s", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("Sessions", 5, 132, 1, 0, "", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("ActiveTime", 6, 134, 1, 0, "s", false));
- fieldIndex++;
- totalsMesg.SetField(new Field("SportIndex", 9, 2, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(totalsMesg);
- TotalsIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Totals, totalsMesg);
- mesgIndex++;
-
- // WeightScale
- Mesg weightScaleMesg = new Mesg("WeightScale", MesgNum.WeightScale);
- fieldIndex = 0;
- weightScaleMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("Weight", 0, 132, 100, 0, "kg", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("PercentFat", 1, 132, 100, 0, "%", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("PercentHydration", 2, 132, 100, 0, "%", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("VisceralFatMass", 3, 132, 100, 0, "kg", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("BoneMass", 4, 132, 100, 0, "kg", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("MuscleMass", 5, 132, 100, 0, "kg", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("BasalMet", 7, 132, 4, 0, "kcal/day", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("PhysiqueRating", 8, 2, 1, 0, "", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("ActiveMet", 9, 132, 4, 0, "kcal/day", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("MetabolicAge", 10, 2, 1, 0, "years", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("VisceralFatRating", 11, 2, 1, 0, "", false));
- fieldIndex++;
- weightScaleMesg.SetField(new Field("UserProfileIndex", 12, 132, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(weightScaleMesg);
- WeightScaleIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.WeightScale, weightScaleMesg);
- mesgIndex++;
-
- // BloodPressure
- Mesg bloodPressureMesg = new Mesg("BloodPressure", MesgNum.BloodPressure);
- fieldIndex = 0;
- bloodPressureMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("SystolicPressure", 0, 132, 1, 0, "mmHg", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("DiastolicPressure", 1, 132, 1, 0, "mmHg", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("MeanArterialPressure", 2, 132, 1, 0, "mmHg", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("Map3SampleMean", 3, 132, 1, 0, "mmHg", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("MapMorningValues", 4, 132, 1, 0, "mmHg", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("MapEveningValues", 5, 132, 1, 0, "mmHg", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("HeartRate", 6, 2, 1, 0, "bpm", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("HeartRateType", 7, 0, 1, 0, "", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("Status", 8, 0, 1, 0, "", false));
- fieldIndex++;
- bloodPressureMesg.SetField(new Field("UserProfileIndex", 9, 132, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(bloodPressureMesg);
- BloodPressureIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.BloodPressure, bloodPressureMesg);
- mesgIndex++;
-
- // MonitoringInfo
- Mesg monitoringInfoMesg = new Mesg("MonitoringInfo", MesgNum.MonitoringInfo);
- fieldIndex = 0;
- monitoringInfoMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- monitoringInfoMesg.SetField(new Field("LocalTimestamp", 0, 134, 1, 0, "s", false));
- fieldIndex++;
- monitoringInfoMesg.SetField(new Field("ActivityType", 1, 0, 1, 0, "", false));
- fieldIndex++;
- monitoringInfoMesg.SetField(new Field("CyclesToDistance", 3, 132, 5000, 0, "m/cycle", false));
- fieldIndex++;
- monitoringInfoMesg.SetField(new Field("CyclesToCalories", 4, 132, 5000, 0, "kcal/cycle", false));
- fieldIndex++;
- monitoringInfoMesg.SetField(new Field("RestingMetabolicRate", 5, 132, 1, 0, "kcal / day", false));
- fieldIndex++;
- mesgs.Add(monitoringInfoMesg);
- MonitoringInfoIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.MonitoringInfo, monitoringInfoMesg);
- mesgIndex++;
-
- // Monitoring
- Mesg monitoringMesg = new Mesg("Monitoring", MesgNum.Monitoring);
- fieldIndex = 0;
- monitoringMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("DeviceIndex", 0, 2, 1, 0, "", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Calories", 1, 132, 1, 0, "kcal", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Distance", 2, 134, 100, 0, "m", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Cycles", 3, 134, 2, 0, "cycles", false));
- subfieldIndex = 0;
- monitoringMesg.fields[fieldIndex].subfields.Add(new Subfield("Steps", 134, 1, 0, "steps"));
- monitoringMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 6);
- monitoringMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 1);
- subfieldIndex++;
- monitoringMesg.fields[fieldIndex].subfields.Add(new Subfield("Strokes", 134, 2, 0, "strokes"));
- monitoringMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 2);
- monitoringMesg.fields[fieldIndex].subfields[subfieldIndex].AddMap(5, 5);
- subfieldIndex++;
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActiveTime", 4, 134, 1000, 0, "s", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActivityType", 5, 0, 1, 0, "", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActivitySubtype", 6, 0, 1, 0, "", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActivityLevel", 7, 0, 1, 0, "", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Distance16", 8, 132, 1, 0, "100 * m", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Cycles16", 9, 132, 1, 0, "2 * cycles (steps)", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActiveTime16", 10, 132, 1, 0, "s", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("LocalTimestamp", 11, 134, 1, 0, "", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Temperature", 12, 131, 100, 0, "C", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("TemperatureMin", 14, 131, 100, 0, "C", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("TemperatureMax", 15, 131, 100, 0, "C", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActivityTime", 16, 132, 1, 0, "minutes", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ActiveCalories", 19, 132, 1, 0, "kcal", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("CurrentActivityTypeIntensity", 24, 13, 1, 0, "", false));
- monitoringMesg.fields[fieldIndex].components.Add(new FieldComponent(5, false, 5, 1, 0)); // activity_type
- monitoringMesg.fields[fieldIndex].components.Add(new FieldComponent(28, false, 3, 1, 0)); // intensity
- fieldIndex++;
- monitoringMesg.SetField(new Field("TimestampMin8", 25, 2, 1, 0, "min", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Timestamp16", 26, 132, 1, 0, "s", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("HeartRate", 27, 2, 1, 0, "bpm", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Intensity", 28, 2, 10, 0, "", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("DurationMin", 29, 132, 1, 0, "min", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Duration", 30, 134, 1, 0, "s", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Ascent", 31, 134, 1000, 0, "m", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("Descent", 32, 134, 1000, 0, "m", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("ModerateActivityMinutes", 33, 132, 1, 0, "minutes", false));
- fieldIndex++;
- monitoringMesg.SetField(new Field("VigorousActivityMinutes", 34, 132, 1, 0, "minutes", false));
- fieldIndex++;
- mesgs.Add(monitoringMesg);
- MonitoringIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Monitoring, monitoringMesg);
- mesgIndex++;
-
- // Hr
- Mesg hrMesg = new Mesg("Hr", MesgNum.Hr);
- fieldIndex = 0;
- hrMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "", false));
- fieldIndex++;
- hrMesg.SetField(new Field("FractionalTimestamp", 0, 132, 32768, 0, "s", false));
- fieldIndex++;
- hrMesg.SetField(new Field("Time256", 1, 2, 256, 0, "s", false));
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(0, false, 8, 256, 0)); // fractional_timestamp
- fieldIndex++;
- hrMesg.SetField(new Field("FilteredBpm", 6, 2, 1, 0, "bpm", false));
- fieldIndex++;
- hrMesg.SetField(new Field("EventTimestamp", 9, 134, 1024, 0, "s", true));
- fieldIndex++;
- hrMesg.SetField(new Field("EventTimestamp12", 10, 13, 1, 0, "", false));
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- hrMesg.fields[fieldIndex].components.Add(new FieldComponent(9, true, 12, 1024, 0)); // event_timestamp
- fieldIndex++;
- mesgs.Add(hrMesg);
- HrIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Hr, hrMesg);
- mesgIndex++;
-
- // MemoGlob
- Mesg memoGlobMesg = new Mesg("MemoGlob", MesgNum.MemoGlob);
- fieldIndex = 0;
- memoGlobMesg.SetField(new Field("PartIndex", 250, 134, 1, 0, "", false));
- fieldIndex++;
- memoGlobMesg.SetField(new Field("Memo", 0, 13, 1, 0, "", false));
- fieldIndex++;
- memoGlobMesg.SetField(new Field("MessageNumber", 1, 132, 1, 0, "", false));
- fieldIndex++;
- memoGlobMesg.SetField(new Field("MessageIndex", 2, 132, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(memoGlobMesg);
- MemoGlobIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.MemoGlob, memoGlobMesg);
- mesgIndex++;
-
- // AntChannelId
- Mesg antChannelIdMesg = new Mesg("AntChannelId", MesgNum.AntChannelId);
- fieldIndex = 0;
- antChannelIdMesg.SetField(new Field("ChannelNumber", 0, 2, 1, 0, "", false));
- fieldIndex++;
- antChannelIdMesg.SetField(new Field("DeviceType", 1, 10, 1, 0, "", false));
- fieldIndex++;
- antChannelIdMesg.SetField(new Field("DeviceNumber", 2, 139, 1, 0, "", false));
- fieldIndex++;
- antChannelIdMesg.SetField(new Field("TransmissionType", 3, 10, 1, 0, "", false));
- fieldIndex++;
- antChannelIdMesg.SetField(new Field("DeviceIndex", 4, 2, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(antChannelIdMesg);
- AntChannelIdIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.AntChannelId, antChannelIdMesg);
- mesgIndex++;
-
- // AntRx
- Mesg antRxMesg = new Mesg("AntRx", MesgNum.AntRx);
- fieldIndex = 0;
- antRxMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- antRxMesg.SetField(new Field("FractionalTimestamp", 0, 132, 32768, 0, "s", false));
- fieldIndex++;
- antRxMesg.SetField(new Field("MesgId", 1, 13, 1, 0, "", false));
- fieldIndex++;
- antRxMesg.SetField(new Field("MesgData", 2, 13, 1, 0, "", false));
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(3, false, 8, 1, 0)); // channel_number
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antRxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- fieldIndex++;
- antRxMesg.SetField(new Field("ChannelNumber", 3, 2, 1, 0, "", false));
- fieldIndex++;
- antRxMesg.SetField(new Field("Data", 4, 13, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(antRxMesg);
- AntRxIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.AntRx, antRxMesg);
- mesgIndex++;
-
- // AntTx
- Mesg antTxMesg = new Mesg("AntTx", MesgNum.AntTx);
- fieldIndex = 0;
- antTxMesg.SetField(new Field("Timestamp", 253, 134, 1, 0, "s", false));
- fieldIndex++;
- antTxMesg.SetField(new Field("FractionalTimestamp", 0, 132, 32768, 0, "s", false));
- fieldIndex++;
- antTxMesg.SetField(new Field("MesgId", 1, 13, 1, 0, "", false));
- fieldIndex++;
- antTxMesg.SetField(new Field("MesgData", 2, 13, 1, 0, "", false));
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(3, false, 8, 1, 0)); // channel_number
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- antTxMesg.fields[fieldIndex].components.Add(new FieldComponent(4, false, 8, 1, 0)); // data
- fieldIndex++;
- antTxMesg.SetField(new Field("ChannelNumber", 3, 2, 1, 0, "", false));
- fieldIndex++;
- antTxMesg.SetField(new Field("Data", 4, 13, 1, 0, "", false));
- fieldIndex++;
- mesgs.Add(antTxMesg);
- AntTxIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.AntTx, antTxMesg);
- mesgIndex++;
-
- // Pad
- Mesg padMesg = new Mesg("Pad", MesgNum.Pad);
- fieldIndex = 0;
- mesgs.Add(padMesg);
- PadIndex = mesgIndex;
- m_mesgLookup.Add(MesgNum.Pad, padMesg);
- mesgIndex++;
-
- #pragma warning restore 0618
- //InvalidIndex; = FitTypeInvalid.uint16;
- }
- #endregion
- #region Methods
- public static Mesg GetMesg(ushort globalMesgNum)
- {
- if(m_mesgLookup.ContainsKey(globalMesgNum))
- {
- return m_mesgLookup[globalMesgNum];
- }
- return new Mesg("unknown", globalMesgNum);
- }
- public static Field GetField(ushort globalMesgNum, byte fieldNum)
- {
- if(m_mesgLookup.ContainsKey(globalMesgNum))
- {
- return m_mesgLookup[globalMesgNum].GetField(fieldNum);
- }
- return new Field("unknown", fieldNum, 0, 1, 0, "", false);
- }
- #endregion
- } // class
- } // namespace
|