Class RfidMessage

  • All Implemented Interfaces:
    Message
    Direct Known Subclasses:
    ConcentratorMessage, StandaloneMessage

    public abstract class RfidMessage
    extends AbstractMRMessage
    Contains the data payload of a serial packet.

    The transmission protocol can come in one of several forms:

    • If the interlocked parameter is false (default), the packet is just sent. If the response length is not zero, a reply of that length is expected.
    • If the interlocked parameter is true, the transmission will require a CRC interlock, which will be automatically added. (Design note: this is done to make sure that the messages remain atomic)
    Since:
    2.11.4
    • Constructor Detail

      • RfidMessage

        protected RfidMessage()
        Suppress the default ctor, as the length must always be specified
      • RfidMessage

        public RfidMessage​(java.lang.String m,
                           int l)
        This ctor interprets the String as the exact sequence to send, byte-for-byte.
        Parameters:
        m - String to send
        l - length of expected response
      • RfidMessage

        public RfidMessage​(byte[] a,
                           int l)
        This ctor interprets the byte array as a sequence of characters to send.
        Parameters:
        a - Array of bytes to send
        l - length of expected response
    • Method Detail

      • setResponseLength

        public final void setResponseLength​(int l)
        Sets the length of an expected response
        Parameters:
        l - length of expected response
      • getResponseLength

        public int getResponseLength()
        Returns the length of an expected response
        Returns:
        length of expected response