IDeviceInfosManager.cs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. using System;
  2. using WingServerCommon.Log;
  3. using WingServerCommon.Interfaces.OpLog;
  4. namespace WingServerCommon.Interfaces.Cache
  5. {
  6. public interface IDeviceInfosManager : IBaseCacheManager<CacheDeviceDTO>
  7. {
  8. }
  9. public class DeviceInfosManager : CacheManager<CacheDeviceDTO>, IDeviceInfosManager
  10. {
  11. public DeviceInfosManager() : base()
  12. {
  13. }
  14. }
  15. public class CacheDeviceDTO : ICacheObject
  16. {
  17. /// <summary>
  18. /// 设备编码
  19. /// </summary>
  20. /// <value>test0122</value>
  21. public string Code { get; set; }
  22. /// <summary>
  23. /// 设备序列号
  24. /// </summary>
  25. /// <value>test010122</value>
  26. public string SerialNumber { get; set; }
  27. /// <summary>
  28. /// 设备密码
  29. /// </summary>
  30. /// <value>ABC123</value>
  31. public string Password { get; set; }
  32. /// <summary>
  33. /// 设备名称
  34. /// </summary>
  35. /// <value>测试设备0122</value>
  36. public string Name { get; set; }
  37. /// <summary>
  38. /// 备注
  39. /// </summary>
  40. /// <value>测试Description22</value>
  41. public string Description { get; set; }
  42. /// <summary>
  43. /// 设备型号
  44. /// </summary>
  45. /// <value>M001</value>
  46. public string DeviceModel { get; set; }
  47. /// <summary>
  48. /// 设备类型
  49. /// </summary>
  50. /// <value>X00001</value>
  51. public string DeviceType { get; set; }
  52. /// <summary>
  53. /// 设备头图
  54. /// </summary>
  55. /// <value>http://192.168.6.117:9001/Storage/B1154C6500E4F174249224B41284498E_7_0_0_0.PNG</value>
  56. public string HeadPicUrl { get; set; }
  57. /// <summary>
  58. /// 设备软件版本
  59. /// </summary>
  60. /// <value>1.11.0</value>
  61. public string DeviceSoftwareVersion { get; set; }
  62. /// <summary>
  63. /// 设备SDK版本
  64. /// </summary>
  65. /// <value>1.11.1</value>
  66. public string SDKSoftwareVersion { get; set; }
  67. /// <summary>
  68. /// 设备所属组织
  69. /// </summary>
  70. /// <value>Organization_2022012520473430DnW3</value>
  71. public string OrganizationCode { get; set; }
  72. /// <summary>
  73. /// 组织下属科室
  74. /// </summary>
  75. /// <value>Organization_2022012520473430DnW32</value>
  76. public string DepartmentCode { get; set; }
  77. /// <summary>
  78. /// 超声机动态唯一码
  79. /// </summary>
  80. /// <value>test01010122</value>
  81. public string ShortCode { get; set; }
  82. /// <summary>
  83. /// 是否设备自动分享
  84. /// </summary>
  85. /// <value>true</value>
  86. public bool IsAutoShared { get; set; }
  87. /// <summary>
  88. /// 最近登录时间
  89. /// </summary>
  90. /// <value>2022-02-28T09:21:38.861Z</value>
  91. public DateTime LastLoginTime { get; set; } = DateTime.UtcNow;
  92. /// <summary>
  93. /// 系统版本
  94. /// </summary>
  95. /// <value>2.2.27.5</value>
  96. public string SystemVersion { get; set; } = string.Empty;
  97. /// <summary>
  98. /// CPU型号
  99. /// </summary>
  100. /// <value>I5-10400</value>
  101. public string CPUModel { get; set; } = string.Empty;
  102. /// <summary>
  103. /// 系统语言
  104. /// </summary>
  105. /// <value>Chinese</value>
  106. public string SystemLanguage { get; set; } = string.Empty;
  107. /// <summary>
  108. /// AI应用集合
  109. /// </summary>
  110. public List<string> DiagnosisModules { get; set; } = new();
  111. /// <summary>
  112. /// 报告转发配置集合
  113. /// </summary>
  114. public List<string> ReportPosterCodes { get; set; } = new();
  115. /// <summary>
  116. /// 是否把多路视屏合流
  117. /// </summary>
  118. /// <value></value>
  119. public bool MergedChannel { get; set; }
  120. /// <summary>
  121. /// 合流的画面宽度
  122. /// </summary>
  123. /// <value></value>
  124. public int MergedVideoOutputWidth { get; set; }
  125. /// <summary>
  126. /// 合流的画面高度
  127. /// </summary>
  128. /// <value></value>
  129. public int MergedVideoOutputHeight { get; set; }
  130. /// <summary>
  131. /// 下载地址模式
  132. /// </summary>
  133. /// <value></value>
  134. public int DownloadModeSetting { get; set; }
  135. /// <summary>
  136. /// 视屏设备画面信息
  137. /// </summary>
  138. /// <value></value>
  139. public IList<CacheVideoDeviceInfo> VideoDeviceInfos { get; set; } = new List<CacheVideoDeviceInfo>();
  140. /// <summary>
  141. /// 直播开关,true=开启,false=关闭
  142. /// </summary>
  143. /// <value></value>
  144. public bool LiveOpened { get; set; }
  145. /// <summary>
  146. /// 是否支持Rtc
  147. /// </summary>
  148. /// <value></value>
  149. public bool SupportRtc { get; set; }
  150. /// <summary>
  151. /// 设备展示名称
  152. /// </summary>
  153. /// <value></value>
  154. public string DisplayName
  155. {
  156. get
  157. {
  158. var displayName = Description;
  159. if (string.IsNullOrWhiteSpace(displayName))
  160. {
  161. displayName = Name;
  162. }
  163. return displayName;
  164. }
  165. }
  166. /// <summary>
  167. /// 连接方式
  168. /// </summary>
  169. /// <value></value>
  170. public int ProxyType { get; set; } = 0;
  171. }
  172. /// <summary>
  173. /// 视屏设备画面信息
  174. /// </summary>
  175. public class CacheVideoDeviceInfo
  176. {
  177. /// <summary>
  178. /// 设备Id(比如超声机唯一码,用来表示这是超声机画面)
  179. /// </summary>
  180. /// <value></value>
  181. public string VideoDeviceId { get; set; }
  182. /// <summary>
  183. /// 视屏画面设备来源的类型(设备主屏或摄像头)
  184. /// </summary>
  185. /// <value></value>
  186. public int VideoDeviceSourceType { get; set; }
  187. /// <summary>
  188. /// 设备设置的画面宽度,上报值
  189. /// </summary>
  190. /// <value></value>
  191. public int Width { get; set; }
  192. /// <summary>
  193. /// 设备设置的画面高度,上报值
  194. /// </summary>
  195. /// <value></value>
  196. public int Height { get; set; }
  197. /// <summary>
  198. /// 设备设置的画面宽度
  199. /// </summary>
  200. /// <value></value>
  201. public int OutputWidth { get; set; }
  202. /// <summary>
  203. /// 设备设置的画面高度
  204. /// </summary>
  205. /// <value></value>
  206. public int OutputHeight { get; set; }
  207. /// <summary>
  208. /// 帧率
  209. /// </summary>
  210. /// <value></value>
  211. public int VideoFps { get; set; } = 20;
  212. /// <summary>
  213. /// 码率
  214. /// </summary>
  215. /// <value></value>
  216. public int VideoBitrate { get; set; } = 2000;
  217. /// <summary>
  218. /// 最小码率
  219. /// </summary>
  220. /// <value></value>
  221. public int MinVideoBitrate { get; set; } = 1000;
  222. }
  223. }