Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.23 KB

README.md

File metadata and controls

35 lines (25 loc) · 1.23 KB

wpilib-ws-schema

Schema for the WPILib WebSocket extension

Schema

The schema is defined using the AsyncAPI style and is located in the schema folder.

Markdown Output

The Markdown Output of what is on master can be found here

HTML Output

The HTML Output of what is on master can be found here

General Structure

The WPILib HALSim Extension acts as a WebSocket client and communicates with an endpoint that runs a WebSocket server.

Messages are exchanged via JSON objects following the structure:

{
    "type": <string>,
    "device": <string>,
    "data": <object>
}

The type string will be the type of device (e.g. DIO, AnalogIn, PWM, etc) and device represents a device identifier (usually the channel number).

Generating Documentation

To generate the documentation, run the following from the schema directory:

  • HTML: ag ./wpilib-ws.yaml @asyncapi/html-template -o ../html
  • Markdown: ag ./wpilib-ws.yaml @asyncapi/markdown-template -o ../md

TODO

  • System messages? e.g. enable/disable, heartbeat, reset