Class NceMessage

All Implemented Interfaces:
Message

public class NceMessage
extends AbstractMRMessage
Encodes a message to an NCE command station.

The NceReply class handles the response from the command station.

The NCE protocol has "binary" and "ASCII" command sets. Depending on the version of the EPROM it contains, NCE command stations have different support for command sets:

  • 1999 - All ASCII works. Binary works except for programming.
  • 2004 - ASCII needed for programming, binary for everything else.
  • 2006 - binary needed for everything
See the NceTrafficController.setCommandOptions(int) method for more information.

Apparently the binary "exitProgrammingMode" command can crash the command station if the EPROM was built before 2006. This method uses a state flag (NceTrafficController.getNceProgMode()) to detect whether a command to enter program mode has been generated, and presumably sent, when using the later EPROMS.