2023-07-27 15:29:37 +08:00
|
|
|
import 'io_type.dart';
|
|
|
|
|
|
|
|
|
|
abstract class Reply{
|
|
|
|
|
//value字节长度
|
2023-08-09 09:32:09 +08:00
|
|
|
int? packetHeader = 4; // 包头4个字节
|
|
|
|
|
int? packetType = 1; // 包类型1个字节
|
|
|
|
|
int? packetNumber = 1; // 包序号
|
|
|
|
|
int? packetIdentifier = 1; // 包标识
|
|
|
|
|
int? packetLength = 4; // 包标识
|
2023-07-27 15:29:37 +08:00
|
|
|
CommandType? commandType;
|
2023-08-09 09:32:09 +08:00
|
|
|
int? packetMcrc = 2; // 校验位
|
2023-07-27 15:29:37 +08:00
|
|
|
|
|
|
|
|
//command key flag
|
|
|
|
|
int commandKey = 0;
|
|
|
|
|
|
2023-08-08 09:42:35 +08:00
|
|
|
Reply.parseData(this.commandType, List<int> dataDetail);
|
2023-08-09 09:32:09 +08:00
|
|
|
// Reply({this.result});
|
2023-07-27 15:29:37 +08:00
|
|
|
|
|
|
|
|
|
2023-08-09 09:32:09 +08:00
|
|
|
// bool get isSuccessfully => packetHeader == EF01EE02;
|
2023-07-27 15:29:37 +08:00
|
|
|
|
|
|
|
|
}
|