Repository navigation
feat: v2.2.0 — Discovery (§Phase 13 milestone 46) - #39
Merged
Merged
Conversation
…13 milestone 46) Adds rcp/discovery.hpp: the broadcastable ACF_ABB discovery read addressed to byte_bus_id 0 (kDiscoveryByteBusId, matching regmap::kEp0) at register-map address 0 (kDiscoveryRegisterAddress), always NTSCF-headed — a TSCF-headed discovery request is dropped by decode_discovery_request as a decode failure (DiscoveryErrc::tscf_headed_request_dropped), not a flag a caller could forget to check. Rides directly on rcp/wire.hpp's existing NTSCF/ACF_ABB framing with no changes to that codec. DiscoveryClaim implements discovery-stream claiming: the first discovery request accepted while rcp::lifecycle::ServerLifecycle reports HwUnconfigured/HwConfigured reserves the stream for that client's configuration writes; the reservation lapses after a configurable Discovery_TimeOut (~20ms default) if no configuration request follows; concurrent discovery requests from other clients never dislodge an active claim nor block their own reads from being answered; and a request in RcpConfigured is always NotEligible, since claiming itself is scoped to the two pre-RCP-configured states. should_answer_discovery is a single, always-true, testable call site documenting the any-state answering invariant (extraction §3.1, §3.5). New coverage in tests/test_discovery.cpp (REQ-DISC-001..009), traced in .fusa-reqs.json. Bumps version.hpp and the CMake project version to 2.2.0, and adds ROADMAP.md milestone 46's "Done (v2.2.0)" note following the milestone 44/45 precedent. Signed-off-by: Matt <47545907+SoundMatt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements ROADMAP.md milestone 46, "Discovery (v2.2.0)": the mandatory
discovery request and discovery-stream claiming mechanism from the OPEN
Alliance TC18 Remote Control Protocol Specification v0.5.1_RC.
include/rcp/discovery.hpp:make_discovery_request/encode_discovery_request: an unconditionalACF_ABB read targeting
byte_bus_id 0(kDiscoveryByteBusId, matchingregmap::kEp0) at register-map address 0 (kDiscoveryRegisterAddress),always wrapped in an NTSCF header. Rides directly on
rcp/wire.hpp'sexisting NTSCF/ACF_ABB framing (v2.0.0) — no changes to that codec.
decode_discovery_request: a TSCF-headed discovery request is droppedas a decode failure (
DiscoveryErrc::tscf_headed_request_dropped), nota boolean flag a caller could forget to check.
DiscoveryClaim: the first discovery request accepted whilercp::lifecycle::ServerLifecyclereportsHwUnconfigured/HwConfiguredreserves the discovery stream for that client'sconfiguration writes; the reservation lapses after a configurable
Discovery_TimeOut(kDefaultTimeout, ~20ms default) if noconfiguration request follows; other clients' concurrent discovery
requests never dislodge an active claim, nor does an active claim ever
block their own reads from being answered; a request in
RcpConfiguredis always
NotEligible, since claiming is scoped to the twopre-RCP-configured states.
should_answer_discovery: a single, always-true, testable call sitedocumenting the mandatory any-state answering invariant.
tests/test_discovery.cpp(REQ-DISC-001..009), registered intests/CMakeLists.txtfollowing the existingtest_wire/test_lifecycle/test_regmappattern..fusa-reqs.json: 9 new traced requirements (REQ-DISC-001..009).ROADMAP.md: milestone 46 gets a "Done (v2.2.0)" paragraph following themilestone 44/45 precedent.
include/rcp/version.hppand the CMake project version to2.2.0.No existing header needed changes —
rcp/wire.hpp,rcp/lifecycle.hpp, andrcp/regmap.hppare used as-is, per the roadmap's own dependency note forthis milestone.
Test plan
cmake --build(system AppleClang, matching CI's clang-14 config)builds the full tree with zero warnings on the new files under the
repo's strict
-Wall -Wextra -Wpedantic -Wshadow ...flags.ctestfull suite: 44/45 tests pass, including the newrcp_discovery(16 test cases / 50 assertions). The one non-pass
(
rcp_powerstate) is a pre-existing, unrelated timing/threading testthat I killed manually after it stalled in this sandbox — unrelated to
this change (confirmed pre-existing on
mainbefore this branch)..fusa-reqs.jsonremains valid JSON with the new REQ-DISC-* entriestraced to
tests/test_discovery.cpp.