update 电单车协议

This commit is contained in:
Guoqs
2024-07-15 17:10:48 +08:00
parent b9ec56a202
commit 6487bb8bdc
8 changed files with 199 additions and 79 deletions

View File

@@ -1,5 +1,8 @@
package com.jsowell.netty.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class ChargingPileMessage {
private int physicalId;
private short messageId;
@@ -18,4 +21,15 @@ public class ChargingPileMessage {
public short getMessageId() { return messageId; }
public byte getCommand() { return command; }
public byte[] getData() { return data; }
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
.append("physicalId", physicalId)
.append("messageId", messageId)
.append("command", command)
.append("data", data)
.toString();
}
}

View File

@@ -0,0 +1,15 @@
package com.jsowell.netty.domain;
import io.netty.buffer.ByteBuf;
public class DnyMessage {
private final ByteBuf content;
public DnyMessage(ByteBuf content) {
this.content = content;
}
public ByteBuf getContent() {
return content;
}
}

View File

@@ -0,0 +1,15 @@
package com.jsowell.netty.domain;
import io.netty.buffer.ByteBuf;
public class Message68 {
private final ByteBuf content;
public Message68(ByteBuf content) {
this.content = content;
}
public ByteBuf getContent() {
return content;
}
}