001package jmri.jmrix.secsi; 002 003/** 004 * Contains the data payload of a serial reply packet. Note that it's _only_ the 005 * payload. 006 * 007 * @author Bob Jacobsen Copyright (C) 2002, 2006, 2007, 2008 008 */ 009public class SerialReply extends jmri.jmrix.AbstractMRReply { 010 011 // create a new one 012 public SerialReply() { 013 super(); 014 setBinary(true); 015 } 016 017 public SerialReply(String s) { 018 super(s); 019 setBinary(true); 020 } 021 022 public SerialReply(SerialReply l) { 023 super(l); 024 setBinary(true); 025 } 026 027 /** 028 * Is reply to poll message. 029 * @return element 0 of reply. 030 * @see SerialSensorManager#reply(SerialReply) 031 */ 032 public int getAddr() { 033 //log.error("getAddr should not be called", new Exception()); // will happen replying to Secsi Simulator 034 return getElement(0); 035 } 036 037 @Override 038 protected int skipPrefix(int index) { 039 // doesn't have to do anything 040 return index; 041 } 042 043 //private final static Logger log = LoggerFactory.getLogger(SerialReply.class); 044 045}