54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
namespace JiShe.CollectBus.Protocol.Contracts.Models
|
|
{
|
|
public class MessageReceivedEvent
|
|
{
|
|
public MessageReceivedEvent(string clientId, string clientIp,int port, string messageHexString, string deviceNo)
|
|
{
|
|
ClientId = clientId;
|
|
ClientIP = clientIp;
|
|
Port = port;
|
|
MessageHexString = messageHexString;
|
|
DeviceNo = deviceNo;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 客服端标识
|
|
/// </summary>
|
|
public string ClientId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客服端IP
|
|
/// </summary>
|
|
public string ClientIP { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客服端端口
|
|
/// </summary>
|
|
public int Port { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客服端报文
|
|
/// </summary>
|
|
public string MessageHexString { get; set; }
|
|
|
|
/// <summary>
|
|
/// 设备号
|
|
/// </summary>
|
|
public string DeviceNo { get; set; }
|
|
}
|
|
|
|
public class MessageReceivedLoginEvent: MessageReceivedEvent
|
|
{
|
|
public MessageReceivedLoginEvent(string clientId, string clientIp, int port, string messageHexString, string deviceNo) : base(clientId, clientIp, port, messageHexString, deviceNo)
|
|
{
|
|
}
|
|
}
|
|
|
|
public class MessageReceivedHeartbeatEvent : MessageReceivedEvent
|
|
{
|
|
public MessageReceivedHeartbeatEvent(string clientId, string clientIp, int port, string messageHexString, string deviceNo) : base(clientId, clientIp, port, messageHexString, deviceNo)
|
|
{
|
|
}
|
|
}
|
|
}
|