WorkoutStepMesg.cs 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. #region Copyright
  2. ////////////////////////////////////////////////////////////////////////////////
  3. // The following FIT Protocol software provided may be used with FIT protocol
  4. // devices only and remains the copyrighted property of Dynastream Innovations Inc.
  5. // The software is being provided on an "as-is" basis and as an accommodation,
  6. // and therefore all warranties, representations, or guarantees of any kind
  7. // (whether express, implied or statutory) including, without limitation,
  8. // warranties of merchantability, non-infringement, or fitness for a particular
  9. // purpose, are specifically disclaimed.
  10. //
  11. // Copyright 2016 Dynastream Innovations Inc.
  12. ////////////////////////////////////////////////////////////////////////////////
  13. // ****WARNING**** This file is auto-generated! Do NOT edit this file.
  14. // Profile Version = 16.60Release
  15. // Tag = production-akw-16.60.00-0-g5d3d436
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #endregion
  18. using System;
  19. using System.Collections.Generic;
  20. using System.Diagnostics;
  21. using System.Text;
  22. using System.IO;
  23. namespace Dynastream.Fit
  24. {
  25. /// <summary>
  26. /// Implements the WorkoutStep profile message.
  27. /// </summary>
  28. public class WorkoutStepMesg : Mesg
  29. {
  30. #region Fields
  31. static class DurationValueSubfield
  32. {
  33. public static ushort DurationTime = 0;
  34. public static ushort DurationDistance = 1;
  35. public static ushort DurationHr = 2;
  36. public static ushort DurationCalories = 3;
  37. public static ushort DurationStep = 4;
  38. public static ushort DurationPower = 5;
  39. public static ushort Subfields = 6;
  40. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  41. public static ushort MainField = Fit.SubfieldIndexMainField;
  42. }
  43. static class TargetValueSubfield
  44. {
  45. public static ushort TargetHrZone = 0;
  46. public static ushort TargetPowerZone = 1;
  47. public static ushort RepeatSteps = 2;
  48. public static ushort RepeatTime = 3;
  49. public static ushort RepeatDistance = 4;
  50. public static ushort RepeatCalories = 5;
  51. public static ushort RepeatHr = 6;
  52. public static ushort RepeatPower = 7;
  53. public static ushort Subfields = 8;
  54. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  55. public static ushort MainField = Fit.SubfieldIndexMainField;
  56. }
  57. static class CustomTargetValueLowSubfield
  58. {
  59. public static ushort CustomTargetSpeedLow = 0;
  60. public static ushort CustomTargetHeartRateLow = 1;
  61. public static ushort CustomTargetCadenceLow = 2;
  62. public static ushort CustomTargetPowerLow = 3;
  63. public static ushort Subfields = 4;
  64. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  65. public static ushort MainField = Fit.SubfieldIndexMainField;
  66. }
  67. static class CustomTargetValueHighSubfield
  68. {
  69. public static ushort CustomTargetSpeedHigh = 0;
  70. public static ushort CustomTargetHeartRateHigh = 1;
  71. public static ushort CustomTargetCadenceHigh = 2;
  72. public static ushort CustomTargetPowerHigh = 3;
  73. public static ushort Subfields = 4;
  74. public static ushort Active = Fit.SubfieldIndexActiveSubfield;
  75. public static ushort MainField = Fit.SubfieldIndexMainField;
  76. }
  77. #endregion
  78. #region Constructors
  79. public WorkoutStepMesg() : base(Profile.GetMesg(MesgNum.WorkoutStep))
  80. {
  81. }
  82. public WorkoutStepMesg(Mesg mesg) : base(mesg)
  83. {
  84. }
  85. #endregion // Constructors
  86. #region Methods
  87. ///<summary>
  88. /// Retrieves the MessageIndex field</summary>
  89. /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
  90. public ushort? GetMessageIndex()
  91. {
  92. return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
  93. }
  94. /// <summary>
  95. /// Set MessageIndex field</summary>
  96. /// <param name="messageIndex_">Nullable field value to be set</param>
  97. public void SetMessageIndex(ushort? messageIndex_)
  98. {
  99. SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
  100. }
  101. ///<summary>
  102. /// Retrieves the WktStepName field</summary>
  103. /// <returns>Returns byte[] representing the WktStepName field</returns>
  104. public byte[] GetWktStepName()
  105. {
  106. return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  107. }
  108. ///<summary>
  109. /// Retrieves the WktStepName field</summary>
  110. /// <returns>Returns String representing the WktStepName field</returns>
  111. public String GetWktStepNameAsString()
  112. {
  113. return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
  114. }
  115. ///<summary>
  116. /// Set WktStepName field</summary>
  117. /// <param name="wktStepName_"> field value to be set</param>
  118. public void SetWktStepName(String wktStepName_)
  119. {
  120. SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(wktStepName_), Fit.SubfieldIndexMainField);
  121. }
  122. /// <summary>
  123. /// Set WktStepName field</summary>
  124. /// <param name="wktStepName_">field value to be set</param>
  125. public void SetWktStepName(byte[] wktStepName_)
  126. {
  127. SetFieldValue(0, 0, wktStepName_, Fit.SubfieldIndexMainField);
  128. }
  129. ///<summary>
  130. /// Retrieves the DurationType field</summary>
  131. /// <returns>Returns nullable WktStepDuration enum representing the DurationType field</returns>
  132. public WktStepDuration? GetDurationType()
  133. {
  134. object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  135. WktStepDuration? value = obj == null ? (WktStepDuration?)null : (WktStepDuration)obj;
  136. return value;
  137. }
  138. /// <summary>
  139. /// Set DurationType field</summary>
  140. /// <param name="durationType_">Nullable field value to be set</param>
  141. public void SetDurationType(WktStepDuration? durationType_)
  142. {
  143. SetFieldValue(1, 0, durationType_, Fit.SubfieldIndexMainField);
  144. }
  145. ///<summary>
  146. /// Retrieves the DurationValue field</summary>
  147. /// <returns>Returns nullable uint representing the DurationValue field</returns>
  148. public uint? GetDurationValue()
  149. {
  150. return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  151. }
  152. /// <summary>
  153. /// Set DurationValue field</summary>
  154. /// <param name="durationValue_">Nullable field value to be set</param>
  155. public void SetDurationValue(uint? durationValue_)
  156. {
  157. SetFieldValue(2, 0, durationValue_, Fit.SubfieldIndexMainField);
  158. }
  159. /// <summary>
  160. /// Retrieves the DurationTime subfield
  161. /// Units: s</summary>
  162. /// <returns>Nullable float representing the DurationTime subfield</returns>
  163. public float? GetDurationTime()
  164. {
  165. return (float?)GetFieldValue(2, 0, DurationValueSubfield.DurationTime);
  166. }
  167. /// <summary>
  168. ///
  169. /// Set DurationTime subfield
  170. /// Units: s</summary>
  171. /// <param name="durationTime">Subfield value to be set</param>
  172. public void SetDurationTime(float? durationTime)
  173. {
  174. SetFieldValue(2, 0, durationTime, DurationValueSubfield.DurationTime);
  175. }
  176. /// <summary>
  177. /// Retrieves the DurationDistance subfield
  178. /// Units: m</summary>
  179. /// <returns>Nullable float representing the DurationDistance subfield</returns>
  180. public float? GetDurationDistance()
  181. {
  182. return (float?)GetFieldValue(2, 0, DurationValueSubfield.DurationDistance);
  183. }
  184. /// <summary>
  185. ///
  186. /// Set DurationDistance subfield
  187. /// Units: m</summary>
  188. /// <param name="durationDistance">Subfield value to be set</param>
  189. public void SetDurationDistance(float? durationDistance)
  190. {
  191. SetFieldValue(2, 0, durationDistance, DurationValueSubfield.DurationDistance);
  192. }
  193. /// <summary>
  194. /// Retrieves the DurationHr subfield
  195. /// Units: % or bpm</summary>
  196. /// <returns>Nullable uint representing the DurationHr subfield</returns>
  197. public uint? GetDurationHr()
  198. {
  199. return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationHr);
  200. }
  201. /// <summary>
  202. ///
  203. /// Set DurationHr subfield
  204. /// Units: % or bpm</summary>
  205. /// <param name="durationHr">Subfield value to be set</param>
  206. public void SetDurationHr(uint? durationHr)
  207. {
  208. SetFieldValue(2, 0, durationHr, DurationValueSubfield.DurationHr);
  209. }
  210. /// <summary>
  211. /// Retrieves the DurationCalories subfield
  212. /// Units: calories</summary>
  213. /// <returns>Nullable uint representing the DurationCalories subfield</returns>
  214. public uint? GetDurationCalories()
  215. {
  216. return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationCalories);
  217. }
  218. /// <summary>
  219. ///
  220. /// Set DurationCalories subfield
  221. /// Units: calories</summary>
  222. /// <param name="durationCalories">Subfield value to be set</param>
  223. public void SetDurationCalories(uint? durationCalories)
  224. {
  225. SetFieldValue(2, 0, durationCalories, DurationValueSubfield.DurationCalories);
  226. }
  227. /// <summary>
  228. /// Retrieves the DurationStep subfield
  229. /// Comment: message_index of step to loop back to. Steps are assumed to be in the order by message_index. custom_name and intensity members are undefined for this duration type.</summary>
  230. /// <returns>Nullable uint representing the DurationStep subfield</returns>
  231. public uint? GetDurationStep()
  232. {
  233. return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationStep);
  234. }
  235. /// <summary>
  236. ///
  237. /// Set DurationStep subfield
  238. /// Comment: message_index of step to loop back to. Steps are assumed to be in the order by message_index. custom_name and intensity members are undefined for this duration type.</summary>
  239. /// <param name="durationStep">Subfield value to be set</param>
  240. public void SetDurationStep(uint? durationStep)
  241. {
  242. SetFieldValue(2, 0, durationStep, DurationValueSubfield.DurationStep);
  243. }
  244. /// <summary>
  245. /// Retrieves the DurationPower subfield
  246. /// Units: % or watts</summary>
  247. /// <returns>Nullable uint representing the DurationPower subfield</returns>
  248. public uint? GetDurationPower()
  249. {
  250. return (uint?)GetFieldValue(2, 0, DurationValueSubfield.DurationPower);
  251. }
  252. /// <summary>
  253. ///
  254. /// Set DurationPower subfield
  255. /// Units: % or watts</summary>
  256. /// <param name="durationPower">Subfield value to be set</param>
  257. public void SetDurationPower(uint? durationPower)
  258. {
  259. SetFieldValue(2, 0, durationPower, DurationValueSubfield.DurationPower);
  260. }
  261. ///<summary>
  262. /// Retrieves the TargetType field</summary>
  263. /// <returns>Returns nullable WktStepTarget enum representing the TargetType field</returns>
  264. public WktStepTarget? GetTargetType()
  265. {
  266. object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  267. WktStepTarget? value = obj == null ? (WktStepTarget?)null : (WktStepTarget)obj;
  268. return value;
  269. }
  270. /// <summary>
  271. /// Set TargetType field</summary>
  272. /// <param name="targetType_">Nullable field value to be set</param>
  273. public void SetTargetType(WktStepTarget? targetType_)
  274. {
  275. SetFieldValue(3, 0, targetType_, Fit.SubfieldIndexMainField);
  276. }
  277. ///<summary>
  278. /// Retrieves the TargetValue field</summary>
  279. /// <returns>Returns nullable uint representing the TargetValue field</returns>
  280. public uint? GetTargetValue()
  281. {
  282. return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  283. }
  284. /// <summary>
  285. /// Set TargetValue field</summary>
  286. /// <param name="targetValue_">Nullable field value to be set</param>
  287. public void SetTargetValue(uint? targetValue_)
  288. {
  289. SetFieldValue(4, 0, targetValue_, Fit.SubfieldIndexMainField);
  290. }
  291. /// <summary>
  292. /// Retrieves the TargetHrZone subfield
  293. /// Comment: hr zone (1-5);Custom =0;</summary>
  294. /// <returns>Nullable uint representing the TargetHrZone subfield</returns>
  295. public uint? GetTargetHrZone()
  296. {
  297. return (uint?)GetFieldValue(4, 0, TargetValueSubfield.TargetHrZone);
  298. }
  299. /// <summary>
  300. ///
  301. /// Set TargetHrZone subfield
  302. /// Comment: hr zone (1-5);Custom =0;</summary>
  303. /// <param name="targetHrZone">Subfield value to be set</param>
  304. public void SetTargetHrZone(uint? targetHrZone)
  305. {
  306. SetFieldValue(4, 0, targetHrZone, TargetValueSubfield.TargetHrZone);
  307. }
  308. /// <summary>
  309. /// Retrieves the TargetPowerZone subfield
  310. /// Comment: Power Zone ( 1-7); Custom = 0;</summary>
  311. /// <returns>Nullable uint representing the TargetPowerZone subfield</returns>
  312. public uint? GetTargetPowerZone()
  313. {
  314. return (uint?)GetFieldValue(4, 0, TargetValueSubfield.TargetPowerZone);
  315. }
  316. /// <summary>
  317. ///
  318. /// Set TargetPowerZone subfield
  319. /// Comment: Power Zone ( 1-7); Custom = 0;</summary>
  320. /// <param name="targetPowerZone">Subfield value to be set</param>
  321. public void SetTargetPowerZone(uint? targetPowerZone)
  322. {
  323. SetFieldValue(4, 0, targetPowerZone, TargetValueSubfield.TargetPowerZone);
  324. }
  325. /// <summary>
  326. /// Retrieves the RepeatSteps subfield
  327. /// Comment: # of repetitions</summary>
  328. /// <returns>Nullable uint representing the RepeatSteps subfield</returns>
  329. public uint? GetRepeatSteps()
  330. {
  331. return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatSteps);
  332. }
  333. /// <summary>
  334. ///
  335. /// Set RepeatSteps subfield
  336. /// Comment: # of repetitions</summary>
  337. /// <param name="repeatSteps">Subfield value to be set</param>
  338. public void SetRepeatSteps(uint? repeatSteps)
  339. {
  340. SetFieldValue(4, 0, repeatSteps, TargetValueSubfield.RepeatSteps);
  341. }
  342. /// <summary>
  343. /// Retrieves the RepeatTime subfield
  344. /// Units: s</summary>
  345. /// <returns>Nullable float representing the RepeatTime subfield</returns>
  346. public float? GetRepeatTime()
  347. {
  348. return (float?)GetFieldValue(4, 0, TargetValueSubfield.RepeatTime);
  349. }
  350. /// <summary>
  351. ///
  352. /// Set RepeatTime subfield
  353. /// Units: s</summary>
  354. /// <param name="repeatTime">Subfield value to be set</param>
  355. public void SetRepeatTime(float? repeatTime)
  356. {
  357. SetFieldValue(4, 0, repeatTime, TargetValueSubfield.RepeatTime);
  358. }
  359. /// <summary>
  360. /// Retrieves the RepeatDistance subfield
  361. /// Units: m</summary>
  362. /// <returns>Nullable float representing the RepeatDistance subfield</returns>
  363. public float? GetRepeatDistance()
  364. {
  365. return (float?)GetFieldValue(4, 0, TargetValueSubfield.RepeatDistance);
  366. }
  367. /// <summary>
  368. ///
  369. /// Set RepeatDistance subfield
  370. /// Units: m</summary>
  371. /// <param name="repeatDistance">Subfield value to be set</param>
  372. public void SetRepeatDistance(float? repeatDistance)
  373. {
  374. SetFieldValue(4, 0, repeatDistance, TargetValueSubfield.RepeatDistance);
  375. }
  376. /// <summary>
  377. /// Retrieves the RepeatCalories subfield
  378. /// Units: calories</summary>
  379. /// <returns>Nullable uint representing the RepeatCalories subfield</returns>
  380. public uint? GetRepeatCalories()
  381. {
  382. return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatCalories);
  383. }
  384. /// <summary>
  385. ///
  386. /// Set RepeatCalories subfield
  387. /// Units: calories</summary>
  388. /// <param name="repeatCalories">Subfield value to be set</param>
  389. public void SetRepeatCalories(uint? repeatCalories)
  390. {
  391. SetFieldValue(4, 0, repeatCalories, TargetValueSubfield.RepeatCalories);
  392. }
  393. /// <summary>
  394. /// Retrieves the RepeatHr subfield
  395. /// Units: % or bpm</summary>
  396. /// <returns>Nullable uint representing the RepeatHr subfield</returns>
  397. public uint? GetRepeatHr()
  398. {
  399. return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatHr);
  400. }
  401. /// <summary>
  402. ///
  403. /// Set RepeatHr subfield
  404. /// Units: % or bpm</summary>
  405. /// <param name="repeatHr">Subfield value to be set</param>
  406. public void SetRepeatHr(uint? repeatHr)
  407. {
  408. SetFieldValue(4, 0, repeatHr, TargetValueSubfield.RepeatHr);
  409. }
  410. /// <summary>
  411. /// Retrieves the RepeatPower subfield
  412. /// Units: % or watts</summary>
  413. /// <returns>Nullable uint representing the RepeatPower subfield</returns>
  414. public uint? GetRepeatPower()
  415. {
  416. return (uint?)GetFieldValue(4, 0, TargetValueSubfield.RepeatPower);
  417. }
  418. /// <summary>
  419. ///
  420. /// Set RepeatPower subfield
  421. /// Units: % or watts</summary>
  422. /// <param name="repeatPower">Subfield value to be set</param>
  423. public void SetRepeatPower(uint? repeatPower)
  424. {
  425. SetFieldValue(4, 0, repeatPower, TargetValueSubfield.RepeatPower);
  426. }
  427. ///<summary>
  428. /// Retrieves the CustomTargetValueLow field</summary>
  429. /// <returns>Returns nullable uint representing the CustomTargetValueLow field</returns>
  430. public uint? GetCustomTargetValueLow()
  431. {
  432. return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
  433. }
  434. /// <summary>
  435. /// Set CustomTargetValueLow field</summary>
  436. /// <param name="customTargetValueLow_">Nullable field value to be set</param>
  437. public void SetCustomTargetValueLow(uint? customTargetValueLow_)
  438. {
  439. SetFieldValue(5, 0, customTargetValueLow_, Fit.SubfieldIndexMainField);
  440. }
  441. /// <summary>
  442. /// Retrieves the CustomTargetSpeedLow subfield
  443. /// Units: m/s</summary>
  444. /// <returns>Nullable float representing the CustomTargetSpeedLow subfield</returns>
  445. public float? GetCustomTargetSpeedLow()
  446. {
  447. return (float?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetSpeedLow);
  448. }
  449. /// <summary>
  450. ///
  451. /// Set CustomTargetSpeedLow subfield
  452. /// Units: m/s</summary>
  453. /// <param name="customTargetSpeedLow">Subfield value to be set</param>
  454. public void SetCustomTargetSpeedLow(float? customTargetSpeedLow)
  455. {
  456. SetFieldValue(5, 0, customTargetSpeedLow, CustomTargetValueLowSubfield.CustomTargetSpeedLow);
  457. }
  458. /// <summary>
  459. /// Retrieves the CustomTargetHeartRateLow subfield
  460. /// Units: % or bpm</summary>
  461. /// <returns>Nullable uint representing the CustomTargetHeartRateLow subfield</returns>
  462. public uint? GetCustomTargetHeartRateLow()
  463. {
  464. return (uint?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetHeartRateLow);
  465. }
  466. /// <summary>
  467. ///
  468. /// Set CustomTargetHeartRateLow subfield
  469. /// Units: % or bpm</summary>
  470. /// <param name="customTargetHeartRateLow">Subfield value to be set</param>
  471. public void SetCustomTargetHeartRateLow(uint? customTargetHeartRateLow)
  472. {
  473. SetFieldValue(5, 0, customTargetHeartRateLow, CustomTargetValueLowSubfield.CustomTargetHeartRateLow);
  474. }
  475. /// <summary>
  476. /// Retrieves the CustomTargetCadenceLow subfield
  477. /// Units: rpm</summary>
  478. /// <returns>Nullable uint representing the CustomTargetCadenceLow subfield</returns>
  479. public uint? GetCustomTargetCadenceLow()
  480. {
  481. return (uint?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetCadenceLow);
  482. }
  483. /// <summary>
  484. ///
  485. /// Set CustomTargetCadenceLow subfield
  486. /// Units: rpm</summary>
  487. /// <param name="customTargetCadenceLow">Subfield value to be set</param>
  488. public void SetCustomTargetCadenceLow(uint? customTargetCadenceLow)
  489. {
  490. SetFieldValue(5, 0, customTargetCadenceLow, CustomTargetValueLowSubfield.CustomTargetCadenceLow);
  491. }
  492. /// <summary>
  493. /// Retrieves the CustomTargetPowerLow subfield
  494. /// Units: % or watts</summary>
  495. /// <returns>Nullable uint representing the CustomTargetPowerLow subfield</returns>
  496. public uint? GetCustomTargetPowerLow()
  497. {
  498. return (uint?)GetFieldValue(5, 0, CustomTargetValueLowSubfield.CustomTargetPowerLow);
  499. }
  500. /// <summary>
  501. ///
  502. /// Set CustomTargetPowerLow subfield
  503. /// Units: % or watts</summary>
  504. /// <param name="customTargetPowerLow">Subfield value to be set</param>
  505. public void SetCustomTargetPowerLow(uint? customTargetPowerLow)
  506. {
  507. SetFieldValue(5, 0, customTargetPowerLow, CustomTargetValueLowSubfield.CustomTargetPowerLow);
  508. }
  509. ///<summary>
  510. /// Retrieves the CustomTargetValueHigh field</summary>
  511. /// <returns>Returns nullable uint representing the CustomTargetValueHigh field</returns>
  512. public uint? GetCustomTargetValueHigh()
  513. {
  514. return (uint?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
  515. }
  516. /// <summary>
  517. /// Set CustomTargetValueHigh field</summary>
  518. /// <param name="customTargetValueHigh_">Nullable field value to be set</param>
  519. public void SetCustomTargetValueHigh(uint? customTargetValueHigh_)
  520. {
  521. SetFieldValue(6, 0, customTargetValueHigh_, Fit.SubfieldIndexMainField);
  522. }
  523. /// <summary>
  524. /// Retrieves the CustomTargetSpeedHigh subfield
  525. /// Units: m/s</summary>
  526. /// <returns>Nullable float representing the CustomTargetSpeedHigh subfield</returns>
  527. public float? GetCustomTargetSpeedHigh()
  528. {
  529. return (float?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetSpeedHigh);
  530. }
  531. /// <summary>
  532. ///
  533. /// Set CustomTargetSpeedHigh subfield
  534. /// Units: m/s</summary>
  535. /// <param name="customTargetSpeedHigh">Subfield value to be set</param>
  536. public void SetCustomTargetSpeedHigh(float? customTargetSpeedHigh)
  537. {
  538. SetFieldValue(6, 0, customTargetSpeedHigh, CustomTargetValueHighSubfield.CustomTargetSpeedHigh);
  539. }
  540. /// <summary>
  541. /// Retrieves the CustomTargetHeartRateHigh subfield
  542. /// Units: % or bpm</summary>
  543. /// <returns>Nullable uint representing the CustomTargetHeartRateHigh subfield</returns>
  544. public uint? GetCustomTargetHeartRateHigh()
  545. {
  546. return (uint?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetHeartRateHigh);
  547. }
  548. /// <summary>
  549. ///
  550. /// Set CustomTargetHeartRateHigh subfield
  551. /// Units: % or bpm</summary>
  552. /// <param name="customTargetHeartRateHigh">Subfield value to be set</param>
  553. public void SetCustomTargetHeartRateHigh(uint? customTargetHeartRateHigh)
  554. {
  555. SetFieldValue(6, 0, customTargetHeartRateHigh, CustomTargetValueHighSubfield.CustomTargetHeartRateHigh);
  556. }
  557. /// <summary>
  558. /// Retrieves the CustomTargetCadenceHigh subfield
  559. /// Units: rpm</summary>
  560. /// <returns>Nullable uint representing the CustomTargetCadenceHigh subfield</returns>
  561. public uint? GetCustomTargetCadenceHigh()
  562. {
  563. return (uint?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetCadenceHigh);
  564. }
  565. /// <summary>
  566. ///
  567. /// Set CustomTargetCadenceHigh subfield
  568. /// Units: rpm</summary>
  569. /// <param name="customTargetCadenceHigh">Subfield value to be set</param>
  570. public void SetCustomTargetCadenceHigh(uint? customTargetCadenceHigh)
  571. {
  572. SetFieldValue(6, 0, customTargetCadenceHigh, CustomTargetValueHighSubfield.CustomTargetCadenceHigh);
  573. }
  574. /// <summary>
  575. /// Retrieves the CustomTargetPowerHigh subfield
  576. /// Units: % or watts</summary>
  577. /// <returns>Nullable uint representing the CustomTargetPowerHigh subfield</returns>
  578. public uint? GetCustomTargetPowerHigh()
  579. {
  580. return (uint?)GetFieldValue(6, 0, CustomTargetValueHighSubfield.CustomTargetPowerHigh);
  581. }
  582. /// <summary>
  583. ///
  584. /// Set CustomTargetPowerHigh subfield
  585. /// Units: % or watts</summary>
  586. /// <param name="customTargetPowerHigh">Subfield value to be set</param>
  587. public void SetCustomTargetPowerHigh(uint? customTargetPowerHigh)
  588. {
  589. SetFieldValue(6, 0, customTargetPowerHigh, CustomTargetValueHighSubfield.CustomTargetPowerHigh);
  590. }
  591. ///<summary>
  592. /// Retrieves the Intensity field</summary>
  593. /// <returns>Returns nullable Intensity enum representing the Intensity field</returns>
  594. public Intensity? GetIntensity()
  595. {
  596. object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
  597. Intensity? value = obj == null ? (Intensity?)null : (Intensity)obj;
  598. return value;
  599. }
  600. /// <summary>
  601. /// Set Intensity field</summary>
  602. /// <param name="intensity_">Nullable field value to be set</param>
  603. public void SetIntensity(Intensity? intensity_)
  604. {
  605. SetFieldValue(7, 0, intensity_, Fit.SubfieldIndexMainField);
  606. }
  607. #endregion // Methods
  608. } // Class
  609. } // namespace