summaryrefslogtreecommitdiff
path: root/src/components/transport_manager/include/transport_manager/transport_manager_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix UpdateAppList/UpdateDeviceList spam (#3339)Andrii Kalinich (GitHub)2020-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix UpdateAppList/UpdateDeviceList spam There was noticed a continuous spam of update app and device list requests from SDL to HMI even if thre is no any devices connected and apps registered. After analysis, there was found a couple of places where logic should be updated: - In OnHMIStartedCooperation don't send update app list after refreshing cloud app information as this function able to trigger the same request itself when needed - When update app list timer is expired, don't send update app list if no any apps were registered or unregistered while timer was running - In transport manager, don't raise OnDeviceListUpdated event if no any devices were added/removed - When WebEngine device is created, it makes sense to connect it automatically and set its status to CONNECTED as its internal communication between SDL and HMI - In transport adapter, don't notify listeners via OnConnectionStatusUpdated() callbacks if device connection status was not actually changed All these actions together prevents all possible reasons of UpdateAppList/UpdateDeviceList spam observed before fix. * fixup! Fix UpdateAppList/UpdateDeviceList spam * fixup! fixup! Fix UpdateAppList/UpdateDeviceList spam * fixup! fixup! fixup! Fix UpdateAppList/UpdateDeviceList spam
* Feature/Web Engine support (#3221)Alexander Kutsan (GitHub)2020-02-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fix SDL behavior during LOW_VOLTAGE (#3029)Andrii Kalinich (GitHub)2019-09-241-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There were found a several problems during SDL testing with ATF scripts: 1. SDL does not ignore messages from mobile/HMI during low voltage and processes them on wake up 2. Sometimes SDL ignores messages on wake up due to timings 3. SDL low voltage process is not stopping properly by exit() function 4. SDL does not send OnAppUnregistered after wake up to HMI To solve mentioned problems, the following changes were done: 1. exit() was replaced with _Exit() which allow to force close the process 2. Suspend transport events processing threads during low voltage, such as unexpected disconnect etc. These events should be processed when SDL wakes up completely. 3. Suspend all client listening threads and shut down sockets for a TCP connections to prevent any possibility to receive message during low voltage. These threads will be resumed on wake up. 4. Set low_voltage flag to false in the end of wakeup() function to prevent any timing issues. 5. Don't add pending requests/notifications into request controller if low voltage event has happened, as it may happen at any moment 6. Don't handle received pending messages from mobile/HMI in RPC handler if low voltage event has happened as it may happen at any moment 7. Updated logic of few test case scenarios. Updated unit tests according to code changes
* Run updated style scriptjacobkeeler2019-04-291-31/+31
|
* Coverity 5.1 Fixes (#2854)JackLivio2019-03-261-1/+1
| | | | | | | | | | | | | | | | * Coverity 5.1 Fixes - Check return values - Pass struct by reference - Cast value to match return type * Coverity: Unchecked dynamic cast * Fix missing not typo * Address comments * Address comment
* Merge branch 'feature/cloud_app_connection_status' into ↵Jacob Keeler2019-01-021-0/+2
|\ | | | | | | feature/secure_websocket_connection
| * Refresh app list when an app is enabled or disabledjacobkeeler2018-12-121-0/+2
| |
* | Remove debug statements and style fixShobhitAd2018-12-071-1/+3
| |
* | Pass CloudAppProperties to websocket client connectionShobhitAd2018-12-051-2/+1
|/
* Add method headers and fix stylejacobkeeler2018-11-271-0/+7
| | | | Also fix issues with retry timer management
* Add cloud connection statusjacobkeeler2018-11-161-2/+5
| | | | Also required some refactoring regarding the retry process for cloud apps, as well as how the HMIApplication struct was filled.
* Add SDL.ActivateApp flow changes for cloud appsjacobkeeler2018-11-141-1/+0
|
* Fix stylejacobkeeler2018-11-141-1/+2
|
* Add Cloud Info to Application ClassJackLivio2018-11-071-0/+2
|
* Remove deprecated methods from projectfeature/remove_deprecated_functions_5_0jacobkeeler2018-08-171-8/+6
|
* Replace utils::SharedPtr with std::shared_ptr, remove non-standard usageConlain Kelly2018-07-181-1/+1
|
* Changes iAP2 Bluetooth to USB switching flowAndrey Oleynik (GitHub)2018-01-181-5/+1
| | | | | | | | | | | These changes update switching flow so now instead of automatic switching start in case of same UUID is detected SDL will wait for external signal from the system to start this flow. Also due to UUID is reliable only while device remains connected (at least on certain systems) SDL now uses Bluetooth MAC and USB serial to manage devices and UUID is used only for detection of devices able to switch their transports. Currently only iAP2 Bluetooth to USB support is implemented.
* Fixes build w/o unit tests enabledAndrey Oleynik (GitHub)2018-01-181-1/+9
|
* Removes odd interface, updates TM unit testsAndrey Oleynik (GitHub)2018-01-181-7/+4
|
* Adds descriptions, removes unused codeAndrey Oleynik (GitHub)2018-01-181-3/+23
|
* Adds main logic and related bugfixes for transport switchingAndrey Oleynik (GitHub)2018-01-181-35/+116
|
* Fix coding styleLevchenko2016-08-051-3/+5
| | | | | | | | | Has been done: - Fixed coding style; - Fixed header guard naming; - Fixed copyright comments. Related to: APPLINK-24892
* AppLaunch TM and CH implementationAGaliuzov2016-08-031-0/+10
| | | | | | Applaunch functionality in TransportMaanger and ConnectionHAndler implementation Related issue : APPLINK-24892
* hotfix/SDL does not release memory after app unregisteringVladislav Antonov2016-04-271-2/+3
| | | | | | | | | | | | | Registered after start connections in TransportAdapterImpl can be unregistered when finalized using the RemoveFinalizedConnection method from the TransportAdapter interface. The call to the RemoveConnection method in the TransportManagerImpl unregisters the connection calling the RemoveFinalizedConnection using the supplied TransportAdapter instance. This solves the observed memory leak of the inactive connections. Issues: APPLINK-22910, APPLINK-23563
* Code style format with clang-formatKozoriz2016-04-251-25/+30
|
* TransportManager update after removing all singletonsKozoriz2016-04-251-8/+17
|
* TransportManager correctives after singletons removingKozoriz2016-03-311-2/+2
| | | | | Corrected TM after removing LastState, MediaManager, PolicyHandler singletones
* TimeTester refatctoring.Kozoriz2016-03-101-12/+18
| | | | | | | | | | Removed singletone using from TimeTester. TimeTester renamed -> TelemetryMonitor. All files and directories corrected. Tests corrected, all works. Disabled 2 tests(task created). Related to : APPLINK-21915
* Review correctives and buildability correctives.Kozoriz2016-03-071-1/+1
|
* Correctives in transportManagerKozoriz2016-03-041-19/+20
| | | | | | | | Corrected src and tests in TransportManager after removing ConnectionHandler, ProtocolHandler, HMIMessageHandler singletones. Related to APPLINK-21440
* INtegration of new Timer to TransportManagerAndriy Kozoriz2016-02-171-5/+6
| | | | | | | Changed using oif TimerThread to Timer Updated usage methods of Timer. Related to : APPLINK-10003
* Add TMIpl::device_list_ synchronizationElisey Zamakhov2015-03-241-0/+1
|
* Add TMIpl::device_to_adapter_map_ synchronizationElisey Zamakhov2015-03-241-1/+3
|
* Add TMIpl::Handle2GUIDConverter::conversion_table_ synchronizationElisey Zamakhov2015-03-241-0/+6
|
* Add TMIpl::connections_ synchronizationElisey Zamakhov2015-03-241-12/+16
|
* Bug Fixes and ImprovementsSynchronizationCommitJustin Dickow2015-02-201-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Empty perform iteration request Fix type of name from string to enum SendLocation implemented on HTML5 HMI Fixed PI response on VR rejection due to high priority. Fix Apps not responsive/not able to start app/apps remain listed on SYNC even after USB disconnect Mobile API change and processing capabilities Change perform interaction request conditions. Fix SDL must always start 3sec timer before resuming the HMILevel of the app Remove redundant StartSavePersistentDataTimer() call. Change wrong predicate name to right. Added stream request handling feature Made streaming timeout in media manager configurable Put navi app in LIMITED in case of phone call Handling of audio state for applications Add stop streaming timeout into ini file Implement HMILevel resumption for job-1 Fix result code ABORTED when interrupts it by Voice recognition activation Fix incorrect value parameter unexpectedDisconnect in BCOnAppUnregistered Fix SDL send BC.OnAppUnregistered with "unexpectedDisconnect" set to "true" in case received from HMI OnExitAllApplications {"reason":"MASTER_RESET"} Fix Update ini file for iAP1 support Current working directory added to image path Fix helpers to make it workable with more then 2 parameters DCHECK() for ManageMobileCommand() replaced with log message because the latter returns false in some regular situations (e.g. TOO_MANY_PENDING_REQUESTS, see SDLAQ-CRS-10) Remove connection after closing. Signed-off-by: Justin Dickow <jjdickow@gmail.com>
* Latest internal release - last bulk merge before pull request and gitflow!?Justin Dickow2015-01-261-9/+14
| | | | | | Smoke tested on Ubuntu 12.04 Signed-off-by: Justin Dickow <jjdickow@gmail.com>
* HmiStatus modifyJustin Dickow2015-01-241-14/+9
| | | | | | | | | | | | | | | | HU DCHECK occurs during multisession registration Remove unused variable SIGSEGV handler added to flush logger queue FixIncomplete device list in UpdateDeviceList request Fix Memory leak on PutFile break Fix Thread and Timer Fix OnHmiStatus Notification Fix Url array sending for endpoints. Fix HashChange Fix SDL parse incoming JSON message with both members error and result as success message Fix Core crashes while connecting mobile app Signed-off-by: Justin Dickow <jjdickow@gmail.com>
* 3.10.1Justin Dickow2014-10-271-111/+11
| | | | Signed-off-by: Justin Dickow <jjdickow@gmail.com>
* SDL 3.8!Justin Dickow2014-10-201-0/+461
Signed-off-by: Justin Dickow <jjdickow@gmail.com>