MasstransferExporter/MasstransferCommon/Model/Constant/Topics.cs

128 lines
3.8 KiB
C#
Raw Normal View History

2024-09-24 03:16:08 +00:00
using MasstransferSecurity.Utils;
namespace MasstransferCommon.Model.Constant;
2024-07-03 06:24:17 +00:00
/// <summary>
/// 这里保存所有的 Mqtt Topic
2024-07-09 03:41:08 +00:00
/// topic 的基本结构构成
2024-09-24 03:16:08 +00:00
/// up/{DeviceInfoUtil.GetDeviceSN()}/{cmd}/{version}
2024-07-09 03:41:08 +00:00
///
2024-07-03 06:24:17 +00:00
/// </summary>
2024-07-09 03:41:08 +00:00
public static class Topics
2024-07-03 06:24:17 +00:00
{
2024-07-09 03:41:08 +00:00
// ReSharper disable once InconsistentNaming
2024-09-24 03:16:08 +00:00
private static string Version = "1.0.0";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上报生产数据
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportProductRecord = $"up/{DeviceInfoUtil.GetDeviceSN()}/100/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 图片上传
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ImageUpload = $"up/{DeviceInfoUtil.GetDeviceSN()}/102/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 查询图片
/// </summary>
2024-09-24 03:16:08 +00:00
public static string QueryImage = $"down/{DeviceInfoUtil.GetDeviceSN()}/103/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 坐标文件上传
/// </summary>
2024-09-24 03:16:08 +00:00
public static string CoordinateUpload = $"up/{DeviceInfoUtil.GetDeviceSN()}/104/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 查询坐标文件
/// </summary>
2024-09-24 03:16:08 +00:00
public static string QueryCoordinate = $"down/{DeviceInfoUtil.GetDeviceSN()}/105/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上报用户操作数据
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportOperationLog = $"up/{DeviceInfoUtil.GetDeviceSN()}/200/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上传系统日志文件
/// </summary>
2024-09-24 03:16:08 +00:00
public static string UploadLogFile = $"up/{DeviceInfoUtil.GetDeviceSN()}/201/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 查询系统日志文件
/// </summary>
2024-09-24 03:16:08 +00:00
public static string QueryLogFile = $"down/{DeviceInfoUtil.GetDeviceSN()}/202/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上报故障信息
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportFaultRecord = $"up/{DeviceInfoUtil.GetDeviceSN()}/203/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上报配置数据
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportConfigData = $"up/{DeviceInfoUtil.GetDeviceSN()}/400/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 下发配置数据
/// </summary>
2024-09-24 03:16:08 +00:00
public static string DownloadConfigData = $"down/{DeviceInfoUtil.GetDeviceSN()}/401/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 下发远程控制指令
/// </summary>
2024-09-24 03:16:08 +00:00
public static string RemoteControl = $"down/{DeviceInfoUtil.GetDeviceSN()}/402/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上报配置字典数据
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportConfigDictionary = $"up/{DeviceInfoUtil.GetDeviceSN()}/403/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 下发OTA包
/// </summary>
// ReSharper disable once InconsistentNaming
2024-09-24 03:16:08 +00:00
public static string IssuedOTAPackage = $"down/{DeviceInfoUtil.GetDeviceSN()}/500/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 查询OTA信息
/// </summary>
// ReSharper disable once InconsistentNaming
2024-09-24 03:16:08 +00:00
public static string QueryOTA = $"up/{DeviceInfoUtil.GetDeviceSN()}/501/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// OTA 更新反馈
/// </summary>
// ReSharper disable once InconsistentNaming
2024-09-24 03:16:08 +00:00
public static string OTAUpgradeFeedback = $"up/{DeviceInfoUtil.GetDeviceSN()}/502/{Version}";
2024-07-09 03:41:08 +00:00
2024-07-03 06:24:17 +00:00
/// <summary>
/// 更新证书事件
/// </summary>
2024-09-24 03:16:08 +00:00
public static string UpdateLicenseEvent = $"up/{DeviceInfoUtil.GetDeviceSN()}/503/{Version}";
2024-07-03 06:24:17 +00:00
/// <summary>
/// 更新证书事件反馈
/// </summary>
2024-09-24 03:16:08 +00:00
public static string UpdateLicenseEventFeedback = $"up/{DeviceInfoUtil.GetDeviceSN()}/505/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上行心跳信息
/// </summary>
2024-09-24 03:16:08 +00:00
public static string HeartBeat = $"up/{DeviceInfoUtil.GetDeviceSN()}/600/{Version}";
2024-07-09 03:41:08 +00:00
/// <summary>
/// 上行系统状态信息
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportSystemStat = $"up/{DeviceInfoUtil.GetDeviceSN()}/601/{Version}";
2024-09-11 12:43:14 +00:00
/// <summary>
/// 上行系统版本信息
/// </summary>
2024-09-24 03:16:08 +00:00
public static string ReportSystemVersion = $"up/{DeviceInfoUtil.GetDeviceSN()}/602/{Version}";
2024-07-03 06:24:17 +00:00
}