1
0

refactor shared

This commit is contained in:
2026-01-08 19:23:19 +08:00
parent 07cc58fb36
commit 64368b7837
23 changed files with 400 additions and 234 deletions

View File

@@ -14,14 +14,15 @@ Command protocol is tramsmitted by system named pipe.
The name of pipe is `\\.\pipe\ed0e3f1f-d214-4880-9562-640bce15e72e` on Windows
or `/tmp/ed0e3f1f-d214-4880-9562-640bce15e72e` on POSIX.
|Code|Direction|Comment|
|:---|:---|:---|
|`0x61`|Presenter<--Trainer|Handshake code (Are Presenter ready?)|
|`0x62`|Presenter-->Trainer|Handshake code (Presenter is ready).|
|`0x01`|Presenter-->Trainer|Data was ready. Please Trainer receive it.|
|`0x02`|Presenter<--Trainer|Data has been received. Please go into next loop.|
|`0x71`|Presenter-->Trainer|Actively Stop (Presenter request stop).|
|`0x71`|Presenter<--Trainer|Stop (Trainer agree the stop request, or trainer actively stop).|
|Code|Mnemonic|Direction|Comment|
|:---|:---|:---|:---|
|`0x61`|HANDSHAKE_REQUEST|Presenter<--Trainer|Handshake code (Are Presenter ready?)|
|`0x62`|HANDSHAKE_RESPONSE|Presenter-->Trainer|Handshake code (Presenter is ready).|
|`0x01`|DATA_READY|Presenter-->Trainer|Data was ready by Presenter. Trainer please receive it.|
|`0x02`|DATA_RECEIVED|Presenter<--Trainer|Data has been received by Trainer. Please go into next loop.|
|`0x21`|ACTIVELY_STOP|Presenter-->Trainer|Something was happened in Presenter and it want to stop.|
|`0x71`|STOP_REQUEST|Presenter<--Trainer|Trainer order Presenter to stop and quit.|
|`0x72`|STOP_RESPONSE|Presenter-->Trainer|Presenster is stopped.|
### Handshake