Files
csaxs_bec/tests
menzelandClaude Opus 4.8 2cbe3737ce
CI for csaxs_bec / test (push) Successful in 1m31s
feat(canon): add Canon CR-N300 PTZ camera device (Phase 1)
Custom (non-EPICS) ophyd device for the Canon CR-N300 PTZ remote camera.

Phase 1 (implemented): standalone control that works with the imaging stack
absent. PTZ/zoom/focus exposed as positioners (move()/set() -> status, stop(),
spec limits: pan +/-170 deg, tilt -30..+100 deg, 20x zoom); camera parameters
(exposure/iris, gain, white balance, focus mode, presets) via read()/describe()
with read-back verification; Manual + Continuous/Face/Tracking AF focus modes.

Control plane (transport/, pure stdlib, no ophyd):
- CameraTransport ABC; XCTransport implements the Canon XC Control Protocol
  (session open/claim/yield, HTTP/CGI) with an injectable opener; FakeTransport
  is a full in-memory simulator for offline mode and tests. Spec-defined CGI
  paths/params/axis encodings (BPE-7216-005) are isolated and flagged for
  hardware verification.

Imaging plane (acquisition/, pure stdlib, no ophyd, not a control dependency):
- FrameRingBuffer (bounded, thread-safe, stores compressed frames) and a
  persistent, fail-soft, instrumented StreamWorker. Phase-2 grab API
  (get_latest/get_latest_n/get_nearest, decode-on-grab) seamed in the device.

Credentials come from env vars (CANON_<NAME>_USER/_PASSWORD), never YAML/Redis.

Adds example device config (real + simulation), a README, and pytest coverage
(transport mocked, ring buffer, stream worker, device logic) — no hardware
required. No new third-party dependencies (Phase-2 decode uses cv2, already a
csaxs_bec dependency).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 23:20:01 +02:00
..