From 3ffd442877b2e3e248c3f90d396fd8691a2dcb82 Mon Sep 17 00:00:00 2001 From: Diana Pinto Date: Fri, 4 Oct 2024 12:35:55 +0100 Subject: [PATCH] capicxx-core-tools 3.2.15 - Create verification test for noRead - Fix issues identified in the CommonAPI-Examples - Update gitignore and cleanup project - Verification test for vsomeip_sec host address - Added workflow to build the project in Ubuntu, Windows, and macOS --- CHANGES | 7 + CommonAPI-Examples/.cproject | 42 -- CommonAPI-Examples/.gitignore | 3 +- CommonAPI-Examples/.project | 33 - CommonAPI-Examples/E01HelloWorld/.cproject | 71 --- CommonAPI-Examples/E01HelloWorld/.gitignore | 2 - CommonAPI-Examples/E01HelloWorld/.project | 33 - .../fidl/E01HelloWorld-SomeIP.fdepl | 2 +- CommonAPI-Examples/E02Attributes/.cproject | 66 -- CommonAPI-Examples/E02Attributes/.gitignore | 2 - CommonAPI-Examples/E02Attributes/.project | 33 - CommonAPI-Examples/E02Attributes/README | 2 +- CommonAPI-Examples/E03Methods/.cproject | 66 -- CommonAPI-Examples/E03Methods/.gitignore | 2 - CommonAPI-Examples/E03Methods/.project | 33 - CommonAPI-Examples/E04PhoneBook/.cproject | 70 --- CommonAPI-Examples/E04PhoneBook/.gitignore | 2 - CommonAPI-Examples/E04PhoneBook/.project | 33 - CommonAPI-Examples/E05Manager/.cproject | 66 -- CommonAPI-Examples/E05Manager/.gitignore | 2 - CommonAPI-Examples/E05Manager/.project | 27 - CommonAPI-Examples/E06Unions/.cproject | 66 -- CommonAPI-Examples/E06Unions/.gitignore | 2 - CommonAPI-Examples/E06Unions/.project | 33 - CommonAPI-Examples/E07Mainloop/.cproject | 71 --- CommonAPI-Examples/E07Mainloop/.gitignore | 2 - CommonAPI-Examples/E07Mainloop/.project | 33 - .../E08CrcProtection/.gitignore | 2 - .../CMakeLists.txt | 2 +- .../README.md | 88 +-- .../commonapi4someip.ini | 0 .../fidl/E08CrcProtectionP04-SomeIP.fdepl} | 8 +- .../fidl/E08CrcProtectionP04.fidl} | 2 +- .../src/E08CrcProtectionP04Client.cpp} | 8 +- .../src/E08CrcProtectionP04Service.cpp} | 6 +- .../src/E08CrcProtectionP04StubImpl.cpp} | 8 +- .../src/E08CrcProtectionP04StubImpl.hpp} | 14 +- .../vsomeip-client.json | 0 .../vsomeip-service.json | 2 +- .../E09CrcProtectionP01/CMakeLists.txt | 118 ++++ .../E09CrcProtectionP01/README.md | 568 ++++++++++++++++++ .../E09CrcProtectionP01/commonapi4someip.ini | 8 + .../fidl/E09CrcProtectionP01-SomeIP.fdepl | 48 ++ .../fidl/E09CrcProtectionP01.fidl | 24 + .../src/E09CrcProtectionP01Client.cpp | 83 +++ .../src/E09CrcProtectionP01Service.cpp | 37 ++ .../src/E09CrcProtectionP01StubImpl.cpp | 29 + .../src/E09CrcProtectionP01StubImpl.hpp | 23 + .../E09CrcProtectionP01/vsomeip-client.json | 53 ++ .../E09CrcProtectionP01/vsomeip-service.json | 60 ++ docx/.cproject | 42 -- docx/.project | 27 - .../.gitignore | 2 - org.genivi.commonapi.console.feature/.project | 17 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../feature.xml | 4 +- org.genivi.commonapi.console.feature/pom.xml | 2 +- .../.gitignore | 2 - .../.project | 17 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../feature.xml | 2 +- .../pom.xml | 2 +- org.genivi.commonapi.console/.classpath | 7 - org.genivi.commonapi.console/.gitignore | 2 - org.genivi.commonapi.console/.project | 28 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 19 - .../.settings/org.eclipse.jdt.launching.prefs | 2 - .../META-INF/MANIFEST.MF | 2 +- org.genivi.commonapi.console/about.mappings | 4 +- org.genivi.commonapi.console/pom.xml | 2 +- .../.gitignore | 2 - .../.project | 17 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../feature.xml | 2 +- org.genivi.commonapi.core.cli.feature/pom.xml | 2 +- .../.gitignore | 2 - .../.project | 11 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../category.xml | 4 +- .../commonapi_console.product | 2 +- org.genivi.commonapi.core.cli.product/pom.xml | 2 +- org.genivi.commonapi.core.cli/.classpath | 7 - org.genivi.commonapi.core.cli/.gitignore | 3 - org.genivi.commonapi.core.cli/.project | 28 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../org.eclipse.ltk.core.refactoring.prefs | 2 - .../META-INF/MANIFEST.MF | 6 +- org.genivi.commonapi.core.cli/pom.xml | 2 +- org.genivi.commonapi.core.feature/.gitignore | 2 - org.genivi.commonapi.core.feature/.project | 19 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - org.genivi.commonapi.core.feature/feature.xml | 2 +- org.genivi.commonapi.core.feature/pom.xml | 2 +- org.genivi.commonapi.core.releng/.gitignore | 1 - org.genivi.commonapi.core.releng/.project | 11 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - org.genivi.commonapi.core.releng/pom.xml | 2 +- org.genivi.commonapi.core.target/.gitignore | 1 - org.genivi.commonapi.core.target/.project | 11 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - org.genivi.commonapi.core.target/pom.xml | 2 +- org.genivi.commonapi.core.ui/.classpath | 7 - org.genivi.commonapi.core.ui/.gitignore | 3 - org.genivi.commonapi.core.ui/.project | 28 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 4 +- org.genivi.commonapi.core.ui/pom.xml | 2 +- .../.gitignore | 2 - org.genivi.commonapi.core.updatesite/.project | 11 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../category.xml | 4 +- org.genivi.commonapi.core.updatesite/pom.xml | 2 +- .../.gitignore | 2 - .../.project | 17 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../feature.xml | 4 +- .../pom.xml | 2 +- .../.classpath | 7 - .../.gitignore | 3 - org.genivi.commonapi.core.validator/.project | 28 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 7 - .../META-INF/MANIFEST.MF | 6 +- org.genivi.commonapi.core.validator/pom.xml | 2 +- .../.gitignore | 4 - .../CMakeLists.txt | 21 +- .../fidl/ClientIdService.fidl | 21 + .../fidl/ti_communication.fidl | 3 + .../src/CMAttributes.cpp | 80 ++- .../src/VSomeIPSec.cpp | 148 +++++ .../src/conf/commonapi4someip.ini.in | 2 + .../src/stub/CMAttributesStub.cpp | 3 + .../src/stub/VSomeIPSecStub.cpp | 57 ++ .../src/stub/VSomeIPSecStub.hpp | 41 ++ org.genivi.commonapi.core/.classpath | 9 - org.genivi.commonapi.core/.gitignore | 5 - org.genivi.commonapi.core/.project | 34 -- .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../.settings/org.eclipse.jdt.core.prefs | 12 - .../META-INF/MANIFEST.MF | 2 +- org.genivi.commonapi.core/pom.xml | 2 +- org.genivi.commonapi.releng/.project | 11 - org.genivi.commonapi.releng/pom.xml | 4 +- 160 files changed, 1544 insertions(+), 1449 deletions(-) delete mode 100644 CommonAPI-Examples/.cproject delete mode 100644 CommonAPI-Examples/.project delete mode 100644 CommonAPI-Examples/E01HelloWorld/.cproject delete mode 100644 CommonAPI-Examples/E01HelloWorld/.gitignore delete mode 100644 CommonAPI-Examples/E01HelloWorld/.project delete mode 100644 CommonAPI-Examples/E02Attributes/.cproject delete mode 100644 CommonAPI-Examples/E02Attributes/.gitignore delete mode 100644 CommonAPI-Examples/E02Attributes/.project delete mode 100644 CommonAPI-Examples/E03Methods/.cproject delete mode 100644 CommonAPI-Examples/E03Methods/.gitignore delete mode 100644 CommonAPI-Examples/E03Methods/.project delete mode 100644 CommonAPI-Examples/E04PhoneBook/.cproject delete mode 100644 CommonAPI-Examples/E04PhoneBook/.gitignore delete mode 100644 CommonAPI-Examples/E04PhoneBook/.project delete mode 100644 CommonAPI-Examples/E05Manager/.cproject delete mode 100644 CommonAPI-Examples/E05Manager/.gitignore delete mode 100644 CommonAPI-Examples/E05Manager/.project delete mode 100644 CommonAPI-Examples/E06Unions/.cproject delete mode 100644 CommonAPI-Examples/E06Unions/.gitignore delete mode 100644 CommonAPI-Examples/E06Unions/.project delete mode 100644 CommonAPI-Examples/E07Mainloop/.cproject delete mode 100644 CommonAPI-Examples/E07Mainloop/.gitignore delete mode 100644 CommonAPI-Examples/E07Mainloop/.project delete mode 100644 CommonAPI-Examples/E08CrcProtection/.gitignore rename CommonAPI-Examples/{E08CrcProtection => E08CrcProtectionP04}/CMakeLists.txt (99%) rename CommonAPI-Examples/{E08CrcProtection => E08CrcProtectionP04}/README.md (87%) rename CommonAPI-Examples/{E08CrcProtection => E08CrcProtectionP04}/commonapi4someip.ini (100%) rename CommonAPI-Examples/{E08CrcProtection/fidl/E08CrcProtection.fdepl => E08CrcProtectionP04/fidl/E08CrcProtectionP04-SomeIP.fdepl} (89%) rename CommonAPI-Examples/{E08CrcProtection/fidl/E08CrcProtection.fidl => E08CrcProtectionP04/fidl/E08CrcProtectionP04.fidl} (95%) rename CommonAPI-Examples/{E08CrcProtection/src/E08CrcProtectionClient.cpp => E08CrcProtectionP04/src/E08CrcProtectionP04Client.cpp} (94%) rename CommonAPI-Examples/{E08CrcProtection/src/E08CrcProtectionService.cpp => E08CrcProtectionP04/src/E08CrcProtectionP04Service.cpp} (89%) rename CommonAPI-Examples/{E08CrcProtection/src/E08CrcProtectionStubImpl.cpp => E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.cpp} (75%) rename CommonAPI-Examples/{E08CrcProtection/src/E08CrcProtectionStubImpl.hpp => E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.hpp} (50%) rename CommonAPI-Examples/{E08CrcProtection => E08CrcProtectionP04}/vsomeip-client.json (100%) rename CommonAPI-Examples/{E08CrcProtection => E08CrcProtectionP04}/vsomeip-service.json (97%) create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/CMakeLists.txt create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/README.md create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/commonapi4someip.ini create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01-SomeIP.fdepl create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01.fidl create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Client.cpp create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Service.cpp create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.cpp create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.hpp create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/vsomeip-client.json create mode 100644 CommonAPI-Examples/E09CrcProtectionP01/vsomeip-service.json delete mode 100644 docx/.cproject delete mode 100644 docx/.project delete mode 100644 org.genivi.commonapi.console.feature/.gitignore delete mode 100644 org.genivi.commonapi.console.feature/.project delete mode 100644 org.genivi.commonapi.console.feature/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.console.feature/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.console.franca.feature/.gitignore delete mode 100644 org.genivi.commonapi.console.franca.feature/.project delete mode 100644 org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.console/.classpath delete mode 100644 org.genivi.commonapi.console/.gitignore delete mode 100644 org.genivi.commonapi.console/.project delete mode 100644 org.genivi.commonapi.console/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.console/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.console/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.genivi.commonapi.console/.settings/org.eclipse.jdt.launching.prefs delete mode 100644 org.genivi.commonapi.core.cli.feature/.gitignore delete mode 100644 org.genivi.commonapi.core.cli.feature/.project delete mode 100644 org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.cli.product/.gitignore delete mode 100644 org.genivi.commonapi.core.cli.product/.project delete mode 100644 org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.cli/.classpath delete mode 100644 org.genivi.commonapi.core.cli/.gitignore delete mode 100644 org.genivi.commonapi.core.cli/.project delete mode 100644 org.genivi.commonapi.core.cli/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.cli/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.cli/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.genivi.commonapi.core.cli/.settings/org.eclipse.ltk.core.refactoring.prefs delete mode 100644 org.genivi.commonapi.core.feature/.gitignore delete mode 100644 org.genivi.commonapi.core.feature/.project delete mode 100644 org.genivi.commonapi.core.feature/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.feature/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.releng/.gitignore delete mode 100644 org.genivi.commonapi.core.releng/.project delete mode 100644 org.genivi.commonapi.core.releng/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.releng/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.target/.gitignore delete mode 100644 org.genivi.commonapi.core.target/.project delete mode 100644 org.genivi.commonapi.core.target/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.target/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.ui/.classpath delete mode 100644 org.genivi.commonapi.core.ui/.gitignore delete mode 100644 org.genivi.commonapi.core.ui/.project delete mode 100644 org.genivi.commonapi.core.ui/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.ui/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.ui/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.genivi.commonapi.core.updatesite/.gitignore delete mode 100644 org.genivi.commonapi.core.updatesite/.project delete mode 100644 org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.validator.feature/.gitignore delete mode 100644 org.genivi.commonapi.core.validator.feature/.project delete mode 100644 org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.validator/.classpath delete mode 100644 org.genivi.commonapi.core.validator/.gitignore delete mode 100644 org.genivi.commonapi.core.validator/.project delete mode 100644 org.genivi.commonapi.core.validator/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core.validator/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core.validator/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.genivi.commonapi.core.verification/fidl/ClientIdService.fidl create mode 100644 org.genivi.commonapi.core.verification/src/VSomeIPSec.cpp create mode 100644 org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.cpp create mode 100644 org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.hpp delete mode 100644 org.genivi.commonapi.core/.classpath delete mode 100644 org.genivi.commonapi.core/.gitignore delete mode 100644 org.genivi.commonapi.core/.project delete mode 100644 org.genivi.commonapi.core/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.genivi.commonapi.core/.settings/org.eclipse.core.runtime.prefs delete mode 100644 org.genivi.commonapi.core/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.genivi.commonapi.releng/.project diff --git a/CHANGES b/CHANGES index f23400f..435657e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,12 @@ Changes ======= +v3.2.15 +- Create verification test for noRead +- Fix issues identified in the CommonAPI-Examples +- Update gitignore and cleanup project +- Verification test for vsomeip_sec host address +- Added workflow to build the project in Ubuntu, Windows, and macOS + v3.2.14 - Update README.md with correct github.io link - Fixed build of the examples with installed DBus diff --git a/CommonAPI-Examples/.cproject b/CommonAPI-Examples/.cproject deleted file mode 100644 index 90d8045..0000000 --- a/CommonAPI-Examples/.cproject +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CommonAPI-Examples/.gitignore b/CommonAPI-Examples/.gitignore index 0e61d95..6d028a1 100644 --- a/CommonAPI-Examples/.gitignore +++ b/CommonAPI-Examples/.gitignore @@ -1,4 +1,3 @@ *~ -.settings -*/src-gen */build +mylog.log diff --git a/CommonAPI-Examples/.project b/CommonAPI-Examples/.project deleted file mode 100644 index efb06ea..0000000 --- a/CommonAPI-Examples/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - CommonAPI-Examples - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E01HelloWorld/.cproject b/CommonAPI-Examples/E01HelloWorld/.cproject deleted file mode 100644 index fc8a4e4..0000000 --- a/CommonAPI-Examples/E01HelloWorld/.cproject +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -DUSE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E01HelloWorld/.gitignore b/CommonAPI-Examples/E01HelloWorld/.gitignore deleted file mode 100644 index 5fb7e99..0000000 --- a/CommonAPI-Examples/E01HelloWorld/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen diff --git a/CommonAPI-Examples/E01HelloWorld/.project b/CommonAPI-Examples/E01HelloWorld/.project deleted file mode 100644 index 06979a8..0000000 --- a/CommonAPI-Examples/E01HelloWorld/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - E01HelloWorld - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld-SomeIP.fdepl b/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld-SomeIP.fdepl index ada37e4..58c3b57 100644 --- a/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld-SomeIP.fdepl +++ b/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld-SomeIP.fdepl @@ -25,7 +25,7 @@ define org.genivi.commonapi.someip.deployment for provider as Service { instance commonapi.examples.E01HelloWorld { InstanceId = "commonapi.examples.HelloWorld" - SomeIpInstanceID = 4660 + SomeIpInstanceID = 22136 SomeIpUnicastAddress = "192.168.0.2" SomeIpReliableUnicastPort = 30499 diff --git a/CommonAPI-Examples/E02Attributes/.cproject b/CommonAPI-Examples/E02Attributes/.cproject deleted file mode 100644 index 298f904..0000000 --- a/CommonAPI-Examples/E02Attributes/.cproject +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -DUSE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E02Attributes/.gitignore b/CommonAPI-Examples/E02Attributes/.gitignore deleted file mode 100644 index 5897208..0000000 --- a/CommonAPI-Examples/E02Attributes/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen \ No newline at end of file diff --git a/CommonAPI-Examples/E02Attributes/.project b/CommonAPI-Examples/E02Attributes/.project deleted file mode 100644 index 851b8a1..0000000 --- a/CommonAPI-Examples/E02Attributes/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - E02Attributes - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E02Attributes/README b/CommonAPI-Examples/E02Attributes/README index 770daa6..5834760 100644 --- a/CommonAPI-Examples/E02Attributes/README +++ b/CommonAPI-Examples/E02Attributes/README @@ -68,7 +68,7 @@ Now see the implementation of the client. The simplest case is to get the curren [source,{cppstr}] ---- #include -#include +#include #include using namespace v1::commonapi::examples; diff --git a/CommonAPI-Examples/E03Methods/.cproject b/CommonAPI-Examples/E03Methods/.cproject deleted file mode 100644 index 531d398..0000000 --- a/CommonAPI-Examples/E03Methods/.cproject +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -DUSE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E03Methods/.gitignore b/CommonAPI-Examples/E03Methods/.gitignore deleted file mode 100644 index 5897208..0000000 --- a/CommonAPI-Examples/E03Methods/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen \ No newline at end of file diff --git a/CommonAPI-Examples/E03Methods/.project b/CommonAPI-Examples/E03Methods/.project deleted file mode 100644 index fe125d0..0000000 --- a/CommonAPI-Examples/E03Methods/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - E03Methods - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E04PhoneBook/.cproject b/CommonAPI-Examples/E04PhoneBook/.cproject deleted file mode 100644 index 79b6194..0000000 --- a/CommonAPI-Examples/E04PhoneBook/.cproject +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -DUSE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E04PhoneBook/.gitignore b/CommonAPI-Examples/E04PhoneBook/.gitignore deleted file mode 100644 index 5897208..0000000 --- a/CommonAPI-Examples/E04PhoneBook/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen \ No newline at end of file diff --git a/CommonAPI-Examples/E04PhoneBook/.project b/CommonAPI-Examples/E04PhoneBook/.project deleted file mode 100644 index af5f73a..0000000 --- a/CommonAPI-Examples/E04PhoneBook/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - E04PhoneBook - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E05Manager/.cproject b/CommonAPI-Examples/E05Manager/.cproject deleted file mode 100644 index fe9fce2..0000000 --- a/CommonAPI-Examples/E05Manager/.cproject +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -D USE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E05Manager/.gitignore b/CommonAPI-Examples/E05Manager/.gitignore deleted file mode 100644 index 5897208..0000000 --- a/CommonAPI-Examples/E05Manager/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen \ No newline at end of file diff --git a/CommonAPI-Examples/E05Manager/.project b/CommonAPI-Examples/E05Manager/.project deleted file mode 100644 index 3deb967..0000000 --- a/CommonAPI-Examples/E05Manager/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - E05Manager - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - diff --git a/CommonAPI-Examples/E06Unions/.cproject b/CommonAPI-Examples/E06Unions/.cproject deleted file mode 100644 index 95bebce..0000000 --- a/CommonAPI-Examples/E06Unions/.cproject +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -D USE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E06Unions/.gitignore b/CommonAPI-Examples/E06Unions/.gitignore deleted file mode 100644 index 5897208..0000000 --- a/CommonAPI-Examples/E06Unions/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen \ No newline at end of file diff --git a/CommonAPI-Examples/E06Unions/.project b/CommonAPI-Examples/E06Unions/.project deleted file mode 100644 index e24f0e5..0000000 --- a/CommonAPI-Examples/E06Unions/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - E06Unions - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E07Mainloop/.cproject b/CommonAPI-Examples/E07Mainloop/.cproject deleted file mode 100644 index fc8a4e4..0000000 --- a/CommonAPI-Examples/E07Mainloop/.cproject +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cmake - -E chdir build/ cmake -D CMAKE_BUILD_TYPE=Debug -DUSE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ../ - - true - false - true - - - - diff --git a/CommonAPI-Examples/E07Mainloop/.gitignore b/CommonAPI-Examples/E07Mainloop/.gitignore deleted file mode 100644 index 5fb7e99..0000000 --- a/CommonAPI-Examples/E07Mainloop/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen diff --git a/CommonAPI-Examples/E07Mainloop/.project b/CommonAPI-Examples/E07Mainloop/.project deleted file mode 100644 index 93b34d5..0000000 --- a/CommonAPI-Examples/E07Mainloop/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - E07Mainloop - - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/CommonAPI-Examples/E08CrcProtection/.gitignore b/CommonAPI-Examples/E08CrcProtection/.gitignore deleted file mode 100644 index 5897208..0000000 --- a/CommonAPI-Examples/E08CrcProtection/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -src-gen \ No newline at end of file diff --git a/CommonAPI-Examples/E08CrcProtection/CMakeLists.txt b/CommonAPI-Examples/E08CrcProtectionP04/CMakeLists.txt similarity index 99% rename from CommonAPI-Examples/E08CrcProtection/CMakeLists.txt rename to CommonAPI-Examples/E08CrcProtectionP04/CMakeLists.txt index cdc8122..dfe9b52 100644 --- a/CommonAPI-Examples/E08CrcProtection/CMakeLists.txt +++ b/CommonAPI-Examples/E08CrcProtectionP04/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 2.8) -set(PRJ_NAME E08CrcProtection) +set(PRJ_NAME E08CrcProtectionP04) set(CMAKE_VERBOSE_MAKEFILE on) diff --git a/CommonAPI-Examples/E08CrcProtection/README.md b/CommonAPI-Examples/E08CrcProtectionP04/README.md similarity index 87% rename from CommonAPI-Examples/E08CrcProtection/README.md rename to CommonAPI-Examples/E08CrcProtectionP04/README.md index 6d91b0d..84f204c 100644 --- a/CommonAPI-Examples/E08CrcProtection/README.md +++ b/CommonAPI-Examples/E08CrcProtectionP04/README.md @@ -1,12 +1,12 @@ -# Example 8: CRC Protection +# Example 8: CRC Protection Using Profile P04 -This example was created to demonstrate how the e2e implementation can be used on the CommonAPI layer. Please note that this example can only be correctly used if the Service and the Client are running on distinct machines/ECUs. -First consider the Franca IDL specification of example 8 **E08CrcProtection.fidl**: +This example was created to demonstrate how the e2e implementation can be used on the CommonAPI layer with profile P04. Please note that this example can only be correctly used if the Service and the Client are running on distinct machines/ECUs. +First consider the Franca IDL specification of example 8 **E08CrcProtectionP04.fidl**: ```java package commonapi.examples -interface E08CrcProtection { +interface E08CrcProtectionP04 { version { major 1 minor 0 } attribute CommonTypes.aStruct aOK @@ -53,7 +53,7 @@ Let's start by the configuration file used for the service **vsomeip-service.jso [ { "service" : "0x1234", - "instance" : "0x5678", + "instance" : "0x0001", "reliable" : { "port" : "30499", "enable-magic-cookies" : "false" } } ], @@ -150,42 +150,42 @@ Please note that the first definition, *unicast* will need to be adapted to your Now let's have a look to the CommonAPI code on the service side, that is splitted between the following 3 files: -* **E08CrcProtectionStubImpl.hpp**: +* **E08CrcProtectionP04StubImpl.hpp**: ```cpp -#ifndef E08CRCPROTECTIONSTUBIMPL_HPP_ -#define E08CRCPROTECTIONSTUBIMPL_HPP_ +#ifndef E08CRCPROTECTIONP04STUBIMPL_HPP_ +#define E08CRCPROTECTIONP04STUBIMPL_HPP_ #include -#include +#include -class E08CrcProtectionStubImpl: public v1_0::commonapi::examples::E08CrcProtectionStubDefault { +class E08CrcProtectionP04StubImpl: public v1_0::commonapi::examples::E08CrcProtectionP04StubDefault { public: - E08CrcProtectionStubImpl(); - virtual ~E08CrcProtectionStubImpl(); + E08CrcProtectionP04StubImpl(); + virtual ~E08CrcProtectionP04StubImpl(); virtual void incCounter(); private: int cnt; }; -#endif // E08CRCPROTECTIONSTUBIMPL_HPP_ +#endif // E08CRCPROTECTIONP04STUBIMPL_HPP_ ``` -* **E08CrcProtectionStubImpl.cpp**: +* **E08CrcProtectionP04StubImpl.cpp**: ```cpp -#include "E08CrcProtectionStubImpl.hpp" +#include "E08CrcProtectionP04StubImpl.hpp" using namespace v1::commonapi::examples; -E08CrcProtectionStubImpl::E08CrcProtectionStubImpl() { +E08CrcProtectionP04StubImpl::E08CrcProtectionP04StubImpl() { cnt = 0; } -E08CrcProtectionStubImpl::~E08CrcProtectionStubImpl() { +E08CrcProtectionP04StubImpl::~E08CrcProtectionP04StubImpl() { } -void E08CrcProtectionStubImpl::incCounter() { +void E08CrcProtectionP04StubImpl::incCounter() { cnt++; CommonTypes::aStruct aOK, aERROR; @@ -200,18 +200,18 @@ void E08CrcProtectionStubImpl::incCounter() { } ``` -* **E08CrcProtectionService.cpp**: +* **E08CrcProtectionP04Service.cpp**: ```cpp #include #include #include -#include "E08CrcProtectionStubImpl.hpp" +#include "E08CrcProtectionP04StubImpl.hpp" int main() { CommonAPI::Runtime::setProperty("LogContext", "E08S"); CommonAPI::Runtime::setProperty("LogApplication", "E08S"); - CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtection"); + CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtectionP04"); std::shared_ptr runtime = CommonAPI::Runtime::get(); @@ -219,7 +219,7 @@ int main() { std::string instance = "commonapi.examples.Attributes"; std::string connection = "service-sample"; - std::shared_ptr myService = std::make_shared(); + std::shared_ptr myService = std::make_shared(); while (!runtime->registerService(domain, instance, myService, connection)) { std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(100)); @@ -238,7 +238,7 @@ int main() { On these implementations we can see that the service side starts by registering a service and if successful, starts incrementing a counter every 5 seconds that is used to set new values into the attributes *aOK* and *aERROR*. Notice that none of the CRC fields are setted explicitly. -Now, we move into the implementation for the client side in **E08CrcProtectionClient.cpp**: +Now, we move into the implementation for the client side in **E08CrcProtectionP04Client.cpp**: ```cpp #include #include @@ -249,14 +249,14 @@ Now, we move into the implementation for the client side in **E08CrcProtectionCl #include #include -#include +#include using namespace v1::commonapi::examples; int main() { CommonAPI::Runtime::setProperty("LogContext", "E08C"); CommonAPI::Runtime::setProperty("LogApplication", "E08C"); - CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtection"); + CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtectionP04"); std::shared_ptr < CommonAPI::Runtime > runtime = CommonAPI::Runtime::get(); @@ -264,7 +264,7 @@ int main() { std::string instance = "commonapi.examples.Attributes"; std::string connection = "client-sample"; - auto myProxy = runtime->buildProxyWithDefaultAttributeExtension(domain, instance, connection); + auto myProxy = runtime->buildProxyWithDefaultAttributeExtension(domain, instance, connection); std::cout << "Waiting for service to become available." << std::endl; while (!myProxy->isAvailable()) { @@ -273,7 +273,7 @@ int main() { CommonTypes::aStruct aOK, aERROR; CommonAPI::CallInfo info(1000); - info.sender_ = 5678; + info.sender_ = 1; // Subscribe aOK for receiving values myProxy->getAOKAttribute().getChangedEvent().subscribe( @@ -327,20 +327,20 @@ The client, after a successful build of the proxy, uses the *getAOKAttribute* an Next we will present some logs of the execution of the service and the client on different machines, respectively: ```bash -bmw:/mnt/E08CrcProtection$ VSOMEIP_CONFIGURATION=vsomeip-service.json COMMONAPI_CONFIG=$PWD/commonapi4someip.ini LD_LIBRARY_PATH=/lib:$PWD/build build/E08CrcProtectionService -[CAPI][INFO] Loading configuration file '/mnt/E08CrcProtection/commonapi4someip.ini' +bmw:/mnt/E08CrcProtectionP04$ VSOMEIP_CONFIGURATION=vsomeip-service.json COMMONAPI_CONFIG=$PWD/commonapi4someip.ini LD_LIBRARY_PATH=/lib:$PWD/build build/E08CrcProtectionP04Service +[CAPI][INFO] Loading configuration file '/mnt/E08CrcProtectionP04/commonapi4someip.ini' [CAPI][INFO] Using default binding 'someip' [CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi' -[CAPI][DEBUG] Loading library for local:commonapi.examples.E08CrcProtection:v1_0:commonapi.examples.Attributes stub. +[CAPI][DEBUG] Loading library for local:commonapi.examples.E08CrcProtectionP04:v1_0:commonapi.examples.Attributes stub. [CAPI][INFO] Loading configuration file /etc//commonapi-someip.ini -[CAPI][DEBUG] Added address mapping: local:commonapi.examples.E08CrcProtection:v1_0:commonapi.examples.Attributes <--> [1234.0001(1.0)] -[CAPI][VERBOSE] Registering function for creating "commonapi.examples.E08CrcProtection:v1_0" proxy. -[CAPI][INFO] Registering function for creating "commonapi.examples.E08CrcProtection:v1_0" stub adapter. -[CAPI][DEBUG] Loading interface library "libE08CrcProtection-someip.so" succeeded. -[CAPI][INFO] Registering stub for "local:commonapi.examples.E08CrcProtection:v1_0:commonapi.examples.Attributes" +[CAPI][DEBUG] Added address mapping: local:commonapi.examples.E08CrcProtectionP04:v1_0:commonapi.examples.Attributes <--> [1234.0001(1.0)] +[CAPI][VERBOSE] Registering function for creating "commonapi.examples.E08CrcProtectionP04:v1_0" proxy. +[CAPI][INFO] Registering function for creating "commonapi.examples.E08CrcProtectionP04:v1_0" stub adapter. +[CAPI][DEBUG] Loading interface library "libE08CrcProtectionP04-someip.so" succeeded. +[CAPI][INFO] Registering stub for "local:commonapi.examples.E08CrcProtectionP04:v1_0:commonapi.examples.Attributes" [326189.926872]~DLT~ 135~INFO ~FIFO /tmp/dlt cannot be opened. Retrying later... 2022-09-12 15:10:32.092482 [info] Parsed vsomeip configuration in 2ms -2022-09-12 15:10:32.093414 [info] Using configuration file: "/mnt/E08CrcProtection/vsomeip-service.json". +2022-09-12 15:10:32.093414 [info] Using configuration file: "/mnt/E08CrcProtectionP04/vsomeip-service.json". 2022-09-12 15:10:32.093760 [info] Configuration module loaded. 2022-09-12 15:10:32.093986 [info] Initializing vsomeip application "service-sample". 2022-09-12 15:10:32.094746 [info] Instantiating routing manager [Host]. @@ -383,18 +383,18 @@ Waiting for calls... (Abort with CTRL+C) ``` ```bash -bmw:~/Documents/commonapi-core-generator/CommonAPI-Examples/E08CrcProtection$ VSOMEIP_CONFIGURATION=vsomeip-client.json COMMONAPI_CONFIG=$PWD/commonapi4someip.ini LD_LIBRARY_PATH=../../../install_folder/lib:$PWD/build build/E08CrcProtectionClient +bmw:~/Documents/commonapi-core-generator/CommonAPI-Examples/E08CrcProtectionP04$ VSOMEIP_CONFIGURATION=vsomeip-client.json COMMONAPI_CONFIG=$PWD/commonapi4someip.ini LD_LIBRARY_PATH=../../../install_folder/lib:$PWD/build build/E08CrcProtectionP04Client [326380.518559]~DLT~2809822~INFO ~FIFO /tmp/dlt cannot be opened. Retrying later... -[CAPI][INFO] Loading configuration file '/home/bmw/Documents/commonapi-core-generator/CommonAPI-Examples/E08CrcProtection/commonapi4someip.ini' +[CAPI][INFO] Loading configuration file '/home/bmw/Documents/commonapi-core-generator/CommonAPI-Examples/E08CrcProtectionP04/commonapi4someip.ini' [CAPI][INFO] Using default binding 'someip' [CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi' -[CAPI][DEBUG] Loading library for local:commonapi.examples.E08CrcProtection:v1_0:commonapi.examples.Attributes proxy. +[CAPI][DEBUG] Loading library for local:commonapi.examples.E08CrcProtectionP04:v1_0:commonapi.examples.Attributes proxy. [CAPI][INFO] Loading configuration file /etc//commonapi-someip.ini -[CAPI][DEBUG] Added address mapping: local:commonapi.examples.E08CrcProtection:v1_0:commonapi.examples.Attributes <--> [1234.0001(1.0)] -[CAPI][VERBOSE] Registering function for creating "commonapi.examples.E08CrcProtection:v1_0" proxy. -[CAPI][INFO] Registering function for creating "commonapi.examples.E08CrcProtection:v1_0" stub adapter. -[CAPI][DEBUG] Loading interface library "libE08CrcProtection-someip.so" succeeded. -[CAPI][VERBOSE] Creating proxy for "local:commonapi.examples.E08CrcProtection:v1_0:commonapi.examples.Attributes" +[CAPI][DEBUG] Added address mapping: local:commonapi.examples.E08CrcProtectionP04:v1_0:commonapi.examples.Attributes <--> [1234.0001(1.0)] +[CAPI][VERBOSE] Registering function for creating "commonapi.examples.E08CrcProtectionP04:v1_0" proxy. +[CAPI][INFO] Registering function for creating "commonapi.examples.E08CrcProtectionP04:v1_0" stub adapter. +[CAPI][DEBUG] Loading interface library "libE08CrcProtectionP04-someip.so" succeeded. +[CAPI][VERBOSE] Creating proxy for "local:commonapi.examples.E08CrcProtectionP04:v1_0:commonapi.examples.Attributes" 2022-09-12 16:13:42.156045 [info] Parsed vsomeip configuration in 1ms 2022-09-12 16:13:42.161035 [info] Using configuration file: "vsomeip-client.json". 2022-09-12 16:13:42.162321 [info] Configuration module loaded. diff --git a/CommonAPI-Examples/E08CrcProtection/commonapi4someip.ini b/CommonAPI-Examples/E08CrcProtectionP04/commonapi4someip.ini similarity index 100% rename from CommonAPI-Examples/E08CrcProtection/commonapi4someip.ini rename to CommonAPI-Examples/E08CrcProtectionP04/commonapi4someip.ini diff --git a/CommonAPI-Examples/E08CrcProtection/fidl/E08CrcProtection.fdepl b/CommonAPI-Examples/E08CrcProtectionP04/fidl/E08CrcProtectionP04-SomeIP.fdepl similarity index 89% rename from CommonAPI-Examples/E08CrcProtection/fidl/E08CrcProtection.fdepl rename to CommonAPI-Examples/E08CrcProtectionP04/fidl/E08CrcProtectionP04-SomeIP.fdepl index 30800e6..634c453 100644 --- a/CommonAPI-Examples/E08CrcProtection/fidl/E08CrcProtection.fdepl +++ b/CommonAPI-Examples/E08CrcProtectionP04/fidl/E08CrcProtectionP04-SomeIP.fdepl @@ -4,9 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" -import "E08CrcProtection.fidl" +import "E08CrcProtectionP04.fidl" -define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E08CrcProtection { +define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E08CrcProtectionP04 { SomeIpServiceID = 4660 attribute aOK { @@ -36,10 +36,10 @@ define org.genivi.commonapi.someip.deployment for typeCollection commonapi.examp } define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.examples.E08CrcProtection { + instance commonapi.examples.E08CrcProtectionP04 { InstanceId = "commonapi.examples.Attributes" - SomeIpInstanceID = 22136 + SomeIpInstanceID = 1 SomeIpUnicastAddress = "192.168.0.2" SomeIpReliableUnicastPort = 30509 diff --git a/CommonAPI-Examples/E08CrcProtection/fidl/E08CrcProtection.fidl b/CommonAPI-Examples/E08CrcProtectionP04/fidl/E08CrcProtectionP04.fidl similarity index 95% rename from CommonAPI-Examples/E08CrcProtection/fidl/E08CrcProtection.fidl rename to CommonAPI-Examples/E08CrcProtectionP04/fidl/E08CrcProtectionP04.fidl index e8b2772..920e96f 100644 --- a/CommonAPI-Examples/E08CrcProtection/fidl/E08CrcProtection.fidl +++ b/CommonAPI-Examples/E08CrcProtectionP04/fidl/E08CrcProtectionP04.fidl @@ -5,7 +5,7 @@ package commonapi.examples -interface E08CrcProtection { +interface E08CrcProtectionP04 { version { major 1 minor 0 } attribute CommonTypes.aStruct aOK diff --git a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionClient.cpp b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04Client.cpp similarity index 94% rename from CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionClient.cpp rename to CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04Client.cpp index 81f07ea..ef94e2b 100644 --- a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionClient.cpp +++ b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04Client.cpp @@ -12,14 +12,14 @@ #include #include -#include +#include using namespace v1::commonapi::examples; int main() { CommonAPI::Runtime::setProperty("LogContext", "E08C"); CommonAPI::Runtime::setProperty("LogApplication", "E08C"); - CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtection"); + CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtectionP04"); std::shared_ptr < CommonAPI::Runtime > runtime = CommonAPI::Runtime::get(); @@ -27,7 +27,7 @@ int main() { std::string instance = "commonapi.examples.Attributes"; std::string connection = "client-sample"; - auto myProxy = runtime->buildProxyWithDefaultAttributeExtension(domain, instance, connection); + auto myProxy = runtime->buildProxyWithDefaultAttributeExtension(domain, instance, connection); std::cout << "Waiting for service to become available." << std::endl; while (!myProxy->isAvailable()) { @@ -36,7 +36,7 @@ int main() { CommonTypes::aStruct aOK, aERROR; CommonAPI::CallInfo info(1000); - info.sender_ = 5678; + info.sender_ = 1; // Subscribe aOK for receiving values myProxy->getAOKAttribute().getChangedEvent().subscribe( diff --git a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionService.cpp b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04Service.cpp similarity index 89% rename from CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionService.cpp rename to CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04Service.cpp index 87a77b4..c4a1f33 100644 --- a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionService.cpp +++ b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04Service.cpp @@ -7,12 +7,12 @@ #include #include -#include "E08CrcProtectionStubImpl.hpp" +#include "E08CrcProtectionP04StubImpl.hpp" int main() { CommonAPI::Runtime::setProperty("LogContext", "E08S"); CommonAPI::Runtime::setProperty("LogApplication", "E08S"); - CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtection"); + CommonAPI::Runtime::setProperty("LibraryBase", "E08CrcProtectionP04"); std::shared_ptr runtime = CommonAPI::Runtime::get(); @@ -20,7 +20,7 @@ int main() { std::string instance = "commonapi.examples.Attributes"; std::string connection = "service-sample"; - std::shared_ptr myService = std::make_shared(); + std::shared_ptr myService = std::make_shared(); while (!runtime->registerService(domain, instance, myService, connection)) { std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(100)); diff --git a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionStubImpl.cpp b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.cpp similarity index 75% rename from CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionStubImpl.cpp rename to CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.cpp index 4ca91cd..ad3b27a 100644 --- a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionStubImpl.cpp +++ b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.cpp @@ -3,18 +3,18 @@ // 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 "E08CrcProtectionStubImpl.hpp" +#include "E08CrcProtectionP04StubImpl.hpp" using namespace v1::commonapi::examples; -E08CrcProtectionStubImpl::E08CrcProtectionStubImpl() { +E08CrcProtectionP04StubImpl::E08CrcProtectionP04StubImpl() { cnt = 0; } -E08CrcProtectionStubImpl::~E08CrcProtectionStubImpl() { +E08CrcProtectionP04StubImpl::~E08CrcProtectionP04StubImpl() { } -void E08CrcProtectionStubImpl::incCounter() { +void E08CrcProtectionP04StubImpl::incCounter() { cnt++; CommonTypes::aStruct aOK, aERROR; diff --git a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionStubImpl.hpp b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.hpp similarity index 50% rename from CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionStubImpl.hpp rename to CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.hpp index 0a2a758..cb7debc 100644 --- a/CommonAPI-Examples/E08CrcProtection/src/E08CrcProtectionStubImpl.hpp +++ b/CommonAPI-Examples/E08CrcProtectionP04/src/E08CrcProtectionP04StubImpl.hpp @@ -3,21 +3,21 @@ // 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 E08CRCPROTECTIONSTUBIMPL_HPP_ -#define E08CRCPROTECTIONSTUBIMPL_HPP_ +#ifndef E08CRCPROTECTIONP04STUBIMPL_HPP_ +#define E08CRCPROTECTIONP04STUBIMPL_HPP_ #include -#include +#include -class E08CrcProtectionStubImpl: public v1_0::commonapi::examples::E08CrcProtectionStubDefault { +class E08CrcProtectionP04StubImpl: public v1_0::commonapi::examples::E08CrcProtectionP04StubDefault { public: - E08CrcProtectionStubImpl(); - virtual ~E08CrcProtectionStubImpl(); + E08CrcProtectionP04StubImpl(); + virtual ~E08CrcProtectionP04StubImpl(); virtual void incCounter(); private: int cnt; }; -#endif // E08CRCPROTECTIONSTUBIMPL_HPP_ +#endif // E08CRCPROTECTIONP04STUBIMPL_HPP_ diff --git a/CommonAPI-Examples/E08CrcProtection/vsomeip-client.json b/CommonAPI-Examples/E08CrcProtectionP04/vsomeip-client.json similarity index 100% rename from CommonAPI-Examples/E08CrcProtection/vsomeip-client.json rename to CommonAPI-Examples/E08CrcProtectionP04/vsomeip-client.json diff --git a/CommonAPI-Examples/E08CrcProtection/vsomeip-service.json b/CommonAPI-Examples/E08CrcProtectionP04/vsomeip-service.json similarity index 97% rename from CommonAPI-Examples/E08CrcProtection/vsomeip-service.json rename to CommonAPI-Examples/E08CrcProtectionP04/vsomeip-service.json index 9c42932..93310bf 100644 --- a/CommonAPI-Examples/E08CrcProtection/vsomeip-service.json +++ b/CommonAPI-Examples/E08CrcProtectionP04/vsomeip-service.json @@ -18,7 +18,7 @@ [ { "service" : "0x1234", - "instance" : "0x5678", + "instance" : "0x0001", "reliable" : { "port" : "30499", "enable-magic-cookies" : "false" } } ], diff --git a/CommonAPI-Examples/E09CrcProtectionP01/CMakeLists.txt b/CommonAPI-Examples/E09CrcProtectionP01/CMakeLists.txt new file mode 100644 index 0000000..803a626 --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/CMakeLists.txt @@ -0,0 +1,118 @@ +# Copyright (C) 2023 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(PRJ_NAME E09CrcProtectionP01) + +set(CMAKE_VERBOSE_MAKEFILE on) + +OPTION(USE_FILE "Set to OFF to disable file logging" OFF ) +message(STATUS "USE_FILE is set to value: ${USE_FILE}") + +OPTION(USE_CONSOLE "Set to OFF to disable console logging" OFF ) +message(STATUS "USE_CONSOLE is set to value: ${USE_CONSOLE}") + +IF(USE_FILE) + add_definitions(-DUSE_FILE) +ENDIF(USE_FILE) +IF(USE_CONSOLE) + add_definitions(-DUSE_CONSOLE) +ENDIF(USE_CONSOLE) + +SET(MAX_LOG_LEVEL "DEBUG" CACHE STRING "maximum log level") +message(STATUS "MAX_LOG_LEVEL is set to value: ${MAX_LOG_LEVEL}") +add_definitions(-DCOMMONAPI_LOGLEVEL=COMMONAPI_LOGLEVEL_${MAX_LOG_LEVEL}) + +if (MSVC) +# Visual C++ is not always sure whether he is really C++ +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /EHsc /wd\\\"4503\\\"") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd\\\"4503\\\"") +else() +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O0 -std=c++11 -pthread -D_GLIBCXX_USE_NANOSLEEP") +endif() + +message(STATUS "Compiler options: ${CMAKE_CXX_FLAGS}") + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug" CACHE STRING + "Choose the type of build, options are: Debug Release." FORCE) +endif(NOT CMAKE_BUILD_TYPE) +message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") + +OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version of CommonAPI" ON) +message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}") + +if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON") + FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY) +else() + FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH) +endif() + +message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}") +message(STATUS "COMMONAPI_INCLUDE_DIRS: ${COMMONAPI_INCLUDE_DIRS}") + +# CommonAPI +include(FindPkgConfig) +############################################################################### + +# SOME/IP +find_package (CommonAPI-SomeIP 3.2.0 REQUIRED) +find_package (vsomeip3 3.2.0 REQUIRED) + +# Source Files +set(PRJ_SRC_PATH src) +set(PRJ_SRC_GEN_PATH src-gen) +set(PRJ_SRC_GEN_COMMONAPI_PATH ${PRJ_SRC_GEN_PATH}/core/v1/commonapi/examples) +set(PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH ${PRJ_SRC_GEN_PATH}/someip/v1/commonapi/examples) + +set(PRJ_NAME_CLIENT ${PRJ_NAME}Client) +set(PRJ_NAME_SERVICE ${PRJ_NAME}Service) + +# Application +FILE(GLOB PRJ_PROXY_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Proxy.cpp) +FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Stub*.cpp) +FILE(GLOB PRJ_STUB_IMPL_SRCS ${PRJ_SRC_COMMONAPI_PATH}/*Stub*.cpp) +set(PRJ_CLIENT_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_CLIENT}.cpp ${PRJ_PROXY_GEN_SRCS}) +set(PRJ_SERVICE_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_SERVICE}.cpp ${PRJ_SRC_PATH}/${PRJ_NAME}StubImpl.cpp ${PRJ_STUB_GEN_SRCS} ${PRJ_STUB_IMPL_SRCS}) + +# Boost +find_package( Boost 1.54 COMPONENTS system thread log REQUIRED ) +include_directories( ${Boost_INCLUDE_DIR} ) + +# SOME/IP library +FILE(GLOB PRJ_SOMEIP_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH}/*cpp) + +include_directories( + src-gen/core + src-gen/someip + ${COMMONAPI_INCLUDE_DIRS} + ${COMMONAPI_SOMEIP_INCLUDE_DIRS} + ${VSOMEIP_INCLUDE_DIRS} +) + +link_directories( + ${COMMONAPI_LIBDIR} + ${COMMONAPI_SOMEIP_CMAKE_DIR}/build + ${Boost_LIBRARY_DIR} +) + +if (MSVC) + set(LINK_LIBRARIES CommonAPI) +else() + set(LINK_LIBRARIES -Wl,--as-needed CommonAPI) +endif() + +# Build Client +add_executable(${PRJ_NAME_CLIENT} ${PRJ_CLIENT_SRCS}) +target_link_libraries(${PRJ_NAME_CLIENT} ${LINK_LIBRARIES} ${VSOMEIP_LIBRARIES}) + +# Build service +add_executable(${PRJ_NAME_SERVICE} ${PRJ_SERVICE_SRCS}) +target_link_libraries(${PRJ_NAME_SERVICE} ${LINK_LIBRARIES} ${VSOMEIP_LIBRARIES}) + +# Build SOME/IP library +add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS}) +target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP) diff --git a/CommonAPI-Examples/E09CrcProtectionP01/README.md b/CommonAPI-Examples/E09CrcProtectionP01/README.md new file mode 100644 index 0000000..073a51a --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/README.md @@ -0,0 +1,568 @@ +# Example 9: CRC Protection Using Profile P01 + +This example was created to demonstrate how the e2e implementation can be used on the CommonAPI layer with profile P01, also referenced as CRC8. Please note that this example can only be correctly used if the Service and the Client are running on distinct machines/ECUs. +First consider the Franca IDL specification of example 9 **E09CrcProtectionP01.fidl**: + +```java +package commonapi.examples + +interface E09CrcProtectionP01 { + version { major 1 minor 0 } + + attribute CommonTypes.aStruct aOK + attribute CommonTypes.aStruct aERROR +} + +typeCollection CommonTypes { + version { major 1 minor 0 } + + struct aStruct { + UInt8 CRC8 + UInt8 CRC8Counter + UInt8 value1 + UInt8 value2 + } +} +``` + +The following CRC related fields in the *aStruct* (*CRC8*, *CRC8Counter*) are automatically computed and setted using the required e2e definitions on the .json file. +In this example we will demonstrate how distinct e2e definitions on the configuration file for the service and the client for the *aERROR* attribute lead to a *CallStatus::INVALID_VALUE* on a changed event notification, after a subscription. + +Let's start by the configuration file used for the service **vsomeip-service.json**: + +```json +{ + "unicast" : "172.17.0.2", + "logging" : + { + "level" : "debug", + "console" : "true", + "file" : { "enable" : "false", "path" : "/tmp/vsomeip.log" }, + "dlt" : "false" + }, + "applications" : + [ + { + "name" : "service-sample", + "id" : "0x1277" + } + ], + "services" : + [ + { + "service" : "0x1234", + "instance" : "0x0001", + "reliable" : { "port" : "30499", "enable-magic-cookies" : "false" } + } + ], + "e2e" : + { + "e2e_enabled" : "true", + "protected" : + [ + { + "service_id" : "0x1234", + "event_id" : "0x80e9", + "profile" : "CRC8", + "variant" : "protector", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x1FF" + }, + { + "service_id" : "0x1234", + "event_id" : "0x80ea", + "profile" : "CRC8", + "variant" : "protector", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x1FF" + } + ] + }, + "routing" : "service-sample", + "service-discovery" : + { + "enable" : "true", + "multicast" : "224.244.224.245", + "port" : "30490", + "protocol" : "udp" + } +} +``` + +And bellow the configuration file used for the client **vsomeip-client.json**: + +```json +{ + "unicast" : "172.17.0.3", + "netmask" : "255.255.255.0", + "logging" : + { + "level" : "debug", + "console" : "true", + "file" : { "enable" : "true", "path" : "/var/log/vsomeip.log" }, + "dlt" : "true" + }, + "applications" : + [ + { + "name" : "client-sample", + "id" : "0x1343" + } + ], + "e2e" : + { + "e2e_enabled" : "true", + "protected" : + [ + { + "service_id" : "0x1234", + "event_id" : "0x80e9", + "profile" : "CRC8", + "variant" : "checker", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x1FF" + }, + { + "service_id" : "0x1234", + "event_id" : "0x80ea", + "profile" : "CRC8", + "variant" : "checker", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x000" + } + ] + }, + "routing" : "client-sample", + "service-discovery" : + { + "enable" : "true", + "multicast" : "224.244.224.245", + "port" : "30490", + "protocol" : "udp" + } +} +``` + +Between both it is possible to see, in the e2e definitions, that the *data_id* for the *aERROR* attribute (*event_id 0x80ea*) has distinct values between the service and the client, *0x1FF* vs *0x000*, while the definitions for the *aOK* attribute (*event_id 0x80e9*) match. +Please note that the first definition, *unicast* will need to be adapted to your specific setup. + +Now let's have a look to the CommonAPI code on the service side, that is splitted between the following 3 files: + +* **E09CrcProtectionP01StubImpl.hpp**: +```cpp +#ifndef E09CRCPROTECTIONP01STUBIMPL_HPP_ +#define E09CRCPROTECTIONP01STUBIMPL_HPP_ + +#include +#include + +class E09CrcProtectionP01StubImpl: public v1_0::commonapi::examples::E09CrcProtectionP01StubDefault { + +public: + E09CrcProtectionP01StubImpl(); + virtual ~E09CrcProtectionP01StubImpl(); + virtual void incCounter(); + +private: + int cnt; +}; + +#endif // E09CRCPROTECTIONP01STUBIMPL_HPP_ +``` + +* **E09CrcProtectionP01StubImpl.cpp**: +```cpp +#include "E09CrcProtectionP01StubImpl.hpp" + +using namespace v1::commonapi::examples; + +E09CrcProtectionP01StubImpl::E09CrcProtectionP01StubImpl() { + cnt = 0; +} + +E09CrcProtectionP01StubImpl::~E09CrcProtectionP01StubImpl() { +} + +void E09CrcProtectionP01StubImpl::incCounter() { + cnt++; + + CommonTypes::aStruct aOK, aERROR; + aOK.setValue1((uint8_t)cnt); + aOK.setValue2((uint8_t)cnt+1); + setAOKAttribute(aOK); + + aERROR.setValue1((uint8_t)cnt); + aERROR.setValue2((uint8_t)cnt+2); + setAERRORAttribute(aERROR); + std::cout << "New counter value = " << cnt << "!" << std::endl; +} +``` + +* **E09CrcProtectionP01Service.cpp**: +```cpp +#include +#include + +#include +#include "E09CrcProtectionP01StubImpl.hpp" + +int main() { + CommonAPI::Runtime::setProperty("LogContext", "E09S"); + CommonAPI::Runtime::setProperty("LogApplication", "E09S"); + CommonAPI::Runtime::setProperty("LibraryBase", "E09CrcProtectionP01"); + + std::shared_ptr runtime = CommonAPI::Runtime::get(); + + std::string domain = "local"; + std::string instance = "commonapi.examples.Attributes"; + std::string connection = "service-sample"; + + std::shared_ptr myService = std::make_shared(); + while (!runtime->registerService(domain, instance, myService, connection)) { + std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + + std::cout << "Successfully Registered Service!" << std::endl; + + while (true) { + myService->incCounter(); // Change value of attributes, see stub implementation + std::cout << "Waiting for calls... (Abort with CTRL+C)" << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(5)); + } + return 0; +} +``` + +On these implementations we can see that the service side starts by registering a service and if successful, starts incrementing a counter every 5 seconds that is used to set new values into the attributes *aOK* and *aERROR*. Notice that none of the CRC fields are setted explicitly. + +Now, we move into the implementation for the client side in **E09CrcProtectionP01Client.cpp**: +```cpp +#include +#include + +#ifndef _WIN32 +#include +#endif + +#include +#include +#include + +using namespace v1::commonapi::examples; + +int main() { + CommonAPI::Runtime::setProperty("LogContext", "E09C"); + CommonAPI::Runtime::setProperty("LogApplication", "E09C"); + CommonAPI::Runtime::setProperty("LibraryBase", "E09CrcProtectionP01"); + + std::shared_ptr < CommonAPI::Runtime > runtime = CommonAPI::Runtime::get(); + + std::string domain = "local"; + std::string instance = "commonapi.examples.Attributes"; + std::string connection = "client-sample"; + + auto myProxy = runtime->buildProxyWithDefaultAttributeExtension(domain, instance, connection); + + std::cout << "Waiting for service to become available." << std::endl; + while (!myProxy->isAvailable()) { + std::this_thread::sleep_for(std::chrono::microseconds(10)); + } + + CommonTypes::aStruct aOK, aERROR; + CommonAPI::CallInfo info(1000); + info.sender_ = 1; + + // Subscribe aOK for receiving values + myProxy->getAOKAttribute().getChangedEvent().subscribe( + [&](const CommonTypes::aStruct& val) { + std::cout << "Received change message on aOK:" << std::endl + << "\tCRC: " << static_cast(val.getCRC8()) << std::endl + << "\tID Nibble: " << static_cast(val.getCRC8Counter() >> 4) << std::endl + << "\tCounter: " << static_cast(val.getCRC8Counter() & 0x0F) << std::endl + << "\tvalue1: " << static_cast(val.getValue1()) << std::endl + << "\tvalue2: " << static_cast(val.getValue2()) << std::endl; + }, + [&](const CommonAPI::CallStatus &status) { + if (status == CommonAPI::CallStatus::INVALID_VALUE) { + std::cout << "Subscription (Changed Event) of aOK attribute returned CallStatus==INVALID_VALUE" << std::endl; + // do something... (no eventhandler gets called in case of INVALID_VALUE status) + } else if (status == CommonAPI::CallStatus::SUCCESS) { + std::cout << "Got valid response for aOK Async getter" << std::endl; + } + } + ); + + // Subscribe aERROR for receiving values + myProxy->getAERRORAttribute().getChangedEvent().subscribe( + [&](const CommonTypes::aStruct& val) { + std::cout << "Received change message on aERROR:" << std::endl + << "\tCRC: " << static_cast(val.getCRC8()) << std::endl + << "\tCounter: " << static_cast(val.getCRC8Counter()) << std::endl + << "\tvalue1: " << static_cast(val.getValue1()) << std::endl + << "\tvalue2: " << static_cast(val.getValue2()) << std::endl; + }, + [&](const CommonAPI::CallStatus &status) { + if (status == CommonAPI::CallStatus::INVALID_VALUE) { + std::cout << "Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE" << std::endl; + // do something... (no eventhandler gets called in case of INVALID_VALUE status) + } else if (status == CommonAPI::CallStatus::SUCCESS) { + std::cout << "Got valid response for aERROR Async getter" << std::endl; + } + } + ); + + while (true) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + } +} +``` + +The client, after a successful build of the proxy, uses the *getAOKAttribute* and *getAERRORAttribute* methods to subscribe to change events on the attributes *aOK* and *aERROR*, respectively. Every notification/access returns a flag named *callStatus* (please see the CommonAPI specification), that has the value *SUCCESS* if everything is working as supposed or a different value if not, in this case, it returns an *INVALID_VALUE* if the CRC values do not match between the computed values for the client and for the service. + +Next we will present some logs of the execution of the service and the client on different machines, respectively: +```bash +bmw:/mnt/E09CrcProtectionP01P01$ VSOMEIP_CONFIGURATION=vsomeip-service.json COMMONAPI_CONFIG=$PWD/commonapi4someip.ini LD_LIBRARY_PATH=/lib:$PWD/build build/E09CrcProtectionP01Service +[CAPI][INFO] Loading configuration file '/workspaces/network-workspace/src/capi/capicxx-core-tools/CommonAPI-Examples/E09CrcProtectionP01P01/commonapi4someip.ini' +[CAPI][INFO] Using default binding 'someip' +[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi' +[CAPI][DEBUG] Loading library for local:commonapi.examples.E09CrcProtectionP01:v1_0:commonapi.examples.Attributes stub. +[CAPI][DEBUG] Added address mapping: local:commonapi.examples.E09CrcProtectionP01:v1_0:commonapi.examples.Attributes <--> [1234.0001(1.0)] +[CAPI][VERBOSE] Registering function for creating "commonapi.examples.E09CrcProtectionP01:v1_0" proxy. +[CAPI][INFO] Registering function for creating "commonapi.examples.E09CrcProtectionP01:v1_0" stub adapter. +[CAPI][DEBUG] Loading interface library "libE09CrcProtectionP01-someip.so" succeeded. +[CAPI][INFO] Registering stub for "local:commonapi.examples.E09CrcProtectionP01:v1_0:commonapi.examples.Attributes" +2023-09-22 15:48:43.113251 [info] Using configuration file: "src/capi/capicxx-core-tools/CommonAPI-Examples/E09CrcProtectionP01P01/vsomeip-service.json". +2023-09-22 15:48:43.113572 [info] Parsed vsomeip configuration in 0ms +2023-09-22 15:48:43.113633 [info] Configuration module loaded. +2023-09-22 15:48:43.113678 [info] Initializing vsomeip (3.3.8) application "service-sample". +2023-09-22 15:48:43.113854 [info] Instantiating routing manager [Host]. +2023-09-22 15:48:43.114788 [info] create_routing_root: Routing root @ /tmp/vsomeip-0 +2023-09-22 15:48:43.115443 [info] Service Discovery enabled. Trying to load module. +2023-09-22 15:48:43.116821 [info] Service Discovery module loaded. +2023-09-22 15:48:43.117022 [info] E2E protection enabled. +2023-09-22 15:48:43.117642 [info] E2E module loaded. +2023-09-22 15:48:43.117794 [info] Application(service-sample, 1277) is initialized (11, 100). +2023-09-22 15:48:43.118421 [info] Starting vsomeip application "service-sample" (1277) using 2 threads I/O nice 255 +2023-09-22 15:48:43.119186 [info] Client [1277] routes unicast:172.17.0.2, netmask:255.255.255.0 +2023-09-22 15:48:43.119539 [info] offer_event: Event [1234.0001.80e9] uses configured cycle time 0ms +2023-09-22 15:48:43.119361 [info] main dispatch thread id from application: 1277 (service-sample) is: 7f73b1103700 TID: 540759 +2023-09-22 15:48:43.119188 [info] shutdown thread id from application: 1277 (service-sample) is: 7f73b0902700 TID: 540760 +2023-09-22 15:48:43.119740 [info] REGISTER EVENT(1277): [1234.0001.80e9:is_provider=true] +2023-09-22 15:48:43.120162 [info] Watchdog is disabled! +2023-09-22 15:48:43.120264 [info] offer_event: Event [1234.0001.80ea] uses configured cycle time 0ms +2023-09-22 15:48:43.120332 [info] REGISTER EVENT(1277): [1234.0001.80ea:is_provider=true] +2023-09-22 15:48:43.120491 [info] io thread id from application: 1277 (service-sample) is: 7f73b1904700 TID: 540758 +2023-09-22 15:48:43.120655 [info] OFFER(1277): [1234.0001:1.0] (true) +2023-09-22 15:48:43.120500 [info] io thread id from application: 1277 (service-sample) is: 7f73a37fe700 TID: 540762 +2023-09-22 15:48:43.120996 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:48:43.121477 [info] create_local_server: Listening @ /tmp/vsomeip-1277 +2023-09-22 15:48:43.121467 [info] Network interface "eth0" state changed: up +Successfully Registered Service! +New counter value = 1! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:48:43.122054 [info] Route "default route (0.0.0.0/0) if: eth0 gw: 172.17.0.1" state changed: up +2023-09-22 15:48:43.122566 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490 +2023-09-22 15:48:43.122688 [debug] Joining to multicast group 224.244.224.245 from 172.17.0.2 +2023-09-22 15:48:43.123310 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490 +2023-09-22 15:48:43.123332 [info] SOME/IP routing ready. +2023-09-22 15:48:45.509821 [info] REMOTE SUBSCRIBE(0000): [1234.0001.0001] from 172.17.0.3:46209 reliable was accepted +2023-09-22 15:48:45.511029 [info] REMOTE SUBSCRIBE(0000): [1234.0001.0002] from 172.17.0.3:46209 reliable was accepted +New counter value = 2! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:48:53.123233 [info] vSomeIP 3.3.8 | (default) +New counter value = 3! +Waiting for calls... (Abort with CTRL+C) +New counter value = 4! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:49:03.124752 [info] vSomeIP 3.3.8 | (default) +New counter value = 5! +Waiting for calls... (Abort with CTRL+C) +New counter value = 6! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:49:13.126490 [info] vSomeIP 3.3.8 | (default) +New counter value = 7! +Waiting for calls... (Abort with CTRL+C) +New counter value = 8! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:49:23.128458 [info] vSomeIP 3.3.8 | (default) +New counter value = 9! +Waiting for calls... (Abort with CTRL+C) +New counter value = 10! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:49:33.130217 [info] vSomeIP 3.3.8 | (default) +New counter value = 11! +Waiting for calls... (Abort with CTRL+C) +New counter value = 12! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:49:43.131073 [info] vSomeIP 3.3.8 | (default) +New counter value = 13! +Waiting for calls... (Abort with CTRL+C) +New counter value = 14! +Waiting for calls... (Abort with CTRL+C) +2023-09-22 15:49:53.131988 [info] vSomeIP 3.3.8 | (default) +New counter value = 15! +Waiting for calls... (Abort with CTRL+C) +New counter value = 16! +Waiting for calls... (Abort with CTRL+C) +``` + +```bash +bmw:~/Documents/commonapi-core-generator/CommonAPI-Examples/E09CrcProtectionP01P01$ VSOMEIP_CONFIGURATION=vsomeip-client.json COMMONAPI_CONFIG=$PWD/commonapi4someip.ini LD_LIBRARY_PATH=../../../install_folder/lib:$PWD/build build/E09CrcProtectionP01Client +[CAPI][INFO] Loading configuration file '/workspaces/network-workspace/src/capi/capicxx-core-tools/CommonAPI-Examples/E09CrcProtectionP01P01/commonapi4someip.ini' +[CAPI][INFO] Using default binding 'someip' +[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi' +[CAPI][DEBUG] Loading library for local:commonapi.examples.E09CrcProtectionP01:v1_0:commonapi.examples.Attributes proxy. +[CAPI][DEBUG] Added address mapping: local:commonapi.examples.E09CrcProtectionP01:v1_0:commonapi.examples.Attributes <--> [1234.0001(1.0)] +[CAPI][VERBOSE] Registering function for creating "commonapi.examples.E09CrcProtectionP01:v1_0" proxy. +[CAPI][INFO] Registering function for creating "commonapi.examples.E09CrcProtectionP01:v1_0" stub adapter. +[CAPI][DEBUG] Loading interface library "libE09CrcProtectionP01-someip.so" succeeded. +[CAPI][VERBOSE] Creating proxy for "local:commonapi.examples.E09CrcProtectionP01:v1_0:commonapi.examples.Attributes" +2023-09-22 15:48:38.807363 [info] Using configuration file: "src/capi/capicxx-core-tools/CommonAPI-Examples/E09CrcProtectionP01P01/vsomeip-client.json". +2023-09-22 15:48:38.808003 [info] Parsed vsomeip configuration in 0ms +2023-09-22 15:48:38.808125 [info] Configuration module loaded. +2023-09-22 15:48:38.808232 [info] Initializing vsomeip (3.3.8) application "client-sample". +2023-09-22 15:48:38.808479 [info] Instantiating routing manager [Host]. +2023-09-22 15:48:38.810178 [info] create_routing_root: Routing root @ /tmp/vsomeip-0 +2023-09-22 15:48:38.811300 [info] Service Discovery enabled. Trying to load module. +2023-09-22 15:48:38.813222 [info] Service Discovery module loaded. +2023-09-22 15:48:38.813607 [info] E2E protection enabled. +2023-09-22 15:48:38.814441 [info] E2E module loaded. +2023-09-22 15:48:38.814699 [info] Application(client-sample, 1343) is initialized (11, 100). +2023-09-22 15:48:38.815996 [info] Starting vsomeip application "client-sample" (1343) using 2 threads I/O nice 255 +2023-09-22 15:48:38.816633 [info] REGISTER EVENT(1343): [1234.0001.80e9:is_provider=false] +2023-09-22 15:48:38.816821 [info] Client [1343] routes unicast:172.17.0.3, netmask:255.255.255.0 +2023-09-22 15:48:38.816940 [info] REGISTER EVENT(1343): [1234.0001.80ea:is_provider=false] +2023-09-22 15:48:38.816814 [info] shutdown thread id from application: 1343 (client-sample) is: 7f4283fff700 TID: 220990 +2023-09-22 15:48:38.816712 [info] main dispatch thread id from application: 1343 (client-sample) is: 7f4288d84700 TID: 220989 +2023-09-22 15:48:38.817224 [info] REQUEST(1343): [1234.0001:1.4294967295] +2023-09-22 15:48:38.817960 [info] Watchdog is disabled! +2023-09-22 15:48:38.818373 [info] io thread id from application: 1343 (client-sample) is: 7f4289585700 TID: 220988 +2023-09-22 15:48:38.818403 [info] io thread id from application: 1343 (client-sample) is: 7f4282ffd700 TID: 220992 +2023-09-22 15:48:38.818806 [info] create_local_server: Listening @ /tmp/vsomeip-1343 +2023-09-22 15:48:38.819053 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:48:38.819421 [info] Network interface "eth0" state changed: up +2023-09-22 15:48:38.819794 [info] Route "default route (0.0.0.0/0) if: eth0 gw: 172.17.0.1" state changed: up +2023-09-22 15:48:38.820132 [info] SUBSCRIBE(1343): [1234.0001.0001:80e9:1] +2023-09-22 15:48:38.820200 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490 +2023-09-22 15:48:38.820299 [info] notify_one_unlocked: Notifying 1234.1.80e9 to client 1343 failed. Event payload not set! +2023-09-22 15:48:38.820428 [debug] Joining to multicast group 224.244.224.245 from 172.17.0.3 +2023-09-22 15:48:38.820599 [info] SUBSCRIBE(1343): [1234.0001.0002:80ea:1] +2023-09-22 15:48:38.820633 [info] SOME/IP routing ready. +2023-09-22 15:48:38.820712 [info] notify_one_unlocked: Notifying 1234.1.80ea to client 1343 failed. Event payload not set! +Waiting for service to become available. +2023-09-22 15:48:38.821086 [info] udp_server_endpoint_impl: SO_RCVBUF is: 212992 (1703936) local port:30490 +2023-09-22 15:48:45.475193 [info] endpoint_manager_impl::create_remote_client: 172.17.0.2:30499 reliable: 1 using local port: 0 +Got valid response for aOK Async getter +Got valid response for aERROR Async getter +2023-09-22 15:48:45.561813 [info] E2E protection: CRC8 does not match: calculated CRC: 70 received CRC: 9f +2023-09-22 15:48:45.562050 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Received change message on aOK: + CRC: 130 + ID Nibble: 1 + Counter: 2 + value1: 1 + value2: 2 +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:48:48.819654 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:48:48.176039 [info] E2E protection: CRC8 does not match: calculated CRC: 78 received CRC: 97 +2023-09-22 15:48:48.176486 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Received change message on aOK: + CRC: 196 + ID Nibble: 1 + Counter: 3 + value1: 2 + value2: 3 +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:48:53.178855 [info] E2E protection: CRC8 does not match: calculated CRC: a3 received CRC: 4c +2023-09-22 15:48:53.179734 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Received change message on aOK: + CRC: 81 + ID Nibble: 1 + Counter: 4 + value1: 3 + value2: 4 +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:48:58.820747 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:48:58.179910 [info] E2E protection: CRC8 does not match: calculated CRC: f2 received CRC: 1d +Received change message on aOK: + CRC: 58 + ID Nibble: 1 + Counter: 5 + value1: 4 + value2: 5 +2023-09-22 15:48:58.180382 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +. +. +. +. +2023-09-22 15:49:33.197830 [info] E2E protection: CRC8 does not match: calculated CRC: 1d received CRC: f2 +Received change message on aOK: + CRC: 239 + ID Nibble: 1 + Counter: 12 + value1: 11 + value2: 12 +2023-09-22 15:49:33.198746 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:49:38.825198 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:49:38.198628 [info] E2E protection: CRC8 does not match: calculated CRC: 4c received CRC: a3 +Received change message on aOK: + CRC: 132 + ID Nibble: 1 + Counter: 13 + value1: 12 + value2: 13 +2023-09-22 15:49:38.199328 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:49:43.203916 [info] E2E protection: CRC8 does not match: calculated CRC: 91 received CRC: 7e +Received change message on aOK: + CRC: 99 + ID Nibble: 1 + Counter: 14 + value1: 13 + value2: 14 +2023-09-22 15:49:43.205027 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:49:48.826064 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:49:48.204628 [info] E2E protection: CRC8 does not match: calculated CRC: 3a received CRC: d5 +2023-09-22 15:49:48.205570 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Received change message on aOK: + CRC: 163 + ID Nibble: 1 + Counter: 0 + value1: 14 + value2: 15 +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:49:53.209003 [info] E2E protection: CRC8 does not match: calculated CRC: e4 received CRC: b +2023-09-22 15:49:53.210144 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Received change message on aOK: + CRC: 22 + ID Nibble: 1 + Counter: 1 + value1: 15 + value2: 16 +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +2023-09-22 15:49:58.827399 [info] vSomeIP 3.3.8 | (default) +2023-09-22 15:49:58.209297 [info] E2E protection: CRC8 does not match: calculated CRC: 58 received CRC: b7 +2023-09-22 15:49:58.210355 [info] E2E protection: CRC check failed for service: 1234 method: 80ea +Received change message on aOK: + CRC: 144 + ID Nibble: 1 + Counter: 2 + value1: 16 + value2: 17 +Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE +``` + +On the Client side we can see, that even though both subscriptions receive a valid response, on every change event notification, it is possible to obtain the *aOK* attribute values, including the automatically set CRC values, but the notification for the *aERROR* attribute always returns an *INVALID_VALUE*, due to the CRC check failed for this method. +We can also check from the client logs that the counter rolls over after it reaches 14 and, for this specific mode ("data_id_mode" : "3"), the low nibble of the high byte from the Data ID field. \ No newline at end of file diff --git a/CommonAPI-Examples/E09CrcProtectionP01/commonapi4someip.ini b/CommonAPI-Examples/E09CrcProtectionP01/commonapi4someip.ini new file mode 100644 index 0000000..9d2e519 --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/commonapi4someip.ini @@ -0,0 +1,8 @@ +[default] +binding=someip + +[logging] +console = true +file = ./mylog.log +dlt = true +level = verbose diff --git a/CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01-SomeIP.fdepl b/CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01-SomeIP.fdepl new file mode 100644 index 0000000..e4dcd49 --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01-SomeIP.fdepl @@ -0,0 +1,48 @@ +/* Copyright (C) 2023 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/. */ + +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "E09CrcProtectionP01.fidl" + +define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E09CrcProtectionP01 { + SomeIpServiceID = 4660 + + attribute aOK { + SomeIpGetterID = 3001 + SomeIpSetterID = 3002 + SomeIpNotifierID = 33001 + SomeIpNotifierEventGroups = { 1 } + + SomeIpAttributeReliable = true + } + + attribute aERROR { + SomeIpGetterID = 3003 + SomeIpSetterID = 3004 + SomeIpNotifierID = 33002 + SomeIpNotifierEventGroups = { 2 } + + SomeIpAttributeReliable = true + } +} + +define org.genivi.commonapi.someip.deployment for typeCollection commonapi.examples.CommonTypes { + + struct aStruct { + } + +} + +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.examples.E09CrcProtectionP01 { + InstanceId = "commonapi.examples.Attributes" + + SomeIpInstanceID = 1 + + SomeIpUnicastAddress = "192.168.0.2" + SomeIpReliableUnicastPort = 30509 + SomeIpUnreliableUnicastPort = 0 + } +} diff --git a/CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01.fidl b/CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01.fidl new file mode 100644 index 0000000..d3d233d --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/fidl/E09CrcProtectionP01.fidl @@ -0,0 +1,24 @@ +/* Copyright (C) 2023 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/. */ + +package commonapi.examples + +interface E09CrcProtectionP01 { + version { major 1 minor 0 } + + attribute CommonTypes.aStruct aOK + attribute CommonTypes.aStruct aERROR +} + +typeCollection CommonTypes { + version { major 1 minor 0 } + + struct aStruct { + UInt8 CRC8 + UInt8 CRC8Counter + UInt8 value1 + UInt8 value2 + } +} diff --git a/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Client.cpp b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Client.cpp new file mode 100644 index 0000000..b9edb55 --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Client.cpp @@ -0,0 +1,83 @@ +// Copyright (C) 2023 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 +#include + +#ifndef _WIN32 +#include +#endif + +#include +#include +#include + +using namespace v1::commonapi::examples; + +int main() { + CommonAPI::Runtime::setProperty("LogContext", "E09C"); + CommonAPI::Runtime::setProperty("LogApplication", "E09C"); + CommonAPI::Runtime::setProperty("LibraryBase", "E09CrcProtectionP01"); + + std::shared_ptr < CommonAPI::Runtime > runtime = CommonAPI::Runtime::get(); + + std::string domain = "local"; + std::string instance = "commonapi.examples.Attributes"; + std::string connection = "client-sample"; + + auto myProxy = runtime->buildProxyWithDefaultAttributeExtension(domain, instance, connection); + + std::cout << "Waiting for service to become available." << std::endl; + while (!myProxy->isAvailable()) { + std::this_thread::sleep_for(std::chrono::microseconds(10)); + } + + CommonTypes::aStruct aOK, aERROR; + CommonAPI::CallInfo info(1000); + info.sender_ = 1; + + // Subscribe aOK for receiving values + myProxy->getAOKAttribute().getChangedEvent().subscribe( + [&](const CommonTypes::aStruct& val) { + std::cout << "Received change message on aOK:" << std::endl + << "\tCRC: " << static_cast(val.getCRC8()) << std::endl + << "\tID Nibble: " << static_cast(val.getCRC8Counter() >> 4) << std::endl + << "\tCounter: " << static_cast(val.getCRC8Counter() & 0x0F) << std::endl + << "\tvalue1: " << static_cast(val.getValue1()) << std::endl + << "\tvalue2: " << static_cast(val.getValue2()) << std::endl; + }, + [&](const CommonAPI::CallStatus &status) { + if (status == CommonAPI::CallStatus::INVALID_VALUE) { + std::cout << "Subscription (Changed Event) of aOK attribute returned CallStatus==INVALID_VALUE" << std::endl; + // do something... (no eventhandler gets called in case of INVALID_VALUE status) + } else if (status == CommonAPI::CallStatus::SUCCESS) { + std::cout << "Got valid response for aOK Async getter" << std::endl; + } + } + ); + + // Subscribe aERROR for receiving values + myProxy->getAERRORAttribute().getChangedEvent().subscribe( + [&](const CommonTypes::aStruct& val) { + std::cout << "Received change message on aERROR:" << std::endl + << "\tCRC: " << static_cast(val.getCRC8()) << std::endl + << "\tCounter: " << static_cast(val.getCRC8Counter()) << std::endl + << "\tvalue1: " << static_cast(val.getValue1()) << std::endl + << "\tvalue2: " << static_cast(val.getValue2()) << std::endl; + }, + [&](const CommonAPI::CallStatus &status) { + if (status == CommonAPI::CallStatus::INVALID_VALUE) { + std::cout << "Subscription (Changed Event) of aERROR attribute returned CallStatus==INVALID_VALUE" << std::endl; + // do something... (no eventhandler gets called in case of INVALID_VALUE status) + } else if (status == CommonAPI::CallStatus::SUCCESS) { + std::cout << "Got valid response for aERROR Async getter" << std::endl; + } + } + ); + + while (true) { + std::this_thread::sleep_for(std::chrono::seconds(1)); + } +} diff --git a/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Service.cpp b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Service.cpp new file mode 100644 index 0000000..fe0579e --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01Service.cpp @@ -0,0 +1,37 @@ +// Copyright (C) 2023 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 +#include + +#include +#include "E09CrcProtectionP01StubImpl.hpp" + +int main() { + CommonAPI::Runtime::setProperty("LogContext", "E09S"); + CommonAPI::Runtime::setProperty("LogApplication", "E09S"); + CommonAPI::Runtime::setProperty("LibraryBase", "E09CrcProtectionP01"); + + std::shared_ptr runtime = CommonAPI::Runtime::get(); + + std::string domain = "local"; + std::string instance = "commonapi.examples.Attributes"; + std::string connection = "service-sample"; + + std::shared_ptr myService = std::make_shared(); + while (!runtime->registerService(domain, instance, myService, connection)) { + std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl; + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + + std::cout << "Successfully Registered Service!" << std::endl; + + while (true) { + myService->incCounter(); // Change value of attributes, see stub implementation + std::cout << "Waiting for calls... (Abort with CTRL+C)" << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(5)); + } + return 0; +} diff --git a/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.cpp b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.cpp new file mode 100644 index 0000000..0d5bd2b --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.cpp @@ -0,0 +1,29 @@ +// Copyright (C) 2023 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 "E09CrcProtectionP01StubImpl.hpp" + +using namespace v1::commonapi::examples; + +E09CrcProtectionP01StubImpl::E09CrcProtectionP01StubImpl() { + cnt = 0; +} + +E09CrcProtectionP01StubImpl::~E09CrcProtectionP01StubImpl() { +} + +void E09CrcProtectionP01StubImpl::incCounter() { + cnt++; + + CommonTypes::aStruct aOK, aERROR; + aOK.setValue1((uint8_t)cnt); + aOK.setValue2((uint8_t)cnt+1); + setAOKAttribute(aOK); + + aERROR.setValue1((uint8_t)cnt); + aERROR.setValue2((uint8_t)cnt+2); + setAERRORAttribute(aERROR); + std::cout << "New counter value = " << cnt << "!" << std::endl; +} diff --git a/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.hpp b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.hpp new file mode 100644 index 0000000..8ff46a9 --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/src/E09CrcProtectionP01StubImpl.hpp @@ -0,0 +1,23 @@ +// Copyright (C) 2023 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 E09CRCPROTECTIONP01STUBIMPL_HPP_ +#define E09CRCPROTECTIONP01STUBIMPL_HPP_ + +#include +#include + +class E09CrcProtectionP01StubImpl: public v1_0::commonapi::examples::E09CrcProtectionP01StubDefault { + +public: + E09CrcProtectionP01StubImpl(); + virtual ~E09CrcProtectionP01StubImpl(); + virtual void incCounter(); + +private: + int cnt; +}; + +#endif // E09CRCPROTECTIONP01STUBIMPL_HPP_ diff --git a/CommonAPI-Examples/E09CrcProtectionP01/vsomeip-client.json b/CommonAPI-Examples/E09CrcProtectionP01/vsomeip-client.json new file mode 100644 index 0000000..b4c7786 --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/vsomeip-client.json @@ -0,0 +1,53 @@ +{ + "unicast" : "172.17.0.3", + "netmask" : "255.255.255.0", + "logging" : + { + "level" : "debug", + "console" : "true", + "file" : { "enable" : "false", "path" : "/var/log/vsomeip-client.log" }, + "dlt" : "false" + }, + "applications" : + [ + { + "name" : "client-sample", + "id" : "0x1343" + } + ], + "e2e" : + { + "e2e_enabled" : "true", + "protected" : + [ + { + "service_id" : "0x1234", + "event_id" : "0x80e9", + "profile" : "CRC8", + "variant" : "checker", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x1FF" + }, + { + "service_id" : "0x1234", + "event_id" : "0x80ea", + "profile" : "CRC8", + "variant" : "checker", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x000" + } + ] + }, + "routing" : "client-sample", + "service-discovery" : + { + "enable" : "true", + "multicast" : "224.244.224.245", + "port" : "30490", + "protocol" : "udp" + } +} diff --git a/CommonAPI-Examples/E09CrcProtectionP01/vsomeip-service.json b/CommonAPI-Examples/E09CrcProtectionP01/vsomeip-service.json new file mode 100644 index 0000000..aff643c --- /dev/null +++ b/CommonAPI-Examples/E09CrcProtectionP01/vsomeip-service.json @@ -0,0 +1,60 @@ +{ + "unicast" : "172.17.0.2", + "logging" : + { + "level" : "debug", + "console" : "true", + "file" : { "enable" : "false", "path" : "/var/log/vsomeip-service.log" }, + "dlt" : "false" + }, + "applications" : + [ + { + "name" : "service-sample", + "id" : "0x1277" + } + ], + "services" : + [ + { + "service" : "0x1234", + "instance" : "0x0001", + "reliable" : { "port" : "30499", "enable-magic-cookies" : "false" } + } + ], + "e2e" : + { + "e2e_enabled" : "true", + "protected" : + [ + { + "service_id" : "0x1234", + "event_id" : "0x80e9", + "profile" : "CRC8", + "variant" : "protector", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x1FF" + }, + { + "service_id" : "0x1234", + "event_id" : "0x80ea", + "profile" : "CRC8", + "variant" : "protector", + "crc_offset" : "0", + "data_id_mode" : "3", + "data_length" : "24", + "data_id" : "0x1FF" + } + ] + }, + "routing" : "service-sample", + "service-discovery" : + { + "enable" : "true", + "multicast" : "224.244.224.245", + "port" : "30490", + "protocol" : "udp" + } +} diff --git a/docx/.cproject b/docx/.cproject deleted file mode 100644 index 2a263f8..0000000 --- a/docx/.cproject +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docx/.project b/docx/.project deleted file mode 100644 index b123719..0000000 --- a/docx/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - CommonAPI-Tools.docx - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - diff --git a/org.genivi.commonapi.console.feature/.gitignore b/org.genivi.commonapi.console.feature/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.console.feature/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.console.feature/.project b/org.genivi.commonapi.console.feature/.project deleted file mode 100644 index 1e578d5..0000000 --- a/org.genivi.commonapi.console.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.genivi.commonapi.console.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/org.genivi.commonapi.console.feature/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.console.feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.console.feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.console.feature/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.console.feature/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.console.feature/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.console.feature/feature.xml b/org.genivi.commonapi.console.feature/feature.xml index 9044d61..c7c60c1 100644 --- a/org.genivi.commonapi.console.feature/feature.xml +++ b/org.genivi.commonapi.console.feature/feature.xml @@ -2,7 +2,7 @@ @@ -18,7 +18,7 @@ - + commonapi org.genivi.commonapi.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.releng \ No newline at end of file diff --git a/org.genivi.commonapi.console.franca.feature/.gitignore b/org.genivi.commonapi.console.franca.feature/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.console.franca.feature/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.console.franca.feature/.project b/org.genivi.commonapi.console.franca.feature/.project deleted file mode 100644 index 7e49c65..0000000 --- a/org.genivi.commonapi.console.franca.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.genivi.commonapi.console.franca.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.console.franca.feature/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.console.franca.feature/feature.xml b/org.genivi.commonapi.console.franca.feature/feature.xml index 2d3b536..862da2d 100644 --- a/org.genivi.commonapi.console.franca.feature/feature.xml +++ b/org.genivi.commonapi.console.franca.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.genivi.commonapi.console.franca.feature/pom.xml b/org.genivi.commonapi.console.franca.feature/pom.xml index c58a039..980b0b8 100644 --- a/org.genivi.commonapi.console.franca.feature/pom.xml +++ b/org.genivi.commonapi.console.franca.feature/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.releng \ No newline at end of file diff --git a/org.genivi.commonapi.console/.classpath b/org.genivi.commonapi.console/.classpath deleted file mode 100644 index eca7bdb..0000000 --- a/org.genivi.commonapi.console/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.genivi.commonapi.console/.gitignore b/org.genivi.commonapi.console/.gitignore deleted file mode 100644 index 4cc0812..0000000 --- a/org.genivi.commonapi.console/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bin/ -/target diff --git a/org.genivi.commonapi.console/.project b/org.genivi.commonapi.console/.project deleted file mode 100644 index 30db1b5..0000000 --- a/org.genivi.commonapi.console/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.genivi.commonapi.console - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.genivi.commonapi.console/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.console/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.console/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.console/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.console/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.console/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.console/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.console/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 47262eb..0000000 --- a/org.genivi.commonapi.console/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,19 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=abort -org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/org.genivi.commonapi.console/.settings/org.eclipse.jdt.launching.prefs b/org.genivi.commonapi.console/.settings/org.eclipse.jdt.launching.prefs deleted file mode 100644 index d211d32..0000000 --- a/org.genivi.commonapi.console/.settings/org.eclipse.jdt.launching.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/org.genivi.commonapi.console/META-INF/MANIFEST.MF b/org.genivi.commonapi.console/META-INF/MANIFEST.MF index 8264081..ec772c0 100644 --- a/org.genivi.commonapi.console/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.console/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI CommonAPI Console Bundle-SymbolicName: org.genivi.commonapi.console;singleton:=true -Bundle-Version: 3.2.14.qualifier +Bundle-Version: 3.2.15.qualifier Bundle-Vendor: BMW AG Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.8.0,4.0.0)";visibility:=reexport, org.apache.commons.cli;bundle-version="[1.2.0,2.0.0)";visibility:=reexport, diff --git a/org.genivi.commonapi.console/about.mappings b/org.genivi.commonapi.console/about.mappings index ac6eba3..6a18401 100644 --- a/org.genivi.commonapi.console/about.mappings +++ b/org.genivi.commonapi.console/about.mappings @@ -1,3 +1,3 @@ -0=3.2.14 -1=20230803 +0=3.2.15 +1=20240402 2=$sun.arch.data.model$ diff --git a/org.genivi.commonapi.console/pom.xml b/org.genivi.commonapi.console/pom.xml index ca5552f..422151c 100644 --- a/org.genivi.commonapi.console/pom.xml +++ b/org.genivi.commonapi.console/pom.xml @@ -8,7 +8,7 @@ commonapi org.genivi.commonapi.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.releng diff --git a/org.genivi.commonapi.core.cli.feature/.gitignore b/org.genivi.commonapi.core.cli.feature/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.core.cli.feature/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.core.cli.feature/.project b/org.genivi.commonapi.core.cli.feature/.project deleted file mode 100644 index 9273e3c..0000000 --- a/org.genivi.commonapi.core.cli.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.genivi.commonapi.core.cli.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.cli.feature/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.cli.feature/feature.xml b/org.genivi.commonapi.core.cli.feature/feature.xml index a6641be..bdb3e42 100644 --- a/org.genivi.commonapi.core.cli.feature/feature.xml +++ b/org.genivi.commonapi.core.cli.feature/feature.xml @@ -2,7 +2,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.cli.product/.gitignore b/org.genivi.commonapi.core.cli.product/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.core.cli.product/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.core.cli.product/.project b/org.genivi.commonapi.core.cli.product/.project deleted file mode 100644 index cb84653..0000000 --- a/org.genivi.commonapi.core.cli.product/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - org.genivi.commonapi.core.cli.product - - - - - - - - \ No newline at end of file diff --git a/org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.cli.product/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.cli.product/category.xml b/org.genivi.commonapi.core.cli.product/category.xml index 3e22ed4..2edd410 100644 --- a/org.genivi.commonapi.core.cli.product/category.xml +++ b/org.genivi.commonapi.core.cli.product/category.xml @@ -1,9 +1,9 @@ - + - + diff --git a/org.genivi.commonapi.core.cli.product/commonapi_console.product b/org.genivi.commonapi.core.cli.product/commonapi_console.product index 48eaa4e..5a32c04 100644 --- a/org.genivi.commonapi.core.cli.product/commonapi_console.product +++ b/org.genivi.commonapi.core.cli.product/commonapi_console.product @@ -1,7 +1,7 @@ - + diff --git a/org.genivi.commonapi.core.cli.product/pom.xml b/org.genivi.commonapi.core.cli.product/pom.xml index 959de93..bebef31 100644 --- a/org.genivi.commonapi.core.cli.product/pom.xml +++ b/org.genivi.commonapi.core.cli.product/pom.xml @@ -144,7 +144,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.cli/.classpath b/org.genivi.commonapi.core.cli/.classpath deleted file mode 100644 index eca7bdb..0000000 --- a/org.genivi.commonapi.core.cli/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.genivi.commonapi.core.cli/.gitignore b/org.genivi.commonapi.core.cli/.gitignore deleted file mode 100644 index ad19da6..0000000 --- a/org.genivi.commonapi.core.cli/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -/bin -/target diff --git a/org.genivi.commonapi.core.cli/.project b/org.genivi.commonapi.core.cli/.project deleted file mode 100644 index aec6f21..0000000 --- a/org.genivi.commonapi.core.cli/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.genivi.commonapi.core.cli - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.genivi.commonapi.core.cli/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.cli/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.cli/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.cli/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.cli/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.cli/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.cli/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.core.cli/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 0c68a61..0000000 --- a/org.genivi.commonapi.core.cli/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.genivi.commonapi.core.cli/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.genivi.commonapi.core.cli/.settings/org.eclipse.ltk.core.refactoring.prefs deleted file mode 100644 index b196c64..0000000 --- a/org.genivi.commonapi.core.cli/.settings/org.eclipse.ltk.core.refactoring.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF b/org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF index 61d721c..2f4a764 100644 --- a/org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF @@ -2,14 +2,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI CommonAPI Core Console Interface Bundle-SymbolicName: org.genivi.commonapi.core.cli;singleton:=true -Bundle-Version: 3.2.14.qualifier +Bundle-Version: 3.2.15.qualifier Bundle-Activator: org.genivi.commonapi.core.cli.Activator Require-Bundle: org.eclipse.core.runtime, org.eclipse.xtext;bundle-version="[2.7.0,3.0.0)";visibility:=reexport, org.franca.core.dsl;bundle-version="[0.13.1,0.14.0)";visibility:=reexport, org.franca.deploymodel.dsl;bundle-version="[0.13.1,0.14.0)";visibility:=reexport, - org.genivi.commonapi.core;bundle-version="3.2.14";visibility:=reexport, - org.genivi.commonapi.console;bundle-version="3.2.14" + org.genivi.commonapi.core;bundle-version="3.2.15";visibility:=reexport, + org.genivi.commonapi.console;bundle-version="3.2.15" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: BMW AG diff --git a/org.genivi.commonapi.core.cli/pom.xml b/org.genivi.commonapi.core.cli/pom.xml index 1cecb01..f042f72 100644 --- a/org.genivi.commonapi.core.cli/pom.xml +++ b/org.genivi.commonapi.core.cli/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.feature/.gitignore b/org.genivi.commonapi.core.feature/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.core.feature/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.core.feature/.project b/org.genivi.commonapi.core.feature/.project deleted file mode 100644 index d1e9a36..0000000 --- a/org.genivi.commonapi.core.feature/.project +++ /dev/null @@ -1,19 +0,0 @@ - - - org.genivi.commonapi.core.feature - - - org.genivi.commonapi.core - org.genivi.commonapi.core.ui - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/org.genivi.commonapi.core.feature/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.feature/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.feature/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.feature/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.feature/feature.xml b/org.genivi.commonapi.core.feature/feature.xml index 6dbd383..b82b409 100644 --- a/org.genivi.commonapi.core.feature/feature.xml +++ b/org.genivi.commonapi.core.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.genivi.commonapi.core.feature/pom.xml b/org.genivi.commonapi.core.feature/pom.xml index 560b7d4..ea9058c 100644 --- a/org.genivi.commonapi.core.feature/pom.xml +++ b/org.genivi.commonapi.core.feature/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.releng/.gitignore b/org.genivi.commonapi.core.releng/.gitignore deleted file mode 100644 index b25c15b..0000000 --- a/org.genivi.commonapi.core.releng/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/org.genivi.commonapi.core.releng/.project b/org.genivi.commonapi.core.releng/.project deleted file mode 100644 index 00b1a97..0000000 --- a/org.genivi.commonapi.core.releng/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - org.genivi.commonapi.core.releng - - - - - - - - \ No newline at end of file diff --git a/org.genivi.commonapi.core.releng/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.releng/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.releng/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.releng/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.releng/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.releng/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.releng/pom.xml b/org.genivi.commonapi.core.releng/pom.xml index 5656f64..05bcbce 100644 --- a/org.genivi.commonapi.core.releng/pom.xml +++ b/org.genivi.commonapi.core.releng/pom.xml @@ -22,7 +22,7 @@ commonapi org.genivi.commonapi.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.releng diff --git a/org.genivi.commonapi.core.target/.gitignore b/org.genivi.commonapi.core.target/.gitignore deleted file mode 100644 index b25c15b..0000000 --- a/org.genivi.commonapi.core.target/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/org.genivi.commonapi.core.target/.project b/org.genivi.commonapi.core.target/.project deleted file mode 100644 index cc11d87..0000000 --- a/org.genivi.commonapi.core.target/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - org.genivi.commonapi.core.target - - - - - - - - \ No newline at end of file diff --git a/org.genivi.commonapi.core.target/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.target/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.target/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.target/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.target/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.target/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.target/pom.xml b/org.genivi.commonapi.core.target/pom.xml index 0ca305e..9c45cb0 100644 --- a/org.genivi.commonapi.core.target/pom.xml +++ b/org.genivi.commonapi.core.target/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng \ No newline at end of file diff --git a/org.genivi.commonapi.core.ui/.classpath b/org.genivi.commonapi.core.ui/.classpath deleted file mode 100644 index eca7bdb..0000000 --- a/org.genivi.commonapi.core.ui/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.genivi.commonapi.core.ui/.gitignore b/org.genivi.commonapi.core.ui/.gitignore deleted file mode 100644 index ad19da6..0000000 --- a/org.genivi.commonapi.core.ui/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -/bin -/target diff --git a/org.genivi.commonapi.core.ui/.project b/org.genivi.commonapi.core.ui/.project deleted file mode 100644 index d7e4e17..0000000 --- a/org.genivi.commonapi.core.ui/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.genivi.commonapi.core.ui - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.genivi.commonapi.core.ui/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.ui/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.ui/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.ui/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.ui/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.ui/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.ui/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.core.ui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 0c68a61..0000000 --- a/org.genivi.commonapi.core.ui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF b/org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF index b4bb3f7..6c1e3da 100644 --- a/org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI CommonAPI Core UI Bundle-SymbolicName: org.genivi.commonapi.core.ui;singleton:=true -Bundle-Version: 3.2.14.qualifier +Bundle-Version: 3.2.15.qualifier Bundle-Activator: org.genivi.commonapi.core.ui.CommonApiUiPlugin Bundle-Vendor: BMW AG Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.10.0,4.0.0)";visibility:=reexport, @@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.10.0,4.0.0)";visibil org.eclipse.xtext.builder;bundle-version="[2.7.0,3.0.0)";visibility:=reexport, org.eclipse.xtext.generator;bundle-version="[2.7.0,3.0.0)";visibility:=reexport, com.google.inject;bundle-version="[5.0.1,6.0.0)";visibility:=reexport, - org.genivi.commonapi.core;bundle-version="3.2.14";visibility:=reexport, + org.genivi.commonapi.core;bundle-version="3.2.15";visibility:=reexport, org.franca.core.dsl.ui;bundle-version="[0.13.1,0.14.0)", org.franca.deploymodel.dsl.ui;bundle-version="[0.13.1,0.14.0)", org.eclipse.ui.console;bundle-version="[3.5.0,4.0.0)" diff --git a/org.genivi.commonapi.core.ui/pom.xml b/org.genivi.commonapi.core.ui/pom.xml index a309f32..62555cd 100644 --- a/org.genivi.commonapi.core.ui/pom.xml +++ b/org.genivi.commonapi.core.ui/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.updatesite/.gitignore b/org.genivi.commonapi.core.updatesite/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.core.updatesite/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.core.updatesite/.project b/org.genivi.commonapi.core.updatesite/.project deleted file mode 100644 index 220eba6..0000000 --- a/org.genivi.commonapi.core.updatesite/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - org.genivi.commonapi.core.updatesite - - - - - - - - \ No newline at end of file diff --git a/org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.updatesite/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.updatesite/category.xml b/org.genivi.commonapi.core.updatesite/category.xml index f467a49..bb674e0 100644 --- a/org.genivi.commonapi.core.updatesite/category.xml +++ b/org.genivi.commonapi.core.updatesite/category.xml @@ -1,9 +1,9 @@ - + - + diff --git a/org.genivi.commonapi.core.updatesite/pom.xml b/org.genivi.commonapi.core.updatesite/pom.xml index 07bddef..d9543a2 100644 --- a/org.genivi.commonapi.core.updatesite/pom.xml +++ b/org.genivi.commonapi.core.updatesite/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng \ No newline at end of file diff --git a/org.genivi.commonapi.core.validator.feature/.gitignore b/org.genivi.commonapi.core.validator.feature/.gitignore deleted file mode 100644 index 873d37a..0000000 --- a/org.genivi.commonapi.core.validator.feature/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -/target diff --git a/org.genivi.commonapi.core.validator.feature/.project b/org.genivi.commonapi.core.validator.feature/.project deleted file mode 100644 index 213bf9c..0000000 --- a/org.genivi.commonapi.core.validator.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.genivi.commonapi.core.validator.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.validator.feature/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.validator.feature/feature.xml b/org.genivi.commonapi.core.validator.feature/feature.xml index 3b00355..1c50695 100644 --- a/org.genivi.commonapi.core.validator.feature/feature.xml +++ b/org.genivi.commonapi.core.validator.feature/feature.xml @@ -2,7 +2,7 @@ @@ -14,7 +14,7 @@ - + commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.validator/.classpath b/org.genivi.commonapi.core.validator/.classpath deleted file mode 100644 index eca7bdb..0000000 --- a/org.genivi.commonapi.core.validator/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.genivi.commonapi.core.validator/.gitignore b/org.genivi.commonapi.core.validator/.gitignore deleted file mode 100644 index ad19da6..0000000 --- a/org.genivi.commonapi.core.validator/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -/bin -/target diff --git a/org.genivi.commonapi.core.validator/.project b/org.genivi.commonapi.core.validator/.project deleted file mode 100644 index 8b90e3c..0000000 --- a/org.genivi.commonapi.core.validator/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.genivi.commonapi.core.validator - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.genivi.commonapi.core.validator/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core.validator/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core.validator/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core.validator/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core.validator/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core.validator/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core.validator/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.core.validator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 0c68a61..0000000 --- a/org.genivi.commonapi.core.validator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF b/org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF index b2e6d33..85426bb 100644 --- a/org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF @@ -3,15 +3,15 @@ Bundle-ManifestVersion: 2 Bundle-Name: GENIVI CommonAPI Core Validator Bundle-Vendor: BMW AG Bundle-SymbolicName: org.genivi.commonapi.core.validator;singleton:=true -Bundle-Version: 3.2.14.qualifier +Bundle-Version: 3.2.15.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.eclipse.ui, org.eclipse.core.expressions;bundle-version="3.4.400", org.eclipse.core.resources, org.eclipse.core.runtime, com.google.inject;bundle-version="[5.0.1,6.0.0)";visibility:=reexport, - org.genivi.commonapi.core;bundle-version="3.2.14", - org.genivi.commonapi.core.ui;bundle-version="3.2.14", + org.genivi.commonapi.core;bundle-version="3.2.15", + org.genivi.commonapi.core.ui;bundle-version="3.2.15", org.franca.core.dsl;bundle-version="[0.13.1,0.14.0)";visibility:=reexport, org.eclipse.xtext;bundle-version="[2.7.0,3.0.0)";visibility:=reexport Export-Package: org.genivi.commonapi.core.validator diff --git a/org.genivi.commonapi.core.validator/pom.xml b/org.genivi.commonapi.core.validator/pom.xml index 94f32e9..d302109 100644 --- a/org.genivi.commonapi.core.validator/pom.xml +++ b/org.genivi.commonapi.core.validator/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.core.verification/.gitignore b/org.genivi.commonapi.core.verification/.gitignore index d13ee43..eeae1cc 100644 --- a/org.genivi.commonapi.core.verification/.gitignore +++ b/org.genivi.commonapi.core.verification/.gitignore @@ -1,9 +1,5 @@ *~ *.o /.deps -/.settings -/.cproject -/.project /build /Testing -/src-gen diff --git a/org.genivi.commonapi.core.verification/CMakeLists.txt b/org.genivi.commonapi.core.verification/CMakeLists.txt index 62b0f85..c27abd7 100644 --- a/org.genivi.commonapi.core.verification/CMakeLists.txt +++ b/org.genivi.commonapi.core.verification/CMakeLists.txt @@ -27,6 +27,8 @@ else() message("CMAKE_GLUECODE_SOMEIP_NAME specified: ${CMAKE_GLUECODE_SOMEIP_NAME}") endif() +SET(CMAKE_CAPI_SOMEIP_GENERATOR_PATH "../../../capicxx-someip-tools" CACHE FILEPATH "Default path to capicxx-someip-generator") + if("${CMAKE_GLUECODE_DBUS_NAME}" STREQUAL "na" AND "${CMAKE_GLUECODE_SOMEIP_NAME}" STREQUAL "na") message(FATAL_ERROR "Please specify at least one of CMAKE_GLUECODE_DBUS_NAME or CMAKE_GLUECODE_SOMEIP_NAME") return() @@ -365,6 +367,12 @@ if (NOT ${TESTS_BAT}) target_link_libraries(StabilitySP ${TEST_LINK_LIBRARIES}) endif() + + add_executable(VSomeIPSec + src/VSomeIPSec.cpp + src/stub/VSomeIPSecStub.cpp + ) + target_link_libraries(VSomeIPSec ${TEST_LINK_LIBRARIES}) endif() if (NOT ${TESTS_BAT}) @@ -391,6 +399,7 @@ if (NOT ${TESTS_BAT}) add_dependencies(THMainLoopIntegration gtest) add_dependencies(THMainLoopIndependence gtest) add_dependencies(THMainLoopTwoThreads gtest) + add_dependencies(VSomeIPSec gtest) if(${TESTS_EXTRA}) add_dependencies(PFPrimitive gtest) add_dependencies(PFComplex gtest) @@ -421,6 +430,7 @@ if (NOT ${TESTS_BAT}) add_dependencies(check THMainLoopIntegration) add_dependencies(check THMainLoopIndependence) add_dependencies(check THMainLoopTwoThreads) + add_dependencies(check VSomeIPSec) if(${TESTS_EXTRA}) add_dependencies(check PFPrimitive) add_dependencies(check PFComplex) @@ -493,12 +503,19 @@ if(NOT "${CMAKE_GLUECODE_SOMEIP_NAME}" STREQUAL "na") # Construct the environment for the tests set(SOMEIP_COMMONAPI_CONFIG "COMMONAPI_CONFIG=commonapi4someip.ini") if ("${SOMEIP_VSOMEIP_JSON_FILE}" STREQUAL "") - set(SOMEIP_VSOMEIP_JSON_FILE "VSOMEIP_CONFIGURATION=../../../ascgit017.CommonAPI-SomeIP-Tools/org.genivi.commonapi.someip.verification/vsomeip.json") + set(SOMEIP_VSOMEIP_JSON_FILE "VSOMEIP_CONFIGURATION=${CMAKE_CAPI_SOMEIP_GENERATOR_PATH}/org.genivi.commonapi.someip.verification/vsomeip.json") + endif() + if ("${SOMEIP_VSOMEIP_LOCAL_TCP_JSON_FILE}" STREQUAL "") + set(SOMEIP_VSOMEIP_LOCAL_TCP_JSON_FILE "VSOMEIP_CONFIGURATION=${CMAKE_CAPI_SOMEIP_GENERATOR_PATH}/org.genivi.commonapi.someip.verification/vsomeip-local-tcp.json") endif() set(SOMEIP_TEST_ENVIRONMENT ${SOMEIP_COMMONAPI_CONFIG} ${SOMEIP_VSOMEIP_JSON_FILE} ) + set(SOMEIP_TEST_LOCAL_TCP_ENVIRONMENT + ${SOMEIP_COMMONAPI_CONFIG} + ${SOMEIP_VSOMEIP_LOCAL_TCP_JSON_FILE} + ) if (NOT ${TESTS_BAT}) add_test(NAME RTLoadingRuntimeSomeIP COMMAND RTLoadingRuntime) @@ -543,6 +560,8 @@ if(NOT "${CMAKE_GLUECODE_SOMEIP_NAME}" STREQUAL "na") set_property(TEST THMainLoopIndependenceSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT}) add_test(NAME THMainLoopTwoThreadsSomeIP COMMAND THMainLoopTwoThreads) set_property(TEST THMainLoopTwoThreadsSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT}) + add_test(NAME VSomeIPSecSomeIP COMMAND VSomeIPSec) + set_property(TEST VSomeIPSecSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_LOCAL_TCP_ENVIRONMENT}) if(${TESTS_EXTRA}) add_test(NAME PFPrimitiveSomeIP COMMAND PFPrimitive) set_property(TEST PFPrimitiveSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT}) diff --git a/org.genivi.commonapi.core.verification/fidl/ClientIdService.fidl b/org.genivi.commonapi.core.verification/fidl/ClientIdService.fidl new file mode 100644 index 0000000..2a18942 --- /dev/null +++ b/org.genivi.commonapi.core.verification/fidl/ClientIdService.fidl @@ -0,0 +1,21 @@ +package commonapi.vsomeipsec + +interface ClientIdService { + + version { major 1 minor 0 } + + attribute UInt32 a + broadcast b2 selective { + out { + UInt32 v + } + } + method m { + in { + UInt32 i + } + out { + UInt32 o + } + } +} diff --git a/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl b/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl index 39ff881..627ec5b 100644 --- a/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl +++ b/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl @@ -12,6 +12,9 @@ interface TestInterface { attribute UInt8 testB noSubscriptions attribute UInt8 testC readonly noSubscriptions attribute UInt8 testD + attribute UInt8 testE noRead + attribute UInt8 testF readonly noRead + attribute UInt8 testG noRead noSubscriptions method testMethod { in { diff --git a/org.genivi.commonapi.core.verification/src/CMAttributes.cpp b/org.genivi.commonapi.core.verification/src/CMAttributes.cpp index 14f0b00..10a7e15 100644 --- a/org.genivi.commonapi.core.verification/src/CMAttributes.cpp +++ b/org.genivi.commonapi.core.verification/src/CMAttributes.cpp @@ -100,6 +100,7 @@ class CMAttributes: public ::testing::Test { * - Call getValue. * - Check if returned call status is CommonAPI::CallStatus::SUCCESS. * - Check if value of is equal to expected value. +* Combinations to test synchronous getValue not allowed for noRead attributes. */ TEST_F(CMAttributes, AttributeGetSynchronous) { @@ -143,6 +144,7 @@ TEST_F(CMAttributes, AttributeGetSynchronous) { * - Call getValue. * - Check if returned call status is CommonAPI::CallStatus::SUCCESS. * - Check if value of is equal to expected value. +* Combinations to test asynchronous getValue not allowed for noRead attributes. */ TEST_F(CMAttributes, AttributeGetAsynchronous) { @@ -192,6 +194,13 @@ TEST_F(CMAttributes, AttributeGetAsynchronous) { * - Set attribute to certain value on proxy side. * - Check if returned call status is CommonAPI::CallStatus::SUCCESS. * - Check if returned value of setValue is equal to expected value. +* Test synchronous setValue API function for attributes with combinations of +* additional properties noRead and noSubscriptions (testE noRead, +* testG noRead noSubscriptions). +* - Set attribute to certain value on proxy side. +* - Check if returned call status is CommonAPI::CallStatus::SUCCESS. +* - Check if returned value of setValue is equal to expected value. +* Other combinations to test synchronous setValue not allowed. */ TEST_F(CMAttributes, AttributeSetSynchronous) { @@ -209,6 +218,17 @@ TEST_F(CMAttributes, AttributeSetSynchronous) { EXPECT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS); EXPECT_EQ(x, y); + x = 7; + y = 1; + testProxy_->getTestEAttribute().setValue(x, callStatus, y); + EXPECT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS); + EXPECT_EQ(x, y); + + x = 9; + y = 3; + testProxy_->getTestGAttribute().setValue(x, callStatus, y); + EXPECT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS); + EXPECT_EQ(x, y); } /** @@ -217,6 +237,13 @@ TEST_F(CMAttributes, AttributeSetSynchronous) { * - Set attribute to certain value on proxy side. * - Check if returned call status is CommonAPI::CallStatus::SUCCESS. * - Check if returned value of setValue is equal to expected value. +* Test asynchronous setValue API function for attributes with combinations of +* additional properties noRead and noSubscriptions (testE noRead, +* testG noRead noSubscriptions). +* - Set attribute to certain value on proxy side. +* - Check if returned call status is CommonAPI::CallStatus::SUCCESS. +* - Check if returned value of setValue is equal to expected value. +* Other combinations to test asynchronous setValue not allowed. */ TEST_F(CMAttributes, AttributeSetAsynchronous) { @@ -240,12 +267,28 @@ TEST_F(CMAttributes, AttributeSetAsynchronous) { std::this_thread::sleep_for(std::chrono::microseconds(tasync)); } EXPECT_EQ(x, value_); + + x = 7; + testProxy_->getTestEAttribute().setValueAsync(x, myCallback); + for (int i = 0; i < 100; i++) { + if (value_ == x) break; + std::this_thread::sleep_for(std::chrono::microseconds(tasync)); + } + EXPECT_EQ(x, value_); + + x = 9; + testProxy_->getTestGAttribute().setValueAsync(x, myCallback); + for (int i = 0; i < 100; i++) { + if (value_ == x) break; + std::this_thread::sleep_for(std::chrono::microseconds(tasync)); + } + EXPECT_EQ(x, value_); } /** * @test Test subscription API function for attributes * -* - Subscribe on testAttribute. +* - Subscribe on testAttribute and on testE. * - Set attribute to certain value on stub side. * - Do checks of call status (CommonAPI::CallStatus::SUCCESS) and returned value in callback function. * - Checks if returned value of setValue is equal to expected value. @@ -294,6 +337,41 @@ TEST_F(CMAttributes, AttributeSubscription) { std::this_thread::sleep_for(std::chrono::microseconds(tasync)); } EXPECT_EQ(x, value_); + + testStub_->setTestValues(0); + + y = 1; + x = 9; + + value_ = 0; + + testProxy_->getTestEAttribute().getChangedEvent().subscribe(myCallback, + [&]( + const CommonAPI::CallStatus &status + ) { + subStatus = status; + }); + + for (int i = 0; i < 100; i++) { + if (subStatus == CommonAPI::CallStatus::SUCCESS) break; + std::this_thread::sleep_for(std::chrono::microseconds(tasync)); + } + EXPECT_EQ(CommonAPI::CallStatus::SUCCESS, subStatus); + + testStub_->setTestValues(x); + for (int i = 0; i < 100; i++) { + if (value_ == x) break; + std::this_thread::sleep_for(std::chrono::microseconds(tasync)); + } + EXPECT_EQ(x, value_); + + x = 12; + testProxy_->getTestEAttribute().setValue(x, callStatus, y); + for (int i = 0; i < 100; i++) { + if (value_ == x) break; + std::this_thread::sleep_for(std::chrono::microseconds(tasync)); + } + EXPECT_EQ(x, value_); } int main(int argc, char** argv) { diff --git a/org.genivi.commonapi.core.verification/src/VSomeIPSec.cpp b/org.genivi.commonapi.core.verification/src/VSomeIPSec.cpp new file mode 100644 index 0000000..0fca1cf --- /dev/null +++ b/org.genivi.commonapi.core.verification/src/VSomeIPSec.cpp @@ -0,0 +1,148 @@ +#include +#include +#include +#include +#include +#include "stub/VSomeIPSecStub.hpp" +#include + +using namespace ::v1::commonapi::vsomeipsec; + +const std::string domain = "local"; +const std::string instance = "1"; +const std::string applicationNameService = "service-sample"; +const std::string applicationNameClient = "client-sample"; +const u_int32_t newValue {5}; +const uint8_t requestersNumber {1}; +const std::string localIP = "127.0.0.1"; + +class Environment: public ::testing::Environment { +public: + virtual ~Environment() { + } + + virtual void SetUp() { + } + + virtual void TearDown() { + } +}; + +class VSomeIPSec: public ::testing::Test { +protected: + void SetUp() { + runtime_ = CommonAPI::Runtime::get(); + ASSERT_TRUE((bool)runtime_); + + testStub_ = std::make_shared([](const std::shared_ptr _client) { + EXPECT_EQ(_client->getHostAddress(), localIP); + }); + ASSERT_TRUE((bool)testStub_); + + ASSERT_TRUE(runtime_->registerService(domain, instance, testStub_, applicationNameService)); + + testProxy_ = runtime_->buildProxy(domain, instance, applicationNameClient); + ASSERT_TRUE((bool)testProxy_); + + ASSERT_TRUE(testProxy_->isAvailableBlocking()); + } + + void TearDown() { + bool unregistered = runtime_->unregisterService(domain, + ClientIdServiceStubDefault::StubInterface::getInterface(), + instance); + { +#ifdef _WIN32 + std::lock_guard gtestLock(gtestMutex); +#endif + ASSERT_TRUE(unregistered); + } + + // wait that proxy is not available + int counter = 0; // counter for avoiding endless loop + while ( testProxy_->isAvailable() && counter < 100 ) { + std::this_thread::sleep_for(std::chrono::microseconds(10000)); + counter++; + } + ASSERT_FALSE(testProxy_->isAvailable()); + } + + std::shared_ptr runtime_; + std::shared_ptr testStub_; + std::shared_ptr> testProxy_; + + std::mutex mutex_; + std::condition_variable cv_; + bool recieved_msg_ = false; + + uint32_t received_value_ = 0; + +}; + +/** +* @test Check the host_adress on methods for attributes interface +*/ +TEST_F(VSomeIPSec, TestClientAttribute) { + uint32_t itsValue; + CommonAPI::CallStatus itsStatus; + + auto itsKeyA = testProxy_->getAAttribute().getChangedEvent().subscribe( + [](const uint32_t &_value) {(void)_value;} + ); + + testProxy_->getAAttribute().setValue(newValue, itsStatus, itsValue); + ASSERT_EQ(itsStatus, CommonAPI::CallStatus::SUCCESS); + EXPECT_EQ(itsValue, newValue); + + testProxy_->getAAttribute().getValue(itsStatus, itsValue); + ASSERT_EQ(itsStatus, CommonAPI::CallStatus::SUCCESS); + EXPECT_EQ(itsValue, newValue); + + testProxy_->getAAttribute().getChangedEvent().unsubscribe(itsKeyA); +} + +/** +* @test Check the host_adress on methods for broadcast selective interface +*/ +TEST_F(VSomeIPSec, TestClientBroadcastSelective) { + auto itsKeyB2 = testProxy_->getB2SelectiveEvent().subscribe( + [&](const uint32_t &_value) { + received_value_ = _value; + std::unique_lock lk(mutex_); + recieved_msg_ = true; + cv_.notify_one(); + } + ); + + while(testStub_->getSubscribersForB2Selective()== nullptr || testStub_->getSubscribersForB2Selective()->size() == 0) { + std::this_thread::sleep_for(std::chrono::microseconds(10000)); + } + ASSERT_EQ(testStub_->getSubscribersForB2Selective()->size(), requestersNumber); + + testStub_->fireB2Selective(newValue); + + // Block until callback happens + std::unique_lock lk(mutex_); + cv_.wait(lk, [&]{ return recieved_msg_; }); + ASSERT_EQ(newValue, received_value_); + + testProxy_->getB2SelectiveEvent().unsubscribe(itsKeyB2); +} + +/** +* @test Check the host_adress on methods for methods interface +*/ +TEST_F(VSomeIPSec, TestClientMethod) { + uint32_t itsValue; + CommonAPI::CallStatus itsStatus; + testProxy_->m(newValue, itsStatus, itsValue); + ASSERT_EQ(itsStatus, CommonAPI::CallStatus::SUCCESS); + ASSERT_EQ(newValue, itsValue); + +} + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + ::testing::AddGlobalTestEnvironment(new Environment()); + return RUN_ALL_TESTS(); +} diff --git a/org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in b/org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in index e252628..d43af51 100644 --- a/org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in +++ b/org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in @@ -80,6 +80,7 @@ local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInter local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInterface37=@GLUECODE_SO_SOMEIP@ local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInterface38=@GLUECODE_SO_SOMEIP@ local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInterface39=@GLUECODE_SO_SOMEIP@ +local:commonapi.vsomeipsec.ClientIdService:v1_0:1=@GLUECODE_SO_SOMEIP@ [stub] local:commonapi.runtime.TestInterface:v1_0:commonapi.runtime.TestInterface=@GLUECODE_SO_SOMEIP@ @@ -157,3 +158,4 @@ local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInter local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInterface37=@GLUECODE_SO_SOMEIP@ local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInterface38=@GLUECODE_SO_SOMEIP@ local:commonapi.stability.sp.TestInterface:v1_0:commonapi.stability.sp.TestInterface39=@GLUECODE_SO_SOMEIP@ +local:commonapi.vsomeipsec.ClientIdService:v1_0:1=@GLUECODE_SO_SOMEIP@ diff --git a/org.genivi.commonapi.core.verification/src/stub/CMAttributesStub.cpp b/org.genivi.commonapi.core.verification/src/stub/CMAttributesStub.cpp index d9bd368..4338bc3 100644 --- a/org.genivi.commonapi.core.verification/src/stub/CMAttributesStub.cpp +++ b/org.genivi.commonapi.core.verification/src/stub/CMAttributesStub.cpp @@ -22,6 +22,9 @@ void CMAttributesStub::setTestValues(uint8_t x) { setTestAAttribute(x); setTestBAttribute(x); setTestCAttribute(x); + setTestEAttribute(x); + setTestFAttribute(x); + setTestGAttribute(x); } } /* namespace v1 */ diff --git a/org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.cpp b/org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.cpp new file mode 100644 index 0000000..664d99e --- /dev/null +++ b/org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.cpp @@ -0,0 +1,57 @@ +#include +#include +#include + +#include "VSomeIPSecStub.hpp" + +namespace v1{ +namespace commonapi { +namespace vsomeipsec { + +ClientIdServiceImpl::ClientIdServiceImpl(const clientHandler_t &_client_validation_handler): + client_validation_handler(_client_validation_handler) { +} + +const uint32_t &ClientIdServiceImpl::getAAttribute( + const std::shared_ptr _client) { + + if (_client->getHostAddress() != "") { + if(client_validation_handler) { + client_validation_handler(_client); + } + } + return ClientIdServiceStubDefault::getAAttribute(); +} + +void ClientIdServiceImpl::onB2SelectiveSubscriptionChanged( + const std::shared_ptr _client, + const CommonAPI::SelectiveBroadcastSubscriptionEvent _event) { + + (void)_event; + if(client_validation_handler) { + client_validation_handler(_client); + } +} + +bool ClientIdServiceImpl::onB2SelectiveSubscriptionRequested( + const std::shared_ptr _client) { + + if(client_validation_handler) { + client_validation_handler(_client); + } + return true; +} + +void ClientIdServiceImpl::m(const std::shared_ptr _client, uint32_t _i, mReply_t _reply) { + + uint32_t o = _i; + _reply(o); + + if(client_validation_handler) { + client_validation_handler(_client); + } +} + +} /* namespace vsomeipsec */ +} /* namespace commonapi */ +} /* namespace v1 */ diff --git a/org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.hpp b/org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.hpp new file mode 100644 index 0000000..55ec21f --- /dev/null +++ b/org.genivi.commonapi.core.verification/src/stub/VSomeIPSecStub.hpp @@ -0,0 +1,41 @@ +/* Copyright (C) 2015-2024 BMW Group + * 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 VSOMEIPSECSTUB_HPP_ +#define VSOMEIPSECSTUB_HPP_ + +#include +#include + +namespace v1 { +namespace commonapi { +namespace vsomeipsec { + +using clientHandler_t = std::function )>; + +class ClientIdServiceImpl : public ClientIdServiceStubDefault { +private: + clientHandler_t client_validation_handler; + +public: + ClientIdServiceImpl(const clientHandler_t &_client_validation_handler); + + const uint32_t &getAAttribute(const std::shared_ptr _client); + void onB2SelectiveSubscriptionChanged( + const std::shared_ptr _client, + const CommonAPI::SelectiveBroadcastSubscriptionEvent _event); + + bool onB2SelectiveSubscriptionRequested( + const std::shared_ptr _client); + + void m(const std::shared_ptr _client, uint32_t _i, + mReply_t _reply); +}; + +} /* namespace vsomeipsec */ +} /* namespace commonapi */ +} /* namespace v1 */ + +#endif /* VSOMEIPSECSTUB_HPP_ */ diff --git a/org.genivi.commonapi.core/.classpath b/org.genivi.commonapi.core/.classpath deleted file mode 100644 index bc001b4..0000000 --- a/org.genivi.commonapi.core/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.genivi.commonapi.core/.gitignore b/org.genivi.commonapi.core/.gitignore deleted file mode 100644 index d7a41af..0000000 --- a/org.genivi.commonapi.core/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/bin -/src-gen -/target -/xtend-gen -*~ diff --git a/org.genivi.commonapi.core/.project b/org.genivi.commonapi.core/.project deleted file mode 100644 index 9e1e3ba..0000000 --- a/org.genivi.commonapi.core/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.genivi.commonapi.core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.pde.PluginNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/org.genivi.commonapi.core/.settings/org.eclipse.core.resources.prefs b/org.genivi.commonapi.core/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c0..0000000 --- a/org.genivi.commonapi.core/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/org.genivi.commonapi.core/.settings/org.eclipse.core.runtime.prefs b/org.genivi.commonapi.core/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22..0000000 --- a/org.genivi.commonapi.core/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/org.genivi.commonapi.core/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.core/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index a698e59..0000000 --- a/org.genivi.commonapi.core/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/org.genivi.commonapi.core/META-INF/MANIFEST.MF b/org.genivi.commonapi.core/META-INF/MANIFEST.MF index 76c94ed..fd736da 100644 --- a/org.genivi.commonapi.core/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI CommonAPI Core C++ Generator Bundle-Vendor: BMW AG -Bundle-Version: 3.2.14.qualifier +Bundle-Version: 3.2.15.qualifier Bundle-SymbolicName: org.genivi.commonapi.core;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.8.0,4.0.0)";visibility:=reexport, diff --git a/org.genivi.commonapi.core/pom.xml b/org.genivi.commonapi.core/pom.xml index 40c1674..e0090be 100644 --- a/org.genivi.commonapi.core/pom.xml +++ b/org.genivi.commonapi.core/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.core.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT ../org.genivi.commonapi.core.releng diff --git a/org.genivi.commonapi.releng/.project b/org.genivi.commonapi.releng/.project deleted file mode 100644 index 99cc852..0000000 --- a/org.genivi.commonapi.releng/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - org.genivi.commonapi.releng - - - - - - - - diff --git a/org.genivi.commonapi.releng/pom.xml b/org.genivi.commonapi.releng/pom.xml index 751d120..fdbe047 100644 --- a/org.genivi.commonapi.releng/pom.xml +++ b/org.genivi.commonapi.releng/pom.xml @@ -3,7 +3,7 @@ 4.0.0 commonapi org.genivi.commonapi.releng - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT pom 0.22.0 @@ -46,7 +46,7 @@ commonapi ${target.id} - 3.2.14-SNAPSHOT + 3.2.15-SNAPSHOT