这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Complete Port of Kotlin MidiCIDeviceConfiguration to C++

Summary

This PR completes the port of the Kotlin MidiCIDeviceConfiguration class to C++ and renames the existing incomplete DeviceConfig to MidiCIDeviceConfiguration. The original C++ implementation was a minimal subset that was "hackily imported" from the Kotlin version and was missing many essential fields.

Changes Made

Core Implementation

  • Renamed DeviceConfigMidiCIDeviceConfiguration throughout the entire codebase
  • Added complete field set from Kotlin implementation including:
    • Channel configuration support via MidiCIChannelList
    • JSON schema string support
    • Auto-send discovery flags (endpoint, profile, property exchange, process inquiry, etc.)
    • Process inquiry configuration with message reporting capabilities
    • Property exchange metadata and values
    • Enhanced capability inquiry support

New Files Created

  • include/midi-ci/core/MidiCIDeviceConfiguration.hpp - Complete C++ port with all Kotlin fields
  • include/midi-ci/core/MidiCIChannelList.hpp - Channel management support

Enhanced Constants

  • Updated MidiCIConstants.hpp with missing enums:
    • MidiCIProcessInquiryFeatures
    • MidiMessageReportDataControl
    • MidiMessageReportSystemMessagesFlags
    • MidiMessageReportChannelControllerFlags
    • MidiMessageReportNoteDataFlags
  • Added missing default constants for proper configuration

Field Updates

  • Renamed max_sysex_sizereceivable_max_sysex_size for consistency with MIDI-CI specification
  • All references updated across the codebase including tools and tests

Backward Compatibility

  • Maintained constructor compatibility for existing usage
  • Default values preserve existing behavior

Files Modified

  • Core library: MidiCIDevice.hpp/cpp, Messenger.cpp, CMakeLists.txt
  • Tests: TestCIMediator.hpp, test_messenger.cpp
  • Tools: All CI tool components updated to use new type
  • Qt5 tool: Settings widget updated

Verification

  • All references to old DeviceConfig name have been systematically replaced
  • Field access patterns updated to use new field names
  • Build configuration updated to include new header files
  • Maintains idiomatic C++ patterns while preserving Kotlin functionality

Link to Devin run

https://app.devin.ai/sessions/75c73f9944244ece8e2b554a4faa4d21

Requested by

Atsushi Eno (atsushieno@gmail.com)

This implementation now provides the complete MIDI-CI device configuration capabilities as specified in the original Kotlin version, enabling full-featured MIDI-CI device management in the C++ implementation.

- Rename DeviceConfig to MidiCIDeviceConfiguration throughout codebase
- Add all missing fields from Kotlin implementation including:
  - Channel configuration (MidiCIChannelList)
  - JSON schema support
  - Auto-send discovery flags
  - Process inquiry configuration
  - Message report settings
  - Property exchange capabilities
- Create MidiCIChannelList.hpp for channel management
- Update MidiCIConstants.hpp with missing enums and constants
- Maintain backward compatibility through constructor
- Update all references in headers, implementations, and tools
- Replace max_sysex_size with receivable_max_sysex_size for consistency

This provides a complete C++ port matching the full Kotlin MidiCIDeviceConfiguration
functionality while maintaining idiomatic C++ patterns.

Co-Authored-By: Atsushi Eno <atsushieno@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@atsushieno atsushieno merged commit 037a6fc into main Jun 18, 2025
@atsushieno atsushieno deleted the devin/1750263795-complete-midi-ci-device-config-port branch June 18, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants