Class CabMessage

  • Direct Known Subclasses:
    DmiCabMessage

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

      Constructors 
      Constructor Description
      CabMessage​(java.lang.String msg, int intValue, boolean ackReqd)
      Create a new CabMessage.
      CabMessage​(java.lang.String messageId, java.lang.String msg, int intValue, boolean ackReqd)
      Create a new CabMessage.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getAckRequired()
      Get if a driver acknowledgement is required for this message.
      java.util.Date getConfirmedTime()
      Get the Time the message was confirmed by the driver.
      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.
      java.lang.String getMessage()
      Get the Message String.
      java.lang.String getMessageId()
      Get the unique Message ID.
      java.util.Date getSentTime()
      Get the Date that the Message was Sent.
      void setConfirmed()
      Set the CabMessage as confirmed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CabMessage

        public CabMessage​(java.lang.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
                          java.lang.String messageId,
                          java.lang.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 Detail

      • getMessage

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

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

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

        @CheckForNull
        public java.util.Date 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.