增加日志

This commit is contained in:
2026-02-03 08:54:16 +08:00
parent 10bf712006
commit 3de5990573
33 changed files with 865 additions and 43 deletions

View File

@@ -103,6 +103,10 @@ namespace CommonEntity
[Id(6)]
[Key(6)]
public string? RoomNumber { get; set; }
[Id(7)]
[Key(7)]
public long? UnixTime { get; set; }
}

View File

@@ -6,6 +6,58 @@ using System.Threading.Tasks;
namespace CommonEntity
{
public class ts_deviceitem
{
public short dev_type { get; set; }
public short dev_addr { get; set; }
public short dev_loop { get; set; }
public int dev_data { get; set; }
}
public class ts_faultitem
{
public short dev_type { get; set; }
public short dev_addr { get; set; }
public short dev_loop { get; set; }
public short error_type { get; set; }
public int error_data { get; set; }
}
public class ts_controlitem
{
public short dev_type { get; set; }
public short dev_addr { get; set; }
public short dev_loop { get; set; }
public short type_l { get; set; }
public int type_h { get; set; }
}
/// <summary>
/// 0x36
/// </summary>
public class DeviceActionData
{
public long ts_ms { get; set; }
public string hotel_id { get; set; }
public string room_id { get; set; }
public string device_id { get; set; }
/// <summary>
/// "上报" 或 "下发"
/// </summary>
public string direction { get; set; }
public string cmd_word { get; set; }
public int frame_id { get; set; }
public byte[] udp_raw { get; set; }
public int sys_lock_status { get; set; }
public int report_count { get; set; }
public int fault_count { get; set; }
public List<ts_deviceitem> device_list { get; set; }
public List<ts_faultitem> fault_list { get; set; }
public List<ts_controlitem> control_list { get; set; }
}
/// <summary>
/// ts 日志
/// </summary>
@@ -26,15 +78,41 @@ namespace CommonEntity
public int comm_seq { get; set; }
public long ts_ms { get; set; }
public List<NengHaolog> electricity { get; set; }
public List<KongTiao> air_conditioner { get; set; }
public extra_data extra { get; set; }
public int insert_card { get; set; }
public int bright_g { get; set; }
public int version { get; set; }
}
public class NengHaolog
{
public string address { get; set; }
public double voltage { get; set; }
public double ampere { get; set; }
public double power { get; set; }
public double energy { get; set; }
public double sum_energy { get; set; }
public string phase { get; set; }
}
public class KongTiao
{
public string address { get; set; }
public int state { get; set; }
public int model { get; set; }
public int speed { get; set; }
public int set_temp { get; set; }
public int now_temp { get; set; }
public int solenoid_valve { get; set; }
}
public class extra_data
{
public byte[] original_byte { get; set; }
public string source { get; set; }
//public string source { get; set; }
public string ver { get; set; }
public object ac { get; set; }
public object meter { get; set; }
//public object ac { get; set; }
//public object meter { get; set; }
}
}

View File

@@ -35,6 +35,8 @@ namespace CommonEntity
/// 心跳包
/// </summary>
public static string BLWLog4NodeJs_RCU_Topic = "blwlog4Nodejs-rcu-heartbeat-topic";
public static string BLWLog4NodeJs_RCU_OnOffLine_Topic = "blwlog4Nodejs-rcu-onoffline-topic";
public static string BLWLog4NodeJs_RCU_Action_Topic = "blwlog4Nodejs-rcu-action-topic";
#endregion
@@ -231,7 +233,7 @@ namespace CommonEntity
public string? Version { get; set; }
[Key(5)]
public bool IsTakeCard { get; set; }
public int IsTakeCard { get; set; }
[Key(6)]
public List<NengHao_Repeat> NengHaoList { get; set; }
@@ -294,6 +296,9 @@ namespace CommonEntity
[Key(15)]
public int IsInsertCard { get; set; }
[Key(16)]
public int Bright_G { get; set; }
}
[MessagePackObject()]
@@ -470,11 +475,13 @@ namespace CommonEntity
public string? EndPoint { get; set; }
public string? Version { get; set; }
public bool IsTakeCard { get; set; }
public double V { get; set; }
public double A { get; set; }
public double P { get; set; }
public double Energy_Consumption { get; set; }
public double Sum_Energy_Consumption { get; set; }
public List<NengHao_Repeat> NengHaoList { get; set; }
//public double V { get; set; }
//public double A { get; set; }
//public double P { get; set; }
//public double Energy_Consumption { get; set; }
//public double Sum_Energy_Consumption { get; set; }
public long CreateTime { get; set; }
public DateTime ReportTime { get; set; }