You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using System ;
using System.Collections.Generic ;
using System.Linq ;
using System.Text ;
using System.Threading.Tasks ;
namespace HighWayIot.TouchSocket.Entity
{
public class BaseMessagePack
{
/// <summary>
/// 功能码
/// </summary>
public byte [ ] FunctionCode { get ; set ; } = new byte [ 2 ] ;
/// <summary>
/// 长度(版本号、序列号、时间戳、数据内容)
/// </summary>
public byte [ ] Length { get ; set ; } = new byte [ 2 ] ;
/// <summary>
/// 版本号( 协议版本号, 初始值为1)
/// </summary>
public byte VersionCode { get ; set ; }
/// <summary>
/// 报文序列号( 循环加1)
/// </summary>
public byte [ ] SerialCode { get ; set ; } = new byte [ 4 ] ;
/// <summary>
/// 时间戳(毫秒)
/// </summary>
public byte [ ] TimeStamp { get ; set ; } = new byte [ 8 ] ;
/// <summary>
/// 数据内容
/// </summary>
public byte [ ] DataContent { get ; set ; }
/// <summary>
/// 校验和( 功能码到内容结束为sum, 255-(sum%255)。)
/// </summary>
public byte CheckSum { get ; set ; }
}
}