Class SystemTest

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

    public abstract class SystemTest
    extends edu.wpi.first.wpilibj2.command.CommandBase
    implements java.lang.Comparable<SystemTest>
    Base testing class. System tests run when the robot is enabled in test mode on the Driver Station. System tests are run with the SystemTestCommand which is configured to run automatically in test mode. Individual system tests can be queued by calling register(SystemTest).
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SystemTest.Priority
      Importance of the SystemTest.
    • Field Summary

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

        m_requirements
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(SystemTest other)  
      abstract boolean didPass()
      Determines passing conditions for the SystemTest
      LightningFaultCodes.Code getCode()
      The relating FaultCode corresponding to the SystemTest
      java.lang.String getMessage()
      The dashboard message of the SystemTest
      SystemTest.Priority getPriority()
      The priority of the SystemTest
      static void register​(SystemTest test)
      Registers the given system test to be run when the LightningRobot is enabled in test mode.
      • 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, initialize, isFinished, isScheduled, perpetually, raceWith, runsWhenDisabled, schedule, schedule, until, withInterrupt, withTimeout
    • Constructor Detail

      • SystemTest

        public SystemTest​(java.lang.String msg,
                          LightningFaultCodes.Code code)
        Creates a new SystemTest
        Parameters:
        msg - Dashboard display message for the SystemTest
        code - FaultCode relating to the SystemTest
    • Method Detail

      • register

        public static void register​(SystemTest test)
        Registers the given system test to be run when the LightningRobot is enabled in test mode.
        Parameters:
        test - The system test to be registered.
      • getMessage

        public java.lang.String getMessage()
        The dashboard message of the SystemTest
        Returns:
        The message to be displayed on the dashboard
      • didPass

        public abstract boolean didPass()
        Determines passing conditions for the SystemTest
        Returns:
        true if the test was completed successfully, false otherwise
      • compareTo

        public int compareTo​(SystemTest other)
        Specified by:
        compareTo in interface java.lang.Comparable<SystemTest>