예제 #1
0
        public override string ToString()
        {
            var res = new StringBuilder();

            res.AppendLine($"帧起始码:{start:X2}");
            res.AppendLine($"设备逻辑地址:{DeviceLogicalCode.ByteArrayToString()}");
            res.AppendLine($"命令序列号:{Seq.ByteArrayToString()}");
            res.AppendLine($"控制码:{ControlCode:X2}");
            res.AppendLine($"数据长度:{Length.ByteArrayToString()}");
            res.AppendLine($"数据域:{Data.ByteArrayToString()}");
            res.AppendLine($"CS校验:{Cs:X2}");
            res.AppendLine($"当前完整帧:{EntireFrame.ByteArrayToString()}");
            res.Append($"帧结束码:{end:X2}");
            return(res.ToString());
        }