2024-07-15 16:05:15 +08:00
|
|
|
package com.jsowell.netty.domain;
|
|
|
|
|
|
2024-07-15 17:10:48 +08:00
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
|
|
|
|
2024-07-15 16:05:15 +08:00
|
|
|
public class ChargingPileMessage {
|
|
|
|
|
private int physicalId;
|
|
|
|
|
private short messageId;
|
|
|
|
|
private byte command;
|
|
|
|
|
private byte[] data;
|
|
|
|
|
|
|
|
|
|
public ChargingPileMessage(int physicalId, short messageId, byte command, byte[] data) {
|
|
|
|
|
this.physicalId = physicalId;
|
|
|
|
|
this.messageId = messageId;
|
|
|
|
|
this.command = command;
|
|
|
|
|
this.data = data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Getters
|
|
|
|
|
public int getPhysicalId() { return physicalId; }
|
|
|
|
|
public short getMessageId() { return messageId; }
|
|
|
|
|
public byte getCommand() { return command; }
|
|
|
|
|
public byte[] getData() { return data; }
|
2024-07-15 17:10:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String toString() {
|
|
|
|
|
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
|
|
|
|
.append("physicalId", physicalId)
|
|
|
|
|
.append("messageId", messageId)
|
|
|
|
|
.append("command", command)
|
|
|
|
|
.append("data", data)
|
|
|
|
|
.toString();
|
|
|
|
|
}
|
2024-07-15 16:05:15 +08:00
|
|
|
}
|