Class AbstractFaultMonitor

    • Constructor Detail

      • AbstractFaultMonitor

        public AbstractFaultMonitor​(LightningFaultCodes.Code code,
                                    java.lang.String msg,
                                    boolean fatal)
        Creates a new abstract fault monitor
        Parameters:
        code - The LightningFaultCodes.Code to be monitored
        msg - The message to use should the fault be written
        fatal - If the fault is fatal and should stop the robot
      • AbstractFaultMonitor

        public AbstractFaultMonitor​(LightningFaultCodes.Code code,
                                    java.lang.String msg)
        Creates a new non-fatal abstract fault monitor
        Parameters:
        code - The LightningFaultCodes.Code to be monitored
        msg - The message to use should the fault be written
    • Method Detail

      • checkFault

        public abstract boolean checkFault()
        To be overridden, determines if fault should be written
        Returns:
        True if the fault should be written, false otherwise
      • check

        public boolean check()
        Checks if the fault should be written, and writes the fault if it should
        Returns:
        True if the fault should be written, false otherwise
      • trigger

        public void trigger()
        Writes the fault. If the fault is fatal, cancles and disables the CommandScheduler