summaryrefslogtreecommitdiff
path: root/src/components/include
Commit message (Collapse)AuthorAgeFilesLines
* Add new methods to PolicyManager classesYana Chernysheva2021-02-024-0/+30
|
* Add new methods to PolicyHandler classYana Chernysheva2021-02-022-0/+17
|
* Support new hardware version paramYana Chernysheva2021-02-021-1/+16
|
* Add vehicle data params to StartSessionAckAndrii Kalinich2021-01-217-0/+45
| | | | | | | Also added some unit tests to cover happy path Additionally, implemented new waiter-function for blocking threads until HMI readiness and release them once all data became available.
* Fix for a potential SDL crash on boot (#3581)Yana Chernysheva (GitHub)2021-01-152-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * Fix for a potential SDL crash on boot One of the reasons why SDL is crashing on start is related to lazy initialization of the HMI/Mobile/v4 API classes. These classes are initializated on demand when some of threads are trying to get the object of that class first time. Most likely, at SDL start might be a situation when HMI/Mobile/v4 API classes are constructing in the one thread and at that moment another thread is trying to get access to the inner data of not-yet-fully-constructed object and this causes a core crash with ~ISchemaItem() calls in stack trace. That is possible because access to these factories is not synchronized. To avoid such situation, factory creation was moved to AM ctor and all other sub components just use getters when they need to get access to API instances. * fixup! Fix for a potential SDL crash on boot Co-authored-by: Dmitriy Boltovskiy <dboltovskyi@luxoft.com> Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com>
* Add OnWayPointChange handling for NAVIGATION app services (#3573)Jacob Keeler2020-12-092-19/+41
| | | | | * Add OnWayPointChange handling for NAVIGATION app services * Only send OnWayPointChange to mobile from active waypoints provider
* Merge pull request #3572 from smartdevicelink/fix/fix_session_heartbeat_startingJackLivio2020-11-132-0/+11
|\ | | | | Fix session heartbeat starting
| * Merge remote-tracking branch 'origin/develop' into ↵JackLivio2020-11-10121-2120/+5774
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | fix/fix_session_heartbeat_starting # Conflicts: # src/components/connection_handler/include/connection_handler/heartbeat_monitor.h # src/components/connection_handler/src/connection.cc # src/components/connection_handler/src/heartbeat_monitor.cc # src/components/protocol_handler/src/protocol_handler_impl.cc
| * | Added check if HB tracking for session is already enabledAKalinich-Luxoft2017-12-222-0/+11
| | | | | | | | | | | | | | | This prevents SDL from starting HB session tracking every time SDL receives HB request from mobile.
* | | Cover connection handler and policy handler with unit tests (#2682)Mykola Korniichuk (GitHub)2020-11-121-55/+0
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Cover connection handler and policy handler with unit tests Few tests added to connection_handler_impl_test.cc and to connection_test.cc There were 2 mocks for telemetry observer. So, one is removed (src/components/include/test/protocol_handler/mock_telemetry_observer.h) Fixed mock_telemetry_observer.h (src/components/protocol_handler/ test/include/protocol_handler/mock_telemetry_observer.h) Added tests to protocol_handler_tm_test.cc set_hash_id and get_hash_id are covered with unit tests. set_hash_id, get_hash_id, ConvertPacketDataToString, get_protocol_observers_count declarations are added to protocol_handler_impl.h under BUILD_TEST flag. Resolves: #2449 * fix according to comments * Unit test for get_hash_id and set_hash_id Removed declarations for internal functions get_hash_id and set_hash_id ConvertPacketDataToString moved to convert_utils as ConvertBinaryDataToString Fixed unit tests for get_hash_id and set_hash_id * replace dcheck or return to if in ConvertBinaryDataToString due to issue in smoke tests * minor UT fixes * Update doxygen for convert_utils * Address comments and fix UT Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
* | ensure apps receive default HMI status before activated status (#3559)7.0.0-RC2release/7.0.0Collin2020-10-292-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove cloud app exception from StateControllerImpl::OnApplicationRegistered * Fix/ Postpone application activation if registration is not complete yet (#3557) * Postpone application activation if registration is not complete yet * fixup! Postpone application activation if registration is not complete yet * fixup! Postpone application activation if registration is not complete yet Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com> * fix style * fix unit tests Co-authored-by: Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
* | Fix sdl sends unexpected disconnect with resource constraint (#3516)Serhii Niukalov (GitHub)2020-10-233-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | * Rework processing of the OnExitApplication (RESOURCE_CONSTRAINT) notification * Update UTs according to changes Co-authored-by: sniukalov <sniukaov@luxoft.com> Co-authored-by: Aleksandr Kutsan <AKutsan@luxoft.com> Co-authored-by: jacobkeeler <jacob.keeler@livioradio.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
* | Add missed NACK reasons (#3545)Yana Chernysheva (GitHub)2020-10-236-18/+27
| | | | | | * Add missed NACK reasons, update UTs and add minor changes
* | Re-order rai logic for plugins (#3526)JackLivio2020-10-062-0/+18
| | | | | | | | | | | | | | | | | | | | | | * Re-order rai logic for plugins * style * Add mock method * Add method descriptions * Add timing content
* | Fix streamer activity in case of suspend (#3488)Andrii Kalinich (GitHub)2020-10-054-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix streamer activity in case of suspend The problem of the current implementation is that SDL kills streaming thread responsible for sending a/v streaming data to HMI when streaming timeout expires. This issue is observed when mobile app dumps 10-seconds audio file to SDL during 2 seconds and after that app does not send any data. In that case HMI will play audio file during 2 seconds + timeout = 5 seconds. At the 5th second SDL just kills streaming thread with all pending messages, however audio service is still open. As a result not a whole audio file is played. The correct behavior from SDL side in that case is not kill streaming thread when streaming timeout was expired. SDL should kill streaming thread only when service is actually stopped. Current SDL behavior was updated to align with a correct behavior described above. * Adjust fix to work with audio socket streaming * Revert "[WIP] initial fix of socket streaming by guessing playback time (#3057)" This reverts commit 7c442abce73c462e7724a64b3ce037bcb8e9093e. * Remove unused code after revert * Fix style issues
* | Fix Cppcheck issues (#3453)Yana Chernysheva (GitHub)2020-10-012-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix noExplicitConstructor issue * Fix functionConst issues * Fix unusedFunction and unusedField issues * Fix redundantInitialization * Fix unreadVariable and unusedVariable issues * Fix postfixOperator issue * Fix variableScope issue * Fix invalidPrintfArgType_sint and unsignedLessThanZero issues * Fix other errors * Add changes, related to functions marked as unused * Fix new issues * Fixe review comment * Fix codestyle * Fix constParameter errors * Fix functionConst errors * Fix noExplicitConstructor, redundantInitialization errors * Fix unreadVariable errors * Fix shadowVariable error * Fix useStlAlgorithm errors * Fixe variableScope error, add FIXME comment * Fix code style * Fix compile error * Remove unsued function * Fix compile error Co-authored-by: Vladislav Semenyuk <vsemenyuk@luxoft.com>
* | Add fixes for new Coverity issuesfix/coverity_7.0jacobkeeler2020-09-171-0/+1
| | | | | | | | Fixes CID 214309, 214305, 214304
* | Feature/Add reason param to All protocol NAKs (#3462)Shobhit Adlakha2020-09-046-3/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add reason param to StartService and EndService NAK payloads * Update the default protocol version * Fix unit tests * Implement minor version check for reason param * Fix unit tests * Apply suggestions from code review Co-authored-by: Collin <iCollin@users.noreply.github.com> * Make semantic versions const and fix handshake NAK reason messages * Make reason a required param * Add error check for protocolversionused call * Use full version for reason param version check * Get protocol NAK reason from OnSessionEndedCallback * Fix failing unit tests * Remove unnecessary condition from protected/unprotected reason check * Add unit tests for NACK reason param * Add unit test for EndServiceNAK with reason param * Fix calltimes in StartSession_NACKReason_SessionObserverReject * Get reason string for service start failed * Add more details to the invalid cert nak reason Co-authored-by: Collin <iCollin@users.noreply.github.com>
* | [SDL-0190] Handle response from HMI during resumption data (#3475)Yana Chernysheva (GitHub)2020-09-045-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add changes to RAI request * Add new class ResumptionDataProcessor * Add new class SDLAppExtension * Add new class ExtensionPendingResumptionHandler * Add new class SDLPendingResumptionHandler * New class VehicleInfoPendingResumptionHandler * Add changes related to ApplicationManager class * Add changes related to MessageHelper class * Add changes related to StateController class * Add changes related to ResumeController class * Add changes related to PolicyHandler class * Add changes related to SDLRPCPlugin * Add changes related to VehicleInfoPlugin * Add changes related to AppServiceAppExtension and SystemCapabilitiesAppExtension * Add changes related to ResetGlobalProperties request * Add changes related to VehicleInfoAppExtension * Add changes related to AppExtension and RCAppExtension * Change OnTimeOut() method in affected requests * Add changes related to method IsAppSubscribedForWayPoints * Fix problem with multiple definitions during building of unit tests * Add changes related to ApplicationHelper class * Add changes related to EventDispatcher * Add changes related to OnSystemCapabilitiesUpdated notification * Fix/fix rai default timeout (#108) Fix RAI default timeout As RAI request does not depend on any HMI response there is no need to track any timeout for it. RAI request will be removed from/ RequestController queue upon RAI response which will be sent anyway Update UT * Do not unsubscribe from pending VD Update SDL logic to avoid sending of unsubscribeVD to HMI during vehicle data resumption for case when another application is also have pending subscription for the same vehicle data. * Fill subscription data for all pending requests Changed SDL logic to update subscription results for each pending subscription request before notifying resumption processor about current subscription is processed. This should be done beforehand because after raising event to processor it can finish resumption process and if it has failed then it can trigger sending of the next subscription request. So at that point, each subscription request should contain updated subscriptions status, otherwise some redundant requests might be sent. * fixup! Add new class ResumptionDataProcessor * fixup! Add new class SDLPendingResumptionHandler * fixup! Add new class ExtensionPendingResumptionHandler * fixup! New class VehicleInfoPendingResumptionHandler * fixup! Add changes to RAI request * fixup! Add new class ResumptionDataProcessor * fixup! Add new class SDLAppExtension * fixup! Add new class SDLPendingResumptionHandler * fixup! New class VehicleInfoPendingResumptionHandler * fixup! Add changes related to ApplicationManager class * fixup! Add changes related to MessageHelper class * fixup! Add changes related to ResumeController class * fixup! Add changes related to SDLRPCPlugin * fixup! Add changes related to AppExtension and RCAppExtension * fixup! Add changes related to AppServiceAppExtension and SystemCapabilitiesAppExtension * fixup! Add changes related to OnSystemCapabilitiesUpdated notification * fixup! Add changes related to ResumeController class * fixup! Change OnTimeOut() method in affected requests * fixup! fixup! Add new class SDLAppExtension * Filter RC subscriptions in vehicle data plugin * Timeout process for reset global properties * Use ResumptionDataProcessor interface instead of subscriber function * Rename ExtensionPendingResumptionHandler * Rename SDLAppExtension * Revert "Filter RC subscriptions in vehicle data plugin" This reverts commit f35e573e7587b06472e9f396d249339e8fc05cc8. * Rename resumption_data_processor.cc * Rename SDLPendingResumptionHandler * fixup! fixup! Add changes related to OnSystemCapabilitiesUpdated notification * fixup! fixup! Add changes related to AppServiceAppExtension and SystemCapabilitiesAppExtension * fixup! Use ResumptionDataProcessor interface instead of subscriber function Co-authored-by: Andrii Kalinich (GitHub) <AKalinich@luxoft.com> Co-authored-by: Aleksandr Kutsan <AKutsan@luxoft.com>
* | Removed unconsistent logger_status variable. (#3489)Alexander Kutsan (GitHub)2020-09-032-71/+14
| | | | | | Fix adopted from SYNC4 codebase
* | SDLCORE-459 : Fix trying to unlock mutex not held by any thread (#3380)Alexander Kutsan (GitHub)2020-09-031-6/+4
| | | | | | | | | | | | | | | | SDLCORE-459 Helgrind considers that this issue is an error because we release mutex before call Broadcast. Co-authored-by: Elvis Kuliiev <ekuliiev@luxoft.com>
* | App not Un-Registering when trying to Force Close Nav App (#3374)Alexander Kutsan (GitHub)2020-09-021-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | * SYNC-62924: App not Un-Registering when trying to Force Close Nav App SYNC-62924 1. video_streaming_Lock acquired was not released when timeout and stop called from another thread happens at the same time 2. resumption timeout callback was waiting on Policy_Manager_lock_ which was not released, when acquired if resuming application is activated. 3. Crash observered when one thread accessing multiframe data and other thread deleting the mutliframe data due to disconnection Co-authored-by: asanka17 <asanka17@ford.com> Co-authored-by: YarikMamykin <ymamykin@luxoft.com> Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com>
* | [SDL 0046] Implement logger abstraction (#3472)VladSemenyuk2020-09-019-158/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement logger abstraction. Integrate it to SDL. Create one logger instance for shared libraries * Rename all logger macros. * Update src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Fix review comments(errors in log messages) * Fix review coments * Fix code style * Add logger variable creation to new commads * Fix review comment * Fixe review comment(class imblemtation moved to .cc file) Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
* | Fix avoid race conditions (#3471)Serhii Niukalov (GitHub)2020-08-212-59/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduced enums instead multiple bool flags Update threadFunc logic Update Start logic Update Stop logic Update Join logic * Update of the affected code * UTs update Co-authored-by: sniukalov <sniukaov@luxoft.com>
* | [SDL 0273] WebEngine Projection mode (#3457)Alexander Kutsan (GitHub)2020-08-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Temporary commit. Changes rpc_spec submodule reference. NOTE: should be removed before merge * Update Mobile API for the new App HMI type WEB_VIEW * Update HMI API for the new App HMI type WEB_VIEW * Add app registration support of the hmi type WEB_VIEW * Update Unit tests related to app registration Add the new one case to check app registration with AppHMItype WEB_VIEW Update existing Application Manager UTs with the new methods for WEB_VIEW Update Application Mock * Add Unit tests for RAI request test * Implement HMI states management for WEP apps * Add new application exit reason RESOURCE_CONSTRAINT Add RESOURCE_CONSTRAINT to HMI API and its processing to OnExitApplicationNotification, update unit tests * Add web socket connection closing on RESOURCE_CONSTRAINT * Update ProtocolHandlerImpl::OnTMMessageSendFailed * Add Unit test for OnAppInterfaceUnregistedNotification * Remove redundant code * Add WEP media & nonmedia to general test cases * Move function to iface class to allow its testing * Add WEP media/nonmedia apps registration for HMI state checks Added unit test cases for WEP media and non-media applications, which allow to check HMI Level, system context, audio and video streaming states calculation after the following actions: - Initial HMI state after registration - HMI state after app activaion - HMI State after app deactivation - HMI state after app exit Note: HMI state includes HMI level, audio, video streaming state, system context * Make code more clear & easy for debug * Add test case for WEP app in resuming mode * Add missed logging * Close connection after RESOURCE_CONSTRAINT RESOURCE_CONSTRAINT unregister reason will close connection for all applications, but not only Web engine projection * Refactoring no functional changes Use setters instead of direct access to app_hmi_type bool var * Use PolicyHandler::CheckHMIType to avoid code duplication * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc Co-authored-by: JackLivio <jack@livio.io> * Use log to check if web engine is allowed * fixup! Use log to check if web engine is allowed * Revert "fixup! Use log to check if web engine is allowed" This reverts commit baad4aae5ffdeba5502a533b2eeb18de84d92b05. * Revert "Use log to check if web engine is allowed" This reverts commit 94c6a7d9efc6912777834bb5aca22c7b46d43497. * Revert "Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/register_app_interface_request.cc" This reverts commit 3296fcc399588f01624c1a27f64ab8bc9176e197. * Revert "Use PolicyHandler::CheckHMIType to avoid code duplication" This reverts commit 2c695099a63b838915cb9b5c91c46ad7fc013b47. * Use log string to check if WEB engine is not allowed * Update submodules Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: sniukalov <sniukaov@luxoft.com> Co-authored-by: Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> Co-authored-by: Mykhailo Vorobiov (GitHub) <61186891+mvorobio@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: JackLivio <jack@livio.io> Co-authored-by: YarikMamykin <ymamykin@gmail.com> Co-authored-by: Andrii Kalinich <AKalinich@luxoft.com>
* | Add SubtleAlert RPC (#3459)Jacob Keeler2020-08-178-18/+23
| | | | | | | | | | | | | | * Add SubtleAlert RPC to project * Add OnSubtleAlertPressed implementation * Add `subtle_notifications_per_minute_by_priority` field to policies
* | Additional Submenus and Driver Distraction Limits (#3447)JackLivio2020-08-071-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement additional sub menus * Fix merge conflicts * Revert adding mobile api merge conflict * Update src/components/interfaces/HMI_API.xml Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/src/application_data_impl.cc Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/add_sub_menu_request.cc Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Address comments * Fix unit tests * Fix conflitcs * Update src/components/interfaces/HMI_API.xml Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com> * Update commit hash Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
* | [SDL 0249] Feature/persisting hmi capabilities (#3397)Yevhenii Dementieiev2020-07-1713-153/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Replace raw pointers with shared pointers * Save UI.GetCapabilities, UI.GetLanguage, UI.GetSupportedLanguages responses into the file specified by ini file If ini file contains an empty path to the cache file, this feature will be disabled and SDL will work as before. SDL will save each response only first time, after that file will not be overwritten. On master reset SDL will remove the cache file. SDL will read default hmi capability values from the cache file on each system boot up * Fix doxygen * Define HMI interfaces aliases * Implement caching for VR, TTS, Buttons, VehicheInfo and RC capabilities * Fix default capabilities structure according to the HMI API * Send requests to get capabilities from HMI in case any capability is missing in cache * Refactor RC capabilities storing and retrieving. Fix related UTs. * Created implementation and unit tests for HMI capabilities persistence after SW update * Created implementation for save and received MetaInfo * Increase unit tests coverage on persistence HMI capabilities * Do not rewrite MetaInfo in case invalid BC.GetSystemInfo response from HMI * Read pcm_stream_capabilities from HMI and save to the cache * Refactor hmi capabilities test * Fix wrong convert PrerecordedSpeech and added unit test for check * Suspend response to RAI requests until HMI has responded to all the HMI capabilities * Request appropriate capabilities if they are not present in the cache and the default capabilities as well * fixup! Send requests to get capabilities from HMI in case any capability is missing in cache * Remove hm_capabilities.json test file It should be removed because during UT building the real hmi_capabilities.json file is copying to the test directory * Re-factor HMICapabilitiesImpl and add the new one method Make changes in the next places: - GetRequestsRequiredForCapabilities method rename to IsRequestsRequiredForCapabilities and return value change to bool. This commit provides the next implementation: the method checks if specified request should be sent to the HMI; - in the save_hmi_capability_field_to_json method remove redundant section in the json node to save; - JsonCapabilitiesGetter: GetInterfaceJsonMember method rename to IsInterfaceJsonMemberExists. Return value change to bool; - Add the new one function GetInterfaceGetter: returns the JsonCapabilitiesGetter according to specified interface name; - Parsing the capabilities cache file wrapped to the try/catch construction; - Add AddRequiredRequestsForCapabilities method; - Remove MatchesCCPUVersion method as redundant; - Rework PrepareXXXJsonValueForSaving methods; - Add new Unit tests for HMICapabilitiesImpl; - Update existing Unit tests according to the appropriate changes; * Update CCPU Version max value parameter (regular and external policies) * Minor updates: - Remove input parameter for the GetSystemInfo method, move the OnSoftwareVersionReceived method out of GetSystemInfo method; - UIGetCapabilitiesResponse: retrieve reference for a specific section from a message instead of using the whole path to needed section; - OnTTSLanguageChangeNotification: add saving cached capabilities for VR; - OnVRLanguageChangeNotification: update log info; - VRGetCapabilitiesResponse: retrieve reference for a specific section from a message instead of using the whole path to needed section; - VRGetSupportedLanguagesResponse: update log info; - CacheManager (regular and external policies): add doxygen description for the SetPreloadedPtFlag method; move back meta info out of "for" loop; * Minor changes for the Unit tests * Fix SDL Core crash during getting RC capability There the case when RC capability didn't initialized yet and rc_capability() method is calling and returns invalid pointer to the RC capability. This commit provides the next changes: - Add check for returned pointer to rc_capability; - Add the new one capabilitiesStatus parameter "kInvalidStatus" for return value for the GetModuleDataCapabilities method; - Update capabilitiesStatus parameter names according to the coding style; * fixup! Re-factor HMICapabilitiesImpl and add the new one method * fixup! Re-factor HMICapabilitiesImpl and add the new one method * fixup! Re-factor HMICapabilitiesImpl and add the new one method * Remove "system_display_capabilities" smart key * Add to the RequestToHMI the RequestCapabilities method The "RequestCapabilities" methos is common for the all *IsReady requests. Because of that it was moved to the base class with common logic. * Re-factor all *IsReady request. The logic for getting capabilities from HMI is common for the all *IsReady request. This logic is implemented in the base RequestToHMI class. So, this logic should be removed from each request and the method of the base class should be used. * fixup! Re-factor all *IsReady request. Co-authored-by: LitvinenkoIra <ilytvynenko@luxoft.com> Co-authored-by: Igor Gapchuk <igapchuck@luxoft.com> Co-authored-by: Yevhenii Dementieiev (GitHub) <ydementieiev@luxoft.com> Co-authored-by: sniukalov <sniukaov@luxoft.com>
* | Fix/sdl 491 apt support formats (#2184)Sho Amano2020-06-302-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move definitions of SamplingRate / AudioCaptureQuality / AudioType to public header * Transfer AudioPassThru configuration to adapter * fix: apply AudioPassThru config to GStreamer pipeline * Update media manager test to remove deprecated method * Reflect code review comments - Update Doxygen comment format - Add description of create_caps_string() method * Fix style issue in from_mic_recorder_adapter.h * Update MediaManager to use Mobile API audio related enums Reflecting review comments.
* | Fixes race condition in messagemeter.h (#3377)Alexander Kutsan (GitHub)2020-06-221-1/+24
| | | | | | | | | | | | | | | | | | | | SDLCORE-373 Unprotected critical section accessed by two different threads, timing_map was being modified by clearing the map identifiers causing a crash in boost::date_time Review: Change RWLock to Lock, Added FrequencyImpl private method Co-authored-by: Mario Godinez <mgodine6@ford.com>
* | Update to filter unknown enums (#3436)JackLivio2020-06-152-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add HMI warnings response for filtered enums * Only filter enums with valid typing Invalid types with an enum schema item were being silently filtered, so we need to look for a specific result code from validate() instead of looking for a general failure. * Fix source for messages from hmis * Fix unit tests Co-authored-by: jacobkeeler <jacob.keeler@livioradio.com>
* | Filter unknown enums when removing unknown parameters (#3385)Jacob Keeler2020-06-102-0/+11
| | | | | | | | | | | | | | | | | | * Add enum filtering step to applySchema This step is triggered when `remove_unknown_parameters` is enabled * Add unit tests * Pass warning info to message response after processing
* | Sdl must store onWayPointChange internally (#2490)Pavel Zhdanov (GitHub)2020-06-082-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | * Add saving way points during notification - When OnWayPointNotification appeared the wayPoint is saving - When new app subscribing on wayPointNotification stored way points are sending to app * Add unit tests * fix style, update to remove (uint32_t) overload of SubscribeAppForWayPoints Co-authored-by: collin <collin+i@collinmcqueen.com>
* | Fix onsystemrequest retry logic (#3400)JackLivio2020-05-282-3/+10
| | | | | | | | | | | | | | | | | | * Fix onsystemrequest retry logic * Cache policy update file from HMI for retries * Fix issues with previous commit Co-authored-by: jacobkeeler <jacob.keeler@livioradio.com>
* | unsubscripe app from waypoints when it is unregistered (#3373)Collin2020-05-212-0/+23
| | | | | | | | | | | | | | * unsubscripe app from waypoints when it is unregistered * address review comments * fix style
* | Fix/Add Startup PTU trigger check (#3363)Shobhit Adlakha2020-05-184-0/+16
| | | | | | | | | | | | | | * Add Startup PTU check * Reset Stop PTU etry when first app is registered * Address review comment
* | ResetGlobalProperties doesn't reset HELPPROMPT and VRHELPITEMS to default ↵Collin2020-05-182-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values (#3357) * Fix bug `ResetGlobalProperties` (#2337) Fix bug `ResetGlobalProperties` does't reset `HELPPROMPT` and `VRHELPITEMS` to default values Fix UT's after bugfixing - Fix `ResetGlobalPropertiesRequestTest` - Add mock function into `MockApplicationManagerSettings` Github issue #1306 Co-authored-by: v-malko4 <vmalkov@luxoft.com> * fix vr_help_title SO type, rename help_prompt_ in unit tests to so_help_prompt * fix style Co-authored-by: v-malko4 <vmalkov@luxoft.com>
* | Add missing ssl_context.h include in security_manager_listener (#2775)Stanislav Kobziev (GitHub)2020-05-111-0/+1
| |
* | Move cached app logic to ChoosePTUApplicationfix/external_policy_buildjacobkeeler2020-04-212-13/+36
| | | | | | | | Also add macro guards for uses of last_ptu_app_id_
* | Fix PROPRIETARY and HTTP retry sequences (#3329)Jacob Keeler2020-04-203-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | * Fix PROPRIETARY and HTTP retry sequences For PROPRIETARY policy updates, Core is responsible for the retry sequence and cycling through update URLs. This fixes the PROPRIETARY flow with a few specific changes: 1. Apps for PTU are chosen randomly using the existing process, but after an application is chosen, all URLs that are associated with that application will be attempted before moving onto the next application. 2. When an OnSystemRequest(PROPRIETARY) is received from the HMI, Core will ignore the `appID` and `url` properties and populate them itself. This is because Core is responsible for providing these fields in PROPRIETARY mode. * Add caching for PTU URLs if provided by HMI * Fix bug in HTTP mode
* | Remove redundant GetSystemInfo sending (#3305)Ira Lytvynenko (GitHub)2020-04-0310-28/+0
| |
* | maintain signature for GetLockScreenIconUrl (#3303)Collin2020-03-231-1/+1
| |
* | Fix/consider timeouts during streaming switching (#3293)Serhii Niukalov (GitHub)2020-03-192-1/+10
| | | | | | | | | | * Consider video and audio status before send end of service Co-authored-by: sniukalov <sniukaov@luxoft.com>
* | Fix OnSystemRequest(LOCK_SCREEN_ICON_URL) sending (#3271) (#3289)Collin2020-03-168-52/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was noticed an issue that sometimes Policy Manager component is returning an empty url for lock screen icon. The root cause of that is the data races between thread which is sending OnSystemRequest notification and backupper thread which overwrites data in the database. As these two threads may have an intersection, there could be a possible situation that backuper thread erased data from `endpoints` table and another thread is using SQL query to select the data from the same table. As a result, second thread receives an empty result as the data was erased and the new one was not inserted yet by backupper thread. After that, SDL just does not send OnSystemRequest as the URL is empty. To fix that issue, policy component has been updated to use internal policy cache instead of direct access to policy database each time to get URL. This will guarantee that a sending thread will get an up-to-date infromation required for OnSystemRequest notification. Also, code cleanup has been done in order to remove all functions which become unused after this fix. Co-authored-by: Andrii Kalinich (GitHub) <AKalinich@luxoft.com>
* | Start the new PTU after a failed retry sequence (#3208)Yevhenii Dementieiev (GitHub)2020-02-287-1/+33
| | | | | | | | | | | | * Start the new PTU after a failed retry sequence in case some trigger occurs during the retry sequence Co-authored-by: Dmytro Boltovskyi (GitHub) <dboltovskyi@luxoft.com>
* | Feature/Web Engine support (#3221)Alexander Kutsan (GitHub)2020-02-2725-101/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ini file parameters for WebEngineSupport Issue : #3197 * Add Server WebSocket transport * Policy changes for Web Engine support Issue : #3197 * Changes in HMI_API for WebEngineSupport Issue : #3197 * Add application manager implementation for WebEngineSupport Add appropriate commands Make changes in application manager Issue : #3197 * Bug fix : Do not override message params if request setups it * Update SDD * fixup! Add application manager implementation for WebEngineSupport * fixup! Add Server WebSocket transport * Rename websocket dir to websocket_server * Rename WebSocketTransport adapter to WebSocketServerTransportAdapter * fixup! Update SDD * Fix/update app list after unregistration (#3252) * fixup! Rename WebSocketTransport adapter to WebSocketServerTransportAdapter * fixup! Rename websocket dir to websocket_server * Don't remove enabled WebEngine apps from pending apps * Rework WebEngine device ID generation * Fix build after back merge * Fix get app properties (#3258) Co-authored-by: Maksym Ked (GitHub) <41471947+mked-luxoft@users.noreply.github.com> * Remove unused vin_code variable Co-authored-by: Maksym Ked (GitHub) <41471947+mked-luxoft@users.noreply.github.com> Co-authored-by: Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> Co-authored-by: Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> Co-authored-by: Andrii Kalinich (GitHub) <AKalinich@luxoft.com>
* | Fix LastState methods thread safe access (#2626)Ira Lytvynenko (GitHub)2020-02-1411-17/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix LastState instance thread safe access Fix LastState instance thread safe access and update dictionary usages in app launch and resumption. There was implemented LastStateWrapper class for providing exclusive thread safe access to LastState instance from all places in the program. Also passing LastState object was replaced with LastStateWrapper object to avoid direct access to LastState instance from another components. Thus there were a small updates in architecture of AM and TM classes. * Fixed mocks and unit tests related to LastState class * Add LastStateWrapper interface and LastStateWrapperPtr typedef * Fix tests after adding LastStateWrapper interface * Deprecate methods with changed signature * Adapt RCConsentManager according to LastState functionality There are some deprecated methods in LastState that are used by RCConsentManager. In addition, LastState::dictionary method returns reference to dictionary no more - only copy of latter. * Adapt AppServiceManager to new LastState usage * Adapt transport manager to new LastState usage * Adapt RPCPlugin to new LastState usage * Adapt AppServiceRPCPlugin to new LastState usage * Adapt RCRPCPlugin to new LastState usage * Adapt SDLRPCPlugin to new LastState usage * Adapt VehicleInfoPlugin to new LastState usage * Adapt existing unit tests * Fix ENABLE_LOG off build failure * Replace old-style loops with range based * Fix potential mutex deadlocks in resumption storage * Add Mutable Data Accessor. The entity that provides the thread-safe mutable access to data. * Fix submodule issues after merge Co-authored-by: Alexander Kutsan (GitHub) <akutsan@luxoft.com> Co-authored-by: Yaroslav Mamykin (GitHub) <33784535+YarikMamykin@users.noreply.github.com> Co-authored-by: Igor Gapchuk (GitHub) <41586842+IGapchuk@users.noreply.github.com> Co-authored-by: Jacob Keeler <jacob.keeler@livioradio.com>
* | Feature/HMI Policy Table Update using vehicle modem (#3201)Ira Lytvynenko (GitHub)2020-02-056-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Send UPDATING state after receiving a successful SDL.PolicyUpdate response * Restart the timeout in case SDL received BC.OnSystemRequest with type PROPRIETARY or HTTP from HMI in UPDATING state * Fix UPDATE_NEEDED - UPDATING sequence in case of second app register * Add unit tests * fixup! Send UPDATING state after receiving a successful SDL.PolicyUpdate response * fixup! Restart the timeout in case SDL received BC.OnSystemRequest with type PROPRIETARY or HTTP from HMI in UPDATING state Co-authored-by: Yaroslav Mamykin (GitHub) <33784535+YarikMamykin@users.noreply.github.com>
* | Rework Uts and add synchronization to avoid race condition in transport ↵Serhii Niukalov (GitHub)2020-01-243-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adapter (#3134) * Allow code compatibility with flag TELEMETRY_MONITOR On/Off Added missed virtual keyword for SetTelemetryMonitor method. Updated related interface and dependent mock classes * Add missed mock classes and update existing ones * Update TCP transport Adapter unit test logic Replaced mock object with real TCP transport adapter to be used with mock object to allow unit testing. * Rework TransportManagerDefault class to allow its unit testing 1) Replaced local variables(raw pointers) by class members 2) Reworked Transport Manager unit tests * Add missed logic when Connection failed to ThreadedSocketConnection::threadMain() Added missed "else" case to ThreadedSocketConnection::threadMain() when connection establishing is failed * Add the Terminate method to the connection interface. To avoid race condition and deadlock during destroying object of TcpServerOriginatedSocketConnection the Terminate method was added to the ThreadedSocketConnection. Race condition can happen between the call FindEstablishedConnection from TcpTransportAdapter::Store and Terminate from TransportAdapterImpl. In case when TcpServerOriginatedSocketConnection destroyed after FindEstablishedConnection called we will get deadlock , because in destructor of TcpServerOriginatedSocketConnection we call StopAndJoinThread(), but now we are in the same thread. Co-authored-by: Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com>
* | Fix SDL app stream processing with non-streamable state. (#3151)Mykola Korniichuk (GitHub)2020-01-172-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix SDL app stream processing with non-streamable state. For determining whether an application is allowed to stream, SDL considered only HMI_Level. Now streaming state is also taken into account. Fix notifications for not streamable apps * Fix unit tests after rename function in new inplimentation * Minor fixes * const parameter for StartEndStreamTimer * Fix logging messages * end_stream_timer shanged to SingleShot * fix unit test for state_controller * fixup! Minor fixes * const parameter for StartEndStreamTimer * Fix logging messages * end_stream_timer shanged to SingleShot * fix unit test for state_controller * rename HMILevelAllowsStreaming -> HMIStateAllowsStreaming * fixup! Fix SDL app stream processing with non-streamable state. Co-authored-by: Yevhenii Dementieiev (GitHub) <57259850+ydementieiev@users.noreply.github.com>