Class SerialMessage

All Implemented Interfaces:
Message

public class SerialMessage extends AbstractMRMessage
Contains the data payload of a TMCC serial packet.

Note that only the payload, not the header or trailer, nor the padding DLE characters are included. These are added during transmission.

  • Constructor Details

    • SerialMessage

      public SerialMessage()
    • SerialMessage

    • SerialMessage

      public SerialMessage(String m)
      This ctor interprets the String as the exact sequence to send, byte-for-byte.
      Parameters:
      m - string form of bytes to send
    • SerialMessage

      @Deprecated(since="5.13.5", forRemoval=true) public SerialMessage(byte[] a)
      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
    • SerialMessage

      public SerialMessage(int value)
      This ctor takes an int value for the 16 bit data content, with an optional leading byte. If the value is greater than 0xFFFF, i.e. the upper byte of three is non-zero, the upper byte is used as the op code, otherwise 0xFE (TMCC 1) will be used.
      Parameters:
      value - The value stored in the content of the packet
  • Method Details