package h.com.serialportapi.comn.message;


/**
 * 收到的日志
 */

public class RecvMessage implements IMessage {

    private String command;
    private String message;

    public RecvMessage(String command) {
        this.command = command;
        // this.message = TimeUtil.currentTime() + "    收到命令：" + command;
        if (command.substring(0, 2).equals("F0")) {
            this.message = "receive instruction ：" + command + " -- failure";
        } else {
            this.message = "receive instruction ：" + command + " -- success";
        }
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public boolean isToSend() {
        return false;
    }
}
