refactor(scpi)!: update producers for firmware SCPI breaking renames#168
refactor(scpi)!: update producers for firmware SCPI breaking renames#168cptkoolbeenz wants to merge 1 commit into
Conversation
Coordinates with daqifi-nyquist-firmware #311 audit. Renames that affect this .NET library (and thus daqifi-desktop via dependency): ## Command renames | Producer method | Old command | New command | Firmware PR | |---|---|---|---| | SetSdLoggingFileName | SYSTem:STORage:SD:LOGging | SYSTem:STORage:SD:FILE | #323 (merged) | | StartStreaming | SYSTem:StartStreamData | SYSTem:STReam:START | #324 | | StopStreaming | SYSTem:StopStreamData | SYSTem:STReam:STOP | #324 | | SetUsbTransparencyMode | SYSTem:USB:SetTransparentMode | SYSTem:USB:TRANSparent:MODE | #324 | ## Deleted: GetSdLoggingState The `SYSTem:STORage:SD:LOGging?` query form referenced by this producer method never existed in the firmware SCPI table — it would have failed at runtime with -113 "Undefined header" against any device. Removing the stale producer + its test. ## Why grouped All four SCPI renames that affect .NET consumers landed in a single PR so the version-compatibility story is simple: "daqifi-core N+1 pairs with firmware that has merged #323 + #324". Renames that don't affect .NET (Stats/ClearStats, TESTpattern, FAULTCLear, DIOProbe:ASSign) are not touched here. ## Test updates - ScpiMessageProducerTests.cs: 3 updated, 1 deleted (GetSdLoggingState) - SdCardOperationsTests.cs: 20 string constants updated - DaqifiDeviceInitializeTests.cs: 1 updated - EndToEndTests.cs: 2 updated No back-compat aliases. Breaking change by design — matches the clean-break precedent established across the firmware rename PRs.
Review Summary by QodoUpdate SCPI commands for firmware breaking renames
WalkthroughsDescription• Update SCPI command strings to match firmware breaking renames - SetSdLoggingFileName: SYSTem:STORage:SD:LOGging → SYSTem:STORage:SD:FILE - StartStreaming: SYSTem:StartStreamData → SYSTem:STReam:START - StopStreaming: SYSTem:StopStreamData → SYSTem:STReam:STOP - SetUsbTransparencyMode: SYSTem:USB:SetTransparentMode → SYSTem:USB:TRANSparent:MODE • Remove stale GetSdLoggingState producer method and test - Query command never existed in firmware SCPI table • Update all test assertions across four test files - 20+ test string constants updated to reflect new commands Diagramflowchart LR
A["Old SCPI Commands"] -->|"SetSdLoggingFileName"| B["SYSTem:STORage:SD:FILE"]
A -->|"StartStreaming"| C["SYSTem:STReam:START"]
A -->|"StopStreaming"| D["SYSTem:STReam:STOP"]
A -->|"SetUsbTransparencyMode"| E["SYSTem:USB:TRANSparent:MODE"]
F["GetSdLoggingState"] -->|"Removed"| G["Stale Query"]
B --> H["Updated Tests"]
C --> H
D --> H
E --> H
File Changes1. src/Daqifi.Core/Communication/Producers/ScpiMessageProducer.cs
|
Code Review by Qodo
1. SD logging state query removed
|
| /// </remarks> | ||
| public static IOutboundMessage<string> DisableStorageSd => new ScpiMessage("SYSTem:STORage:SD:ENAble 0"); | ||
|
|
||
| /// <summary> |
There was a problem hiding this comment.
1. Sd logging state query removed 🐞 Bug ≡ Correctness
ScpiMessageProducer.GetSdLoggingState was removed (not renamed), breaking any consumers that compile against it and eliminating a SD logging-state query from the public producer surface. This is a functional/API removal beyond the four SCPI renames described in the PR.
Agent Prompt
### Issue description
The public producer member for querying SD logging state was removed. This creates a breaking API change and removes functionality (ability to query SD logging state) rather than performing a rename.
### Issue Context
PR intent is described as "4 SCPI renames"; removal is a larger change and should either be replaced with the renamed query or explicitly preserved as an alias for compatibility.
### Fix Focus Areas
- src/Daqifi.Core/Communication/Producers/ScpiMessageProducer.cs[79-106]
- src/Daqifi.Core.Tests/Communication/Producers/ScpiMessageProducerTests.cs[61-93]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Coordinates with daqifi-nyquist-firmware #311. Groups the 4 SCPI renames that affect .NET consumers into one PR for clean version compatibility. Merge after firmware #324 lands.