Package jmri.jmrit.etcs
Class CabMessage
java.lang.Object
jmri.jmrit.etcs.CabMessage
- Direct Known Subclasses:
DmiCabMessage
Class to represent a CabMessage to send to the ERTMS DMI.
-
Constructor Summary
ConstructorsConstructorDescriptionCabMessage(String msg, int intValue, boolean ackReqd) Create a new CabMessage.CabMessage(String messageId, String msg, int intValue, boolean ackReqd) Create a new CabMessage. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet if a driver acknowledgement is required for this message.Get the Time the message was confirmed by the driver.intgetGroup()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.Get the Message String.Get the unique Message ID.Get the Date that the Message was Sent.voidSet the CabMessage as confirmed.
-
Constructor Details
-
CabMessage
Create a new CabMessage.- Parameters:
msg- String of message valueintValue- 1 if system status / important, 2 for auxiliary messages.ackReqd- true if an acknowledgement is required, else false.
-
CabMessage
Create a new CabMessage.- Parameters:
messageId- unique ID String.msg- String of message valueintValue- 1 if system status / important, 2 for auxiliary messages.ackReqd- true if an acknowledgement is required, else false.
-
-
Method Details
-
getMessage
Get the Message String.- Returns:
- String of the Message.
-
getMessageId
Get the unique Message ID.- Returns:
- the Message ID.
-
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
Set the CabMessage as confirmed. Sets the confirmed time. -
getAckRequired
Get if a driver acknowledgement is required for this message.- Returns:
- true if acknowledgement required, else false.
-
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.
-