pub enum SimulatorEvent {
Warning(String),
ConsoleMessage(String),
RobotCodeLoading,
RobotCodeStarting,
RobotCodeFinished,
RobotCodeError {
message: String,
backtrace: String,
},
LcdInitialized,
LcdUpdated(LcdLines),
LcdColorsUpdated {
foreground: u32,
background: u32,
},
LcdShutdown,
}Expand description
An event that happens inside the simulator that the API consumer might want to know about. Use this to monitor robot code progress, simulated LCD updates, log messages, and more.
Variants§
Warning(String)
A warning message has been emitted by the simulator backend. The robot code is likely using the PROS API incorrectly.
ConsoleMessage(String)
The robot code has written the following text to the simulated serial port. A trailing newline should not be assumed.
RobotCodeLoading
The robot code is being loaded into the simulator and compiled.
RobotCodeStarting
The robot code has begun executing and the initialize/opcontrol task is about to be spawned.
RobotCodeFinished
All tasks have finished executing.
RobotCodeError
The robot code has panicked or otherwise faulted.
LcdInitialized
The LCD has been initialized and may be updated in the future.
LcdUpdated(LcdLines)
The LCD has been updated and should be redrawn.
LcdColorsUpdated
The robot code has requested that the LCD color change to the provided foreground/background (RGBA).
LcdShutdown
The LCD has shut down and should be blanked.
Trait Implementations§
Source§impl Clone for SimulatorEvent
impl Clone for SimulatorEvent
Source§fn clone(&self) -> SimulatorEvent
fn clone(&self) -> SimulatorEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more