Class AbstractTimedSystemTest

  • All Implemented Interfaces:
    edu.wpi.first.util.sendable.Sendable, edu.wpi.first.wpilibj2.command.Command, java.lang.Comparable<SystemTest>

    public abstract class AbstractTimedSystemTest
    extends SystemTest
    Abstract SystemTest that runs for a given period of time.
    • Field Summary

      • Fields inherited from class edu.wpi.first.wpilibj2.command.CommandBase

        m_requirements
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected double elapsed()
      The quantity of time that has passed since the test has started running.
      void initialize()  
      boolean isFinished()  
      • Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase

        addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem, withName
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface edu.wpi.first.wpilibj2.command.Command

        alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineWith, end, execute, hasRequirement, isScheduled, perpetually, raceWith, runsWhenDisabled, schedule, schedule, until, withInterrupt, withTimeout
    • Constructor Detail

      • AbstractTimedSystemTest

        public AbstractTimedSystemTest​(java.lang.String msg,
                                       double timeout,
                                       LightningFaultCodes.Code code)
        Creates a new AbstractTimedSystemTest
        Parameters:
        msg - Dashboard display message for the SystemTest
        timeout - Duration the test should be run in seconds
        code - FaultCode relating to the SystemTest
      • AbstractTimedSystemTest

        public AbstractTimedSystemTest​(java.lang.String msg,
                                       double timeout,
                                       LightningFaultCodes.Code code,
                                       SystemTest.Priority priority)
        Creates a new AbstractTimedSystemTest
        Parameters:
        msg - Dashboard display message for the SystemTest
        timeout - Duration the test should be run in seconds
        code - FaultCode relating to the SystemTest
        priority - SystemTest.Priority of the SystemTest
    • Method Detail

      • initialize

        public void initialize()
      • isFinished

        public boolean isFinished()
      • elapsed

        protected double elapsed()
        The quantity of time that has passed since the test has started running.
        Returns:
        The elapsed time in seconds.