Expand description
The Vexide Simulator Protocol enables communication between VEX robot simulators and user-facing frontends using a JSON-based protocol.
The code executor and frontend communicate over a stream in newline-delimited JSON format.
The backend sends Event
s which represent a change in simulator state.
These are used by the frontend to correctly display the state of the simulated program.
The frontend sends Command
s to the code executor to control the robot code environment, simulating changes in robot hardware (like controller input and LCD touch events) or competition phase.
The full protocol is documented at https://internals.vexide.dev/simulators/protocol.
Structs§
- AdiPort
- A 3-wire “ADI” port for analog devices.
- Battery
- Battery status and statistics.
- Color
- Competition
Mode - Controller
State - The raw state of a VEX V5 controller.
- Rect
- Robot
State - The current state of the robot as a whole.
- Serial
Data - Smart
Port - An RJ9 4p4c “Smart” port on the VEX V5.
- Text
Metrics - V5Text
- VCode
Sig - Base64-encoded program metadata.
Enums§
- Command
- A message sent from the frontend to the simulator.
- Comp
Mode - The current stage of a competition.
- Controller
Update - A method of retrieving a controller’s current state.
- Device
- The configuration of a V5 peripheral.
- Device
Status - The current state of a V5 peripheral.
- Draw
Command - An instruction for drawing to the robot LCD screen.
- Event
- A message sent from the simulator to the frontend.
- Link
Mode - The mode of a VEXlink-configured radio.
- LogLevel
- The importance level of a log message.
- Motor
Brake Mode - The brake mode of a VEX V5 motor.
- Motor
Gearset - The gearset of a VEX V5 motor.
- Port
- An arbitrary port on the VEX V5.
- Scroll
Location - Shape
- A shape that can be drawn to the robot LCD screen.
- Text
Location - Touch
Event - The gearset of a VEX V5 motor.
- V5Font
Family - V5Font
Size