Class CbusPowerManager

All Implemented Interfaces:
EventListener, PropertyChangeFirer, PropertyChangeProvider, Disposable, AbstractMRListener, CanListener, PowerManager

PowerManager implementation for controlling CBUS layout power.
  • Constructor Details

  • Method Details

    • setPower

      public void setPower(int v) throws JmriException
      Description copied from class: AbstractPowerManager
      Specified by:
      setPower in interface PowerManager
      Overrides:
      setPower in class AbstractPowerManager<CanSystemConnectionMemo>
      Throws:
      JmriException
    • updatePower

      public void updatePower(int newPower)
      Notification to JMRI of main track power state. Does not send to Layout. Only used to bypass having the PowerManager respond to messages from the command station because I don't know why the PowerManager should not do the job the PowerManager API was created to do in the CBus package.
      Parameters:
      newPower - New Power Status
    • dispose

      public void dispose()
      Called when disposing of a disposable.

      Note there are no assurances this method will not be called multiple times against a single instance of this Disposable. It is the responsibility of this Disposable to protect itself and the application from ensuring that calling this method multiple times has no unwanted side effects.

      Specified by:
      dispose in interface Disposable
      Specified by:
      dispose in interface PowerManager
    • reply

      public void reply(CanReply m)
      Description copied from interface: CanListener
      Called when an incoming CanFrame is received from the CAN Network.
      Specified by:
      reply in interface CanListener
      Parameters:
      m - the CanReply being received.
    • message

      public void message(CanMessage m)
      Does not listen to outgoing messages. Called when an outgoing message is sent to the CAN Network.
      Specified by:
      message in interface CanListener
      Parameters:
      m - the CanMessage being sent.