001package jmri.jmrix.loconet.locoio; 002 003/** 004 * 005 * @author John Plocher, January 3, 2007 006 */ 007public class LocoIOMode { 008 009 /** 010 * Create a new instance of LocoIOMode. 011 * @param isOutput isOutput value. 012 * @param opcode opcode. 013 * @param sv0 sv0 value. 014 * @param sv2 sv2 value. 015 * @param mode IO mode. 016 */ 017 public LocoIOMode(int isOutput, int opcode, int sv0, int sv2, String mode) { 018 this.isOutput = isOutput; 019 this.opcode = opcode; 020 this.sv0 = sv0; 021 this.sv2 = sv2; 022 this.mode = mode; 023 } 024 private final int isOutput; 025 private final int opcode; 026 private final int sv0; 027 private final int sv2; 028 private final String mode; 029 030 public String getMode() { 031 return mode; 032 } 033 034 public String getFullMode() { 035 return ((isOutput == 1) ? "Output: " : "Input: ") + mode + " "; 036 } 037 038 public int getOutput() { 039 return isOutput; 040 } 041 042 public int getOpCode() { 043 return opcode; 044 } 045 046 public int getSV() { 047 return sv0; 048 } 049 050 public int getV2() { 051 return sv2; 052 } 053 054}