Cheesy Arena Web-socket
This page will describe the Web-Socket and the methods to update the client and how it relates to the point system and the external controls.
Most of Cheesy Arena dynamic content are encoded into a web-socket json packet. Notable locations are the Field Testing Panel, Match Play Panel, Field monitor, Audience display, and other dynamic content panels. Each section will describe what packets are receive and can be sent to Cheesy Arena.
General information
The way that Cheesy arena formats their packet is in a Type field and a Data field which its the payload for that specific data type. This is also the same for sending data to Cheesy Arena. From here onward the Headers will Denote packet types
{"type": [Data Packet Type],"data":[payload]}Ping
The Ping Packet confirms that the client is still receiving data from the web-socket server, no response is needed to keep the connection alive
{"type":"ping","data":null}
arenaStatus
The Arena State Packet is one of the basic packet that gets sent from Cheesy Arena and will be seen the most in logging. In the Json it will contain the entire arena state from the driver station and teams and what mode Cheesy Arena is in. A Sample Packet is below. Notably the driver station is abbreviated so use the key below to indicate what driver station should be disabled. This relationship does follow through in other data packets as well.
Blue 1
B1
Blue 2
B2
Blue 3
B3
Red 1
R1
Red 2
R2
Red 3
R3
Match State
The match state key is denotes what mode the FMS is in from the driver station. Use the table below to see what state is what.
PreMatch
Field not running human and robots are allowed on the field
StartMatch
FMS starting the match
WarmupPeriod
Any precode that needs to run before match runs gets executed here
AutoPeriod
Robots are in Auto Mode
PausePeriod
The time period between Auto and Teleop
TeleopPeriod
Robots are in Teleop mode
PostMatch
Match is complete final edits to score can be made this is where the FMS team can signal in Volunteers and reset
TimeoutActive
Time out timer is running
PostTimeout
Timeout Timer is completed
ToggleBypass
Toggle bypass turns on the bypass for the specific driver station. This command can only be sent from the Match Play screen.
updateRealtimeScore
This updates the the score in 6 sections divided up by the Blue alliance and the Red Alliance in each major section in a match Auto, Teleop, and Endgame. For the update to work you have to send the whole data packet, you cannot send just the updated section, the whole state needs to be updated all at once.
PLCIOChange
The PLC IO Change is only called from the Field_testing page and the following is an ordered list of inputs, outputs and coils simulating ModBus Code comments to the payload will mark what the line changes.
Last updated
Was this helpful?
