LedJson.java 1.1 KB
package com.air.led;

import com.google.gson.Gson;

public class LedJson {

	/**
	 * 
	 * @param ledCode
	 *            Led屏的编号
	 * @param opType
	 *            0屏复位,1屏上显示车牌,3查询当前屏上显示内容
	 * @param text
	 *            想让led屏显示的文字
	 */
	public LedJson(String ledCode, int opType, String text) {
		setLedCode(ledCode);
		setOpType(opType);
		if ("空闲".equalsIgnoreCase(text)) {
			setOpType(0);
		} else {
			setText(text);
		}
	}

	private String ledCode;
	private int OpType;
	private String text;
	private int color;

	public String getLedCode() {
		return ledCode;
	}

	public void setLedCode(String ledCode) {
		this.ledCode = ledCode;
	}

	public int getOpType() {
		return OpType;
	}

	public void setOpType(int opType) {
		OpType = opType;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public int getColor() {
		return color;
	}

	public void setColor(int color) {
		this.color = color;
	}

	@Override
	public String toString() {
		return new Gson().toJson(this);
	}

}