Interface Motor<T>

All Superinterfaces:
Runnable, Stoppable
All Known Implementing Classes:
CoreMotor

public interface Motor<T> extends Runnable, Stoppable
The core threading harness within an activity.
  • Method Details

    • setInput

      Motor<T> setInput(Input input)
      Set the input on this motor. It will be read from each cycle before applying the action.
      Parameters:
      input - an instance of ActivityInput
      Returns:
      this ActivityMotor, for method chaining
    • getInput

      Input getInput()
    • setAction

      Motor<T> setAction(Action action)
      Set the action on this motor. It will be applied to each input.
      Parameters:
      action - an instance of activityAction
      Returns:
      this ActivityMotor, for method chaining
    • getAction

      Action getAction()
    • getSlotId

      long getSlotId()
      get the slotId which this motor is assigned to within the activity instance.
      Returns:
      long slot id
    • getState

      MotorState getState()
      Get a description of the current slot run status.
      Returns:
      - a value from the RunState enum
    • removeState

      void removeState()