package com.gary.msr.proto;

import java.io.Serializable;

public class MSRLayerParams {
	public static class MSRLayer1Params implements Serializable {
		private static final long serialVersionUID = 1L;
		public char ch1ss;
		public char ch1es;
		public char ch2ss;
		public char ch2es;
		public char ch3ss;
		public char ch3es;
		public boolean beepFlag;
		public boolean ibmFlag;
		public boolean checkFormatFlag;
		public boolean usbModeFlag;
		public boolean newFlag;
		public int card1;
		public boolean chard1EnterFlag;
		public int card2;
		public boolean chard2EnterFlag;
		public int card3;
		public boolean chard3EnterFlag;
		public int iButtonOnOffsetStart;
		public int iButtonOnOffsetType;
		public int iButtonOnOffsetLen;
		public boolean iButtonOnBeepFlag;
		public int iButtonOffOffsetStart;
		public int iButtonOffOffsetType;
		public int iButtonOffOffsetLen;
		public boolean iButtonOffBeepFlag;
		public char iButtonss;
		public char iButtones;
		public char jis2ss;
		public char jis2es;

		public MSRLayer1Params() {

		}

		public MSRLayer1Params(char ch1ss, char ch1es, char ch2ss, char ch2es,
				char ch3ss, char ch3es, boolean beepFlag, boolean ibmFlag,
				boolean checkFormatFlag, boolean usbModeFlag, boolean newFlag,
				int card1, boolean chard1EnterFlag, int card2,
				boolean chard2EnterFlag, int card3, boolean chard3EnterFlag,
				int iButtonOnOffsetStart, int iButtonOnOffsetType,
				int iButtonOnOffsetLen, boolean iButtonOnBeepFlag,
				int iButtonOffOffsetStart, int iButtonOffOffsetType,
				int iButtonOffOffsetLen, boolean iButtonOffBeepFlag,
				char iButtonss, char iButtones, char jis2ss, char jis2es) {
			super();
			this.ch1ss = ch1ss;
			this.ch1es = ch1es;
			this.ch2ss = ch2ss;
			this.ch2es = ch2es;
			this.ch3ss = ch3ss;
			this.ch3es = ch3es;
			this.beepFlag = beepFlag;
			this.ibmFlag = ibmFlag;
			this.checkFormatFlag = checkFormatFlag;
			this.usbModeFlag = usbModeFlag;
			this.newFlag = newFlag;
			this.card1 = card1;
			this.chard1EnterFlag = chard1EnterFlag;
			this.card2 = card2;
			this.chard2EnterFlag = chard2EnterFlag;
			this.card3 = card3;
			this.chard3EnterFlag = chard3EnterFlag;
			this.iButtonOnOffsetStart = iButtonOnOffsetStart;
			this.iButtonOnOffsetType = iButtonOnOffsetType;
			this.iButtonOnOffsetLen = iButtonOnOffsetLen;
			this.iButtonOnBeepFlag = iButtonOnBeepFlag;
			this.iButtonOffOffsetStart = iButtonOffOffsetStart;
			this.iButtonOffOffsetType = iButtonOffOffsetType;
			this.iButtonOffOffsetLen = iButtonOffOffsetLen;
			this.iButtonOffBeepFlag = iButtonOffBeepFlag;
			this.iButtonss = iButtonss;
			this.iButtones = iButtones;
			this.jis2ss = jis2ss;
			this.jis2es = jis2es;
		}

	}

	public static class MSRLayer2Params implements Serializable {
		private static final long serialVersionUID = 2L;
		public int index;

		public MSRLayer2Params(int index) {
			super();
			this.index = index;
		}

		public MSRLayer2Params() {

		}
	}

	// NΪ3~11
	public static class MSRLayerNParam implements Serializable {
		private static final long serialVersionUID = 3L;
		public int n;
		public boolean asciiMode;
		public int[] data;

		public MSRLayerNParam(int n, boolean asciiMode, int[] data) {
			super();
			this.n = n;
			this.asciiMode = asciiMode;
			this.data = data;
		}

		public MSRLayerNParam() {

		}

		@Override
		public boolean equals(Object obj) {
			if (obj == null) {
				return false;
			} else {
				if (this.getClass() != obj.getClass())
					return false;
				MSRLayerNParam neweParam = (MSRLayerNParam) obj;
				if (this.n == neweParam.n
						&& this.asciiMode == neweParam.asciiMode)
					return true;
				return false;

			}
		}
	}
}
