Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
# Unified Interface Plan - Phase 2
Status: complete for review
Canonical issue: https://github.com/getpwnam/diseqc_cntrl/issues/86
## Objective
Define the transport-agnostic command model, shared result envelope, and capability registry for the new application.
## Decisions Applied From User Feedback
1. Command names are normalized now.
2. Configuration operations are moved under system.
3. Serial status bar scope for v1 is diseqc only.
4. New managed application is CubleyControl and targets CubleyNative.Interop.
## Canonical External Namespace (v1)
1. Current domain: cubley/v1/diseqc
2. Reserved domain: cubley/v1/azel
3. Shared domain: cubley/v1/system
## Transport-Agnostic Command IDs
The internal command model is transport-neutral and uses normalized command IDs.
### DiSEqC domain
1. diseqc.rotor.goto_angle
2. diseqc.rotor.goto_satellite
3. diseqc.rotor.halt
4. diseqc.rotor.step_east
5. diseqc.rotor.step_west
6. diseqc.rotor.drive_east
7. diseqc.rotor.drive_west
8. diseqc.lnb.set_voltage
9. diseqc.lnb.set_polarization
10. diseqc.lnb.set_tone
11. diseqc.lnb.set_band
12. diseqc.calibration.set_reference
### System domain
1. system.config.get
2. system.config.set
3. system.config.save
4. system.config.reset
5. system.config.reload
6. system.config.fram_clear
7. system.capabilities.get
8. system.version.get
### Reserved AZEL domain
No executable command IDs are defined in v1. The domain is reserved for future expansion.
## Shared Result Envelope (v1 baseline)
Required fields:
1. ok: bool success flag
2. code: normalized result code string
3. msg: human-readable summary
4. ts: monotonic or UTC timestamp string from the runtime policy
5. req_id: optional correlation ID from caller
Optional fields:
1. command: canonical command ID
2. domain: system or diseqc
3. data: key-value payload fields for command-specific values
## Error Code Taxonomy (v1 baseline)
1. validation_error
2. unsupported
3. busy
4. hw_fault
5. timeout
6. internal_error
7. ok
## Capability Registry Model
Capabilities are represented as stable string IDs with boolean enabled state.
Initial registry keys:
1. domain.diseqc
2. domain.system
3. domain.azel
4. transport.serial
5. transport.mqtt
6. feature.status_bar
7. feature.config_fram
## Serial and MQTT Parity Rule (Phase 2 contract)
1. Every executable canonical command ID must have one serial mapping and one MQTT mapping.
2. Every command result must be representable using the shared envelope fields.
3. Diseqc-only status bar fields are required in v1. Azel status bar fields are out of scope for v1.
## Open Points For Next Phase
1. Timestamp encoding policy for ts (epoch, ISO-8601-like text, or uptime ticks).
2. Whether req_id should be generated by device when absent or left empty.
3. Exact data key naming style for envelope payload fields.
82fdcecfbThis file is pinned to the selected release. Download the original to open it in your design tool.