diff options
author | Juergen Gehring <juergen.gehring@bmw.de> | 2018-01-25 00:40:03 -0800 |
---|---|---|
committer | Juergen Gehring <juergen.gehring@bmw.de> | 2018-01-25 00:40:03 -0800 |
commit | 6cf4dc4636ded6d908e5382c9666d78f72ae8e3a (patch) | |
tree | 96daebd731fad9fc8150ce07cc09433f78c91885 | |
parent | 686cb94032c12be4981eac46efe5f62c2ba4d0e8 (diff) | |
download | vSomeIP-6cf4dc4636ded6d908e5382c9666d78f72ae8e3a.tar.gz |
vsomeip 2.9.12.9.1
-rw-r--r-- | CHANGES | 10 | ||||
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | examples/hello_world/hello_world_service.cpp | 2 | ||||
-rw-r--r-- | implementation/configuration/include/internal.hpp.in | 2 | ||||
-rw-r--r-- | implementation/routing/include/routing_manager_proxy.hpp | 2 | ||||
-rw-r--r-- | implementation/routing/src/routing_manager_impl.cpp | 25 | ||||
-rw-r--r-- | implementation/runtime/src/application_impl.cpp | 17 | ||||
-rw-r--r-- | implementation/tracing/src/trace_connector.cpp | 26 |
8 files changed, 66 insertions, 26 deletions
@@ -1,6 +1,13 @@ Changes ======= +v2.9.1 +- Don't ignore service requests for UDP-only remote services done + before corresponding OfferService message was received. +- Ensure that main dispatcher thread waits until newly started + dispatcher threads are finished with their call into the user code + before starting to dispatch again after a blocking call occurred. + v2.9.0 - Added get_offered_services_async method to application interface to read the currently offered services @@ -13,6 +20,9 @@ v2.9.0 - Incoming subscriptions are now not acknowledged if not all events of the eventgroup can be served with the given endpoint options. +v2.8.1 +- Support negative filter in trace connector + v2.8.0 - Change behaviour of register_subscription_status_handler method of the application interface: Registered handlers will only be called diff --git a/CMakeLists.txt b/CMakeLists.txt index 3976336..2ce790e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ project (vsomeip) set (VSOMEIP_MAJOR_VERSION 2) set (VSOMEIP_MINOR_VERSION 9) -set (VSOMEIP_PATCH_VERSION 0) +set (VSOMEIP_PATCH_VERSION 1) set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION}) set (PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentatin/doxygen.in set (CMAKE_VERBOSE_MAKEFILE off) @@ -138,14 +138,14 @@ if (MSVC) message("using MSVC Compiler") # add_definitions(-DVSOMEIP_DLL_COMPILATION) now it is controlled per target SET(BOOST_WINDOWS_VERSION "0x600" CACHE STRING "Set the same Version as the Version with which Boost was built, otherwise there will be errors. (normaly 0x600 is for Windows 7 and 0x501 is for Windows XP)") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DUSE_VSOMEIP_STATISTICS -DCOMMONAPI_INTERNAL_COMPILATION -DBOOST_LOG_DYN_LINK -DBOOST_ASIO_DISABLE_IOCP /EHsc") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DUSE_VSOMEIP_STATISTICS -DCOMMONAPI_INTERNAL_COMPILATION -DBOOST_LOG_DYN_LINK -DBOOST_ASIO_DISABLE_IOCP /EHsc") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_LOG_DYN_LINK -DBOOST_ASIO_DISABLE_IOCP /EHsc") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_WIN32_WINNT=${BOOST_WINDOWS_VERSION} -DWIN32 -DBOOST_LOG_DYN_LINK -DBOOST_ASIO_DISABLE_IOCP /EHsc") set(USE_RT "") set(Boost_LIBRARIES "") link_directories(${Boost_LIBRARY_DIR_DEBUG}) ADD_DEFINITIONS( -DBOOST_ALL_DYN_LINK ) else() - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${OS} ${OS_CXX_FLAGS} -DUSE_VSOMEIP_STATISTICS -DBOOST_LOG_DYN_LINK -g ${OPTIMIZE} -std=c++0x ${NO_DEPRECATED} ${EXPORTSYMBOLS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${OS} ${OS_CXX_FLAGS} -DBOOST_LOG_DYN_LINK -g ${OPTIMIZE} -std=c++0x ${NO_DEPRECATED} ${EXPORTSYMBOLS}") set(USE_RT "rt") endif() diff --git a/examples/hello_world/hello_world_service.cpp b/examples/hello_world/hello_world_service.cpp index 3a07cc0..7af031c 100644 --- a/examples/hello_world/hello_world_service.cpp +++ b/examples/hello_world/hello_world_service.cpp @@ -116,7 +116,7 @@ public: // Send the response back app_->send(resp, true); - // we're finished stop now + // we have finished terminate(); } diff --git a/implementation/configuration/include/internal.hpp.in b/implementation/configuration/include/internal.hpp.in index ea35e9d..8fb78d7 100644 --- a/implementation/configuration/include/internal.hpp.in +++ b/implementation/configuration/include/internal.hpp.in @@ -18,7 +18,7 @@ #define VSOMEIP_DEFAULT_CONFIGURATION_FILE "/etc/vsomeip.json" #define VSOMEIP_LOCAL_CONFIGURATION_FILE "./vsomeip.json" -#define VSOMEIP_MANDATORY_CONFIGURATION_FILES "vsomeip_std.json,vsomeip_app.json,vsomeip_plc.json" +#define VSOMEIP_MANDATORY_CONFIGURATION_FILES "vsomeip_std.json,vsomeip_app.json,vsomeip_plc.json,vsomeip_log.json" #define VSOMEIP_DEFAULT_CONFIGURATION_FOLDER "/etc/vsomeip" #define VSOMEIP_LOCAL_CONFIGURATION_FOLDER "./vsomeip" diff --git a/implementation/routing/include/routing_manager_proxy.hpp b/implementation/routing/include/routing_manager_proxy.hpp index eed0d6f..fac8a2c 100644 --- a/implementation/routing/include/routing_manager_proxy.hpp +++ b/implementation/routing/include/routing_manager_proxy.hpp @@ -216,8 +216,6 @@ private: std::map<client_t, std::set<subscription_data_t>> pending_incoming_subscripitons_; std::mutex incoming_subscripitons_mutex_; - std::mutex deserialize_mutex_; - std::mutex state_mutex_; std::condition_variable state_condition_; diff --git a/implementation/routing/src/routing_manager_impl.cpp b/implementation/routing/src/routing_manager_impl.cpp index 8d03d75..8cd311a 100644 --- a/implementation/routing/src/routing_manager_impl.cpp +++ b/implementation/routing/src/routing_manager_impl.cpp @@ -2130,6 +2130,31 @@ void routing_manager_impl::add_routing_info( std::lock_guard<std::recursive_mutex> its_lock(endpoint_mutex_); remote_service_info_[_service][_instance][false] = endpoint_def; } + // check if service was requested and increase requester count if necessary + { + std::lock_guard<std::mutex> its_lock(requested_services_mutex_); + for (const auto &client_id : requested_services_) { + const auto found_service = client_id.second.find(_service); + if (found_service != client_id.second.end()) { + const auto found_instance = found_service->second.find( + _instance); + if (found_instance != found_service->second.end()) { + for (const auto &major_minor_pair : found_instance->second) { + if ((major_minor_pair.first == _major + || _major == DEFAULT_MAJOR + || major_minor_pair.first == ANY_MAJOR) + && (major_minor_pair.second <= _minor + || _minor == DEFAULT_MINOR + || major_minor_pair.second + == ANY_MINOR)) { + its_info->add_client(client_id.first); + break; + } + } + } + } + } + } } if (!is_reliable_known) { on_availability(_service, _instance, true, _major, _minor); diff --git a/implementation/runtime/src/application_impl.cpp b/implementation/runtime/src/application_impl.cpp index 7b8fd22..e3f84ef 100644 --- a/implementation/runtime/src/application_impl.cpp +++ b/implementation/runtime/src/application_impl.cpp @@ -1455,17 +1455,18 @@ routing_manager * application_impl::get_routing_manager() const { } void application_impl::main_dispatch() { + const std::thread::id its_id = std::this_thread::get_id(); std::unique_lock<std::mutex> its_lock(handlers_mutex_); while (is_dispatching_) { - if (handlers_.empty()) { + if (handlers_.empty() || !is_active_dispatcher(its_id)) { // Cancel other waiting dispatcher dispatcher_condition_.notify_all(); // Wait for new handlers to execute - while (handlers_.empty() && is_dispatching_) { + while (is_dispatching_ && (handlers_.empty() || !is_active_dispatcher(its_id))) { dispatcher_condition_.wait(its_lock); } } else { - while (is_dispatching_ && !handlers_.empty()) { + while (is_dispatching_ && !handlers_.empty() && is_active_dispatcher(its_id)) { std::shared_ptr<sync_handler> its_handler = handlers_.front(); handlers_.pop_front(); its_lock.unlock(); @@ -1483,6 +1484,12 @@ void application_impl::main_dispatch() { } } } + // application was stopped + { + std::lock_guard<std::mutex> its_lock(dispatcher_mutex_); + dispatchers_.erase(its_id); + } + remove_elapsed_dispatchers(); its_lock.unlock(); } @@ -1511,6 +1518,10 @@ void application_impl::dispatch() { } } { + std::lock_guard<std::mutex> its_lock(handlers_mutex_); + dispatcher_condition_.notify_all(); + } + { std::lock_guard<std::mutex> its_lock(dispatcher_mutex_); elapsed_dispatchers_.insert(its_id); } diff --git a/implementation/tracing/src/trace_connector.cpp b/implementation/tracing/src/trace_connector.cpp index dc52010..93f7d6e 100644 --- a/implementation/tracing/src/trace_connector.cpp +++ b/implementation/tracing/src/trace_connector.cpp @@ -295,24 +295,23 @@ bool trace_connector::apply_filter_rules(const byte_t *_data, uint16_t _data_si filter_rule_t its_filter_rule = it_filter_rules->second; // apply filter rule - bool filter_rule_matches = false; + bool trace_message = true; filter_type_e its_filter_type = its_filter_rule.first; for(auto it_filter_rule_map = its_filter_rule.second.begin(); - it_filter_rule_map != its_filter_rule.second.end(); + it_filter_rule_map != its_filter_rule.second.end() && trace_message; ++it_filter_rule_map) { filter_criteria_e its_criteria = it_filter_rule_map->first; auto &its_filter_expressions = it_filter_rule_map->second; - // check if filter expressions of filter criteria match - filter_rule_matches = filter_expressions_match(its_criteria, its_filter_expressions, _data, _data_size) == (int)its_filter_type; - if(!filter_rule_matches) { - // filter expressions of filter criteria does not match - break; + if(its_filter_expressions.size() != 0) { + // check if filter expressions of filter criteria match + const bool filter_rule_matches = filter_expressions_match(its_criteria, its_filter_expressions, _data, _data_size); + trace_message = !(filter_rule_matches && its_filter_type == filter_type_e::NEGATIVE); } } - if(filter_rule_matches) { + if(trace_message) { //filter rule matches -> send message over 'its_channel' to DLT _send_msg_over_channels.push_back(its_channel); } @@ -361,20 +360,17 @@ bool trace_connector::filter_expressions_match( // if extraction is successful, filter if (is_successful) { - bool filter_expressions_matches = true; + bool filter_expressions_matches = false; for (auto it_expressions = _expressions.begin(); - it_expressions != _expressions.end(); + it_expressions != _expressions.end() && !filter_expressions_matches; ++it_expressions) { filter_expression_t its_filter_expression = *it_expressions; uint16_t its_message_value = 0; - its_message_value = (uint16_t)((its_message_value << 8) + first); its_message_value = (uint16_t)((its_message_value << 8) + second); - if(its_filter_expression != its_message_value) { - filter_expressions_matches = false; - break; - } + + filter_expressions_matches = (its_filter_expression == its_message_value); } return filter_expressions_matches; } |