Repository navigation
feat: Use SerialDeviceFinder probing for --discover-serial - #5
Conversation
Updates the --discover-serial option to use Core's enhanced SerialDeviceFinder which now probes ports to identify actual DAQiFi devices. Changes: - Renamed DiscoverSerialPorts() to DiscoverSerialDevicesAsync() - Uses SerialDeviceFinder.DiscoverAsync() instead of just listing ports - Shows device info (name, serial, firmware) for discovered devices - Falls back to listing raw ports if no DAQiFi devices found - Shows real-time discovery progress via DeviceDiscovered event Depends on: daqifi/daqifi-core#98 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
- Add try-catch around discovery to handle exceptions gracefully - Use .ToList() to avoid multiple enumeration of devices Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove the unrelated --mimic-desktop / DesktopFlowTest WIP that was accidentally carried over from an earlier branch via git stash. The PR's stated scope is SD-export-csv only; DesktopFlowTest doesn't exist in this repo so the call site broke compilation (Qodo #1). - Validate --sd-export-csv requires --sd-parse; previously, passing --sd-export-csv alone fell through to the connection logic and emitted a misleading "Missing required option: --ip or --serial" error (Qodo #2). - Emit a one-time stderr warning when an SD log entry carries more analog values than the configured analog port count, so silent truncation is observable (Qodo #3). - Rename progress display from "samples written" / "samples/s" to "rows written" / "rows/s". The counter increments per SampleRow (channel-value pair), not per SD entry — matches what's emitted to the CSV (Qodo #4). - Update README ".NET 8 SDK" → ".NET 9 SDK" to match the project TFM bump (Qodo #5). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User description
Summary
Updates the
--discover-serialoption to use Core's enhancedSerialDeviceFinderwhich now probes ports to identify actual DAQiFi devices instead of just listing available serial ports.Changes
DiscoverSerialPorts()toDiscoverSerialDevicesAsync()SerialDeviceFinder.DiscoverAsync()to probe and identify devicesDeviceDiscoveredeventExample Output
Test Plan
Dependencies
🤖 Generated with Claude Code
PR Type
Enhancement
Description
Replaced serial port listing with active device probing
Uses SerialDeviceFinder to identify actual DAQiFi devices
Shows real-time discovery progress and device details
Falls back to raw port listing if no devices found
Renamed function to DiscoverSerialDevicesAsync for clarity
Diagram Walkthrough
File Walkthrough
Program.cs
Replace serial port listing with active device probingProgram.cs
DiscoverSerialPorts()toDiscoverSerialDevicesAsync()withasync support
SerialDeviceFinderfor active device probing instead ofpassive port listing
DeviceDiscoveredevent handlerfirmware version
discovered
discovery