docs: correct drifted and fabricated APIs in chapters 13/17/35/51
An audit of doc code blocks against the real headers found APIs that do not exist in the codebase, presented as authoritative walkthroughs: - ch35 (dispatch): an entirely fabricated callback architecture — HostCommandRegistry::set_emit_ceid_handler, CommandOutcome, emit_ceids. Rewritten to the real Spec/Result/dispatch + the new set_handler hook. - ch13 (E30): wrong store names — EventStore/ReportStore -> EventReportSubscriptions, SvidStore -> StatusVariableStore, AlarmStore/AlarmDispatcher -> AlarmRegistry, ClockStore -> Clock, TerminalServiceStore -> (no store), in both the capability tables and the worked S2F33 example. - ch17 (E116): EptStore/seconds/bucket_ -> EptStateMachine/milliseconds/buckets_. - ch51 (extending): stale host-command handler -> the real set_handler signature. Verified clean by grep: no fabricated symbols remain in docs/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -118,14 +118,14 @@ set-alarm, register a custom handler:
|
||||
|
||||
```cpp
|
||||
// At startup:
|
||||
model->commands.register_handler("VENT",
|
||||
[model](const ParamList& params) -> CommandOutcome {
|
||||
model->commands.set_handler("VENT",
|
||||
[model](const std::string& rcmd,
|
||||
const std::vector<gem::CommandParameter>& params) {
|
||||
// Actually vent the chamber here.
|
||||
if (!vacuum_safe_to_vent()) {
|
||||
return {HostCmdAck::CannotPerformNow, {}};
|
||||
}
|
||||
if (!vacuum_safe_to_vent())
|
||||
return gem::HostCmdAck::CannotDoNow;
|
||||
hardware_vent_chamber();
|
||||
return {HostCmdAck::Accept, {}};
|
||||
return gem::HostCmdAck::Accept;
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user