update 电单车协议

This commit is contained in:
Guoqs
2024-07-15 15:07:38 +08:00
parent ebf5259a6f
commit 61b948aea9
4 changed files with 184 additions and 5 deletions

View File

@@ -0,0 +1,49 @@
package com.jsowell.netty.domain;
public class ProtocolDnyMessage {
private final byte[] header;
private final int length;
private final byte[] physicalId;
private final int messageId;
private final byte command;
private final byte[] data;
private final int checksum;
public ProtocolDnyMessage(byte[] header, int length, byte[] physicalId, int messageId, byte command, byte[] data, int checksum) {
this.header = header;
this.length = length;
this.physicalId = physicalId;
this.messageId = messageId;
this.command = command;
this.data = data;
this.checksum = checksum;
}
public byte[] getHeader() {
return header;
}
public int getLength() {
return length;
}
public byte[] getPhysicalId() {
return physicalId;
}
public int getMessageId() {
return messageId;
}
public byte getCommand() {
return command;
}
public byte[] getData() {
return data;
}
public int getChecksum() {
return checksum;
}
}