Class CabMessage

java.lang.Object
jmri.jmrit.etcs.CabMessage
Direct Known Subclasses:
DmiCabMessage

@API(status=EXPERIMENTAL) public class CabMessage extends Object
Class to represent a CabMessage to send to the ERTMS DMI.
  • Constructor Details

    • CabMessage

      public CabMessage(String msg, int intValue, boolean ackReqd)
      Create a new CabMessage.
      Parameters:
      msg - String of message value
      intValue - 1 if system status / important, 2 for auxiliary messages.
      ackReqd - true if an acknowledgement is required, else false.
    • CabMessage

      public CabMessage(@Nonnull String messageId, String msg, int intValue, boolean ackReqd)
      Create a new CabMessage.
      Parameters:
      messageId - unique ID String.
      msg - String of message value
      intValue - 1 if system status / important, 2 for auxiliary messages.
      ackReqd - true if an acknowledgement is required, else false.
  • Method Details

    • getMessage

      public String getMessage()
      Get the Message String.
      Returns:
      String of the Message.
    • getMessageId

      public String getMessageId()
      Get the unique Message ID.
      Returns:
      the Message ID.
    • getSentTime

      public Date getSentTime()
      Get the Date that the Message was Sent.
      Returns:
      the date of message creation.
    • getConfirmedTime

      Get the Time the message was confirmed by the driver.
      Returns:
      time confirmed, else null if unconfirmed.
    • setConfirmed

      public void setConfirmed()
      Set the CabMessage as confirmed. Sets the confirmed time.
    • getAckRequired

      public boolean getAckRequired()
      Get if a driver acknowledgement is required for this message.
      Returns:
      true if acknowledgement required, else false.
    • getGroup

      public int getGroup()
      Get Message Group. 1 - system status messages and the important plain/fixed text messages received from track-side. 2 - auxiliary plain/fixed text messages received from track-side.
      Returns:
      the group this message is in.