java.lang.Object
com.cdarobotics.cdalib.opmodes.modules.Module
Direct Known Subclasses:
BindingModule, LambdaModule, NullModule, TeleOpPedroModule

public abstract class Module extends Object
A reusable, OpMode-shaped unit of behavior. A module has the same lifecycle as an OpMode (init(), init_loop(), start(), loop(), stop()) and is driven automatically once installed with ModularOpMode.installModule(com.cdarobotics.cdalib.opmodes.modules.Module). Use it to package program logic that can be shared across multiple OpModes.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Called once when the OpMode initializes.
    abstract void
    Called repeatedly during the OpMode init phase, after init() and before start(), while the driver is still on the init screen.
    abstract void
    Called every loop.
    abstract void
    Called once when the OpMode starts (play pressed).
    abstract void
    Called once when the OpMode ends.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Module

      public Module()
  • Method Details

    • init

      public abstract void init()
      Called once when the OpMode initializes.
    • init_loop

      public abstract void init_loop()
      Called repeatedly during the OpMode init phase, after init() and before start(), while the driver is still on the init screen.
    • start

      public abstract void start()
      Called once when the OpMode starts (play pressed).
    • loop

      public abstract void loop()
      Called every loop.
    • stop

      public abstract void stop()
      Called once when the OpMode ends.