VideoMesg.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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 Video profile message.
  27. /// </summary>
  28. public class VideoMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public VideoMesg() : base(Profile.GetMesg(MesgNum.Video))
  34. {
  35. }
  36. public VideoMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the Url field</summary>
  43. /// <returns>Returns byte[] representing the Url field</returns>
  44. public byte[] GetUrl()
  45. {
  46. return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
  47. }
  48. ///<summary>
  49. /// Retrieves the Url field</summary>
  50. /// <returns>Returns String representing the Url field</returns>
  51. public String GetUrlAsString()
  52. {
  53. return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
  54. }
  55. ///<summary>
  56. /// Set Url field</summary>
  57. /// <param name="url_"> field value to be set</param>
  58. public void SetUrl(String url_)
  59. {
  60. SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(url_), Fit.SubfieldIndexMainField);
  61. }
  62. /// <summary>
  63. /// Set Url field</summary>
  64. /// <param name="url_">field value to be set</param>
  65. public void SetUrl(byte[] url_)
  66. {
  67. SetFieldValue(0, 0, url_, Fit.SubfieldIndexMainField);
  68. }
  69. ///<summary>
  70. /// Retrieves the HostingProvider field</summary>
  71. /// <returns>Returns byte[] representing the HostingProvider field</returns>
  72. public byte[] GetHostingProvider()
  73. {
  74. return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  75. }
  76. ///<summary>
  77. /// Retrieves the HostingProvider field</summary>
  78. /// <returns>Returns String representing the HostingProvider field</returns>
  79. public String GetHostingProviderAsString()
  80. {
  81. return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
  82. }
  83. ///<summary>
  84. /// Set HostingProvider field</summary>
  85. /// <param name="hostingProvider_"> field value to be set</param>
  86. public void SetHostingProvider(String hostingProvider_)
  87. {
  88. SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(hostingProvider_), Fit.SubfieldIndexMainField);
  89. }
  90. /// <summary>
  91. /// Set HostingProvider field</summary>
  92. /// <param name="hostingProvider_">field value to be set</param>
  93. public void SetHostingProvider(byte[] hostingProvider_)
  94. {
  95. SetFieldValue(1, 0, hostingProvider_, Fit.SubfieldIndexMainField);
  96. }
  97. ///<summary>
  98. /// Retrieves the Duration field
  99. /// Units: ms
  100. /// Comment: Playback time of video</summary>
  101. /// <returns>Returns nullable uint representing the Duration field</returns>
  102. public uint? GetDuration()
  103. {
  104. return (uint?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
  105. }
  106. /// <summary>
  107. /// Set Duration field
  108. /// Units: ms
  109. /// Comment: Playback time of video</summary>
  110. /// <param name="duration_">Nullable field value to be set</param>
  111. public void SetDuration(uint? duration_)
  112. {
  113. SetFieldValue(2, 0, duration_, Fit.SubfieldIndexMainField);
  114. }
  115. #endregion // Methods
  116. } // Class
  117. } // namespace