Skip to content

Commit c2b3c3f

Browse files
authored
Merge pull request #154 from smartdevicelink/feature/service_status_update_to_hmi
Feature/service status update to hmi
2 parents 89b1b7e + 00f4bd0 commit c2b3c3f

File tree

5 files changed

+89
-0
lines changed

5 files changed

+89
-0
lines changed

config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@
118118
},
119119
{
120120
"name": "GetFilePath"
121+
},
122+
{
123+
"name": "OnServiceUpdate"
121124
}
122125
]
123126
},

docs/BasicCommunication/OnServiceUpdate/assets/OnServiceUpdate.gliffy

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
123 KB
Loading
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## OnServiceUpdate
2+
3+
Type
4+
: Notification
5+
6+
Sender
7+
: SDL
8+
9+
Purpose
10+
: Update HMI with the status of a particular service
11+
12+
!!! may
13+
14+
Display a pop-up providing accurate feedback to the user on the status of the system or what steps to take in case of an error.
15+
16+
!!!
17+
18+
### Notification
19+
When a mobile navigation application is activated and sends a request for the Video Service there is a series of steps taken.
20+
These steps include:
21+
22+
* getting the current [system time](../getsystemtime)
23+
* performing a policy table update
24+
* decrypting certificates and ensuring validity of the certificates
25+
26+
Processing these steps SDL sends OnServiceUpdate notification to HMI to provide accurate feedback on the status of the system.
27+
28+
#### Parameters
29+
30+
|Name|Type|Mandatory|Additional|
31+
|:---|:---|:--------|:---------|
32+
|serviceType|[Common.ServiceType](../../common/enums/#servicetype)|true||
33+
|serviceEvent|[Common.ServiceEvent](../../common/enums/#serviceevent)|false||
34+
|reason|[Common.ServiceStatusUpdateReason](../../common/enums/#servicestatusupdatereason)|false||
35+
|appID|Integer|false||
36+
37+
!!! note
38+
The only time when SDL would not be able provide the `appID` would be during the first StartService request for the RPC service before RAI was sent.
39+
!!!
40+
41+
### Sequence Diagrams
42+
43+
|||
44+
OnServiceUpdate
45+
![OnServiceUpdate](assets/OnServiceUpdate.png)
46+
|||
47+
48+
#### JSON Example Notification
49+
50+
```json
51+
{
52+
"jsonrpc": "2.0",
53+
"method": "BC.OnServiceUpdate",
54+
"params": {
55+
"serviceType": "RPC",
56+
"serviceEvent":"REQUEST_RECEIVED"
57+
}
58+
}
59+
```

docs/Common/Enums/index.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,3 +1243,29 @@
12431243
|:---|:----|:----------|
12441244
|DEFAULT_WINDOW|0|The default window is a main window pre-created on behalf of the app|
12451245
|PRIMARY_WIDGET|1|The primary widget of the app|
1246+
1247+
### ServiceType
1248+
1249+
|Name|Value|Description|
1250+
|:---|:----|:----------|
1251+
|VIDEO|0|Refers to the Video service.|
1252+
|AUDIO|1|Refers to the Audio service.|
1253+
|RPC|2|Refers to RPC service.|
1254+
1255+
### ServiceEvent
1256+
1257+
|Name|Value|Description|
1258+
|:---|:----|:----------|
1259+
|REQUEST_RECEIVED|0|When a request for a Service is received.|
1260+
|REQUEST_ACCEPTED|1|When a request for a Service is accepted.|
1261+
|REQUEST_REJECTED|2|When a request for a Service is rejected.|
1262+
1263+
### ServiceStatusUpdateReason
1264+
1265+
|Name|Value|Description|
1266+
|:---|:----|:----------|
1267+
|PTU_FAILED|0|When a Service is rejected because the system was unable to get a required Policy Table Update.|
1268+
|INVALID_CERT|1|When a Service is rejected because the security certificate is invalid/expired.|
1269+
|INVALID_TIME|2|When a Service is rejected because the system was unable to get a valid SystemTime from HMI, which is required for certificate authentication.|
1270+
|PROTECTION_ENFORCED|3|When a Service is rejected because the system configuration ini file requires the service must be protected, but the app asks for an unprotected service.|
1271+
|PROTECTION_DISABLED|4|When a mobile app requests a protected service, but the system starts an unprotected service instead.|

0 commit comments

Comments
 (0)