2d60571a9c
Adds a Docker-based interop harness that drives the C++ server with
secsgem-py 0.3.0 as the active host and probes a secsgem-py-passive
equipment from a minimal C++ active client. Surfaces and fixes four
interoperability bugs uncovered by cross-testing:
* SEMI E5 identifier formatcodes are a U1|U2|U4|U8 wildcard;
secsgem-py picks the narrowest fitting width while our parsers
only accepted U4. `as_uN_scalar` / `as_iN_scalar` now accept
any unsigned/signed width and range-check the downcast.
* PPBODY (S7F3/F6) is "ASCII | Binary | List" per the spec;
secsgem-py defaults to ASCII. Added BINARY_OR_ASCII codegen
item type with `as_text_or_binary` accessor.
* S1F23/F24 Collection Event Namelist was unimplemented; added
schema + `vids_for(ceid)` accessor on EventReportSubscriptions
plus the dispatch handler.
* S10F1 was registered as a host->equipment handler, but per
SEMI E5 §12 S10F1 is equipment->host; S10F3 is the actual
host->equipment Terminal Display Single. Added an S10F3
handler alongside (we keep S10F1 too for backward compat).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
# All build artifacts live in the named `build` volume (inside Docker), the
|
|
# host only provides the source tree mounted read-write at /app.
|
|
#
|
|
# docker compose build # build the toolchain image
|
|
# docker compose run --rm builder # configure + compile
|
|
# docker compose run --rm tests # run unit tests
|
|
# docker compose up server client # live HSMS demo
|
|
|
|
x-base: &base
|
|
build: .
|
|
volumes:
|
|
- .:/app
|
|
- build:/app/build
|
|
|
|
services:
|
|
builder:
|
|
<<: *base
|
|
# Put builder on the same network as server/client/equipment_py so
|
|
# one-off `docker compose run --rm builder /app/build/secs_interop_probe ...`
|
|
# commands can DNS-resolve peer services by their compose name.
|
|
networks: [secs]
|
|
command:
|
|
- bash
|
|
- -lc
|
|
- >
|
|
cmake -S /app -B /app/build -G Ninja -DCMAKE_BUILD_TYPE=Release &&
|
|
cmake --build /app/build
|
|
|
|
tests:
|
|
<<: *base
|
|
depends_on:
|
|
builder:
|
|
condition: service_completed_successfully
|
|
command: ["ctest", "--test-dir", "/app/build", "--output-on-failure"]
|
|
|
|
server:
|
|
<<: *base
|
|
depends_on:
|
|
builder:
|
|
condition: service_completed_successfully
|
|
command: ["/app/build/secs_server", "--port", "5000", "--device", "0"]
|
|
networks: [secs]
|
|
# No host port publish: the client reaches the server over the `secs`
|
|
# Docker network by service name. Uncomment to expose to the host.
|
|
# ports:
|
|
# - "5000:5000"
|
|
|
|
client:
|
|
<<: *base
|
|
depends_on:
|
|
builder:
|
|
condition: service_completed_successfully
|
|
server:
|
|
condition: service_started
|
|
command: ["/app/build/secs_client", "--host", "server", "--port", "5000", "--device", "0"]
|
|
networks: [secs]
|
|
|
|
# Python container preloaded with secsgem-py 0.3.0 for cross-validation
|
|
# of our C++ HSMS/SECS-II/GEM implementation against the reference library.
|
|
interop:
|
|
build: ./interop
|
|
volumes:
|
|
- .:/app
|
|
working_dir: /app/interop
|
|
networks: [secs]
|
|
|
|
# secsgem-py running as passive equipment so the C++ active host can
|
|
# connect to it. Used by tools/run_interop.sh which then launches
|
|
# `secs_interop_probe --host equipment_py`.
|
|
equipment_py:
|
|
build: ./interop
|
|
volumes:
|
|
- .:/app
|
|
working_dir: /app/interop
|
|
command: ["python3", "/app/interop/passive_equipment.py", "--port", "5000"]
|
|
networks: [secs]
|
|
|
|
networks:
|
|
secs: {}
|
|
|
|
volumes:
|
|
build: {}
|