summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cproject143
-rw-r--r--.gitignore75
-rw-r--r--.project27
-rw-r--r--CHANGES6
-rw-r--r--CMakeLists.txt2
-rw-r--r--daemon/vsomeipd.cpp6
-rw-r--r--implementation/configuration/include/watchdog.hpp7
-rw-r--r--implementation/configuration/src/configuration_impl.cpp3
-rw-r--r--implementation/endpoints/include/netlink_connector.hpp42
-rw-r--r--implementation/endpoints/src/udp_server_endpoint_impl.cpp18
-rw-r--r--implementation/routing/src/routing_manager_impl.cpp77
-rw-r--r--implementation/routing/src/routing_manager_proxy.cpp19
-rw-r--r--implementation/runtime/include/application_impl.hpp25
-rw-r--r--implementation/runtime/src/application_impl.cpp60
-rw-r--r--plugins/CMakeLists.txt8
-rw-r--r--plugins/mgu/CMakeLists.txt58
-rw-r--r--plugins/mgu/include/diagnosis_plugin_mgu.hpp53
-rw-r--r--plugins/mgu/src/diagnosis_plugin_mgu.cpp144
18 files changed, 172 insertions, 601 deletions
diff --git a/.cproject b/.cproject
deleted file mode 100644
index 79a7589..0000000
--- a/.cproject
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.79466970">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.79466970" moduleId="org.eclipse.cdt.core.settings" name="Debug">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.79466970" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug.79466970">
- <folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.79466970." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.base.472160906" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.126246094" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
- <builder arguments="-C ${ProjDirPath}/build" buildPath="" command="make" id="cdt.managedbuild.target.gnu.builder.base.936131223" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
- <tool id="cdt.managedbuild.tool.gnu.archiver.base.468946977" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.241506467" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
- <option id="gnu.cpp.compiler.option.optimization.level.1561426756" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.option.debugging.level.851016816" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.option.include.paths.1832880123" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/ascgit017.vSomeIP/interface}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/ascgit017.vSomeIP/implementation}&quot;"/>
- </option>
- <option id="gnu.cpp.compiler.option.preprocessor.def.984350116" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
- <listOptionValue builtIn="false" value="__GXX_EXPERIMENTAL_CXX0X__="/>
- <listOptionValue builtIn="false" value="__cplusplus=201103L"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1191506977" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.2040510072" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
- <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1272614114" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.debugging.level.335989444" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.52027112" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.base.767946208" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.2002608193" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
- <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.742110533" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.assembler.base.1727070462" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.863664036" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="implementation"/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- <cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.1077215527">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1077215527" moduleId="org.eclipse.cdt.core.settings" name="Release">
- <externalSettings/>
- <extensions>
- <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.autotools.core.ErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.1077215527" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release.1077215527">
- <folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.1077215527." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.1300992737" name="Cross GCC">
- <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1763953726" isAbstract="false" osList="all"/>
- <builder buildPath="${workspace_loc:/vsomeip.redesign}/Release" id="cdt.managedbuild.builder.gnu.cross.158252116" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry excluding="implementation|interface" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="implementation"/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="interface"/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="vsomeip.redesign.cdt.managedbuild.target.gnu.cross.exe.1896389325" name="Executable"/>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Release">
- <resource resourceType="PROJECT" workspacePath="/vsomeip.redesign"/>
- </configuration>
- <configuration configurationName="Debug">
- <resource resourceType="PROJECT" workspacePath="/vsomeip.redesign"/>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
- <buildTargets>
- <target name="Run cmake" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
- <buildCommand>cmake</buildCommand>
- <buildArguments>-E chdir build/ cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=debug ../</buildArguments>
- <buildTarget/>
- <stopOnError>true</stopOnError>
- <useDefaultCommand>false</useDefaultCommand>
- <runAllBuilders>true</runAllBuilders>
- </target>
- </buildTargets>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
- <doc-comment-owner id="org.eclipse.cdt.internal.ui.text.doctools.NullDocCommentOwner">
- <path value=""/>
- </doc-comment-owner>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.79466970;cdt.managedbuild.config.gnu.cross.exe.debug.79466970.;cdt.managedbuild.tool.gnu.cross.c.compiler.1370514747;cdt.managedbuild.tool.gnu.c.compiler.input.5498382">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.79466970;cdt.managedbuild.config.gnu.cross.exe.debug.79466970.;cdt.managedbuild.tool.gnu.cpp.compiler.base.241506467;cdt.managedbuild.tool.gnu.cpp.compiler.input.1191506977">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1077215527;cdt.managedbuild.config.gnu.cross.exe.release.1077215527.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.311127332;cdt.managedbuild.tool.gnu.cpp.compiler.input.1813640584">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.79466970;cdt.managedbuild.config.gnu.cross.exe.debug.79466970.;cdt.managedbuild.tool.gnu.c.compiler.base.2040510072;cdt.managedbuild.tool.gnu.c.compiler.input.52027112">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1077215527;cdt.managedbuild.config.gnu.cross.exe.release.1077215527.;cdt.managedbuild.tool.gnu.cross.c.compiler.502527676;cdt.managedbuild.tool.gnu.c.compiler.input.284129377">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.79466970;cdt.managedbuild.config.gnu.cross.exe.debug.79466970.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.105039682;cdt.managedbuild.tool.gnu.cpp.compiler.input.717037074">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- </scannerConfigBuildInfo>
- </storageModule>
-</cproject>
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 2d955fc..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,75 +0,0 @@
-/CMakeFiles
-/build*/*
-/examples/hello_world/build
-/.settings
-/doc
-/daemon/CMakeFiles
-/examples/CMakeFiles
-/implementation/configuration/include/internal.hpp
-/test/application_tests/application_test.json
-/test/application_tests/application_test_daemon.json
-/test/application_tests/application_test_no_dispatch_threads.json
-/test/application_tests/application_test_no_dispatch_threads_daemon.json
-/test/big_payload_tests/big_payload_test_tcp_client.json
-/test/big_payload_tests/big_payload_test_tcp_service.json
-/test/big_payload_tests/big_payload_test_tcp_client_random.json
-/test/big_payload_tests/big_payload_test_tcp_service_random.json
-/test/big_payload_tests/big_payload_test_tcp_client_limited_general.json
-/test/big_payload_tests/big_payload_test_tcp_service_limited_general.json
-/test/magic_cookies_tests/magic_cookies_test_client.json
-/test/magic_cookies_tests/magic_cookies_test_service.json
-/test/payload_tests/external_local_payload_test_client_external.json
-/test/payload_tests/external_local_payload_test_client_local.json
-/test/payload_tests/external_local_payload_test_service.json
-/test/routing_tests/external_local_routing_test_client_external.json
-/test/routing_tests/external_local_routing_test_service.json
-/test/routing_tests/local_routing_test_starter.sh
-/test/client_id_tests/client_id_test_diff_client_ids_diff_ports_master.json
-/test/client_id_tests/client_id_test_diff_client_ids_diff_ports_slave.json
-/test/client_id_tests/client_id_test_diff_client_ids_same_ports_master.json
-/test/client_id_tests/client_id_test_diff_client_ids_same_ports_slave.json
-/test/client_id_tests/client_id_test_diff_client_ids_partial_same_ports_master.json
-/test/client_id_tests/client_id_test_diff_client_ids_partial_same_ports_slave.json
-/test/client_id_tests/client_id_test_same_client_ids_diff_ports_master.json
-/test/client_id_tests/client_id_test_same_client_ids_diff_ports_slave.json
-/test/client_id_tests/client_id_test_same_client_ids_same_ports_master.json
-/test/client_id_tests/client_id_test_same_client_ids_same_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_diff_ports_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_diff_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_same_ports_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_same_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_partial_same_ports_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_partial_same_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_same_client_ids_diff_ports_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_same_client_ids_diff_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_same_client_ids_same_ports_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_same_client_ids_same_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_one_event_two_eventgroups_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_one_event_two_eventgroups_udp_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_one_event_two_eventgroups_tcp_slave.json
-/test/subscribe_notify_one_tests/subscribe_notify_one_test_diff_client_ids_diff_ports_master.json
-/test/subscribe_notify_one_tests/subscribe_notify_one_test_diff_client_ids_diff_ports_slave.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_diff_ports_same_service_id_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_diff_ports_same_service_id_slave.json
-/test/cpu_load_tests/cpu_load_test_client_slave.json
-/test/cpu_load_tests/cpu_load_test_client_master.json
-/test/cpu_load_tests/cpu_load_test_service_slave.json
-/test/cpu_load_tests/cpu_load_test_service_master.json
-/tools/CMakeFiles
-/test/initial_event_tests/initial_event_test_diff_client_ids_diff_ports_master.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_diff_ports_same_service_id_master.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_diff_ports_same_service_id_slave.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_diff_ports_slave.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_partial_same_ports_master.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_partial_same_ports_slave.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_same_ports_master.json
-/test/initial_event_tests/initial_event_test_diff_client_ids_same_ports_slave.json
-/test/initial_event_tests/initial_event_test_same_client_ids_diff_ports_master.json
-/test/initial_event_tests/initial_event_test_same_client_ids_diff_ports_slave.json
-/test/initial_event_tests/initial_event_test_same_client_ids_same_ports_master.json
-/test/initial_event_tests/initial_event_test_same_client_ids_same_ports_slave.json
-/test/offer_tests/offer_test_external_master.json
-/test/offer_tests/offer_test_external_slave.json
-/test/offer_tests/offer_test_external_master_starter.sh
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_diff_ports_autoconfig_master.json
-/test/subscribe_notify_tests/subscribe_notify_test_diff_client_ids_diff_ports_autoconfig_slave.json
diff --git a/.project b/.project
deleted file mode 100644
index 5a95166..0000000
--- a/.project
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>ascgit017.vSomeIP</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- </natures>
-</projectDescription>
diff --git a/CHANGES b/CHANGES
index 2695a0f..3f0d65f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -329,3 +329,9 @@ v2.7.0
is_valid_crc()
- Incoming remote responses where the CRC check fails will trigger:
set_is_valid_crc(false)
+
+v2.7.1
+- Prevent processing of too short messages received via UDP
+- Avoid catching SIGABRT in vsomeipd
+- Prevent duplicate logging of remote messages
+- Log message cleanup/enhancement
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c2db35..aaae8e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ project (vsomeip)
set (VSOMEIP_MAJOR_VERSION 2)
set (VSOMEIP_MINOR_VERSION 7)
-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)
diff --git a/daemon/vsomeipd.cpp b/daemon/vsomeipd.cpp
index b329534..0fb88c9 100644
--- a/daemon/vsomeipd.cpp
+++ b/daemon/vsomeipd.cpp
@@ -29,11 +29,6 @@ void vsomeipd_stop(int _signal) {
if (_signal == SIGINT || _signal == SIGTERM) {
its_application->stop();
}
- if (_signal == SIGABRT) {
- VSOMEIP_INFO << "Stopping service discovery";
- its_application->set_routing_state(vsomeip::routing_state_e::RS_SUSPENDED);
- its_application->stop();
- }
if (_signal == SIGUSR1) {
VSOMEIP_INFO << "Suspending service discovery";
its_application->set_routing_state(vsomeip::routing_state_e::RS_SUSPENDED);
@@ -69,7 +64,6 @@ int vsomeipd_process(bool _is_quiet) {
// Handle signals
signal(SIGINT, vsomeipd_stop);
signal(SIGTERM, vsomeipd_stop);
- signal(SIGABRT, vsomeipd_stop);
signal(SIGUSR1, vsomeipd_stop);
signal(SIGUSR2, vsomeipd_stop);
#endif
diff --git a/implementation/configuration/include/watchdog.hpp b/implementation/configuration/include/watchdog.hpp
index 5466fb3..00fdb69 100644
--- a/implementation/configuration/include/watchdog.hpp
+++ b/implementation/configuration/include/watchdog.hpp
@@ -2,7 +2,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
#ifndef VSOMEIP_CFG_WATCHDOG_HPP_
#define VSOMEIP_CFG_WATCHDOG_HPP_
@@ -10,6 +9,12 @@ namespace vsomeip {
namespace cfg {
struct watchdog {
+ watchdog()
+ : is_enabeled_(false),
+ timeout_in_ms_(VSOMEIP_DEFAULT_WATCHDOG_TIMEOUT),
+ missing_pongs_allowed_(VSOMEIP_DEFAULT_MAX_MISSING_PONGS) {
+ }
+
bool is_enabeled_;
uint32_t timeout_in_ms_;
uint32_t missing_pongs_allowed_;
diff --git a/implementation/configuration/src/configuration_impl.cpp b/implementation/configuration/src/configuration_impl.cpp
index 68ad340..d1bdac5 100644
--- a/implementation/configuration/src/configuration_impl.cpp
+++ b/implementation/configuration/src/configuration_impl.cpp
@@ -1315,9 +1315,6 @@ std::set<uint16_t> configuration_impl::load_client_ports(
}
void configuration_impl::load_watchdog(const element &_element) {
- watchdog_->is_enabeled_ = false;
- watchdog_->timeout_in_ms_ = VSOMEIP_DEFAULT_WATCHDOG_TIMEOUT;
- watchdog_->missing_pongs_allowed_ = VSOMEIP_DEFAULT_MAX_MISSING_PONGS;
try {
auto its_service_discovery = _element.tree_.get_child("watchdog");
for (auto i = its_service_discovery.begin();
diff --git a/implementation/endpoints/include/netlink_connector.hpp b/implementation/endpoints/include/netlink_connector.hpp
index db0cbc5..fdad718 100644
--- a/implementation/endpoints/include/netlink_connector.hpp
+++ b/implementation/endpoints/include/netlink_connector.hpp
@@ -94,48 +94,6 @@ public:
return sizeof(sockaddr);
}
- /// Compare two endpoints for equality.
- friend bool operator==(const nl_endpoint<Protocol>& e1,
- const nl_endpoint<Protocol>& e2)
- {
- return e1.sockaddr == e2.sockaddr;
- }
-
- /// Compare two endpoints for inequality.
- friend bool operator!=(const nl_endpoint<Protocol>& e1,
- const nl_endpoint<Protocol>& e2)
- {
- return !(e1.sockaddr == e2.sockaddr);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<(const nl_endpoint<Protocol>& e1,
- const nl_endpoint<Protocol>& e2)
- {
- return e1.sockaddr < e2.sockaddr;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>(const nl_endpoint<Protocol>& e1,
- const nl_endpoint<Protocol>& e2)
- {
- return e2.sockaddr < e1.sockaddr;
- }
-
- /// Compare endpoints for ordering.
- friend bool operator<=(const nl_endpoint<Protocol>& e1,
- const nl_endpoint<Protocol>& e2)
- {
- return !(e2 < e1);
- }
-
- /// Compare endpoints for ordering.
- friend bool operator>=(const nl_endpoint<Protocol>& e1,
- const nl_endpoint<Protocol>& e2)
- {
- return !(e1 < e2);
- }
-
private:
sockaddr_nl sockaddr;
};
diff --git a/implementation/endpoints/src/udp_server_endpoint_impl.cpp b/implementation/endpoints/src/udp_server_endpoint_impl.cpp
index bd323e4..3bc5938 100644
--- a/implementation/endpoints/src/udp_server_endpoint_impl.cpp
+++ b/implementation/endpoints/src/udp_server_endpoint_impl.cpp
@@ -328,12 +328,18 @@ void udp_server_endpoint_impl::receive_cbk(
i += current_message_size;
} else {
VSOMEIP_ERROR << "Received an unreliable vSomeIP message with bad length field";
- service_t its_service = VSOMEIP_BYTES_TO_WORD(recv_buffer_[VSOMEIP_SERVICE_POS_MIN],
- recv_buffer_[VSOMEIP_SERVICE_POS_MAX]);
- if (its_service != VSOMEIP_SD_SERVICE) {
- its_host->on_error(&recv_buffer_[i],
- (uint32_t)remaining_bytes, this,
- its_remote_address, its_remote_port);
+ if (remaining_bytes > VSOMEIP_SERVICE_POS_MAX) {
+ service_t its_service = VSOMEIP_BYTES_TO_WORD(recv_buffer_[VSOMEIP_SERVICE_POS_MIN],
+ recv_buffer_[VSOMEIP_SERVICE_POS_MAX]);
+ if (its_service != VSOMEIP_SD_SERVICE) {
+ if (read_message_size == 0) {
+ VSOMEIP_ERROR << "Ignoring unreliable vSomeIP message with SomeIP message length 0!";
+ } else {
+ its_host->on_error(&recv_buffer_[i],
+ (uint32_t)remaining_bytes, this,
+ its_remote_address, its_remote_port);
+ }
+ }
}
remaining_bytes = 0;
}
diff --git a/implementation/routing/src/routing_manager_impl.cpp b/implementation/routing/src/routing_manager_impl.cpp
index 343741f..a66d273 100644
--- a/implementation/routing/src/routing_manager_impl.cpp
+++ b/implementation/routing/src/routing_manager_impl.cpp
@@ -560,9 +560,16 @@ bool routing_manager_impl::send(client_t _client, const byte_t *_data,
bool is_service_discovery = (its_service == vsomeip::sd::service
&& its_method == vsomeip::sd::method);
+#ifdef USE_DLT
+ bool is_response(false);
+#endif
+
if (is_request) {
its_target = find_local(its_service, _instance);
} else if (!is_notification) {
+#ifdef USE_DLT
+ is_response = true;
+#endif
its_target = find_local(its_client);
} else if (is_notification && _client) { // Selective notifications!
if (_client == get_client()) {
@@ -583,13 +590,16 @@ bool routing_manager_impl::send(client_t _client, const byte_t *_data,
if (its_target) {
#ifdef USE_DLT
- const uint16_t its_data_size
- = uint16_t(_size > USHRT_MAX ? USHRT_MAX : _size);
+ if ((is_request && its_client == get_client()) ||
+ (is_response && find_local_client(its_service, _instance) == get_client())) {
+ const uint16_t its_data_size
+ = uint16_t(_size > USHRT_MAX ? USHRT_MAX : _size);
- tc::trace_header its_header;
- if (its_header.prepare(its_target, true, _instance))
- tc_->trace(its_header.data_, VSOMEIP_TRACE_HEADER_SIZE,
- _data, its_data_size);
+ tc::trace_header its_header;
+ if (its_header.prepare(its_target, true, _instance))
+ tc_->trace(its_header.data_, VSOMEIP_TRACE_HEADER_SIZE,
+ _data, its_data_size);
+ }
#endif
is_sent = send_local(its_target, get_client(), _data, _size, _instance, _flush, _reliable, VSOMEIP_SEND, _is_valid_crc);
} else {
@@ -2316,26 +2326,27 @@ bool routing_manager_impl::on_subscribe_accepted(service_t _service, instance_t
return false;
}
- if (client != VSOMEIP_ROUTING_CLIENT) {
- VSOMEIP_INFO << "Subscription accepted: eventgroup=" << _eventgroup
- << " : target: " << _target->get_address().to_string()
- << ":" << std::dec <<_target->get_port()
- << (_target->is_reliable() ? " reliable" : " unreliable")
- << " from client: 0x" << std::hex << client << ".";
- } else {
- VSOMEIP_INFO << "Subscription accepted: eventgroup: " << _eventgroup
- << " : target: " << _target->get_address().to_string()
- << ":" << std::dec <<_target->get_port()
- << (_target->is_reliable() ? " reliable" : " unreliable")
- << " from unknown client.";
- }
+ VSOMEIP_INFO << "REMOTE SUBSCRIBE("
+ << std::hex << std::setw(4) << std::setfill('0') << client <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << _service << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _instance << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _eventgroup << "]"
+ << " from " << _target->get_address().to_string()
+ << ":" << std::dec <<_target->get_port()
+ << (_target->is_reliable() ? " reliable" : " unreliable");
{
std::lock_guard<std::mutex> its_lock(remote_subscribers_mutex_);
remote_subscribers_[_service][_instance][client].insert(_target);
}
} else {
- VSOMEIP_ERROR<< "subscribe: attempt to subscribe to unknown eventgroup!";
+ VSOMEIP_ERROR << "REMOTE SUBSCRIBE: attempt to subscribe to unknown eventgroup ["
+ << std::hex << std::setw(4) << std::setfill('0') << _service << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _instance << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _eventgroup << "]"
+ << " from " << _target->get_address().to_string()
+ << ":" << std::dec <<_target->get_port()
+ << (_target->is_reliable() ? " reliable" : " unreliable");
return false;
}
return true;
@@ -2409,16 +2420,14 @@ void routing_manager_impl::on_unsubscribe(service_t _service,
if (its_eventgroup) {
client_t its_client = find_client(_service, _instance, its_eventgroup, _target);
- if (its_client != VSOMEIP_ROUTING_CLIENT) {
- VSOMEIP_INFO << "on_unsubscribe: target: " << _target->get_address().to_string()
- << ":" << std::dec <<_target->get_port()
- << (_target->is_reliable() ? " reliable" : " unreliable")
- << " from client: 0x" << std::hex << its_client;
- } else {
- VSOMEIP_INFO << "on_unsubscribe: target: " << _target->get_address().to_string()
- << ":" << std::dec <<_target->get_port()
- << (_target->is_reliable() ? " reliable" : " unreliable");
- }
+ VSOMEIP_INFO << "REMOTE UNSUBSCRIBE("
+ << std::hex << std::setw(4) << std::setfill('0') << its_client <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << _service << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _instance << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _eventgroup << "]"
+ << " from " << _target->get_address().to_string()
+ << ":" << std::dec <<_target->get_port()
+ << (_target->is_reliable() ? " reliable" : " unreliable");
its_eventgroup->remove_target(_target);
clear_remote_subscriber(_service, _instance, its_client, _target);
@@ -2439,7 +2448,13 @@ void routing_manager_impl::on_unsubscribe(service_t _service,
}
} else {
- VSOMEIP_ERROR<<"unsubscribe: attempt to subscribe to unknown eventgroup!";
+ VSOMEIP_ERROR << "REMOTE UNSUBSCRIBE: attempt to subscribe to unknown eventgroup ["
+ << std::hex << std::setw(4) << std::setfill('0') << _service << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _instance << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _eventgroup << "]"
+ << " from " << _target->get_address().to_string()
+ << ":" << std::dec <<_target->get_port()
+ << (_target->is_reliable() ? " reliable" : " unreliable");
}
}
diff --git a/implementation/routing/src/routing_manager_proxy.cpp b/implementation/routing/src/routing_manager_proxy.cpp
index 6e5cf6a..309d220 100644
--- a/implementation/routing/src/routing_manager_proxy.cpp
+++ b/implementation/routing/src/routing_manager_proxy.cpp
@@ -743,6 +743,9 @@ void routing_manager_proxy::on_disconnect(std::shared_ptr<endpoint> _endpoint) {
is_connected_ = !(_endpoint == sender_);
}
if (!is_connected_) {
+ VSOMEIP_INFO << "routing_manager_proxy::on_disconnect: Client 0x" << std::hex
+ << get_client() << " calling host_->on_state "
+ << "with DEREGISTERED";
host_->on_state(state_type_e::ST_DEREGISTERED);
}
}
@@ -1102,6 +1105,12 @@ void routing_manager_proxy::on_routing_info(const byte_t *_data,
std::memcpy(&its_client_size, &_data[i], sizeof(uint32_t));
i += uint32_t(sizeof(uint32_t));
+ if (its_client_size + i > _size) {
+ VSOMEIP_WARNING << "Client 0x" << std::hex << get_client() << " : "
+ << "Processing of routing info failed due to bad length fields!";
+ return;
+ }
+
if (i + sizeof(client_t) <= _size) {
client_t its_client;
std::memcpy(&its_client, &_data[i], sizeof(client_t));
@@ -1195,6 +1204,11 @@ void routing_manager_proxy::on_routing_info(const byte_t *_data,
send_pending_subscriptions(its_service, its_instance, its_major);
}
host_->on_availability(its_service, its_instance, true, its_major, its_minor);
+ VSOMEIP_INFO << "ON_AVAILABLE("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << its_service << "."
+ << std::hex << std::setw(4) << std::setfill('0') << its_instance
+ << ":" << std::dec << int(its_major) << "." << std::dec << its_minor << "]";
} else if (routing_info_entry == routing_info_entry_e::RIE_DEL_SERVICE_INSTANCE) {
{
std::lock_guard<std::mutex> its_lock(local_services_mutex_);
@@ -1208,6 +1222,11 @@ void routing_manager_proxy::on_routing_info(const byte_t *_data,
}
on_stop_offer_service(its_service, its_instance, its_major, its_minor);
host_->on_availability(its_service, its_instance, false, its_major, its_minor);
+ VSOMEIP_INFO << "ON_UNAVAILABLE("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << its_service << "."
+ << std::hex << std::setw(4) << std::setfill('0') << its_instance
+ << ":" << std::dec << int(its_major) << "." << std::dec << its_minor << "]";
}
its_services_size -= uint32_t(sizeof(instance_t) + sizeof(major_version_t) + sizeof(minor_version_t) );
diff --git a/implementation/runtime/include/application_impl.hpp b/implementation/runtime/include/application_impl.hpp
index f38cd2c..45facc1 100644
--- a/implementation/runtime/include/application_impl.hpp
+++ b/implementation/runtime/include/application_impl.hpp
@@ -175,14 +175,35 @@ private:
//
// Types
//
+
+ enum class handler_type_e : uint8_t {
+ MESSAGE,
+ AVAILABILITY,
+ STATE,
+ SUBSCRIPTION,
+ UNKNOWN
+ };
+
struct sync_handler {
sync_handler(std::function<void()> _handler) :
handler_(_handler),
- is_dispatching_(false) { }
+ is_dispatching_(false),
+ service_id_(ANY_SERVICE),
+ instance_id_(ANY_INSTANCE),
+ method_id_(ANY_METHOD),
+ session_id_(0),
+ eventgroup_id_(0),
+ handler_type_(handler_type_e::UNKNOWN) { }
std::function<void()> handler_;
bool is_dispatching_;
+ service_t service_id_;
+ instance_t instance_id_;
+ method_t method_id_;
+ session_t session_id_;
+ eventgroup_t eventgroup_id_;
+ handler_type_e handler_type_;
};
struct message_handler {
@@ -242,6 +263,8 @@ private:
bool check_subscription_state(service_t _service, instance_t _instance,
eventgroup_t _eventgroup, event_t _event);
+
+ void print_blocking_call(std::shared_ptr<sync_handler> _handler);
//
// Attributes
//
diff --git a/implementation/runtime/src/application_impl.cpp b/implementation/runtime/src/application_impl.cpp
index 988d48f..bff1040 100644
--- a/implementation/runtime/src/application_impl.cpp
+++ b/implementation/runtime/src/application_impl.cpp
@@ -765,6 +765,9 @@ void application_impl::do_register_availability_handler(service_t _service,
for(auto available_instances_it : available_services_it.second)
_handler(available_services_it.first, available_instances_it.first, are_available);
});
+ its_sync_handler->handler_type_ = handler_type_e::AVAILABILITY;
+ its_sync_handler->service_id_ = _service;
+ its_sync_handler->instance_id_ = _instance;
handlers_.push_back(its_sync_handler);
dispatcher_condition_.notify_one();
@@ -964,6 +967,11 @@ void application_impl::deliver_subscription_state(service_t _service, instance_t
handler(_service, _instance,
_eventgroup, _event, _error);
});
+ its_sync_handler->handler_type_ = handler_type_e::SUBSCRIPTION;
+ its_sync_handler->service_id_ = _service;
+ its_sync_handler->instance_id_ = _instance;
+ its_sync_handler->method_id_ = _event;
+ its_sync_handler->eventgroup_id_ = _eventgroup;
handlers_.push_back(its_sync_handler);
}
if (handlers.size()) {
@@ -996,6 +1004,10 @@ void application_impl::on_subscription_error(service_t _service,
= std::make_shared<sync_handler>([handler, _error]() {
handler(_error);
});
+ its_sync_handler->handler_type_ = handler_type_e::SUBSCRIPTION;
+ its_sync_handler->service_id_ = _service;
+ its_sync_handler->instance_id_ = _instance;
+ its_sync_handler->eventgroup_id_ = _eventgroup;
handlers_.push_back(its_sync_handler);
}
dispatcher_condition_.notify_all();
@@ -1172,6 +1184,7 @@ void application_impl::on_state(state_type_e _state) {
= std::make_shared<sync_handler>([handler, _state]() {
handler(_state);
});
+ its_sync_handler->handler_type_ = handler_type_e::STATE;
handlers_.push_back(its_sync_handler);
}
dispatcher_condition_.notify_one();
@@ -1264,6 +1277,9 @@ void application_impl::on_availability(service_t _service, instance_t _instance,
{
handler(_service, _instance, _is_available);
});
+ its_sync_handler->handler_type_ = handler_type_e::AVAILABILITY;
+ its_sync_handler->service_id_ = _service;
+ its_sync_handler->instance_id_ = _instance;
handlers_.push_back(its_sync_handler);
}
}
@@ -1375,6 +1391,11 @@ void application_impl::on_message(const std::shared_ptr<message> &&_message) {
std::make_shared<sync_handler>([handler, _message]() {
handler(std::move(_message));
});
+ its_sync_handler->handler_type_ = handler_type_e::MESSAGE;
+ its_sync_handler->service_id_ = _message->get_service();
+ its_sync_handler->instance_id_ = _message->get_instance();
+ its_sync_handler->method_id_ = _message->get_method();
+ its_sync_handler->session_id_ = _message->get_session();
handlers_.push_back(its_sync_handler);
}
}
@@ -1460,9 +1481,9 @@ void application_impl::invoke_handler(std::shared_ptr<sync_handler> &_handler) {
boost::asio::steady_timer its_dispatcher_timer(io_);
its_dispatcher_timer.expires_from_now(std::chrono::milliseconds(max_dispatch_time_));
- its_dispatcher_timer.async_wait([this, its_id](const boost::system::error_code &_error) {
+ its_dispatcher_timer.async_wait([this, its_id, _handler](const boost::system::error_code &_error) {
if (!_error) {
- VSOMEIP_INFO << "Blocking call detected. Client=" << std::hex << get_client();
+ print_blocking_call(_handler);
bool active_dispatcher_available(false);
{
std::lock_guard<std::mutex> its_lock(dispatcher_mutex_);
@@ -1826,4 +1847,39 @@ bool application_impl::check_subscription_state(service_t _service, instance_t _
return should_subscribe;
}
+void application_impl::print_blocking_call(std::shared_ptr<sync_handler> _handler) {
+ switch (_handler->handler_type_) {
+ case handler_type_e::AVAILABILITY:
+ VSOMEIP_INFO << "BLOCKING CALL AVAILABILITY("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->service_id_ << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->instance_id_ << "]";
+ break;
+ case handler_type_e::MESSAGE:
+ VSOMEIP_INFO << "BLOCKING CALL MESSAGE("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->service_id_ << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->instance_id_ << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->method_id_ << ":"
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->session_id_ << "]";
+ break;
+ case handler_type_e::STATE:
+ VSOMEIP_INFO << "BLOCKING CALL STATE("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() << ")";
+ break;
+ case handler_type_e::SUBSCRIPTION:
+ VSOMEIP_INFO << "BLOCKING CALL SUBSCRIPTION("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() <<"): ["
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->service_id_ << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->instance_id_ << "."
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->eventgroup_id_ << ":"
+ << std::hex << std::setw(4) << std::setfill('0') << _handler->method_id_ << "]";
+ break;
+ case handler_type_e::UNKNOWN:
+ VSOMEIP_INFO << "BLOCKING CALL UNKNOWN("
+ << std::hex << std::setw(4) << std::setfill('0') << get_client() << ")";
+ break;
+ }
+}
+
} // namespace vsomeip
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
deleted file mode 100644
index 2ecebc1..0000000
--- a/plugins/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright (C) 2016-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-cmake_minimum_required (VERSION 2.8)
-
-add_subdirectory ( mgu ) \ No newline at end of file
diff --git a/plugins/mgu/CMakeLists.txt b/plugins/mgu/CMakeLists.txt
deleted file mode 100644
index 16a2873..0000000
--- a/plugins/mgu/CMakeLists.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2016-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-cmake_minimum_required (VERSION 2.8)
-
-set (VSOMEIP_DIAGNOSIS_PLUGIN_MAJOR_VERSION 1)
-set (VSOMEIP_DIAGNOSIS_PLUGIN_MINOR_VERSION 0)
-set (VSOMEIP_DIAGNOSIS_PLUGIN_PATCH_VERSION 0)
-
-if(DEFINED VSOMEIP_VERSION)
- set (VSOMEIP_DIAGNOSIS_PLUGIN_VERSION ${VSOMEIP_VERSION}-${VSOMEIP_DIAGNOSIS_PLUGIN_MAJOR_VERSION}.${VSOMEIP_DIAGNOSIS_PLUGIN_MINOR_VERSION}.${VSOMEIP_DIAGNOSIS_PLUGIN_PATCH_VERSION})
-else()
- find_package (vsomeip 2.7.0 REQUIRED)
- set (VSOMEIP_DIAGNOSIS_PLUGIN_VERSION ${vsomeip_VERSION}-${VSOMEIP_DIAGNOSIS_PLUGIN_MAJOR_VERSION}.${VSOMEIP_DIAGNOSIS_PLUGIN_MINOR_VERSION}.${VSOMEIP_DIAGNOSIS_PLUGIN_PATCH_VERSION})
-endif()
-message(STATUS "vsomeip-diagnosis-plugin-mgu: " ${VSOMEIP_DIAGNOSIS_PLUGIN_VERSION})
-
-# Offer the user the choice of overriding the installation directories
-set (INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
-set (INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
-set (INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
-
-include_directories (
- include
- ${VSOMEIP_INCLUDE_DIRS}
-)
-
-# OS
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(OS "LINUX")
- set(DL_LIBRARY "dl")
- set(NO_DEPRECATED "")
- set(OPTIMIZE "")
- set(OS_CXX_FLAGS "-D_GLIBCXX_USE_NANOSLEEP -pthread -O -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector -fasynchronous-unwind-tables -fno-omit-frame-pointer -D_FORTIFY_SOURCE=2")
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${OS} ${OS_CXX_FLAGS} -g ${OPTIMIZE} -std=c++0x ${NO_DEPRECATED}")
-set(USE_RT "rt")
-
-# MGU diagnosis job plugin library
-file(GLOB vsomeip-diagnosis-plugin-mgu_SRC
- "src/diagnosis_plugin_mgu.cpp"
-)
-list(SORT vsomeip-diagnosis-plugin-mgu_SRC)
-
-add_library(vsomeip-diagnosis-plugin-mgu SHARED ${vsomeip-diagnosis-plugin-mgu_SRC})
-set_target_properties (vsomeip-diagnosis-plugin-mgu PROPERTIES VERSION ${VSOMEIP_DIAGNOSIS_PLUGIN_VERSION} SOVERSION ${VSOMEIP_DIAGNOSIS_PLUGIN_MAJOR_VERSION})
-target_link_libraries(vsomeip-diagnosis-plugin-mgu vsomeip)
-
-install (
- TARGETS vsomeip-diagnosis-plugin-mgu
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib
- RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin
-)
-
-################################################################################################### \ No newline at end of file
diff --git a/plugins/mgu/include/diagnosis_plugin_mgu.hpp b/plugins/mgu/include/diagnosis_plugin_mgu.hpp
deleted file mode 100644
index 2520636..0000000
--- a/plugins/mgu/include/diagnosis_plugin_mgu.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2016-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef VSOMEIP_DIAGNOSIS_PLUGIN_MGU_HPP
-#define VSOMEIP_DIAGNOSIS_PLUGIN_MGU_HPP
-
-#include <mutex>
-
-#include <vsomeip/application.hpp>
-#include <vsomeip/runtime.hpp>
-#include <vsomeip/message.hpp>
-#include <vsomeip/payload.hpp>
-#include <vsomeip/plugins/application_plugin.hpp>
-
-namespace vsomeip {
-namespace mgu {
-
-class diagnosis_plugin_mgu
- : public application_plugin,
- public plugin_impl<diagnosis_plugin_mgu>,
- public std::enable_shared_from_this<diagnosis_plugin_mgu> {
-public:
- diagnosis_plugin_mgu();
- VSOMEIP_EXPORT void on_application_state_change(
- const std::string _application_name,
- const application_plugin_state_e _app_state);
-private:
- void on_message(const std::shared_ptr<vsomeip::message> &_request);
- void on_state(vsomeip::state_type_e _state);
-
- std::string application_name_;
- std::mutex application_name_mutex_;
-
- static const uint32_t error_ok_;
- static const uint32_t error_out_of_range_;
- static const uint32_t error_communication_error_;
- static const uint8_t communication_type_mask_;
- static const uint8_t expected_payload_length_;
- static const uint8_t communication_type_payload_offset_;
- static const vsomeip::service_t diag_job_service_id_;
- static const vsomeip::instance_t diag_job_instance_id_;
- static const vsomeip::major_version_t diag_job_major_;
- static const vsomeip::minor_version_t diag_job_minor_;
- static const vsomeip::method_t diag_job_rx_on_tx_on_;
- static const vsomeip::method_t diag_job_rx_on_tx_off_;
-};
-
-} // namespace mgu
-} // namespace vsomeip
-
-#endif // VSOMEIP_DIAGNOSIS_PLUGIN_MGU_HPP
diff --git a/plugins/mgu/src/diagnosis_plugin_mgu.cpp b/plugins/mgu/src/diagnosis_plugin_mgu.cpp
deleted file mode 100644
index aa8c57d..0000000
--- a/plugins/mgu/src/diagnosis_plugin_mgu.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (C) 2016-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#include <vsomeip/plugin.hpp>
-#include <byteswap.h>
-
-#include "../include/diagnosis_plugin_mgu.hpp"
-
-VSOMEIP_PLUGIN(vsomeip::mgu::diagnosis_plugin_mgu)
-
-namespace vsomeip {
-namespace mgu {
-
-const uint32_t diagnosis_plugin_mgu::error_ok_ = 256;
-const uint32_t diagnosis_plugin_mgu::error_out_of_range_ = 257;
-const uint32_t diagnosis_plugin_mgu::error_communication_error_ = 576;
-const uint8_t diagnosis_plugin_mgu::communication_type_mask_ = 2;
-const uint8_t diagnosis_plugin_mgu::expected_payload_length_ = sizeof(uint32_t) + sizeof(uint8_t);
-const uint8_t diagnosis_plugin_mgu::communication_type_payload_offset_ = sizeof(uint32_t);
-const vsomeip::service_t diagnosis_plugin_mgu::diag_job_service_id_ = 0xFE9F;
-const vsomeip::instance_t diagnosis_plugin_mgu::diag_job_instance_id_ = 0x80;
-const vsomeip::major_version_t diagnosis_plugin_mgu::diag_job_major_ = 0x0;
-const vsomeip::minor_version_t diagnosis_plugin_mgu::diag_job_minor_ = 0x1;
-const vsomeip::method_t diagnosis_plugin_mgu::diag_job_rx_on_tx_on_ = 0x1;
-const vsomeip::method_t diagnosis_plugin_mgu::diag_job_rx_on_tx_off_ = 0x2;
-
-diagnosis_plugin_mgu::diagnosis_plugin_mgu()
- : plugin_impl("diagnosis job plug-in mgu",
- VSOMEIP_APPLICATION_PLUGIN_VERSION,
- vsomeip::plugin_type_e::APPLICATION_PLUGIN) {
-}
-
-void diagnosis_plugin_mgu::on_application_state_change(const std::string _application_name,
- const vsomeip::application_plugin_state_e _app_state) {
-
- std::shared_ptr<vsomeip::application> application = nullptr;
- {
- std::lock_guard<std::mutex> lock(application_name_mutex_);
- application_name_ = _application_name;
- application = runtime::get()->get_application(application_name_);
- }
- if (application) {
- switch (_app_state) {
- case vsomeip::application_plugin_state_e::STATE_INITIALIZED:
- if (application->is_routing()) {
- application->register_state_handler(
- std::bind(&diagnosis_plugin_mgu::on_state,
- this, std::placeholders::_1));
- application->register_message_handler(diag_job_service_id_,
- diag_job_instance_id_, vsomeip::ANY_METHOD,
- std::bind(&diagnosis_plugin_mgu::on_message,
- this, std::placeholders::_1));
- }
- break;
-
- case vsomeip::application_plugin_state_e::STATE_STARTED:
- break;
- case vsomeip::application_plugin_state_e::STATE_STOPPED:
- if (application->is_routing()) {
- application->stop_offer_service(
- diag_job_service_id_, diag_job_instance_id_, diag_job_major_, diag_job_minor_);
- application->unregister_message_handler(
- diag_job_service_id_, diag_job_instance_id_, vsomeip::ANY_METHOD);
- application->unregister_state_handler();
- }
- break;
- }
- }
-}
-
-void diagnosis_plugin_mgu::on_message(const std::shared_ptr<vsomeip::message> &_request) {
- std::shared_ptr<vsomeip::application> application = nullptr;
- {
- std::lock_guard<std::mutex> lock(application_name_mutex_);
- application = runtime::get()->get_application(application_name_);
- }
- if (application && application->is_routing()) {
- vsomeip::routing_state_e state = vsomeip::routing_state_e::RS_UNKNOWN;
- switch (_request->get_method()) {
- case diag_job_rx_on_tx_on_:
- state = vsomeip::routing_state_e::RS_RUNNING;
- break;
- case diag_job_rx_on_tx_off_:
- state = vsomeip::routing_state_e::RS_DIAGNOSIS;
- break;
- default:
- break;
- }
- // Only reply if one of the 2 well known message are called!
- if (state != vsomeip::routing_state_e::RS_UNKNOWN) {
- uint32_t error;
- auto payload = _request->get_payload();
- // Check for correct data length
- if (payload->get_length() == expected_payload_length_) {
- // Check if bit 1 is set
- if (payload->get_data()[communication_type_payload_offset_]
- & communication_type_mask_) {
- application->set_routing_state(state);
- error = bswap_32(error_ok_);
- } else {
- error = bswap_32(error_out_of_range_);
- }
- } else {
- error = bswap_32(error_communication_error_);
- }
-
- auto its_payload = vsomeip::runtime::get()->create_payload();
- std::vector<byte_t> its_payload_data;
- // Set error return type
- for (uint8_t i = 0; i < sizeof(error); ++i) {
- its_payload_data.push_back(reinterpret_cast<const byte_t*>(&error)[i]);
- }
-
- // Copy handle from request-payload!
- for (uint8_t i = 0; i < sizeof(uint32_t); ++i) {
- its_payload_data.push_back(payload->get_data()[i]);
- }
-
- // Create & send response
- its_payload->set_data(its_payload_data);
- std::shared_ptr<vsomeip::message> its_response =
- vsomeip::runtime::get()->create_response(_request);
- its_response->set_payload(its_payload);
- application->send(its_response, true);
- }
- }
-}
-
-void diagnosis_plugin_mgu::on_state(vsomeip::state_type_e _state) {
- std::shared_ptr<vsomeip::application> application = nullptr;
- {
- std::lock_guard<std::mutex> lock(application_name_mutex_);
- application = runtime::get()->get_application(application_name_);
- }
- if (application && _state == vsomeip::state_type_e::ST_REGISTERED) {
- application->offer_service(diag_job_service_id_, diag_job_instance_id_,
- diag_job_major_, diag_job_minor_);
- }
-}
-
-} // namespace mgu
-} // namespace vsomeip