package com.sagacloud.dto;

/**
 * 指令下发结果
 */
public class OrderSendResp {
	private int state = OrderExeState.OK_SEND.getCode();
	/** 指令执行结果，只有state=200时有值 */
	public String exeResult;
	/** 下发指令的编号，格式： 时间戳-顺序号 */
	public String orderSeqNum;
	/** 指令发送结果  */
	public String sendResult;
	
	public int getState() {
		return state;
	}
	public void beOK() {
		state = OrderExeState.OK.getCode();
	}
	public void beOKSend() {
		state = OrderExeState.OK_SEND.getCode();
	}
	public void beErrSend() {
		state = OrderExeState.ERR_SEND.getCode();
	}
	public void beErrAnalysis() {
		state = OrderExeState.ERR_ANALYSIS.getCode();
	}
	@Override
	public String toString() {
		return "OrderSendResp [state=" + state + ", exeResult=" + exeResult + ", orderSeqNum=" + orderSeqNum
				+ ", sendResult=" + sendResult + "]";
	}
	
}
