Remove premature non-DRI layers
This commit is contained in:
@@ -1,97 +0,0 @@
|
||||
# Host APP Rebuild
|
||||
|
||||
## Goal
|
||||
|
||||
Keep the APP layer suitable for teaching from simple to complex.
|
||||
|
||||
Teaching order:
|
||||
|
||||
1. one button
|
||||
2. one keyboard page
|
||||
3. two pages
|
||||
4. one main window
|
||||
5. one shared theme
|
||||
|
||||
## Completed Nodes
|
||||
|
||||
### Node 1: theme helpers
|
||||
|
||||
Files:
|
||||
|
||||
- `KeyBorad/KeyBorad/APP/AppTheme.h`
|
||||
- `KeyBorad/KeyBorad/APP/AppTheme.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- centralize colors and style strings
|
||||
- keep styling readable
|
||||
- avoid mixing style text inside every widget
|
||||
|
||||
### Node 2: key button
|
||||
|
||||
Files:
|
||||
|
||||
- `KeyBorad/KeyBorad/APP/AppKeyButton.h`
|
||||
- `KeyBorad/KeyBorad/APP/AppKeyButton.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- teach one custom button first
|
||||
- keep state changes explicit
|
||||
- let one widget own its own text and style refresh
|
||||
|
||||
### Node 3: keyboard page
|
||||
|
||||
Files:
|
||||
|
||||
- `KeyBorad/KeyBorad/APP/AppKeyboardPage.h`
|
||||
- `KeyBorad/KeyBorad/APP/AppKeyboardPage.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- grow from one button to a full keypad
|
||||
- keep layout data local and explicit
|
||||
|
||||
### Node 4: settings page
|
||||
|
||||
Files:
|
||||
|
||||
- `KeyBorad/KeyBorad/APP/AppSettingsPage.h`
|
||||
- `KeyBorad/KeyBorad/APP/AppSettingsPage.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- use a second page early
|
||||
- give transport status and action feedback one simple home
|
||||
|
||||
### Node 5: main window integration
|
||||
|
||||
Files updated in this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/APP/AppMainWindow.h`
|
||||
- `KeyBorad/KeyBorad/APP/AppMainWindow.cpp`
|
||||
- `KeyBorad/KeyBorad/main.cpp`
|
||||
|
||||
Implemented behavior:
|
||||
|
||||
- create the two-page window
|
||||
- own one `Lgc_Core`
|
||||
- start handshake on launch
|
||||
- poll the logic layer with a timer
|
||||
- refresh settings page texts from logic state
|
||||
|
||||
### Node 6: Qt property typing fix
|
||||
|
||||
Files updated in this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/APP/AppKeyboardPage.cpp`
|
||||
- `KeyBorad/KeyBorad/APP/AppSettingsPage.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- keep widget property values explicit under MSVC + Qt
|
||||
- avoid relying on implicit conversion from string literal to `QVariant`
|
||||
|
||||
Implemented behavior:
|
||||
|
||||
- replace raw `"title"` / `"body"` property values with `QStringLiteral(...)`
|
||||
@@ -1,58 +0,0 @@
|
||||
# Host COM Rebuild
|
||||
|
||||
## Goal
|
||||
|
||||
Keep the protocol layer small and explicit.
|
||||
|
||||
The COM layer should:
|
||||
|
||||
- define packet-facing helpers
|
||||
- own frame parsing and packet building
|
||||
- avoid transport concerns
|
||||
- avoid UI and session concerns
|
||||
|
||||
## Completed Nodes
|
||||
|
||||
### Node 1: legacy protocol baseline
|
||||
|
||||
Files already present before this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/COM/Com_Cdc.h`
|
||||
- `KeyBorad/KeyBorad/COM/Com_CdcEncode.h`
|
||||
- `KeyBorad/KeyBorad/COM/Com_CdcEncode.cpp`
|
||||
- `KeyBorad/KeyBorad/COM/Com_CdcDecode.h`
|
||||
- `KeyBorad/KeyBorad/COM/Com_CdcDecode.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- these files preserve the old packet format
|
||||
- they already encode and decode complete CDC frames
|
||||
- they also contain per-packet payload helpers
|
||||
|
||||
### Node 2: unified protocol entry
|
||||
|
||||
Files added in this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/COM/Com_ProtoCodec.h`
|
||||
- `KeyBorad/KeyBorad/COM/Com_ProtoCodec.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- provides a thin and readable entry point for higher layers
|
||||
- keeps `DRI` from depending on packet parsing
|
||||
- keeps `LGC` from depending on low-level byte layout details
|
||||
- starts from the smallest useful handshake path
|
||||
|
||||
Implemented behavior:
|
||||
|
||||
- build `HelloReq` frame
|
||||
- validate whether a parsed packet is `HelloRsp`
|
||||
- decode `HelloRsp`
|
||||
- forward frame parsing and stream extraction to the existing low-level codec
|
||||
|
||||
## Next COM nodes
|
||||
|
||||
- bitmap encode/decode helper
|
||||
- ack/error helper
|
||||
- time sync and theme helper
|
||||
- replace direct `Com_Cdc*` calls in higher layers with `Com_ProtoCodec*`
|
||||
@@ -1,77 +0,0 @@
|
||||
# Host LGC Rebuild
|
||||
|
||||
## Goal
|
||||
|
||||
Keep the logic layer small, readable, and teachable.
|
||||
|
||||
The logic layer should:
|
||||
|
||||
- own connection state
|
||||
- own handshake state
|
||||
- call DRI for bytes
|
||||
- call COM for frame and packet parsing
|
||||
- expose a small interface to APP
|
||||
|
||||
The logic layer should not:
|
||||
|
||||
- parse serial bytes by itself
|
||||
- enumerate devices directly
|
||||
- own widget code
|
||||
|
||||
## Completed Nodes
|
||||
|
||||
### Node 1: function executor shell
|
||||
|
||||
Files:
|
||||
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_FunctionExecutor.h`
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_FunctionExecutor.cpp`
|
||||
|
||||
Design notes:
|
||||
|
||||
- keep function execution out of session code
|
||||
- reserve one place for OS-specific actions
|
||||
- keep the initial implementation small
|
||||
|
||||
### Node 2: state model
|
||||
|
||||
Files updated in this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_State.h`
|
||||
|
||||
Design notes:
|
||||
|
||||
- state is plain data
|
||||
- connection text and last action text live here
|
||||
- handshake result fields live here
|
||||
|
||||
### Node 3: session handshake path
|
||||
|
||||
Files completed in this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_Session.h`
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_Session.cpp`
|
||||
|
||||
Implemented behavior:
|
||||
|
||||
- try CDC handshake
|
||||
- send `HelloReq`
|
||||
- wait for `HelloRsp`
|
||||
- store the active transport
|
||||
- keep a stream buffer for CDC bytes
|
||||
- return the next parsed packet to upper layers
|
||||
|
||||
### Node 4: core facade
|
||||
|
||||
Files completed in this step:
|
||||
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_Core.h`
|
||||
- `KeyBorad/KeyBorad/LOGIC/Lgc_Core.cpp`
|
||||
|
||||
Implemented behavior:
|
||||
|
||||
- give APP one small entry point
|
||||
- start CDC handshake through session
|
||||
- expose `Start / Poll / Close / GetState`
|
||||
- refresh state from `HelloRsp`
|
||||
- update a simple action text when packets arrive
|
||||
Reference in New Issue
Block a user