API reference
Writing an autonomous routine? You need two of these pages.
Chassis is the facade every routine is written against, and Routine is the fluent recipe layer on top of it. Everything else on this page is the machinery underneath — real, documented, and safe to ignore until you want it.
Every public entity in every shipped header — 1,632 of them across 115 headers: types and their members, nested types, free functions, namespace-scope constants and type aliases. Extracted from the headers, so it cannot fall behind the code: anything added to a shipped header appears here the next time the tool runs, and the host test build fails if it has not.
A public entity with no documentation comment fails the build, naming itself and its file and line. That gate is what makes "generated" mean "complete" rather than "generated from whatever someone remembered to write".
What is not here, and why. Four exclusions, all deliberate:
include/shulib/sim/ — the host simulator. Test-only, and not by convention: a CI guard fails the build if anything outside sim/ includes it, so no robot binary can reach it.
hal/fake/ and localization/fake/ — the test doubles the suite drives the real seams with. Public by file placement, test fixtures by charter; test/README.md is their documentation.
- Preprocessor macros (
SHULIB_PRECONDITION, SHULIB_TRACE). A macro has no signature, no access and no type, so there is nothing for an extractor to render without inventing it. Each is explained at length in its own header's design commentary, which every page below reproduces in full — so they are on the site, in prose, but not in the member lists or the index.
protected members — one section in the tree, in motion/move_to_pose.hpp. This reference documents the surface you call; the surface you subclass is guide chapter 13's subject.
Being on this page does not freeze anything. Most of what follows is unfrozen and expected to move. The Freeze Register in the roadmap is the only place a contract is locked, and it is enforced by compile-time signature pins, not by this page: changing a frozen signature fails a C++ test that names the register row, while changing anything else here costs one /// edit and a regeneration. Those are different mechanisms and only the first is a promise.
What the gate does not check. It proves every entity has a documentation comment. It has no opinion about whether that comment says anything — /// Sets the voltage. on setVoltage passes. Only a reader catches that, which is why the headers are written to be read and why each page below ends with the header's own design commentary rather than a bare list of signatures.
Prose about how to think about the API lives in the user guide — chapter 10 is the API as prose, and deliberately does not restate signatures. Worked recipes live in the cookbook. This page answers "what exactly exists, and what is its exact spelling".
Pages
Chassis and routines
Motion
Control
Kinematics
Localization
Manipulation
Sequencing
Diagnostics
| Page |
Header |
What it is |
| Blackbox format |
diag/blackbox_format.hpp |
The SHULIB BLACKBOX on-disk format, v1 — the binary record SdSink writes and BlackboxReader reads. |
| Blackbox reader |
diag/blackbox_reader.hpp |
BlackboxReader — THE DECODER. It ships in the same chunk as the encoder, because a format nothing can read is not a record: the first time a blackbox genuinely matters is a competition afternoon, and a file that cannot be opened that afternoon is worth exac… |
| Build info |
diag/build_info.hpp |
build_info — the git build hash plumbing for the §18.5 session header. |
| Controller display |
diag/controller_display.hpp |
ControllerFaultDisplay — the D-4 controller-screen content. |
| Debug record |
diag/debug_record.hpp |
DebugRecord — the per-tick snapshot schema. |
| Fault |
diag/fault.hpp |
Fault discipline (master plan §18.4; WS13, chunk A1) — the stable numeric fault-code enum and the latched first-fault capture. |
| Finite guard |
diag/finite_guard.hpp |
Finite-value invariant guards (master plan §18.4) — the LOG-AND-RECOVER counterpart to SHULIB_PRECONDITION's throw. |
| Health monitor |
diag/health_monitor.hpp |
HealthMonitor — sensor/power pathology → FaultCode, edge-triggered. |
| Level filter sink |
diag/level_filter_sink.hpp |
LevelFilterSink — per-subsystem log levels. |
| Line format |
diag/line_format.hpp |
line_format — the ONE set of §18.3 text-formatting primitives. |
| Loop monitor |
diag/loop_monitor.hpp |
LoopMonitor — loop-overrun / tick-timing detection. |
| Motion result |
diag/motion_result.hpp |
MotionResult — the per-motion result line, as data + one formatter. |
| Plausibility guard |
diag/plausibility_guard.hpp |
Physical-plausibility invariants (diagnostics-plan D-5; WS13, chunk C5) — FiniteGuard's log-and-recover posture, extended beyond finiteness. |
| Rate limit sink |
diag/rate_limit_sink.hpp |
RateLimitedSink — per-channel rate limiting with COUNTED, REPORTED drops. |
| Run summary |
diag/run_summary.hpp |
RunSummary — the end-of-run one-screen summary, as DATA. |
| SD sink |
diag/sd_sink.hpp |
SdSink — the BLACKBOX: a binary, versioned, session-stamped record of a run, written to the brain's SD card. |
| Session info |
diag/session_info.hpp |
SessionInfo + the §18.5 session header — provenance as the FIRST lines of every run. |
| Term sink |
diag/term_sink.hpp |
TermSink — the human-readable terminal stream, the PRIMARY dev/debug surface. |
| Tick attribution |
diag/tick_attribution.hpp |
TickAttribution — WHO consumed the loop budget. |
| Trace |
diag/trace.hpp |
SHULIB_TRACE — the compile-time TRACE strip. |
| Triage |
diag/triage.hpp |
The D-7 TRIAGE BLOCK — "why did it break", rendered for a human. |
Math and frames
| Page |
Header |
What it is |
| Angle |
math/angle.hpp |
Angle — a heading on SE(2). The one type that owns angle wrapping, so the "degrees into cos/sin" and "359° vs -1°" bug classes are impossible by construction. |
| Frame |
math/frame.hpp |
frame.hpp — THE ONE PLACE a frame rotation is allowed. |
| Pose2d |
math/pose2d.hpp |
Pose2d — a rigid-body pose on SE(2): position (x, y) + heading. |
| Twist2d |
math/twist2d.hpp |
Twist2d and ChassisSpeeds — the velocity currencies of the motion stack. |
Units
| Page |
Header |
What it is |
| Literals |
units/literals.hpp |
User-defined literals for shulib units. Each converts to CANONICAL units at the point of writing, so the rest of the code never sees a raw unit again: distance = 24_in; field = 1_tile; dt = 20_ms; v = 12_volt;. |
| Quantity |
units/quantity.hpp |
Quantity — compile-time dimensional analysis. |
HAL — the hardware seams
| Page |
Header |
What it is |
| Battery |
hal/battery.hpp |
IBattery — the V5 battery (pros::battery) behind the HAL. |
| Block sink |
hal/block_sink.hpp |
IBlockSink — where BINARY BLOCKS physically go (an SD-card file on the brain, a captured buffer in a test). |
| Char sink |
hal/char_sink.hpp |
ICharSink — where formatted diagnostic BYTES physically go (a terminal, a captured string in a test, later a serial port). |
| Clock |
hal/clock.hpp |
IClock — the single source of "now" for the whole stack. |
| Controller |
hal/controller.hpp |
IController — the V5 game controller behind the HAL (chunk R1a, absorbing Phase T's T1): the INPUT half of driver control. |
| Controller conversion |
hal/controller_conversion.hpp |
Controller canonical conversions — the ONE place the V5 controller's raw stick range becomes shulib's canonical [-1, 1] (§7: "convert exactly once, at the edge"). |
| Digital in |
hal/digital_in.hpp |
IDigitalIn — a single digital input line behind the HAL (chunk R1b): a limit switch, a bumper, a jumper — any two-state sensor on an ADI port. |
| Digital out |
hal/digital_out.hpp |
IDigitalOut — a single digital output line behind the HAL (chunk F1, WS7/M4): a pneumatic solenoid on the ADI ports, or any other two-state actuator. |
| Distance |
hal/distance.hpp |
IDistance — a distance / time-of-flight sensor (pros::Distance) behind the HAL. |
| Distance conversion |
hal/distance_conversion.hpp |
Distance-sensor canonical conversions — the ONE place the V5 distance sensor's millimeters become shulib's canonical inches and its raw 0–63 confidence becomes [0, 1] (§7: "convert exactly once, at the edge"). |
| GPS |
hal/gps.hpp |
IGps — the VEX GPS behind the HAL, reporting in shulib's CANONICAL frame (the VEX meters / clockwise-from-North convention is converted away in the hal/pros adapter via gps_conversion.hpp). |
| GPS conversion |
hal/gps_conversion.hpp |
GPS canonical conversions — the ONE place the VEX GPS frame becomes shulib's canonical frame (§7: "convert exactly once, at the edge"). |
| IMU |
hal/imu.hpp |
IImu — the inertial sensor behind the HAL, reporting in shulib's CANONICAL frame (the V5's clockwise/degrees convention is converted away in the hal/pros adapter via imu_conversion.hpp, so everything above this line is CCW-positive radians). |
| IMU conversion |
hal/imu_conversion.hpp |
IMU canonical conversions — the ONE place the V5 inertial sensor's frame becomes shulib's canonical frame (§7: "convert exactly once, at the edge"). |
| Line display |
hal/line_display.hpp |
ILineDisplay — where short status LINES physically go (the V5 controller's LCD; a captured fake in tests). |
| Mechanism |
hal/mechanism.hpp |
The mechanism device seam (chunk F1, WS7/M4): IMechanism + the two concrete compositions every VEX mechanism reduces to at the device level — a group of motors on one shaft (MotorMechanism) and a set of digital lines switching one pneumatic circuit (Pneumat… |
| Motor |
hal/motor.hpp |
IMotor — a single V5 smart motor behind the HAL. |
| Motor conversion |
hal/motor_conversion.hpp |
Motor canonical conversions — the ONE place the V5 smart motor's units become shulib's canonical units (§7: "convert exactly once, at the edge"). |
| Null sink |
hal/null_sink.hpp |
NullSink — the zero-cost default ITelemetrySink (§18.1). |
| Optical |
hal/optical.hpp |
IOptical — a color / optical sensor (pros::Optical) behind the HAL. |
| Optical conversion |
hal/optical_conversion.hpp |
Optical-sensor canonical conversions — the ONE place the V5 optical sensor's raw channels become shulib's canonical ranges (§7: "convert exactly once, at the edge"). |
| Rotation |
hal/rotation.hpp |
IRotation — a rotation / tracking-wheel sensor (pros::Rotation) behind the HAL. |
| Rotation conversion |
hal/rotation_conversion.hpp |
Rotation-sensor canonical conversions — the ONE place the V5 rotation sensor's centidegrees become shulib's canonical radians (§7: "convert exactly once, at the edge"). |
| Telemetry sink |
hal/telemetry_sink.hpp |
ITelemetrySink — the diagnostics output seam. |
| Vision |
hal/vision.hpp |
IVision / ITagSource — the AI Vision seams. |
| Vision conversion |
hal/vision_conversion.hpp |
vision_conversion.hpp — the ONE place raw AprilTag image corners become shulib's canonical robot-relative tag pose (§7: convert exactly once, at the edge). |
HAL — the PROS adapters
Core
Spec
| Page |
Header |
What it is |
| Accuracy |
spec/accuracy.hpp |
accuracy.hpp — the accuracy targets of Freeze Register ROW F2, the LOCKED spec the autonomous is measured against. |
Top level
| Page |
Header |
What it is |
| Version |
version.hpp |
The shulib API version — the mechanism behind the Freeze Register's promise. |
Every public entity, alphabetically
The alphabetical index lists all 1,632 of them with a link to each. Nested types appear under their qualified name (BlackboxReader::Frame::type), so a member of a nested type is findable by the name you would actually write.
Where the other documents fit
- The user guide teaches the ideas in order, and chapter 10 is the API as prose — when to reach for a verb, what it does when things go wrong, which gotchas bite. It deliberately does not restate signatures; this reference owns those.
- The cookbook answers "how do I write the routine I am writing right now", with compiled recipes.
- This reference answers "what exactly exists, and what is its exact spelling".
Last updated 2026-08-15 — published from the main release branch, commit fa545ff. This site tracks releases, so between them it can lag the repository — that lag is deliberate, and it is what keeps the development log off the public site. For the current state of the code, see the repository.