Package jmri
Interface CommandStation
- All Known Implementing Classes:
BiDiBTrafficController,CbusCommandStation,DCCppCommandStation,EasyDccCommandStation,HornbyEliteCommandStation,LenzCommandStation,MarklinSimTrafficController,MarklinTrafficController,Mx1CommandStation,NceTrafficController,OlcbCommandStation,RocoCommandStation,RocoZ21CommandStation,SlotManager,SprogCommandStation,TamsTrafficController,TrafficController,UhlenbrockSlotManager
public interface CommandStation
Provide a DCC command station's basic ability: Sending DCC packets to the
rails.
Note that this is separate from higher-level things like access to
Throttle capability (e.g. via ThrottleManager),
more convenient sending of accessory command messages via JMRI
Turnout objects, programming via service mode
(Programmer) or on-main programmers
(AddressedProgrammer) etc.
System-specific implementations can be obtained via the
InstanceManager class.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidsendAccSignalDecoderPkt(int address, int aspect, int count) As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send Accessory Signal Decoder Packets.default voidsendAltAccSignalDecoderPkt(int address, int aspect, int count) As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send the alternate form of Accessory Signal Decoder Packets.booleansendPacket(byte[] packet, int repeats) Send a specific packet to the rails.
-
Method Details
-
sendPacket
Send a specific packet to the rails.- Parameters:
packet- Byte array representing the packet, including the error-correction byte.repeats- Number of times to repeat the transmission.- Returns:
trueif the operation succeeds,falseotherwise.
-
getUserName
-
getSystemPrefix
-
sendAccSignalDecoderPkt
As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send Accessory Signal Decoder Packets.It's equivalent to calling
NmraPacket.accSignalDecoderPkt(int, int)and sending the resulting packet to the rails- Parameters:
address- The DCC signal decoder address to useaspect- The signal aspect to sendcount- the number of times to repeat the send
-
sendAltAccSignalDecoderPkt
As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send the alternate form of Accessory Signal Decoder Packets.It's equivalent to calling
NmraPacket.altAccSignalDecoderPkt(int, int)and sending the resulting packet to the rails- Parameters:
address- The DCC signal decoder address to useaspect- The signal aspect to sendcount- the number of times to repeat the send
-