|
# STA5 SmartLink command guidance
|
|
# STA5 SmartLink command guidance
|
|
|
|
|
|
|
|
*Agenda*
|
|
|
|
- [Requirement](#Requirement)
|
|
|
|
- [APIs](#APIs)
|
|
|
|
- [SmartLink data format](#SmartLink data format)
|
|
|
|
- [SmartLink data base structure](#SmartLink data base structure)
|
|
|
|
- [Command](#Command)
|
|
|
|
- [Subscribe](#Subscribe)
|
|
|
|
- [On Top Notification](#On Top Notification)
|
|
|
|
- [On Top Notification(AA)](#On Top Notification)
|
|
|
|
- [Get Up](#Get Up)
|
|
|
|
|
|
## Requirement
|
|
## Requirement
|
|
- Platform: STA5
|
|
- Platform: STA5
|
|
|
|
|
... | @@ -53,3 +64,88 @@ if (ret < 0) { |
... | @@ -53,3 +64,88 @@ if (ret < 0) { |
|
| dstAppName | unsigned char[128] | 128 bytes | Destination application name in string. |
|
|
| dstAppName | unsigned char[128] | 128 bytes | Destination application name in string. |
|
|
| cmd | unsigned int | 4 bytes | Refer to type SML_COMMAND. |
|
|
| cmd | unsigned int | 4 bytes | Refer to type SML_COMMAND. |
|
|
| len | unsigned int | 4 bytes | Total length of message in bytes. |
|
|
| len | unsigned int | 4 bytes | Total length of message in bytes. |
|
|
|
|
|
|
|
|
## SmartLink data base structure
|
|
|
|
| Data member | Date type | Data length | Description |
|
|
|
|
| ------------------- | --------- | ----------- | ---------------------- |
|
|
|
|
| index | int | 4 bytes | |
|
|
|
|
| DeviceName[32] | char | 32 bytes | Phone Name. |
|
|
|
|
| usbSerialNumber[32] | char | 32 bytes | USB serial number. |
|
|
|
|
| btMacAddress[32] | char | 32 bytes | Bluetooth MAC address. |
|
|
|
|
| SupportedAPP | int | 4 bytess | Refer to APP_TYPE. |
|
|
|
|
|
|
|
|
## Command
|
|
|
|
|
|
|
|
### Subscribe
|
|
|
|
- From APPs - Client
|
|
|
|
- To subscribe the service from SmartLink. Send below message to SmartLink.
|
|
|
|
|
|
|
|
| Data member | Value |
|
|
|
|
| ----------- | -------------------------------------- |
|
|
|
|
| version | SML_MAJOR_VERSION |
|
|
|
|
| mode | E_DELEGATE |
|
|
|
|
| AppType | Refer to type APP_TYPE. |
|
|
|
|
| state | E_STATE_OK |
|
|
|
|
| AppClientID | Client ID. |
|
|
|
|
| srcAppName | Source application name in string. |
|
|
|
|
| dstAppName | "SML" |
|
|
|
|
| cmd | E_REQ_SUBSCRIBE |
|
|
|
|
| len | Total length of message in bytes(288). |
|
|
|
|
|
|
|
|
- From SmartLink: No return message.
|
|
|
|
|
|
|
|
### On Top Notification
|
|
|
|
- From APPs - Client
|
|
|
|
- Notify SmartLink when APP is on Projection mode. Send below message to SmartLink.
|
|
|
|
|
|
|
|
| Data member | Value |
|
|
|
|
| ----------- | -------------------------------------- |
|
|
|
|
| version | SML_MAJOR_VERSION |
|
|
|
|
| mode | E_DELEGATE |
|
|
|
|
| AppType | Refer to type APP_TYPE. |
|
|
|
|
| state | E_STATE_OK |
|
|
|
|
| AppClientID | Client ID. |
|
|
|
|
| srcAppName | Source application name in string. |
|
|
|
|
| dstAppName | "SML" |
|
|
|
|
| cmd | E_REQ_I_AM_TOP |
|
|
|
|
| len | Total length of message in bytes(288). |
|
|
|
|
|
|
|
|
- From SmartLink: No return message.
|
|
|
|
|
|
|
|
### On Top Notification(AA)
|
|
|
|
- From AA - Client
|
|
|
|
- Notify SmartLink when APP is on Projection mode. Send below message to SmartLink.
|
|
|
|
|
|
|
|
| Data member | Value |
|
|
|
|
| -------------------------- | ----------------------------------------- |
|
|
|
|
| version | SML_MAJOR_VERSION |
|
|
|
|
| mode | E_DELEGATE |
|
|
|
|
| AppType | Refer to type APP_TYPE. |
|
|
|
|
| state | E_STATE_OK |
|
|
|
|
| AppClientID | Client ID. |
|
|
|
|
| srcAppName | "AA" |
|
|
|
|
| dstAppName | "SML" |
|
|
|
|
| cmd | E_REQ_I_AM_TOP |
|
|
|
|
| len | Total length of message in bytes(288+64). |
|
|
|
|
| ---Outside of 288 bytes--- | |
|
|
|
|
| UsbSerialNumber[32] | 32 bytes, the USB serial number of MD. |
|
|
|
|
| BtMacAddress[32] | 32 bytes, the BT MAC address of MD. |
|
|
|
|
|
|
|
|
- From SmartLink: No return message.
|
|
|
|
|
|
|
|
### Get Up
|
|
|
|
- From SmartLink - Server
|
|
|
|
- Notify APP to enter Projection mode.
|
|
|
|
|
|
|
|
| Data member | Value |
|
|
|
|
| ----------- | -------------------------------------- |
|
|
|
|
| version | SML_MAJOR_VERSION |
|
|
|
|
| mode | E_DELEGATE |
|
|
|
|
| AppType | Refer to type APP_TYPE. |
|
|
|
|
| state | E_STATE_OK |
|
|
|
|
| AppClientID | Client ID. |
|
|
|
|
| srcAppName | "SML" |
|
|
|
|
| dstAppName | Received Application name. |
|
|
|
|
| cmd | E_GET_UP |
|
|
|
|
| len | Total length of message in bytes(288). |
|
|
|
|
|