Package io.engineblock.activityapi.core
Interface Motor<T>
-
-
Method Summary
Modifier and Type Method Description ActiongetAction()InputgetInput()longgetSlotId()get the slotId which this motor is assigned to within the activity instance.SlotStateTrackergetSlotStateTracker()Get a description of the current slot run status.Motor<T>setAction(Action action)Set the action on this motor.Motor<T>setInput(Input input)Set the input on this motor.-
Methods inherited from interface io.engineblock.activityapi.core.Stoppable
requestStop
-
-
-
-
Method Detail
-
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
-
getSlotStateTracker
SlotStateTracker getSlotStateTracker()
Get a description of the current slot run status.- Returns:
- - a value from the
RunStateenum
-
-