Class MqttConsistManager

    • Constructor Detail

      • MqttConsistManager

        public MqttConsistManager​(MqttSystemConnectionMemo memo)
        Constructor - call the constructor for the superclass, and initialize the consist reader thread, which retrieves consist information from the command station.
        memo - the associated connection memo
    • Method Detail

      • isCommandStationConsistPossible

        public boolean isCommandStationConsistPossible()
        This implementation does support advanced consists, so return true.
        true if command station consists are supported; false otherwise
      • csConsistNeedsSeperateAddress

        public boolean csConsistNeedsSeperateAddress()
        Does a CS consist require a separate consist address? CS consist addresses are assigned by the user, so return true.
        true is command station consist requires separate address; false otherwise
      • addConsist

        public Consist addConsist​(LocoAddress address)
        Add a new MQTT Consist with the given address to consistTable/consistList.
        Specified by:
        addConsist in class AbstractConsistManager
        address - consist address
        a consist at address; this will be the existing consist if a consist is already known to exist at address
      • activateConsist

        public void activateConsist​(LocoAddress address)
        Consist is activated on the controller for the specified LocoAddress This is used by MqttThrottle to either publish an existing consist or clear an old one upon opening the new throttle.
        address - Consist address to be activated
      • deactivateConsist

        public void deactivateConsist​(LocoAddress address)
        If a consist exists with the given address, the consist is deactivated on the controller, otherwise it does nothing. This is used by a throttle in case it is controlling a consist.
        address - Consist address to be deactivated