#front-end #robot #vex #simulator #json #competition #state

vexide-simulator-protocol

JSON-based protocol enabling communication between VEX robot simulators and user-facing frontends

2 unstable releases

0.2.0 Jun 8, 2024
0.1.0 May 27, 2024

#114 in Simulation

24 downloads per month

MIT license

14KB
367 lines

Vexide Simulator Protocol

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 Events 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 Commands 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.


lib.rs:

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 Events 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 Commands 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.

Dependencies

~0.7–1.3MB
~29K SLoC