feat: migrate routing to Essentials v3-routing.21 API - #36
Draft
anthony-lopez-pd wants to merge 10 commits into
Draft
feat: migrate routing to Essentials v3-routing.21 API#36anthony-lopez-pd wants to merge 10 commits into
anthony-lopez-pd wants to merge 10 commits into
Conversation
routing.21 removed the routing-interface family this plugin used. Migrate onto the consolidated replacements without changing hardware-switching behavior: - Bump PepperDashEssentials to 3.0.0-dev-v3-routing.21. - Add plugin-local IDmInputSlot / IDmOutputSlot (replace removed IRoutingInputSlot / IRoutingOutputSlot; slot model is plugin-internal) and plugin-local ITxRouting(WithFeedback) / IRmcRouting(WithFeedback) : IRoutingMidpointWithFeedback. - IRoutingInputsOutputs -> IRoutingMidpoint on endpoint/passthrough controllers. - IRoutingNumeric(WithFeedback) / IRouting / IMatrixRouting -> consolidated IRoutingMidpointWithFeedback on chassis/midpoint controllers; add the newly-required ClearRoute / CurrentRoutes / RouteChanged members, populated from existing switch feedback. Shared TX members implemented once in DmTxControllerBase. - DmChassisController: drop IMatrixRouting (kept IRoutingMidpointWithFeedback); retype InputSlots/OutputSlots to the plugin-local slot interfaces. Crestron switching logic (DMOutput.VideoOut/AudioOut/USBRoutedTo, off-timers, feedback wiring) is unchanged. Builds clean against routing.21; all 84 plugin validation tests pass. Hardware validation pending. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… Wyrestorm) Brings the DM routing-feedback surface in line with the reviewed Wyrestorm NetworkHD migration: - IDmOutputSlot/DmMatrixOutput.CurrentRoutes now exposed as IReadOnlyDictionary so route state can't be mutated outside SetInputRoute (which raises OutputSlotChanged). - DmMatrixClearInput (the "none"/route-off sentinel) caches a single IsOnline BoolFeedback reporting online, instead of allocating a new offline feedback on every access. - Removed the dead VideoSyncDetected/VideoSyncChanged surface from IDmInputSlot (no consumers); kept concrete on DmMatrixInput only. Drops the CS0067 pragma from the sentinel. - DmMatrixOutput ctor no longer swallows exceptions into a half-built, still-registered slot; it validates/throws and the chassis call site skips-and-logs a failed slot so one bad card can't poison startup. Build clean (0 warnings); 84 tests pass. Hardware-switching logic unchanged. The chassis breakaway CurrentRoutes clobber (output-only removal key) is tracked separately and not addressed here. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Log a warning when chassis video/audio route feedback can't resolve a matching output/input port (distinguishes a genuine route-off from a lookup miss that would otherwise silently report no source). - Drop the dead Usb seed from DmMatrixOutput.currentRoutes (never set; the output only tracks Video/Audio from hardware feedback). - Null-guard the DmMatrixInput constructor (device/videoSyncfeedback). - Comment accuracy: document the known output-only keying limitation on UpdateCurrentRoute (breakaway A/V clobber, tracked separately); correct the "plugin-private" slot-dictionary claim (they're public members, just no longer part of a core routing contract); fix the orphaned doc block on Chassis_DMOutputChange. Build clean (0 warnings); 84 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t tests Fixes the breakaway-routing clobber in the new IRoutingMidpointWithFeedback surface (#1) and adds the first laptop unit tests of the route-feedback bookkeeping (#10). Problem: the chassis recorded CurrentRoutes keyed on the output port only. DM output/input ports are typed Audio|Video and the same RoutingOutputPort instance is reported for both the video and audio feedback events, so an audio route and a video route to the same output overwrote each other — DM breakaway (independent A/V) routes could not be represented, and RouteChanged reported the wrong/missing signal. Change: - New DmRouteFeedbackTracker maintains CurrentRoutes keyed on the explicit (output port, signal type) pair — signal type from the feedback event is the only reliable discriminator since the ports are AudioVideo-typed. Pure bookkeeping over Crestron-free Essentials.Core routing types. - DmChassisController, DmTxControllerBase, and DmRmc4kZScalerCController now delegate to the shared tracker, replacing three near-duplicate, divergent implementations (the chassis keyed output-only; the TX keyed on InputPort .Type, which also fails when input ports are AudioVideo). - Tests: tests/DmRouteFeedbackTrackerTests.cs links the production helper and exercises breakaway coexistence, per-signal replace, per-signal route-off, multi-output isolation, null-output guard, Clear(), and list-instance stability. Required referencing PepperDash.Essentials.Core in the test project (the routing port/descriptor types are Crestron-free, so they load in the test host even though the plugin itself is reflection-only). Build clean (0 warnings); 91 tests pass (84 existing + 7 new). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ges and update CurrentRoutes
…e changes and update CurrentRoutes
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.
Migrates the DM plugin off the routing-interface family that
3.0.0-dev-v3-routing.21removed, onto the consolidated replacements, without changing hardware-switching behavior. 43 controllers + the matrix slot types.Mapping applied
IRoutingInputSlot/IRoutingOutputSlot→ plugin-localIDmInputSlot/IDmOutputSlot(slot model is plugin-internal).IRoutingInputsOutputs→IRoutingMidpoint(endpoint/passthrough controllers — pure rename).IRoutingNumeric(WithFeedback)/IRouting/IMatrixRouting→IRoutingMidpointWithFeedback(chassis/midpoints), adding the now-requiredClearRoute/CurrentRoutes/RouteChanged, populated from existing switch feedback.ITxRouting(WithFeedback)/IRmcRoutingWithFeedback→ plugin-local interfaces extendingIRoutingMidpointWithFeedback; shared TX members implemented once inDmTxControllerBase.DmChassisController: droppedIMatrixRouting(keptIRoutingMidpointWithFeedback);InputSlots/OutputSlotsretyped to the plugin-local slot interfaces (retained as public members; nothing external consumed theIMatrixRoutingtype).Crestron switching logic (
DMOutput.VideoOut/AudioOut/USBRoutedTo, off-timers, feedback wiring) is unchanged.Status
CurrentRoutes/RouteChangedpopulation after switch and after clear (Mobile Control / route-feedback consumers).ClearRoutesemantics per device family (chassis/matrix issue a real hardware route-off; source-style devices select "no source"; AirMedia & the two no-feedback controllers drop the tracked route only).DmMatrixOutput.IsOnlinewas previously declared-but-never-initialized (latent NRE); now initialized to matchDmMatrixInput.Same pattern as the Wyrestorm routing migration (PepperDash/epi-wyrestorm-networkHD#3).
🤖 Generated with Claude Code