public abstract class FtcEventLoopBase extends java.lang.Object implements EventLoop
FtcEventLoopBase
is an abstract base that handles defines core event processing
logic that's available whether or not a Robot is currently extant or notModifier and Type | Field and Description |
---|---|
protected Activity |
activityContext |
protected FtcEventLoopHandler |
ftcEventLoopHandler |
protected NetworkConnectionHandler |
networkConnectionHandler |
protected ProgrammingModeController |
programmingModeController |
protected RobotConfigFileManager |
robotCfgFileMgr |
protected boolean |
runningOnDriverStation |
static java.lang.String |
TAG |
TELEMETRY_DEFAULT_INTERVAL
Modifier | Constructor and Description |
---|---|
protected |
FtcEventLoopBase(HardwareFactory hardwareFactory,
UpdateUI.Callback callback,
Activity activityContext,
ProgrammingModeController programmingModeController) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleCommandActivateConfiguration(java.lang.String data) |
protected void |
handleCommandDeleteConfiguration(java.lang.String fileInfo) |
protected void |
handleCommandRequestActiveConfiguration(java.lang.String extra) |
protected void |
handleCommandRequestConfigurations()
Serialize the entire list of config file metadata and send to the driver station
|
protected void |
handleCommandRequestConfigurationTemplates()
Serialize the entire list of config file metadata and send to the driver station
|
protected void |
handleCommandRequestParticularConfiguration(java.lang.String data) |
protected void |
handleCommandRestartRobot() |
protected void |
handleCommandSaveConfiguration(java.lang.String fileInfo) |
protected void |
handleCommandStartProgrammingMode()
Starts programming mode on the robot controller, as requested by driver station.
|
protected void |
handleCommandStopProgrammingMode()
Stops programming mode on the robot controller, as requested by driver station.
|
CallbackResult |
processCommand(Command command)
Process command method, this will be called if the event loop manager receives a user defined
command.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOpModeManager, handleUsbModuleDetach, init, loop, onUsbDeviceAttached, processedRecentlyAttachedUsbDevices, refreshUserTelemetry, requestOpModeStop, teardown
public static final java.lang.String TAG
protected NetworkConnectionHandler networkConnectionHandler
protected Activity activityContext
protected RobotConfigFileManager robotCfgFileMgr
protected FtcEventLoopHandler ftcEventLoopHandler
protected boolean runningOnDriverStation
protected final ProgrammingModeController programmingModeController
protected FtcEventLoopBase(HardwareFactory hardwareFactory, UpdateUI.Callback callback, Activity activityContext, ProgrammingModeController programmingModeController)
public CallbackResult processCommand(Command command) throws java.lang.InterruptedException, RobotCoreException
EventLoop
processCommand
in interface EventLoop
command
- command to processjava.lang.InterruptedException
RobotCoreException
protected void handleCommandActivateConfiguration(java.lang.String data)
protected void handleCommandRequestActiveConfiguration(java.lang.String extra)
protected void handleCommandRestartRobot()
protected void handleCommandRequestParticularConfiguration(java.lang.String data)
protected void handleCommandDeleteConfiguration(java.lang.String fileInfo)
protected void handleCommandSaveConfiguration(java.lang.String fileInfo)
protected void handleCommandRequestConfigurations()
protected void handleCommandRequestConfigurationTemplates()
protected void handleCommandStartProgrammingMode()
protected void handleCommandStopProgrammingMode()