package com.szpg.plc.message.command.write;

import com.szpg.plc.message.AppMessageConstants;
import com.szpg.plc.message.command.WriteMemoryCommand;
import com.szpg.plc.message.response.WriteMemoryCommandResponse;

public class SetJgOffBitCommand extends WriteMemoryCommand {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 935723353287421429L;

	public final static int JG_OFF_ENABLE = 1; // 井盖关闭
	public final static int JG_OFF_DISABLE = 0; // 井盖关闭复位

	private int jgoff;
	
	public int getJgoff() {
		return jgoff;
	}

	public void setJgoff(int jgoff) {
		this.jgoff = jgoff;
	}

	@Override
	public String getCommandType() {
		return AppMessageConstants.CMD_TYPE_SETJGOFF;
	}

	@Override
	public Class<WriteMemoryCommandResponse> getResponseClass() {
		return WriteMemoryCommandResponse.class;
	}

	@Override
	public String toString() {
		return "向终端[" + getDestinationId() + "]发送设置井盖关闭位命令[" + jgoff + "]";
	}
}
