CameraEventMesg.cs 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 CameraEvent profile message.
  27. /// </summary>
  28. public class CameraEventMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public CameraEventMesg() : base(Profile.GetMesg(MesgNum.CameraEvent))
  34. {
  35. }
  36. public CameraEventMesg(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 CameraEventType field</summary>
  79. /// <returns>Returns nullable CameraEventType enum representing the CameraEventType field</returns>
  80. public CameraEventType? GetCameraEventType()
  81. {
  82. object obj = GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  83. CameraEventType? value = obj == null ? (CameraEventType?)null : (CameraEventType)obj;
  84. return value;
  85. }
  86. /// <summary>
  87. /// Set CameraEventType field</summary>
  88. /// <param name="cameraEventType_">Nullable field value to be set</param>
  89. public void SetCameraEventType(CameraEventType? cameraEventType_)
  90. {
  91. SetFieldValue(1, 0, cameraEventType_, Fit.SubfieldIndexMainField);
  92. }
  93. ///<summary>
  94. /// Retrieves the CameraFileUuid field</summary>
  95. /// <returns>Returns byte[] representing the CameraFileUuid field</returns>
  96. public byte[] GetCameraFileUuid()
  97. {
  98. return (byte[])GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  99. }
  100. ///<summary>
  101. /// Retrieves the CameraFileUuid field</summary>
  102. /// <returns>Returns String representing the CameraFileUuid field</returns>
  103. public String GetCameraFileUuidAsString()
  104. {
  105. return Encoding.UTF8.GetString((byte[])GetFieldValue(2, 0, Fit.SubfieldIndexMainField));
  106. }
  107. ///<summary>
  108. /// Set CameraFileUuid field</summary>
  109. /// <param name="cameraFileUuid_"> field value to be set</param>
  110. public void SetCameraFileUuid(String cameraFileUuid_)
  111. {
  112. SetFieldValue(2, 0, System.Text.Encoding.UTF8.GetBytes(cameraFileUuid_), Fit.SubfieldIndexMainField);
  113. }
  114. /// <summary>
  115. /// Set CameraFileUuid field</summary>
  116. /// <param name="cameraFileUuid_">field value to be set</param>
  117. public void SetCameraFileUuid(byte[] cameraFileUuid_)
  118. {
  119. SetFieldValue(2, 0, cameraFileUuid_, Fit.SubfieldIndexMainField);
  120. }
  121. ///<summary>
  122. /// Retrieves the CameraOrientation field</summary>
  123. /// <returns>Returns nullable CameraOrientationType enum representing the CameraOrientation field</returns>
  124. public CameraOrientationType? GetCameraOrientation()
  125. {
  126. object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  127. CameraOrientationType? value = obj == null ? (CameraOrientationType?)null : (CameraOrientationType)obj;
  128. return value;
  129. }
  130. /// <summary>
  131. /// Set CameraOrientation field</summary>
  132. /// <param name="cameraOrientation_">Nullable field value to be set</param>
  133. public void SetCameraOrientation(CameraOrientationType? cameraOrientation_)
  134. {
  135. SetFieldValue(3, 0, cameraOrientation_, Fit.SubfieldIndexMainField);
  136. }
  137. #endregion // Methods
  138. } // Class
  139. } // namespace