Class SerialMessage

All Implemented Interfaces:
Message
Direct Known Subclasses:
SpecificMessage, SpecificMessage, SpecificMessage, SpecificMessage, SpecificMessage

public abstract class SerialMessage 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)
  • Field Details

  • Constructor Details

    • SerialMessage

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

      public SerialMessage(int l)
    • SerialMessage

      public SerialMessage(String m, int l)
      This ctor interprets the String as the exact sequence to send, byte-for-byte.
      Parameters:
      m - sequence to send
      l - expected reply length
    • SerialMessage

      @Deprecated(since="5.13.5", forRemoval=true) public SerialMessage(byte[] a, int l)
      Deprecated, for removal: This API element is subject to removal in a future version.
      5.13.5, unused, requires further development.
      This ctor interprets the byte array as a sequence of characters to send.
      Parameters:
      a - Array of bytes to send
      l - expected reply length
  • Method Details