docs: bring the documentation up to the daemon/client era

A large gap had opened between the docs and the code: the README and
INTEGRATION guide did not mention the gRPC daemon or the Python client at
all (the entire vendor surface), ARCHITECTURE still described secs_server
as the ~1200-line canonical wiring example (it is a ~110-line thin main
over EquipmentRuntime), and test counts across six files were stale
(445/2753 -> 473/3087 core + the separate 125-assertion daemon suite).

- README: new "Integrating your tool (pick a tier)" section — Python
  client / any-language gRPC / embedded C++ — plus daemon tests and
  tools/run_interop.sh in the Testing section.
- ARCHITECTURE: layer diagram gains the vendor-surface and
  EquipmentRuntime/default_handlers tiers; stale wiring row fixed.
- INTEGRATION: three-tier chooser up front (this guide = the C++ tier).
- ch30 tour: secs_gemd + secs_gemd_tests in the binaries table.
- ch31: example alarm used a nonexistent `alcd:` field with bit 7 set
  (which the validator forbids) -> real `category:`/`name:` fields, and
  the roles: block documented.
- ch35: handler-location note now points at default_handlers.cpp's 15
  per-capability register_* functions.
- ch40: built-artifacts list + sample output counts.
- ch50: secsgem::gem runtime/default_handlers/handler_slot/name_index
  includes + new secsgem::daemon namespace section.
- PROOFS: test-count table gains the runtime/handlers/daemon row so the
  tally adds up; daemon suite noted. VERIFICATION/COMPLIANCE counts.
- interop/README: the one-command runner + the two daemon-track harnesses
  (daemon_interop, pyclient_interop).

Audited via a docs-vs-code sweep (the audit itself under-reported: it
validated counts textually; reality was 473/3087).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 23:18:31 +02:00
parent 8686654b15
commit af1a159c59
12 changed files with 174 additions and 22 deletions
+26
View File
@@ -98,6 +98,32 @@ often the right answer — this chapter helps you find which header.
`include/secsgem/gem/store/` — 18 per-domain stores. See
chapter [32](32_stores_and_the_data_model.md) for the full table.
Engine-owner and default-behaviour entry points (added with the daemon
track; see [DAEMON_ROADMAP.md](DAEMON_ROADMAP.md)):
```cpp
#include "secsgem/gem/runtime.hpp" // EquipmentRuntime: owns
// io_context + Server + model + control FSM + Router; thread-safe
// set_variable/emit_event/set_alarm/clear_alarm, on_command hook,
// read_sync (the standard cross-thread read), control-state mirror,
// add_control_state_observer / add_link_observer.
#include "secsgem/gem/default_handlers.hpp" // the 56 GEM handlers as 15
// per-capability register_* functions + register_default_handlers.
#include "secsgem/gem/handler_slot.hpp" // primary + observer handler slots
#include "secsgem/gem/name_index.hpp" // name -> VID/CEID resolution
```
### `secsgem::daemon` — the gRPC vendor surface
```cpp
#include "secsgem/daemon/equipment_service.hpp" // EquipmentService: the
// proto/secsgem/v1 Equipment service over an EquipmentRuntime
// (SetVariables/GetVariables/FireEvent/SetAlarm/ClearAlarm/
// GetControlState/RequestControlState/WatchHealth/Subscribe/
// CompleteCommand). Built into apps/secs_gemd.cpp; the Python
// client in clients/python wraps the same proto.
```
### `secsgem::config` — YAML loader + validator (chapter 31, 36)
```cpp