package com.szpg.plc.message.response;

import java.util.Calendar;

import org.apache.log4j.Logger;

import com.szpg.plc.message.CommandResponse;

public class LinkCommandResponse extends CommandResponse {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -3918316368349985732L;
	
	private Logger logger = Logger.getLogger(this.getClass().getName());
	
	public LinkCommandResponse() {
		super();
	}

	public LinkCommandResponse(Calendar time) {
		super(time);
	}

	public LinkCommandResponse(Calendar time, String messageProducerId) {
		super(time, messageProducerId);
	}

	@Override
	public void afterAction() {
		if (isValid() == true) {
			logger.debug("终端[" + getMessageProducerId() + "]握手成功");
		}
		else {
			logger.warn("终端[" + getMessageProducerId() + "]握手失败");
		}
	}

	@Override
	public String toString() {
		return "终端[" + getMessageProducerId() + "]握手命令响应";
	}
	
}
