-
Notifications
You must be signed in to change notification settings - Fork 0
SDL 0249 Persisting HMI Capabilities
Feature 1: As a mobile application, I want to get HMI capabilities from SDL after Ignition OFF/ON cycle so that I can interact with the HMI efficiently
Background
Given App requests HMI Capabilities with one of the following RPC
- UI.GetSupportedLanguages
- UI.GetCapabilities
- VR.GetSupportedLanguages
- VR.GetCapabilities
- TTS.GetSupportedLanguages
- TTS.GetCapabilities
- Buttons.GetCapabilities
- VehicleInfo.GetVehicleType
- RC.GetCapabilities
- UI.GetLanguage
- VR.GetLanguage
- TTS.GetLanguage
Given App registers after Ignition OFF/ON cycle
When App requests HMI Capabilities
Then SDL checks HMICapabilitiesCacheFile
in AppStorageFolder
in smartDeviceLink.ini
And SDL provides HMI Capabilities persisted in HMICapabilitiesCacheFile
in the corresponding response.
Scenario 2: SDL creates HMICapabilitiesCacheFile
in case it is not present in AppStorageFolder
in SmartDeviceLink.ini
When SDL checks HMICapabilitiesCacheFile
and variable is null/empty in smartDeviceLink.ini
Then SDL must create HMICapabilitiesCacheFile
file
When Any capability requested by an app is missing in HMICapabilitiesCacheFile
Then SDL must default back to hmi_capabilities.json
file for corresponding capability
And SDL should send requests to get these capabilities from HMI
Given Receiving HMI response for any of the UI/VR/TTS/Buttons/VehicleInfo/Navigation/RC capabilities
When SDL checks if HMICapabilitiesCacheFile
file already has the data set received in HMI responseand
HMICapabilitiesCacheFile` file does not have the data set received in HMI response
Then SDL writes the HMI response data to HMICapabilitiesCacheFile
file
And SDL does not send corresponding requests to get HMI capabilities to HMI for subsequent ignition cycles, follow the rest of launch sequence requests/notifications as applicable.
And SDL uses this new data set for apps/SDL Core communication until ignition cycle is performed.
Scenario 5: SDL continues launching sequence if capabilities sent fom HMI are already present in HMICapabilitiesCacheFile
file
Given Receiving HMI response for any of the UI/VR/TTS/Buttons/VehicleInfo/Navigation/RC capabilities
When HMICapabilitiesCacheFile
file already has the data set received in HMI response
Then SDL does not overwrite the response to HMICapabilitiesCacheFile
file
And SDL does not send corresponding request to get HMI capabilities to HMI for subsequent ignition cycles
And SDL follows the rest of the launch sequence
Given Mobile application already obtained HMI capabilities in the ignition cycle
When HMI sends a Dynamic RPC with changes to capabilities
Then Core must overwrite contents of received notifications in HMICapabilitiesCacheFile
file and use this data until ignition cycle is performed
Dynamic RPCs:
- UI.OnLanguageChange
- VR.OnLanguageChange
- TTS.OnLanguageChange
Given All HMI Capabilities are presented in HMICapabilitiesCacheFile
When HMI sends OnExitAllApplications with reason MASTER_RESET
Then SDL Core must delete HMICapabilitiesCacheFile
in AppStorageFolder in smartDeviceLink.ini
Feature 2: As a mobile application, I want to get actual HMI capabilities from SDL after HMI SW update
Given App sends RAI after HMI SW update
When SDL's local ccpu_version
does not match with received from BC.GetSystemInfo(ccpu_version
)
Then SDL must delete HMICapabilitiesCacheFile
And SDL must send GetCapabilities
requests for each interface (VR, TTS, UI, etc) to HMI and persist the responses received from HMI to HMICapabilitiesCacheFile
And SDL must set IsHMICooperating
to true when HMI has responded to all the HMI capabilities requests
And SDL must respond to all pending RAI requests from mobile applications
Scenario 2: SDL does not persist capabilities after SW update if HMI doesn't respond to GetCapabilities
requests
Given SDL sends GetCapabilities
requests for each interface (VR, TTS, UI, etc) to HMI
When HMI does not send response for one ore more GetCapabilities
requests or HMI sends errors
Then SDL must fall back to default HMI Capabilities
And SDL must NOT persist those capabilities in cache
And SDL must set IsHMICooperating
to true
And SDL must respond to all pending RAI requests from mobile applications
Static RPCs:
- UI.GetSupportedLanguages
- UI.GetCapabilities
- TTS.GetSupportedLanguages
- TTS.GetCapabilities
- Buttons.GetCapabilities
- RC.GetCapabilities
- UI.GetLanguage
- BC.GetSystemInfo-CCPU version changed
- BC.GetSystemInfo-CCPU version did not change
Dynamic RPCs: