feat: add --diagnostics command exercising IDeviceDiagnostics#32
Draft
tylerkron wants to merge 1 commit into
Draft
feat: add --diagnostics command exercising IDeviceDiagnostics#32tylerkron wants to merge 1 commit into
tylerkron wants to merge 1 commit into
Conversation
Add a --diagnostics CLI command that runs every IDeviceDiagnostics query against a connected device and prints the results: error-queue depth, memory diagnostics, stream stats, log read/clear/test, command history, and runtime log-level set. Each step is isolated so one unsupported query is reported without aborting the rest; exit code is non-zero if any step fails. Requires Daqifi.Core with the IDeviceDiagnostics API (daqifi-core#266), which is newer than the published 0.24.0 package — build against a local core checkout via -p:DaqifiCoreProjectPath=<path> until a release ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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
Adds a
--diagnosticsCLI command that exercises the fullIDeviceDiagnosticssurface added in daqifi-core#266. Useful as a one-shot bench check of the firmware's logging & performance-counter queries.It connects + initializes, then runs each query and prints results:
SYSTem:ERRor:COUNt?— error-queue depthSYSTem:MEMory:FREE?— heap / sample-pool diagnosticsSYSTem:STReam:STATS?— streaming performance countersSYSTem:LOG:TEST→SYSTem:LOG?— inject then read the system logSYSTem:LOG:CMDHistory?— recent SCPI command historySYSTem:LOG:LEVel STREAM,2— set a runtime log level (echoes applied level + ceiling)SYSTem:LOG:CLEar— clear the log bufferEach step is isolated (one failed/unsupported query is reported but doesn't abort the rest); the process exits non-zero if any step fails. All operations are non-destructive (the only state touched — log buffer, runtime log level — is volatile and resets on reboot).
This depends on the
IDeviceDiagnosticsAPI from daqifi-core#266, which is newer than the publishedDaqifi.Core0.24.0 package this app references by default. Until a release with diagnostics ships:Daqifi.Core.Device.Diagnosticsnot found in 0.24.0).Before merging: wait for core #266 to merge + a new
Daqifi.Corepackage to publish, then bump thePackageReferenceversion inDaqifi.Core.Cli.csprojand undraft.Bench-tested
Built against the core #266 branch and run against a real device (NQ over USB serial,
/dev/cu.usbmodem101) — exit code 0, all eight queries succeeded:🤖 Generated with Claude Code