Package jmri.jmrix

Class AbstractMRReply

    • Constructor Detail

      • AbstractMRReply

        public AbstractMRReply()
        Create a new AbstractMRReply instance.
      • AbstractMRReply

        public AbstractMRReply​(java.lang.String s)
        Create a new AbstractMRReply instance from a string.
        Parameters:
        s - String to use as reply content
    • Method Detail

      • setOpCode

        public void setOpCode​(int i)
        Set the OpCode. Sets Element 0 to character value of integer.
        Parameters:
        i - Opcode value.
      • getOpCode

        public int getOpCode()
        Get the OpCode.
        Returns:
        value of Element 0.
      • flush

        public void flush()
        Flush the message. Sets number of data characters to 0. Does not reset array length or data.
      • isBinary

        public boolean isBinary()
        Get if the Reply has Binary form flag set.
        Returns:
        true if binary, else false.
      • setBinary

        public void setBinary​(boolean b)
        Set flag for if the Reply is Binary form.
        Parameters:
        b - true if binary, else false.
      • setUnsolicited

        public final void setUnsolicited()
        Set flag for Unsolicited to true.
      • isUnsolicited

        public boolean isUnsolicited()
        Get flag for Unsolicited.
        Returns:
        true if Unsolicited, else false.
      • toString

        public java.lang.String toString()
        Description copied from interface: Message
        Specified by:
        toString in interface Message
        Overrides:
        toString in class java.lang.Object
      • skipPrefix

        protected abstract int skipPrefix​(int index)
      • value

        public int value()
      • match

        public int match​(java.lang.String s)