Class AutoActiveTrain.AutoEngineer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.LinkedList<jmri.jmrit.dispatcher.AutoActiveTrain.AutoEngineer.SpeedSetting> stepQueue  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abort()
      Flag from user to end run.
      boolean getIsForward()  
      float getTargetSpeed()  
      boolean isAtSpeed()
      Check if train is moving at its current requested speed.
      boolean isStopped()
      Check if train is moving or stopped.
      protected void setFunction​(int cmdNum, boolean isSet)  
      void setHalt​(boolean halt)
      Flag from user's control.
      void setIsForward​(boolean isForward)  
      (package private) void setNextStep()  
      void setRamping​(int ramping, int fullRampTime, int minThrottleInterval, int rampRate)  
      void setSpeedImmediate​(float speed)
      Set the train speed directly, bypassing ramping.
      void setSpeedLimits​(float minReliableOperatingSpeed, float maxSpeed, float speedFactor)
      Set the limits and adjustment factore for train speed.
      void setTargetSpeed​(float speed)  
      void setTargetSpeed​(float distance, float speed)  
      void slowToStop​(boolean on)  
      void stopAllTimers()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stepQueue

        java.util.LinkedList<jmri.jmrit.dispatcher.AutoActiveTrain.AutoEngineer.SpeedSetting> stepQueue
    • Method Detail

      • setRamping

        public void setRamping​(int ramping,
                               int fullRampTime,
                               int minThrottleInterval,
                               int rampRate)
      • setIsForward

        public void setIsForward​(boolean isForward)
      • setHalt

        public void setHalt​(boolean halt)
        Flag from user's control.
        Parameters:
        halt - true to immediately stop the train; false otherwise
      • setSpeedLimits

        public void setSpeedLimits​(float minReliableOperatingSpeed,
                                   float maxSpeed,
                                   float speedFactor)
        Set the limits and adjustment factore for train speed. Active train will calculate the required setting and it will be adjusted if not 0.0f required setting * speed Factor then test for less than max and greater than min.
        Parameters:
        minReliableOperatingSpeed - lowest throttle % train will reliably move.
        maxSpeed - max throttle % for train.
        speedFactor - multiplier
      • setTargetSpeed

        public void setTargetSpeed​(float distance,
                                   float speed)
      • slowToStop

        public void slowToStop​(boolean on)
      • setSpeedImmediate

        public void setSpeedImmediate​(float speed)
        Set the train speed directly, bypassing ramping.
        Parameters:
        speed - 0.0 (stop) to 1.0 (full)
      • isStopped

        public boolean isStopped()
        Check if train is moving or stopped.
        Returns:
        true if stopped; false otherwise
      • isAtSpeed

        public boolean isAtSpeed()
        Check if train is moving at its current requested speed.
        Returns:
        true if at requested speed; false otherwise
      • abort

        public void abort()
        Flag from user to end run.
      • setFunction

        protected void setFunction​(int cmdNum,
                                   boolean isSet)