How It Works
High-level architecture and data flow derived from the current codebase index.
High-level architecture
main.py
-> DBCUtility.py (MainWindow shell)
-> HomeScreenWidget
-> ConverterWindow (View tab)
-> DBCEditorWidget (Edit tab)
-> DBCCompareWidget (Compare tab)
Core modules
src/DBCUtility.py: main window, tab shell, view workflow, recent-file integrationsrc/dbc_editor.py: DBC load/save/edit logic and change trackingsrc/dbc_editor_ui.py: edit widgets and dialogssrc/dbc_comparator.py: text and structured comparison enginesrc/dbc_comparator_ui.py: side-by-side, unified, and structured compare UIsrc/multiplex_support.py: multiplexed-signal classification, filtering, and validationsrc/message_layout_visualizer.py: bit-level message layout renderingsrc/home_screen.py: home screen and recent-files managersrc/about_dialog.py: version/about dialogsrc/search_module.py: shared search widgetsrc/resource_utils.py: dev/PyInstaller resource path handling
Main flows
View flow
- Load DBC via cantools
- Extract messages, signals, and multiplexer metadata
- Populate tree and detail panels
Edit flow
- Load a DBC into an internal editable structure
- Update messages or signals through dialogs
- Track original vs modified state
Save-review flow
- Editor requests save
- Main window switches to Compare
- User reviews the diff
- Confirmed save writes the generated DBC text to disk
Compare flow
- Read primary and secondary files
- Build text diffs and semantic diffs
- Render in the active compare mode
- Re-diff live when editable views change
Why the current design matters
- UI and business logic stay separated enough to keep core operations testable
- Multiplexer behavior is handled consistently across view, edit, compare, and visualization
- Resource loading works for both source runs and PyInstaller builds
- Dirty-state tracking and save-review reduce accidental writes