VideoFrameMesg.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 VideoFrame profile message.
  27. /// </summary>
  28. public class VideoFrameMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public VideoFrameMesg() : base(Profile.GetMesg(MesgNum.VideoFrame))
  34. {
  35. }
  36. public VideoFrameMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Timestamp field
  43. /// Units: s
  44. /// Comment: Whole second part of the timestamp</summary>
  45. /// <returns>Returns DateTime representing the Timestamp field</returns>
  46. public DateTime GetTimestamp()
  47. {
  48. return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
  49. }
  50. /// <summary>
  51. /// Set Timestamp field
  52. /// Units: s
  53. /// Comment: Whole second part of the timestamp</summary>
  54. /// <param name="timestamp_">Nullable field value to be set</param>
  55. public void SetTimestamp(DateTime timestamp_)
  56. {
  57. SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
  58. }
  59. ///<summary>
  60. /// Retrieves the TimestampMs field
  61. /// Units: ms
  62. /// Comment: Millisecond part of the timestamp.</summary>
  63. /// <returns>Returns nullable ushort representing the TimestampMs field</returns>
  64. public ushort? GetTimestampMs()
  65. {
  66. return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  67. }
  68. /// <summary>
  69. /// Set TimestampMs field
  70. /// Units: ms
  71. /// Comment: Millisecond part of the timestamp.</summary>
  72. /// <param name="timestampMs_">Nullable field value to be set</param>
  73. public void SetTimestampMs(ushort? timestampMs_)
  74. {
  75. SetFieldValue(0, 0, timestampMs_, Fit.SubfieldIndexMainField);
  76. }
  77. ///<summary>
  78. /// Retrieves the FrameNumber field
  79. /// Comment: Number of the frame that the timestamp and timestamp_ms correlate to</summary>
  80. /// <returns>Returns nullable uint representing the FrameNumber field</returns>
  81. public uint? GetFrameNumber()
  82. {
  83. return (uint?)GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  84. }
  85. /// <summary>
  86. /// Set FrameNumber field
  87. /// Comment: Number of the frame that the timestamp and timestamp_ms correlate to</summary>
  88. /// <param name="frameNumber_">Nullable field value to be set</param>
  89. public void SetFrameNumber(uint? frameNumber_)
  90. {
  91. SetFieldValue(1, 0, frameNumber_, Fit.SubfieldIndexMainField);
  92. }
  93. #endregion // Methods
  94. } // Class
  95. } // namespace