... | ... | @@ -4,6 +4,7 @@ |
|
|
- [Designer](#designer)
|
|
|
- [Purpose](#purpose)
|
|
|
- [Requirement](#requirement)
|
|
|
- [Flow Chart](#flow-chart)
|
|
|
- [APIs](#apis)
|
|
|
- [SmartLink data format](#smartlink-data-format)
|
|
|
- [SmartLink data base structure](#smartlink-data-base-structure)
|
... | ... | @@ -63,6 +64,35 @@ export |
|
|
└── libsocket.so
|
|
|
</pre>
|
|
|
|
|
|
## Flow Chart
|
|
|
```mermaid
|
|
|
graph TD
|
|
|
A[START] -->|Multi-thread| B(Socket Accepter thread)
|
|
|
B --> C(create_unix_server_socket)
|
|
|
C --> D(accept_unix_stream_socket)
|
|
|
D -->|Multi-thread| E(listener thread)
|
|
|
E --> F(Receive E_REQ_SUBSCRIBE command)
|
|
|
F --> G(Switch case by APP_TYPE)
|
|
|
G --> H{case MAIN_UI}
|
|
|
H --> I[Main UI message handler]
|
|
|
H --> J{case AA}
|
|
|
J --> K[Android Auto message handler]
|
|
|
J --> L{case CP}
|
|
|
L --> M[Apple CarPlay message handler]
|
|
|
L --> N{case BT_SRV}
|
|
|
N --> O[BT SRV message handler]
|
|
|
N --> P{case Others}
|
|
|
P --> Q[Others message handler]
|
|
|
P --> G
|
|
|
D -->|Multi-thread| R(listener thread)
|
|
|
R --> S(...)
|
|
|
D -->|Multi-thread| T(...)
|
|
|
A -->|Multi-thread| U(Key button thread)
|
|
|
U --> V(Detect /dev/input/event0)
|
|
|
A -->|Multi-thread| W(Rotary button thread)
|
|
|
W --> X(Detect /dev/input/event1)
|
|
|
```
|
|
|
|
|
|
## APIs
|
|
|
- To connect:
|
|
|
<pre>
|
... | ... | |