From 8d9344e26e2ad55c1b791d6eac416fae9ce37c3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Gehring?= Date: Fri, 4 Nov 2016 09:22:42 -0700 Subject: [PATCH] CommonAPI-SomeIP-Tools 3.1.10 --- .gitignore | 1 + CHANGES | 10 + CommonAPI-Examples/CMakeLists.txt | 4 +- CommonAPI-Examples/commonapi.ini | 32 +- INSTALL | 36 +- docx/CommonAPISomeIPCppUserGuide | 6 +- org.genivi.commonapi.releng/pom.xml | 8 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../commonapi_someip_cli.product | 9 +- .../pom.xml | 2 +- org.genivi.commonapi.someip.cli/.classpath | 10 +- .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 8 +- org.genivi.commonapi.someip.cli/pom.xml | 2 +- .../.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 4 +- .../pom.xml | 2 +- .../validator/SomeIPDeploymentValidator.xtend | 78 +- .../feature.xml | 8 +- org.genivi.commonapi.someip.feature/pom.xml | 2 +- org.genivi.commonapi.someip.releng/pom.xml | 2 +- .../org.genivi.commonapi.someip.target.target | 3 +- org.genivi.commonapi.someip.target/pom.xml | 2 +- org.genivi.commonapi.someip.ui/.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 10 +- org.genivi.commonapi.someip.ui/pom.xml | 2 +- .../Build CommonAPI-SomeIP Tools.launch | 1 + .../category.xml | 4 +- .../pom.xml | 2 +- .../feature.xml | 2 +- .../pom.xml | 2 +- .../.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 10 +- org.genivi.commonapi.someip.validator/pom.xml | 2 +- .../CMakeLists.txt | 5 +- .../fidl/conf/mp_selective.fdepl.in | 28 - .../vsomeip-security.json | 1012 +++++++++++++++++ org.genivi.commonapi.someip/.classpath | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 6 +- .../CommonAPI-SOMEIP_deployment_spec.fdepl | 3 + org.genivi.commonapi.someip/pom.xml | 2 +- .../FInterfaceSomeIPDeploymentGenerator.xtend | 8 +- ...FInterfaceSomeIPStubAdapterGenerator.xtend | 110 +- ...eCollectionSomeIPDeploymentGenerator.xtend | 14 +- 49 files changed, 1311 insertions(+), 188 deletions(-) create mode 100644 CHANGES create mode 100644 org.genivi.commonapi.someip.cli/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.genivi.commonapi.someip.deployment.validator/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.genivi.commonapi.someip.ui/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.genivi.commonapi.someip.validator/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.genivi.commonapi.someip.verification/fidl/conf/mp_selective.fdepl.in create mode 100644 org.genivi.commonapi.someip.verification/vsomeip-security.json create mode 100644 org.genivi.commonapi.someip/.settings/org.eclipse.jdt.core.prefs diff --git a/.gitignore b/.gitignore index 9815396..a6a0558 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /build/* /doc /org.genivi.commonapi.someip.verification/fidl/ti_advanced_bselective.fdepl +/org.genivi.commonapi.someip.verification/fidl/ti_advanced_extended.fdepl /org.genivi.commonapi.someip.verification/fidl/ti_advanced_managed.fdepl /org.genivi.commonapi.someip.verification/fidl/ti_advanced_polymorph.fdepl /org.genivi.commonapi.someip.verification/fidl/ti_communication.fdepl diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..0dd9ca7 --- /dev/null +++ b/CHANGES @@ -0,0 +1,10 @@ +Changes +======= + +v3.1.10 +- Upgrade to JDK-1.8. +- Explicitely set visibility for the deployments to enable linkage after compilation with -fvisibility=hidden. +- Added new deployment parameter CRCWidth for attributes, broadcasts and methods. +- Added config file to run tests with security. All clients are allowed to do everything and "credentials" (uid/gid) may need to be adjusted in order to run tests on different platforms depending on which user/group the tests started from. +- Added filter in validator to avoid validation of interfaces deployed for the core or dbus. + diff --git a/CommonAPI-Examples/CMakeLists.txt b/CommonAPI-Examples/CMakeLists.txt index ee1189b..76031e2 100644 --- a/CommonAPI-Examples/CMakeLists.txt +++ b/CommonAPI-Examples/CMakeLists.txt @@ -55,8 +55,8 @@ endif() message("CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}") message("COMMONAPI_INCLUDE_DIRS: ${COMMONAPI_INCLUDE_DIRS}") -find_package (CommonAPI-SomeIP 3.1.9 REQUIRED) -find_package (vsomeip 2.4.0 REQUIRED) +find_package (CommonAPI-SomeIP 3.1.10 REQUIRED) +find_package (vsomeip 2.5.0 REQUIRED) include_directories ( ${COMMONAPI_INCLUDE_DIRS} diff --git a/CommonAPI-Examples/commonapi.ini b/CommonAPI-Examples/commonapi.ini index c5f09b8..9004b55 100644 --- a/CommonAPI-Examples/commonapi.ini +++ b/CommonAPI-Examples/commonapi.ini @@ -2,21 +2,21 @@ binding=someip [proxy] -local:commonapi.someip.heartbeat:BMW.ATM=libsomeip-example-someip.so -local:commonapi.someip.math:BMW.ATM=libsomeip-example-someip.so -local:commonapi.someip.attr:BMW.ATM=libsomeip-attribute-example-someip.so -local:commonapi.someip.attranonymtc:BMW.ATM=libsomeip-attributeanonymtc-example-someip.so -local:commonapi.someip.attrnamedtc:BMW.ATM=libsomeip-attributenamedtc-example-someip.so -local:commonapi.someip.Map:BMW.ATM=libsomeip-map-example-someip.so -local:commonapi.someip.methodSample:BMW.ATM=libsomeip-methodSample-example-someip.so -local:commonapi.serialization.Sample:BMW.ATM=libsomeip-serialization-example-someip.so +local:commonapi.someip.heartbeat:v1_42:BMW.ATM=libsomeip-example-someip.so +local:commonapi.someip.math:v1_42:BMW.ATM=libsomeip-example-someip.so +local:commonapi.someip.attr:v1_42:BMW.ATM=libsomeip-attribute-example-someip.so +local:commonapi.someip.attranonymtc:v1_42:BMW.ATM=libsomeip-attributeanonymtc-example-someip.so +local:commonapi.someip.attrnamedtc:v1_42:BMW.ATM=libsomeip-attributenamedtc-example-someip.so +local:commonapi.someip.Map:v1_0:BMW.ATM=libsomeip-map-example-someip.so +local:commonapi.someip.methodSample:v1_0:BMW.ATM=libsomeip-methodSample-example-someip.so +local:commonapi.serialization.Sample:v1_42:BMW.ATM=libsomeip-serialization-example-someip.so [stub] -local:commonapi.someip.heartbeat:BMW.ATM=libsomeip-example-someip.so -local:commonapi.someip.math:BMW.ATM=libsomeip-example-someip.so -local:commonapi.someip.attr:BMW.ATM=libsomeip-attribute-example-someip.so -local:commonapi.someip.attranonymtc:BMW.ATM=libsomeip-attributeanonymtc-example-someip.so -local:commonapi.someip.attrnamedtc:BMW.ATM=libsomeip-attributenamedtc-example-someip.so -local:commonapi.someip.Map:BMW.ATM=libsomeip-map-example-someip.so -local:commonapi.someip.methodSample:BMW.ATM=libsomeip-methodSample-example-someip.so -local:commonapi.serialization.Sample:BMW.ATM=libsomeip-serialization-example-someip.so +local:commonapi.someip.heartbeat:v1_42:BMW.ATM=libsomeip-example-someip.so +local:commonapi.someip.math:v1_42:BMW.ATM=libsomeip-example-someip.so +local:commonapi.someip.attr:v1_42:BMW.ATM=libsomeip-attribute-example-someip.so +local:commonapi.someip.attranonymtc:v1_42:BMW.ATM=libsomeip-attributeanonymtc-example-someip.so +local:commonapi.someip.attrnamedtc:v1_42:BMW.ATM=libsomeip-attributenamedtc-example-someip.so +local:commonapi.someip.Map:v1_0:BMW.ATM=libsomeip-map-example-someip.so +local:commonapi.someip.methodSample:v1_0:BMW.ATM=libsomeip-methodSample-example-someip.so +local:commonapi.serialization.Sample:v1_42:BMW.ATM=libsomeip-serialization-example-someip.so diff --git a/INSTALL b/INSTALL index 0cc3b8e..305df24 100644 --- a/INSTALL +++ b/INSTALL @@ -1,35 +1 @@ -= IPC CommonAPI SomeIP Tools C++ - -:doctitle: IPC CommonAPI SomeIP Tools C++ -:version: - -== Copyright -Copyright (C) 2015,2016 Bayerische Motoren Werke Aktiengesellschaft (BMW AG). -Copyright (C) 2015,2016 GENIVI Alliance, Inc. - -This file is part of GENIVI Project IPC Common API C++. - -Contributions are licensed to the GENIVI Alliance under one or more Contribution License Agreements or MPL 2.0. - -== License -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/. - -== Version -{version} - -== CommonAPI C++ Specification and User Guide -The specification document and the user guide can be found in the CommonAPI documentation directory of the CommonAPI-Tools project. - -== Further information -Source code and latest news can be found at http://projects.genivi.org/commonapi/. - -== Build Instructions for Linux - -You can build all code generators by calling maven from the command-line. Open a console and change in the directory org.genivi.commonapi.someip.releng of your CommonAPI-Tools directory. Then call: ----- -mvn -DCOREPATH= -Dtarget.id=org.genivi.commonapi.someip.target clean verify ----- -COREPATH is the directory, that contains the target definition folder: org.genivi.commonapi.core.target. - - -After the successful build you will find the commond-line generators archived in org.genivi.commonapi.someip.cli.product/target/products/commonapi-generator.zip and the update-sites in org.genivi.commonapi.someip.updatesite/target. +Please refer to README.md for the installation instructions. diff --git a/docx/CommonAPISomeIPCppUserGuide b/docx/CommonAPISomeIPCppUserGuide index 731c273..8feecf4 100644 --- a/docx/CommonAPISomeIPCppUserGuide +++ b/docx/CommonAPISomeIPCppUserGuide @@ -169,13 +169,17 @@ This kind of section determines how CommonAPI addresses are translated into SOME - +service+ - +instance+ +- +major+ +- +minor+ Example: ---- -[local:de.ABC:de.app1] +[local:de.ABC:v1_1:de.app1] service=0x1234 instance=0x5678 +major=1 +minor=2 ---- ==== Deployment diff --git a/org.genivi.commonapi.releng/pom.xml b/org.genivi.commonapi.releng/pom.xml index 1e046b2..ff92c88 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.1.9-SNAPSHOT + 3.1.10-SNAPSHOT pom 0.22.0 @@ -13,7 +13,7 @@ 2.7.3 - + sonatype http://repository.sonatype.org/content/groups/sonatype-public-grid/ @@ -46,7 +46,7 @@ commonapi ${target.id} - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT @@ -88,7 +88,7 @@ org.eclipse.xtend xtend-maven-plugin - ${xtend-version} + ${xtend-version} diff --git a/org.genivi.commonapi.someip.cli.feature/feature.xml b/org.genivi.commonapi.someip.cli.feature/feature.xml index 4c97029..594360c 100644 --- a/org.genivi.commonapi.someip.cli.feature/feature.xml +++ b/org.genivi.commonapi.someip.cli.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.genivi.commonapi.someip.cli.feature/pom.xml b/org.genivi.commonapi.someip.cli.feature/pom.xml index 3e820c6..45299e3 100644 --- a/org.genivi.commonapi.someip.cli.feature/pom.xml +++ b/org.genivi.commonapi.someip.cli.feature/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.cli.product/commonapi_someip_cli.product b/org.genivi.commonapi.someip.cli.product/commonapi_someip_cli.product index 166bb32..23da8d3 100644 --- a/org.genivi.commonapi.someip.cli.product/commonapi_someip_cli.product +++ b/org.genivi.commonapi.someip.cli.product/commonapi_someip_cli.product @@ -1,13 +1,13 @@ - + - -Dosgi.requiredJavaVersion=1.7 -Xms512m -Xmx512m -XX:PermSize=128m + -Dosgi.requiredJavaVersion=1.8 -Xms512m -Xmx512m -XX:PermSize=128m -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts @@ -23,7 +23,10 @@ - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8 + org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8 diff --git a/org.genivi.commonapi.someip.cli.product/pom.xml b/org.genivi.commonapi.someip.cli.product/pom.xml index da50835..a481232 100644 --- a/org.genivi.commonapi.someip.cli.product/pom.xml +++ b/org.genivi.commonapi.someip.cli.product/pom.xml @@ -131,7 +131,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng diff --git a/org.genivi.commonapi.someip.cli/.classpath b/org.genivi.commonapi.someip.cli/.classpath index fdae74c..eca7bdb 100644 --- a/org.genivi.commonapi.someip.cli/.classpath +++ b/org.genivi.commonapi.someip.cli/.classpath @@ -1,7 +1,7 @@ - - - - - \ No newline at end of file + + + + + diff --git a/org.genivi.commonapi.someip.cli/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.someip.cli/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/org.genivi.commonapi.someip.cli/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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.someip.cli/META-INF/MANIFEST.MF b/org.genivi.commonapi.someip.cli/META-INF/MANIFEST.MF index 55daeb8..5fcf886 100644 --- a/org.genivi.commonapi.someip.cli/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.someip.cli/META-INF/MANIFEST.MF @@ -2,15 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: commonapi Some/IP generator Console Interface Bundle-SymbolicName: org.genivi.commonapi.someip.cli;singleton:=true -Bundle-Version: 3.1.9.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Activator: org.genivi.commonapi.someip.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.9.0,0.10.0)";visibility:=reexport, org.franca.deploymodel.dsl;bundle-version="[0.9.0,0.10.0)";visibility:=reexport, org.genivi.commonapi.console, - org.genivi.commonapi.someip;bundle-version="3.1.9", - org.genivi.commonapi.someip.deployment.validator;bundle-version="3.1.9" + org.genivi.commonapi.someip;bundle-version="3.1.10", + org.genivi.commonapi.someip.deployment.validator;bundle-version="3.1.10" Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: BMW AG diff --git a/org.genivi.commonapi.someip.cli/pom.xml b/org.genivi.commonapi.someip.cli/pom.xml index 117965e..e5893e6 100644 --- a/org.genivi.commonapi.someip.cli/pom.xml +++ b/org.genivi.commonapi.someip.cli/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.deployment.validator/.classpath b/org.genivi.commonapi.someip.deployment.validator/.classpath index 13a6c65..428337e 100644 --- a/org.genivi.commonapi.someip.deployment.validator/.classpath +++ b/org.genivi.commonapi.someip.deployment.validator/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.genivi.commonapi.someip.deployment.validator/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.someip.deployment.validator/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/org.genivi.commonapi.someip.deployment.validator/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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.someip.deployment.validator/META-INF/MANIFEST.MF b/org.genivi.commonapi.someip.deployment.validator/META-INF/MANIFEST.MF index fc52c2a..5038ddd 100644 --- a/org.genivi.commonapi.someip.deployment.validator/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.someip.deployment.validator/META-INF/MANIFEST.MF @@ -2,8 +2,8 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI Common API Some/IP Deployment Validator Bundle-SymbolicName: org.genivi.commonapi.someip.deployment.validator;singleton:=true -Bundle-Version: 3.1.9.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-Version: 3.1.10.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: BMW AG Export-Package: org.genivi.commonapi.someip.deployment.validator Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0";visibility:=reexport, diff --git a/org.genivi.commonapi.someip.deployment.validator/pom.xml b/org.genivi.commonapi.someip.deployment.validator/pom.xml index d705f28..e793746 100644 --- a/org.genivi.commonapi.someip.deployment.validator/pom.xml +++ b/org.genivi.commonapi.someip.deployment.validator/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.deployment.validator/src/org/genivi/commonapi/someip/deployment/validator/SomeIPDeploymentValidator.xtend b/org.genivi.commonapi.someip.deployment.validator/src/org/genivi/commonapi/someip/deployment/validator/SomeIPDeploymentValidator.xtend index b0b50c5..5bd4081 100644 --- a/org.genivi.commonapi.someip.deployment.validator/src/org/genivi/commonapi/someip/deployment/validator/SomeIPDeploymentValidator.xtend +++ b/org.genivi.commonapi.someip.deployment.validator/src/org/genivi/commonapi/someip/deployment/validator/SomeIPDeploymentValidator.xtend @@ -8,13 +8,16 @@ import org.eclipse.emf.common.util.Diagnostic import org.eclipse.emf.common.util.DiagnosticChain import org.eclipse.xtext.validation.FeatureBasedDiagnostic import org.franca.core.franca.FInterface +import org.franca.core.franca.FModel import org.franca.deploymodel.dsl.fDeploy.FDAttribute import org.franca.deploymodel.dsl.fDeploy.FDBroadcast import org.franca.deploymodel.dsl.fDeploy.FDInteger import org.franca.deploymodel.dsl.fDeploy.FDInterface +import org.franca.deploymodel.dsl.fDeploy.FDInterfaceInstance import org.franca.deploymodel.dsl.fDeploy.FDMethod import org.franca.deploymodel.dsl.fDeploy.FDModel import org.franca.deploymodel.dsl.fDeploy.FDProperty +import org.franca.deploymodel.dsl.fDeploy.FDProvider import org.franca.deploymodel.dsl.fDeploy.FDValue import static org.franca.deploymodel.dsl.fDeploy.FDeployPackage.Literals.* @@ -22,6 +25,7 @@ import static org.franca.deploymodel.dsl.fDeploy.FDeployPackage.Literals.* class SomeIPDeploymentValidator { private static String DEPLOYMENT_SPECIFICATION_FILENAME_SUFFIX = "_deployment_spec.fdepl" + private static String SOMEIP_SPECIFICATION_TYPE = "someip.deployment" var DiagnosticChain diagnostics var allMethodIds = new HashMap>> @@ -32,6 +36,7 @@ class SomeIPDeploymentValidator var eventIdDiagnostics = new HashSet var missingInterfaceDeployment = new HashSet var fdInterfaces = new ArrayList + var fdInterfaceInstances = new ArrayList def validate(Collection fdepls, DiagnosticChain diagnostics) { @@ -41,7 +46,16 @@ class SomeIPDeploymentValidator { var deplFileName = fdepl.eResource.URI.lastSegment if (!deplFileName.endsWith(DEPLOYMENT_SPECIFICATION_FILENAME_SUFFIX)) - fdInterfaces.addAll(fdepl.deployments.filter(typeof(FDInterface))) + { + for ( fdInterface : fdepl.deployments.filter(typeof(FDInterface))) { + if(fdInterface.spec.name != null && fdInterface.spec.name.contains(SOMEIP_SPECIFICATION_TYPE)) + fdInterfaces.add(fdInterface) + } + for ( fdProvider : fdepl.deployments.filter(typeof(FDProvider))) { + if(fdProvider.spec.name != null && fdProvider.spec.name.contains(SOMEIP_SPECIFICATION_TYPE)) + fdInterfaceInstances.addAll(fdProvider.instances) + } + } } for (fdInterface : fdInterfaces) @@ -49,6 +63,61 @@ class SomeIPDeploymentValidator for (fdInterface : fdInterfaces) validateIds(fdInterface) + + for (fdInterface : fdInterfaces) + validateCompleteInterfaceDeployments(fdInterface) + + validateProviderInstanceDeployments(fdepls) + } + + private def validateProviderInstanceDeployments(Collection fdepls) + { + fdInterfaceInstances.forEach[interfaceInstance| + if (fdInterfaces.findFirst[target != null && interfaceInstance.target != null && target.equals(interfaceInstance.target)] == null) + { + var diag = new FeatureBasedDiagnostic(Diagnostic.WARNING, + "No deployment for interface \"" + getFullName(interfaceInstance.target) + "\".", + interfaceInstance, null, -1, null, null) + diagnostics.add(diag) + } + ] + } + + private def validateCompleteInterfaceDeployments(FDInterface fdInterface) + { + val FInterface fInterface = fdInterface.target + if (fInterface != null) + { + fInterface.attributes.forEach[fAttr| + if (fdInterface.attributes.findFirst[fdAttr|fAttr.equals(fdAttr.target)] == null) + { + var diag = new FeatureBasedDiagnostic(Diagnostic.WARNING, + "No deployment for attribute \"" + fAttr.name + "\".", + fAttr, null, -1, null, null) + diagnostics.add(diag) + } + ] + + fInterface.broadcasts.forEach[fBroadcast| + if (fdInterface.broadcasts.findFirst[fdBroadcast|fBroadcast.equals(fdBroadcast.target)] == null) + { + var diag = new FeatureBasedDiagnostic(Diagnostic.WARNING, + "No deployment for broadcast \"" + fBroadcast.name + "\".", + fBroadcast, null, -1, null, null) + diagnostics.add(diag) + } + ] + + fInterface.methods.forEach[fMethod| + if (fdInterface.methods.findFirst[fdMethod|fMethod.equals(fdMethod.target)] == null) + { + var diag = new FeatureBasedDiagnostic(Diagnostic.WARNING, + "No deployment for method \"" + fMethod.name + "\".", + fMethod, null, -1, null, null) + diagnostics.add(diag) + } + ] + } } private def validateInterface(FDInterface fdInterface) @@ -656,4 +725,11 @@ class SomeIPDeploymentValidator return null return (prop.value.single as FDInteger).value } + + private def String getFullName(FInterface intf) + { + if (intf == null) + return "" + return (intf.eContainer as FModel).name + "." + intf.name + } } diff --git a/org.genivi.commonapi.someip.feature/feature.xml b/org.genivi.commonapi.someip.feature/feature.xml index 5a9d46b..1bbe244 100644 --- a/org.genivi.commonapi.someip.feature/feature.xml +++ b/org.genivi.commonapi.someip.feature/feature.xml @@ -2,7 +2,7 @@ @@ -17,21 +17,21 @@ id="org.genivi.commonapi.someip" download-size="0" install-size="0" - version="3.1.9.qualifier" + version="3.1.10.qualifier" unpack="false"/> diff --git a/org.genivi.commonapi.someip.feature/pom.xml b/org.genivi.commonapi.someip.feature/pom.xml index 843bc3c..044ce22 100644 --- a/org.genivi.commonapi.someip.feature/pom.xml +++ b/org.genivi.commonapi.someip.feature/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.releng/pom.xml b/org.genivi.commonapi.someip.releng/pom.xml index 3c0a9b0..b6e6bb9 100644 --- a/org.genivi.commonapi.someip.releng/pom.xml +++ b/org.genivi.commonapi.someip.releng/pom.xml @@ -24,7 +24,7 @@ commonapi org.genivi.commonapi.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.releng diff --git a/org.genivi.commonapi.someip.target/org.genivi.commonapi.someip.target.target b/org.genivi.commonapi.someip.target/org.genivi.commonapi.someip.target.target index 0c1b9b5..2637093 100644 --- a/org.genivi.commonapi.someip.target/org.genivi.commonapi.someip.target.target +++ b/org.genivi.commonapi.someip.target/org.genivi.commonapi.someip.target.target @@ -1,5 +1,5 @@ - + @@ -21,4 +21,5 @@ + diff --git a/org.genivi.commonapi.someip.target/pom.xml b/org.genivi.commonapi.someip.target/pom.xml index 933688e..20ea331 100644 --- a/org.genivi.commonapi.someip.target/pom.xml +++ b/org.genivi.commonapi.someip.target/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.ui/.classpath b/org.genivi.commonapi.someip.ui/.classpath index 1fa3e68..eca7bdb 100644 --- a/org.genivi.commonapi.someip.ui/.classpath +++ b/org.genivi.commonapi.someip.ui/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.genivi.commonapi.someip.ui/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.someip.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/org.genivi.commonapi.someip.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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.someip.ui/META-INF/MANIFEST.MF b/org.genivi.commonapi.someip.ui/META-INF/MANIFEST.MF index 7748347..2bb3ae3 100644 --- a/org.genivi.commonapi.someip.ui/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.someip.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI Common API Some/IP UI Bundle-SymbolicName: org.genivi.commonapi.someip.ui;singleton:=true -Bundle-Version: 3.1.9.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-Activator: org.genivi.commonapi.someip.ui.CommonApiSomeIPUiPlugin Bundle-Vendor: BMW AG Require-Bundle: org.eclipse.ui, @@ -14,12 +14,12 @@ Require-Bundle: org.eclipse.ui, 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="3.0.0", - org.genivi.commonapi.core.ui;bundle-version="3.1.9", - org.genivi.commonapi.someip;bundle-version="3.1.9", + org.genivi.commonapi.core.ui;bundle-version="3.1.10", + org.genivi.commonapi.someip;bundle-version="3.1.10", org.franca.core.dsl.ui;bundle-version="0.9.1", org.franca.deploymodel.dsl.ui;bundle-version="0.9.1", - org.genivi.commonapi.someip.deployment.validator;bundle-version="3.1.9" -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 + org.genivi.commonapi.someip.deployment.validator;bundle-version="3.1.10" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Import-Package: javax.inject Export-Package: org.genivi.commonapi.someip.ui diff --git a/org.genivi.commonapi.someip.ui/pom.xml b/org.genivi.commonapi.someip.ui/pom.xml index 0513b24..290945c 100644 --- a/org.genivi.commonapi.someip.ui/pom.xml +++ b/org.genivi.commonapi.someip.ui/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.updatesite/Build CommonAPI-SomeIP Tools.launch b/org.genivi.commonapi.someip.updatesite/Build CommonAPI-SomeIP Tools.launch index c1cb8e7..5062028 100644 --- a/org.genivi.commonapi.someip.updatesite/Build CommonAPI-SomeIP Tools.launch +++ b/org.genivi.commonapi.someip.updatesite/Build CommonAPI-SomeIP Tools.launch @@ -15,5 +15,6 @@ + diff --git a/org.genivi.commonapi.someip.updatesite/category.xml b/org.genivi.commonapi.someip.updatesite/category.xml index 747625d..0f65375 100644 --- a/org.genivi.commonapi.someip.updatesite/category.xml +++ b/org.genivi.commonapi.someip.updatesite/category.xml @@ -1,9 +1,9 @@ - + - + diff --git a/org.genivi.commonapi.someip.updatesite/pom.xml b/org.genivi.commonapi.someip.updatesite/pom.xml index c104fe9..8f3b120 100644 --- a/org.genivi.commonapi.someip.updatesite/pom.xml +++ b/org.genivi.commonapi.someip.updatesite/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.validator.feature/feature.xml b/org.genivi.commonapi.someip.validator.feature/feature.xml index 8ac4a58..ce9f8a7 100644 --- a/org.genivi.commonapi.someip.validator.feature/feature.xml +++ b/org.genivi.commonapi.someip.validator.feature/feature.xml @@ -2,7 +2,7 @@ diff --git a/org.genivi.commonapi.someip.validator.feature/pom.xml b/org.genivi.commonapi.someip.validator.feature/pom.xml index 4219016..8d27f40 100644 --- a/org.genivi.commonapi.someip.validator.feature/pom.xml +++ b/org.genivi.commonapi.someip.validator.feature/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.validator/.classpath b/org.genivi.commonapi.someip.validator/.classpath index 1fa3e68..eca7bdb 100644 --- a/org.genivi.commonapi.someip.validator/.classpath +++ b/org.genivi.commonapi.someip.validator/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.genivi.commonapi.someip.validator/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.someip.validator/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/org.genivi.commonapi.someip.validator/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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.someip.validator/META-INF/MANIFEST.MF b/org.genivi.commonapi.someip.validator/META-INF/MANIFEST.MF index aa9a4f5..42b458b 100644 --- a/org.genivi.commonapi.someip.validator/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.someip.validator/META-INF/MANIFEST.MF @@ -2,15 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI Common API Some/IP Validator Bundle-SymbolicName: org.genivi.commonapi.someip.validator;singleton:=true -Bundle-Version: 3.1.9.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-Version: 3.1.10.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-Vendor: BMW AG Require-Bundle: 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, org.eclipse.xtext.ui;bundle-version="[2.7.0,3.0.0)";visibility:=reexport, - org.genivi.commonapi.core;bundle-version="3.1.9";visibility:=reexport, + org.genivi.commonapi.core;bundle-version="3.1.10";visibility:=reexport, org.genivi.commonapi.core.ui, - org.genivi.commonapi.someip;bundle-version="3.1.9";visibility:=reexport, - org.genivi.commonapi.someip.ui;bundle-version="3.1.9";visibility:=reexport + org.genivi.commonapi.someip;bundle-version="3.1.10";visibility:=reexport, + org.genivi.commonapi.someip.ui;bundle-version="3.1.10";visibility:=reexport Export-Package: org.genivi.commonapi.someip.validator diff --git a/org.genivi.commonapi.someip.validator/pom.xml b/org.genivi.commonapi.someip.validator/pom.xml index 610d1ff..0580811 100644 --- a/org.genivi.commonapi.someip.validator/pom.xml +++ b/org.genivi.commonapi.someip.validator/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip.verification/CMakeLists.txt b/org.genivi.commonapi.someip.verification/CMakeLists.txt index 785fa7c..2a0051b 100644 --- a/org.genivi.commonapi.someip.verification/CMakeLists.txt +++ b/org.genivi.commonapi.someip.verification/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT(libsomeipglue) SET( ${PROJECT_NAME}_MAJOR_VERSION 3 ) SET( ${PROJECT_NAME}_MINOR_VERSION 1 ) -SET( ${PROJECT_NAME}_PATCH_LEVEL 9 ) +SET( ${PROJECT_NAME}_PATCH_LEVEL 10 ) message("Project name: ${PROJECT_NAME}") @@ -140,8 +140,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fidl/conf/ti_stability_sp.fdepl.in "${CMAKE_CURRENT_SOURCE_DIR}/fidl/ti_stability_sp.fdepl" @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fidl/conf/ti_threading.fdepl.in "${CMAKE_CURRENT_SOURCE_DIR}/fidl/ti_threading.fdepl" @ONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fidl/conf/mp_selective.fdepl.in - "${CMAKE_CURRENT_SOURCE_DIR}/fidl/mp_selective.fdepl" @ONLY) file(GLOB FDEPL_FILES "fidl/*.fdepl") message("FDEPL_FILES: ${FDEPL_FILES}") @@ -204,7 +202,6 @@ file(GLOB GLUE_SRCS "src-gen/v1/commonapi/runtime/*SomeIP*.cpp" "src-gen/v1/commonapi/threading/*SomeIP*.cpp" "src-gen/v1/commonapi/stability/sp/*SomeIP*.cpp" - "src-gen/v1/commonapi/multiprocess/bselective/*SomeIP*.cpp" ${DERIVED_TYPE_SRC} ${POLYMORPHIC_TYPE_SRC} ) diff --git a/org.genivi.commonapi.someip.verification/fidl/conf/mp_selective.fdepl.in b/org.genivi.commonapi.someip.verification/fidl/conf/mp_selective.fdepl.in deleted file mode 100644 index 32f2b89..0000000 --- a/org.genivi.commonapi.someip.verification/fidl/conf/mp_selective.fdepl.in +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2015 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-SOMEIP_deployment_spec.fdepl" -import "@COMMONAPI_TEST_FIDL_PATH@/mp_selective.fidl" - -define org.genivi.commonapi.someip.deployment for interface commonapi.multiprocess.bselective.MPSelective { - SomeIpServiceID = 4688 - - broadcast bTestSelective { - SomeIpEventID = 42170 - SomeIpEventGroups = { 33008 } - } -} - -define org.genivi.commonapi.someip.deployment for provider Service { - instance commonapi.multiprocess.bselective.MPSelective { - InstanceId = "commonapi.multiprocess.bselective.MPSelective" - - SomeIpInstanceID = 22656 - - SomeIpUnicastAddress = "127.0.0.1" - SomeIpReliableUnicastPort = 30499 - SomeIpUnreliableUnicastPort = 30499 - } -} diff --git a/org.genivi.commonapi.someip.verification/vsomeip-security.json b/org.genivi.commonapi.someip.verification/vsomeip-security.json new file mode 100644 index 0000000..9624c94 --- /dev/null +++ b/org.genivi.commonapi.someip.verification/vsomeip-security.json @@ -0,0 +1,1012 @@ +{ + "unicast" : "127.0.0.1", + "logging" : + { + "level" : "warning", + "console" : "true", + "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" }, + "dlt" : "false" + }, + "applications" : + [ + { + "name" : "vsomeipd", + "id" : "0x1111" + }, + { + "name" : "client-sample", + "num_dispatchers" : "3", + "id" : "0x1343" + }, + { + "name" : "other-client-sample", + "id" : "0x1344" + }, + { + "name" : "service-sample", + "id" : "0x1277" + }, + { + "name" : "test-service", + "id" : "0x1488" + }, + { + "name" : "StabilityMP-Child0", + "id" : "0x1400" + }, + { + "name" : "StabilityMP-Child1", + "id" : "0x1401" + }, + { + "name" : "StabilityMP-Child2", + "id" : "0x1402" + }, + { + "name" : "StabilityMP-Child3", + "id" : "0x1403" + }, + { + "name" : "StabilityMP-Child4", + "id" : "0x1404" + }, + { + "name" : "StabilityMP-Child5", + "id" : "0x1405" + }, + { + "name" : "StabilityMP-Child6", + "id" : "0x1406" + }, + { + "name" : "StabilityMP-Child7", + "id" : "0x1407" + }, + { + "name" : "StabilityMP-Child8", + "id" : "0x1408" + }, + { + "name" : "StabilityMP-Child9", + "id" : "0x1409" + }, + { + "name" : "StabilityMP-Child10", + "id" : "0x140a" + }, + { + "name" : "mainloop-thirdParty", + "id" : "0x140d" + }, + { + "name" : "blub", + "id" : "0x1345" + } + ], + "servicegroups" : + [ + { + "name" : "default", + "delays" : + { + "initial" : { "minimum" : "10", "maximum" : "100" }, + "repetition-base" : "200", + "repetition-max" : "3", + "cyclic-offer" : "2000", + "cyclic-request" : "2001" + }, + "services" : + [ + { + "service" : "0x1234", + "instance" : "0x5678", + "reliable" : { "port" : "30509", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1234", + "instance" : "0x5706", + "unreliable" : "31017" + }, + { + "service" : "0x1235", + "instance" : "0x5679", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1236", + "instance" : "0x5680", + "unreliable" : "31000" + }, + { + "service" : "0x1237", + "instance" : "0x5681", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1238", + "instance" : "0x5682", + "unreliable" : "31000" + }, + { + "service" : "0x1239", + "instance" : "0x5683", + "unreliable" : "31000" + }, + { + "service" : "0x1240", + "instance" : "0x5684", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1240", + "instance" : "0x5685", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1A85", + "instance" : "0x5999", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1241", + "instance" : "0x5685", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1242", + "instance" : "0x5686", + "reliable" : { "port" : "30506", "enable-magic-cookies" : "false" }, + "unreliable" : "31000" + }, + { + "service" : "0x1243", + "instance" : "0x5687", + "unreliable" : "31000" + }, + { + "service" : "0x1243", + "instance" : "0x5690", + "unreliable" : "31001" + }, + { + "service" : "0x1243", + "instance" : "0x5691", + "unreliable" : "31002" + }, + { + "service" : "0x1243", + "instance" : "0x5692", + "unreliable" : "31003" + }, + { + "service" : "0x1243", + "instance" : "0x5693", + "unreliable" : "31004" + }, + { + "service" : "0x1243", + "instance" : "0x5694", + "unreliable" : "31005" + }, + { + "service" : "0x1243", + "instance" : "0x5695", + "unreliable" : "31006" + }, + { + "service" : "0x1243", + "instance" : "0x5696", + "unreliable" : "31007" + }, + { + "service" : "0x1243", + "instance" : "0x5697", + "unreliable" : "31008" + }, + { + "service" : "0x1243", + "instance" : "0x5698", + "unreliable" : "31009" + }, + { + "service" : "0x1243", + "instance" : "0x5699", + "unreliable" : "31010" + }, + { + "service" : "0x1243", + "instance" : "0x5700", + "unreliable" : "31011" + }, + { + "service" : "0x1243", + "instance" : "0x5701", + "unreliable" : "31012" + }, + { + "service" : "0x1243", + "instance" : "0x5702", + "unreliable" : "31013" + }, + { + "service" : "0x1243", + "instance" : "0x5703", + "unreliable" : "31014" + }, + { + "service" : "0x1243", + "instance" : "0x5704", + "unreliable" : "31015" + }, + { + "service" : "0x1243", + "instance" : "0x5705", + "unreliable" : "31016" + }, + { + "service" : "0x1243", + "instance" : "0x5706", + "unreliable" : "31017" + }, + { + "service" : "0x1243", + "instance" : "0x5707", + "unreliable" : "31018" + }, + { + "service" : "0x1243", + "instance" : "0x5708", + "unreliable" : "31019" + }, + { + "service" : "0x1243", + "instance" : "0x5709", + "unreliable" : "31020" + }, + { + "service" : "0x1243", + "instance" : "0x5710", + "unreliable" : "31021" + }, + { + "service" : "0x1243", + "instance" : "0x5711", + "unreliable" : "31022" + }, + { + "service" : "0x1243", + "instance" : "0x5712", + "unreliable" : "31023" + }, + { + "service" : "0x1243", + "instance" : "0x5713", + "unreliable" : "31024" + }, + { + "service" : "0x1243", + "instance" : "0x5714", + "unreliable" : "31025" + }, + { + "service" : "0x1243", + "instance" : "0x5715", + "unreliable" : "31026" + }, + { + "service" : "0x1243", + "instance" : "0x5716", + "unreliable" : "31027" + }, + { + "service" : "0x1243", + "instance" : "0x5717", + "unreliable" : "31028" + }, + { + "service" : "0x1243", + "instance" : "0x5718", + "unreliable" : "31029" + }, + { + "service" : "0x1243", + "instance" : "0x5719", + "unreliable" : "31030" + }, + { + "service" : "0x1243", + "instance" : "0x5720", + "unreliable" : "31031" + }, + { + "service" : "0x1243", + "instance" : "0x5721", + "unreliable" : "31032" + }, + { + "service" : "0x1243", + "instance" : "0x5722", + "unreliable" : "31033" + }, + { + "service" : "0x1243", + "instance" : "0x5723", + "unreliable" : "31034" + }, + { + "service" : "0x1243", + "instance" : "0x5724", + "unreliable" : "31035" + }, + { + "service" : "0x1243", + "instance" : "0x5725", + "unreliable" : "31036" + }, + { + "service" : "0x1243", + "instance" : "0x5726", + "unreliable" : "31037" + }, + { + "service" : "0x1243", + "instance" : "0x5727", + "unreliable" : "31038" + }, + { + "service" : "0x1243", + "instance" : "0x5728", + "unreliable" : "31039" + }, + { + "service" : "0x1243", + "instance" : "0x5729", + "unreliable" : "31040" + }, + { + "service" : "0x1244", + "instance" : "0x5688", + "unreliable" : "31000" + }, + { + "service" : "0x1244", + "instance" : "0x5730", + "unreliable" : "31002" + }, + { + "service" : "0x1244", + "instance" : "0x5731", + "unreliable" : "31003" + }, + { + "service" : "0x1244", + "instance" : "0x5732", + "unreliable" : "31004" + }, + { + "service" : "0x1244", + "instance" : "0x5733", + "unreliable" : "31005" + }, + { + "service" : "0x1244", + "instance" : "0x5734", + "unreliable" : "31006" + }, + { + "service" : "0x1244", + "instance" : "0x5735", + "unreliable" : "31007" + }, + { + "service" : "0x1244", + "instance" : "0x5736", + "unreliable" : "31008" + }, + { + "service" : "0x1244", + "instance" : "0x5737", + "unreliable" : "31009" + }, + { + "service" : "0x1244", + "instance" : "0x5738", + "unreliable" : "31010" + }, + { + "service" : "0x1244", + "instance" : "0x5739", + "unreliable" : "31011" + }, + { + "service" : "0x1244", + "instance" : "0x5740", + "unreliable" : "31012" + }, + { + "service" : "0x1244", + "instance" : "0x5741", + "unreliable" : "31013" + }, + { + "service" : "0x1244", + "instance" : "0x5742", + "unreliable" : "31014" + }, + { + "service" : "0x1244", + "instance" : "0x5743", + "unreliable" : "31015" + }, + { + "service" : "0x1244", + "instance" : "0x5744", + "unreliable" : "31016" + }, + { + "service" : "0x1244", + "instance" : "0x5745", + "unreliable" : "31017" + }, + { + "service" : "0x1244", + "instance" : "0x5746", + "unreliable" : "31018" + }, + { + "service" : "0x1244", + "instance" : "0x5747", + "unreliable" : "31019" + }, + { + "service" : "0x1244", + "instance" : "0x5748", + "unreliable" : "31020" + }, + { + "service" : "0x1244", + "instance" : "0x5749", + "unreliable" : "31021" + }, + { + "service" : "0x1244", + "instance" : "0x5750", + "unreliable" : "31022" + }, + { + "service" : "0x1244", + "instance" : "0x5751", + "unreliable" : "31023" + }, + { + "service" : "0x1244", + "instance" : "0x5752", + "unreliable" : "31024" + }, + { + "service" : "0x1244", + "instance" : "0x5753", + "unreliable" : "31025" + }, + { + "service" : "0x1244", + "instance" : "0x5754", + "unreliable" : "31026" + }, + { + "service" : "0x1244", + "instance" : "0x5755", + "unreliable" : "31027" + }, + { + "service" : "0x1244", + "instance" : "0x5756", + "unreliable" : "31028" + }, + { + "service" : "0x1244", + "instance" : "0x5757", + "unreliable" : "31029" + }, + { + "service" : "0x1244", + "instance" : "0x5758", + "unreliable" : "31030" + }, + { + "service" : "0x1244", + "instance" : "0x5759", + "unreliable" : "31031" + }, + { + "service" : "0x1244", + "instance" : "0x5760", + "unreliable" : "31032" + }, + { + "service" : "0x1244", + "instance" : "0x5761", + "unreliable" : "31033" + }, + { + "service" : "0x1244", + "instance" : "0x5762", + "unreliable" : "31034" + }, + { + "service" : "0x1244", + "instance" : "0x5763", + "unreliable" : "31035" + }, + { + "service" : "0x1244", + "instance" : "0x5764", + "unreliable" : "31036" + }, + { + "service" : "0x1244", + "instance" : "0x5765", + "unreliable" : "31037" + }, + { + "service" : "0x1244", + "instance" : "0x5766", + "unreliable" : "31038" + }, + { + "service" : "0x1244", + "instance" : "0x5767", + "unreliable" : "31039" + }, + { + "service" : "0x1244", + "instance" : "0x5768", + "unreliable" : "31040" + }, + { + "service" : "0x1244", + "instance" : "0x5769", + "unreliable" : "31041" + }, + { + "service" : "0x1244", + "instance" : "0x5770", + "unreliable" : "31042" + }, + { + "service" : "0x1244", + "instance" : "0x5771", + "unreliable" : "31043" + }, + { + "service" : "0x1244", + "instance" : "0x5772", + "unreliable" : "31044" + }, + { + "service" : "0x1244", + "instance" : "0x5773", + "unreliable" : "31045" + }, + { + "service" : "0x1244", + "instance" : "0x5774", + "unreliable" : "31046" + }, + { + "service" : "0x1244", + "instance" : "0x5775", + "unreliable" : "31047" + }, + { + "service" : "0x1244", + "instance" : "0x5776", + "unreliable" : "31048" + }, + { + "service" : "0x1244", + "instance" : "0x5777", + "unreliable" : "31049" + }, + { + "service" : "0x1244", + "instance" : "0x5778", + "unreliable" : "31050" + }, + { + "service" : "0x1244", + "instance" : "0x5779", + "unreliable" : "31051" + }, + { + "service" : "0x1244", + "instance" : "0x5780", + "unreliable" : "31052" + }, + { + "service" : "0x1244", + "instance" : "0x5781", + "unreliable" : "31053" + }, + { + "service" : "0x1244", + "instance" : "0x5782", + "unreliable" : "31054" + }, + { + "service" : "0x1244", + "instance" : "0x5783", + "unreliable" : "31055" + }, + { + "service" : "0x1244", + "instance" : "0x5784", + "unreliable" : "31056" + }, + { + "service" : "0x1244", + "instance" : "0x5785", + "unreliable" : "31057" + }, + { + "service" : "0x1244", + "instance" : "0x5786", + "unreliable" : "31058" + }, + { + "service" : "0x1244", + "instance" : "0x5787", + "unreliable" : "31059" + }, + { + "service" : "0x1244", + "instance" : "0x5788", + "unreliable" : "31060" + }, + { + "service" : "0x1244", + "instance" : "0x5789", + "unreliable" : "31061" + }, + { + "service" : "0x1244", + "instance" : "0x5790", + "unreliable" : "31062" + }, + { + "service" : "0x1244", + "instance" : "0x5791", + "unreliable" : "31063" + }, + { + "service" : "0x1244", + "instance" : "0x5792", + "unreliable" : "31064" + }, + { + "service" : "0x1244", + "instance" : "0x5793", + "unreliable" : "31065" + }, + { + "service" : "0x1244", + "instance" : "0x5794", + "unreliable" : "31066" + }, + { + "service" : "0x1244", + "instance" : "0x5795", + "unreliable" : "31067" + }, + { + "service" : "0x1244", + "instance" : "0x5796", + "unreliable" : "31068" + }, + { + "service" : "0x1244", + "instance" : "0x5797", + "unreliable" : "31069" + }, + { + "service" : "0x1244", + "instance" : "0x5798", + "unreliable" : "31070" + }, + { + "service" : "0x1244", + "instance" : "0x5799", + "unreliable" : "31071" + }, + { + "service" : "0x1244", + "instance" : "0x5800", + "unreliable" : "31072" + }, + { + "service" : "0x1244", + "instance" : "0x5801", + "unreliable" : "31073" + }, + { + "service" : "0x1244", + "instance" : "0x5802", + "unreliable" : "31074" + }, + { + "service" : "0x1244", + "instance" : "0x5803", + "unreliable" : "31075" + }, + { + "service" : "0x1244", + "instance" : "0x5804", + "unreliable" : "31076" + }, + { + "service" : "0x1244", + "instance" : "0x5805", + "unreliable" : "31077" + }, + { + "service" : "0x1244", + "instance" : "0x5806", + "unreliable" : "31078" + }, + { + "service" : "0x1244", + "instance" : "0x5807", + "unreliable" : "31079" + }, + { + "service" : "0x1244", + "instance" : "0x5808", + "unreliable" : "31080" + }, + { + "service" : "0x1244", + "instance" : "0x5809", + "unreliable" : "31081" + }, + { + "service" : "0x1244", + "instance" : "0x5810", + "unreliable" : "31082" + }, + { + "service" : "0x1244", + "instance" : "0x5811", + "unreliable" : "31083" + }, + { + "service" : "0x1244", + "instance" : "0x5812", + "unreliable" : "31084" + }, + { + "service" : "0x1244", + "instance" : "0x5813", + "unreliable" : "31085" + }, + { + "service" : "0x1244", + "instance" : "0x5814", + "unreliable" : "31086" + }, + { + "service" : "0x1244", + "instance" : "0x5815", + "unreliable" : "31087" + }, + { + "service" : "0x1244", + "instance" : "0x5816", + "unreliable" : "31088" + }, + { + "service" : "0x1244", + "instance" : "0x5817", + "unreliable" : "31089" + }, + { + "service" : "0x1244", + "instance" : "0x5818", + "unreliable" : "31090" + }, + { + "service" : "0x1244", + "instance" : "0x5819", + "unreliable" : "31091" + }, + { + "service" : "0x1244", + "instance" : "0x5820", + "unreliable" : "31092" + }, + { + "service" : "0x1244", + "instance" : "0x5821", + "unreliable" : "31093" + }, + { + "service" : "0x1244", + "instance" : "0x5822", + "unreliable" : "31094" + }, + { + "service" : "0x1244", + "instance" : "0x5823", + "unreliable" : "31095" + }, + { + "service" : "0x1244", + "instance" : "0x5824", + "unreliable" : "31096" + }, + { + "service" : "0x1244", + "instance" : "0x5825", + "unreliable" : "31097" + }, + { + "service" : "0x1244", + "instance" : "0x5826", + "unreliable" : "31098" + }, + { + "service" : "0x1244", + "instance" : "0x5827", + "unreliable" : "31099" + }, + { + "service" : "0x1244", + "instance" : "0x5828", + "unreliable" : "31100" + }, + { + "service" : "0x1244", + "instance" : "0x5829", + "unreliable" : "31101" + }, + { + "service" : "0x1245", + "instance" : "0x5689", + "unreliable" : "31001" + }, + { + "service" : "0x1246", + "instance" : "0x568a", + "unreliable" : "31001" + }, + { + "service" : "0x1247", + "instance" : "0x568b", + "unreliable" : "31001" + }, + { + "service" : "0x1234", + "instance" : "0x03e8", + "unreliable" : "30499" + }, + { + "service" : "0x1235", + "instance" : "0x07d0", + "unreliable" : "30500" + }, + { + "service" : "0x1235", + "instance" : "0x07d1", + "unreliable" : "30501" + }, + { + "service" : "0x1236", + "instance" : "0x0bb8", + "unreliable" : "30600" + }, + { + "service" : "0x1237", + "instance" : "0x0bb9", + "unreliable" : "30601" + }, + { + "service" : "0x1238", + "instance" : "0x0bba", + "unreliable" : "30602", + "events" : + [ + { + "event" : "0x80ec", + "is_field" : "true" + } + ], + "eventgroups" : + [ + { + "eventgroup" : "0x4556", + "events" : + [ + "0x80ec" + ] + } + ] + }, + { + "service" : "0x1239", + "instance" : "0x0bbb", + "unreliable" : "30603", + "events" : + [ + { + "event" : "0x80ed", + "is_field" : "true" + } + ], + "eventgroups" : + [ + { + "eventgroup" : "0x4557", + "events" : + [ + "0x80ed" + ] + } + ] + }, + { + "service" : "0x1248", + "instance" : "0x1", + "unreliable" : "31000" + }, + { + "service" : "0x1250", + "instance" : "0x5880", + "unreliable" : "0x7723" + }, + { + "service" : "0x15b3", + "instance" : "0x3e8", + "unreliable" : "0x775b" + }, + { + "service" : "0x15b4", + "instance" : "0x3e9", + "unreliable" : "0x775c" + }, + { + "service" : "0x15b5", + "instance" : "0x3ea", + "unreliable" : "0x775d" + } + ] + } + ], + "security" : + { + "check_credentials" : "true", + "policies" : + [ + { + "client" : { "first" : "0x0001", "last" : "0xFFFF" }, + "credentials" : { "uid" : "1000", "gid" : "1000" }, + "deny" : + { + } + } + ] + }, + "routing" : "vsomeipd", + "service-discovery" : + { + "enable" : "true", + "multicast" : "224.244.224.245", + "port" : "30490", + "protocol" : "udp" + } +} diff --git a/org.genivi.commonapi.someip/.classpath b/org.genivi.commonapi.someip/.classpath index 3e9059e..4a3597e 100644 --- a/org.genivi.commonapi.someip/.classpath +++ b/org.genivi.commonapi.someip/.classpath @@ -1,6 +1,6 @@ - + diff --git a/org.genivi.commonapi.someip/.settings/org.eclipse.jdt.core.prefs b/org.genivi.commonapi.someip/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/org.genivi.commonapi.someip/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +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.someip/META-INF/MANIFEST.MF b/org.genivi.commonapi.someip/META-INF/MANIFEST.MF index 372ba03..fd4e61d 100644 --- a/org.genivi.commonapi.someip/META-INF/MANIFEST.MF +++ b/org.genivi.commonapi.someip/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: GENIVI Common API Some/IP C++ Generator Bundle-Vendor: BMW AG -Bundle-Version: 3.1.9.qualifier +Bundle-Version: 3.1.10.qualifier Bundle-SymbolicName: org.genivi.commonapi.someip;singleton:=true Bundle-ActivationPolicy: lazy Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0", @@ -10,8 +10,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0", org.eclipse.xtext.util;bundle-version="[2.7.0,3.0.0)";visibility:=reexport, org.franca.core.dsl;bundle-version="[0.9.0,0.10.0)";visibility:=reexport, org.franca.deploymodel.dsl;bundle-version="[0.9.0,0.10.0)";visibility:=reexport, - org.genivi.commonapi.core;bundle-version="3.1.9";visibility:=reexport, + org.genivi.commonapi.core;bundle-version="3.1.10";visibility:=reexport, org.eclipse.core.resources;bundle-version="[3.9.0,4.0.0)" -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Export-Package: org.genivi.commonapi.someip.generator, org.genivi.commonapi.someip.preferences diff --git a/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl b/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl index bc84ff2..c8cb260 100644 --- a/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl +++ b/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl @@ -65,6 +65,7 @@ specification org.genivi.commonapi.someip.deployment extends org.genivi.commonap SomeIpEventGroups: Integer[] (optional); SomeIpAttributeEndianess: {le, be} (default: be); + SomeIpAttributeCRCWidth: {zero, one, four} (default: zero); } for methods { @@ -78,6 +79,7 @@ specification org.genivi.commonapi.someip.deployment extends org.genivi.commonap SomeIpErrorCoding: {Header} (default: Header); SomeIpMethodEndianess: {le, be} (default: be); + SomeIpMethodCRCWidth: {zero, one, four} (default: zero); } for broadcasts { @@ -88,6 +90,7 @@ specification org.genivi.commonapi.someip.deployment extends org.genivi.commonap SomeIpEventGroups: Integer[] (optional); SomeIpBroadcastEndianess: {le, be} (default: be); + SomeIpBroadcastCRCWidth: {zero, one, four} (default: zero); } for arrays { diff --git a/org.genivi.commonapi.someip/pom.xml b/org.genivi.commonapi.someip/pom.xml index 950f691..c504b9c 100644 --- a/org.genivi.commonapi.someip/pom.xml +++ b/org.genivi.commonapi.someip/pom.xml @@ -7,7 +7,7 @@ commonapi org.genivi.commonapi.someip.releng - 3.1.9-SNAPSHOT + 3.1.10-SNAPSHOT ../org.genivi.commonapi.someip.releng \ No newline at end of file diff --git a/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPDeploymentGenerator.xtend b/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPDeploymentGenerator.xtend index e6debe5..d6f1a5c 100644 --- a/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPDeploymentGenerator.xtend +++ b/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPDeploymentGenerator.xtend @@ -92,7 +92,7 @@ class FInterfaceSomeIPDeploymentGenerator extends FTypeCollectionSomeIPDeploymen «a.generateDeploymentDeclaration(m, _interface, _accessor)» «ENDFOR» «FOR a : m.outArgs» - «a.generateDeploymentDeclaration(m, _interface, _accessor)» + «a.generateDeploymentDeclaration(m, _interface, _accessor)» «ENDFOR» «ENDFOR» @@ -157,20 +157,20 @@ class FInterfaceSomeIPDeploymentGenerator extends FTypeCollectionSomeIPDeploymen ///////////////////////////////////// def protected dispatch String generateDeploymentDeclaration(FAttribute _attribute, FInterface _interface, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_attribute) || (_attribute.array && _accessor.hasDeployment(_attribute))) { - return "extern " + _attribute.getDeploymentType(_interface, true) + " " + _attribute.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _attribute.getDeploymentType(_interface, true) + " " + _attribute.name + "Deployment;" } return "" } def protected String generateDeploymentDeclaration(FArgument _argument, FMethod _method, FInterface _interface, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_argument) || (_argument.array && _accessor.hasDeployment(_argument))) { - return "extern " + _argument.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _argument.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "Deployment;" } } def protected String generateDeploymentDeclaration(FArgument _argument, FBroadcast _broadcast, FInterface _interface, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_argument) || (_argument.array && _accessor.hasDeployment(_argument))) { - return "extern " + _argument.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _argument.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "Deployment;" } } diff --git a/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPStubAdapterGenerator.xtend b/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPStubAdapterGenerator.xtend index d3cf5ed..484b87f 100644 --- a/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPStubAdapterGenerator.xtend +++ b/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FInterfaceSomeIPStubAdapterGenerator.xtend @@ -7,6 +7,7 @@ package org.genivi.commonapi.someip.generator import java.util.HashMap import java.util.List +import java.util.LinkedList import javax.inject.Inject import org.eclipse.core.resources.IResource import org.eclipse.xtext.generator.IFileSystemAccess @@ -108,7 +109,9 @@ class FInterfaceSomeIPStubAdapterGenerator { void «broadcast.unsubscribeSelectiveMethodName»(const std::shared_ptr clientId); std::shared_ptr const «broadcast.stubAdapterClassSubscribersMethodName»(); «ELSE» - void «broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map['const ' + getTypeName(_interface, true) + '& ' + elementName].join(', ')»); + «IF !broadcast.isErrorType(_accessor)» + void «broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map['const ' + getTypeName(_interface, true) + '& ' + elementName].join(', ')»); + «ENDIF» «ENDIF» «ENDFOR» @@ -162,7 +165,7 @@ class FInterfaceSomeIPStubAdapterGenerator { «var counterMap = new HashMap()» «var methodNumberMap = new HashMap()» - «_interface.generateMethodDispatcherDeclarations(_interface, counterMap, methodNumberMap)» + «_interface.generateMethodDispatcherDeclarations(_interface, counterMap, methodNumberMap, _accessor)» «_interface.someipStubAdapterClassNameInternal»( const CommonAPI::SomeIP::Address &_address, @@ -198,13 +201,15 @@ class FInterfaceSomeIPStubAdapterGenerator { «ENDIF» // Provided events/fields «FOR broadcast : _interface.broadcasts» - { - std::set itsEventGroups; - «FOR eventgroup : broadcast.getEventGroups(_accessor)» - itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(«eventgroup»)); - «ENDFOR» - CommonAPI::SomeIP::StubAdapter::registerEvent(«broadcast.getEventIdentifier(_accessor)», itsEventGroups, false); - } + «IF !broadcast.isErrorType(_accessor)» + { + std::set itsEventGroups; + «FOR eventgroup : broadcast.getEventGroups(_accessor)» + itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(«eventgroup»)); + «ENDFOR» + CommonAPI::SomeIP::StubAdapter::registerEvent(«broadcast.getEventIdentifier(_accessor)», itsEventGroups, false); + } + «ENDIF» «ENDFOR» «FOR attribute : _interface.attributes» «IF attribute.observable» @@ -349,23 +354,25 @@ class FInterfaceSomeIPStubAdapterGenerator { } «ELSE» - template - void «_interface.someipStubAdapterClassNameInternal»<_Stub, _Stubs...>::«broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map['const ' + getTypeName(_interface, true) + '& _' + elementName].join(', ')») { - «FOR arg: broadcast.outArgs» - «val String deploymentType = arg.getDeploymentType(_interface, true)» - «val String deployment = arg.getDeploymentRef(arg.array, broadcast, _interface, _accessor)» - «IF deploymentType != "CommonAPI::EmptyDeployment" && deploymentType != ""» - CommonAPI::Deployable< «arg.getTypeName(arg, true)», «deploymentType»> deployed_«arg.name»(_«arg.name», «IF deployment != ""»«deployment»«ELSE»nullptr«ENDIF»); - «ENDIF» - «ENDFOR» - CommonAPI::SomeIP::StubEventHelper> - ::sendEvent( - *this, - «broadcast.getEventIdentifier(_accessor)», - «broadcast.getEndianess(_accessor)»«IF broadcast.outArgs.size > 0»,«ENDIF» - «broadcast.outArgs.map[getDeployedElementName(_interface, _accessor)].join(', ')» - ); - } + «IF !broadcast.isErrorType(_accessor)» + template + void «_interface.someipStubAdapterClassNameInternal»<_Stub, _Stubs...>::«broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map['const ' + getTypeName(_interface, true) + '& _' + elementName].join(', ')») { + «FOR arg: broadcast.outArgs» + «val String deploymentType = arg.getDeploymentType(_interface, true)» + «val String deployment = arg.getDeploymentRef(arg.array, broadcast, _interface, _accessor)» + «IF deploymentType != "CommonAPI::EmptyDeployment" && deploymentType != ""» + CommonAPI::Deployable< «arg.getTypeName(arg, true)», «deploymentType»> deployed_«arg.name»(_«arg.name», «IF deployment != ""»«deployment»«ELSE»nullptr«ENDIF»); + «ENDIF» + «ENDFOR» + CommonAPI::SomeIP::StubEventHelper> + ::sendEvent( + *this, + «broadcast.getEventIdentifier(_accessor)», + «broadcast.getEndianess(_accessor)»«IF broadcast.outArgs.size > 0»,«ENDIF» + «broadcast.outArgs.map[getDeployedElementName(_interface, _accessor)].join(', ')» + ); + } + «ENDIF» «ENDIF» «ENDFOR» @@ -454,17 +461,27 @@ class FInterfaceSomeIPStubAdapterGenerator { def private String generateMethodDispatcherDeclarations(FInterface _interface, FInterface _container, HashMap _counters, - HashMap _methods) ''' + HashMap _methods, + PropertyAccessor _accessor) ''' «val accessor = getAccessor(_interface)» «FOR method : _interface.methods» «FTypeGenerator::generateComments(method, false)» «IF !method.isFireAndForget» + «var errorReplyTypes = new LinkedList()» + «FOR broadcast : _interface.broadcasts» + «IF broadcast.isErrorType(method, _accessor)» + «{errorReplyTypes.add(broadcast.errorReplyTypes(method, _accessor));""}» + «broadcast.generateErrorReplyCallback(_interface, method, _accessor)» + «ENDIF» + «ENDFOR» + static CommonAPI::SomeIP::MethodWithReplyStubDispatcher< «_interface.stubFullClassName», std::tuple< «method.allInTypes»>, std::tuple< «method.allOutTypes»>, std::tuple< «method.inArgs.getDeploymentTypes(_interface, accessor)»>, - std::tuple< «method.getErrorDeploymentType(true)»«method.outArgs.getDeploymentTypes(_interface, accessor)»> + std::tuple< «method.getErrorDeploymentType(true)»«method.outArgs.getDeploymentTypes(_interface, accessor)»>«IF errorReplyTypes.size > 0»,«ENDIF» + «errorReplyTypes.map['std::function< void (' + it + ')>'].join(',\n')» «IF !(_counters.containsKey(method.someipStubDispatcherVariable))» «{_counters.put(method.someipStubDispatcherVariable, 0); _methods.put(method, 0);""}» > «method.someipStubDispatcherVariable»; @@ -491,10 +508,11 @@ class FInterfaceSomeIPStubAdapterGenerator { def private String recursivelyGenerateMethodDispatcherDeclarations(FInterface _interface, FInterface _container, HashMap _counters, - HashMap _methods) ''' - «_interface.generateMethodDispatcherDeclarations(_container, _counters, _methods)» + HashMap _methods, + PropertyAccessor _accessor) ''' + «_interface.generateMethodDispatcherDeclarations(_container, _counters, _methods, _accessor)» «IF _interface.base != null» - «_interface.base.recursivelyGenerateMethodDispatcherDeclarations(_container, _counters, _methods)» + «_interface.base.recursivelyGenerateMethodDispatcherDeclarations(_container, _counters, _methods, _accessor)» «ENDIF» ''' @@ -535,27 +553,38 @@ class FInterfaceSomeIPStubAdapterGenerator { HashMap methodnumberMap) ''' «FTypeGenerator::generateComments(_method, false)» «IF !_method.isFireAndForget» + «var errorReplyTypes = new LinkedList()» + «var errorReplyCallbacks = new LinkedList()» + «FOR broadcast : _interface.broadcasts» + «IF broadcast.isErrorType(_method, _accessor)» + «{errorReplyTypes.add(broadcast.errorReplyTypes(_method, _accessor));""}» + «{errorReplyCallbacks.add('std::bind(&' + _interface.someipStubAdapterClassNameInternal + '<_Stub, _Stubs...>::' + + broadcast.errorReplyCallbackName(_accessor) + ', ' + broadcast.errorReplyCallbackBindArgs(_accessor) + ')' + );""}» + «ENDIF» + «ENDFOR» template CommonAPI::SomeIP::MethodWithReplyStubDispatcher< «_interface.stubFullClassName», std::tuple< «_method.allInTypes»>, std::tuple< «_method.allOutTypes»>, std::tuple< «_method.inArgs.getDeploymentTypes(_interface, _accessor)»>, - std::tuple< «_method.getErrorDeploymentType(true)»«_method.outArgs.getDeploymentTypes(_interface, _accessor)»> + std::tuple< «_method.getErrorDeploymentType(true)»«_method.outArgs.getDeploymentTypes(_interface, _accessor)»>«IF errorReplyTypes.size > 0»,«ENDIF» + «errorReplyTypes.map['std::function< void (' + it + ')>'].join(',\n')» «IF !(counterMap.containsKey(_method.someipStubDispatcherVariable))» «{counterMap.put(_method.someipStubDispatcherVariable, 0); methodnumberMap.put(_method, 0);""}» > «_thisInterface.someipStubAdapterClassNameInternal»<_Stub, _Stubs...>::«_method.someipStubDispatcherVariable»( &«_interface.stubClassName + "::" + _method.elementName», «_method.isLittleEndian(_accessor)», «_method.getDeployments(_interface, _accessor, true, false)», - «_method.getDeployments(_interface, _accessor, false, true)»); + «_method.getDeployments(_interface, _accessor, false, true)»«IF errorReplyCallbacks.size > 0»,«'\n' + errorReplyCallbacks.map[it].join(',\n')»«ENDIF»); «ELSE» «{counterMap.put(_method.someipStubDispatcherVariable, counterMap.get(_method.someipStubDispatcherVariable) + 1); methodnumberMap.put(_method, counterMap.get(_method.someipStubDispatcherVariable));""}» > «_interface.someipStubAdapterClassNameInternal»<_Stub, _Stubs...>::«_method.someipStubDispatcherVariable»«Integer::toString(counterMap.get(_method.someipStubDispatcherVariable))»( &«_interface.stubClassName + "::" + _method.elementName», «_method.isLittleEndian(_accessor)» «_method.getDeployments(_interface, _accessor, true, false)», - «_method.getDeployments(_interface, _accessor, false, true)»); + «_method.getDeployments(_interface, _accessor, false, true)»«IF errorReplyCallbacks.size > 0»,«'\n' + errorReplyCallbacks.map[it].join(',\n')»«ENDIF»); «ENDIF» «ELSE» template @@ -809,4 +838,17 @@ class FInterfaceSomeIPStubAdapterGenerator { def private generateStubAttributeTableInitializer(FInterface _interface, PropertyAccessor _accessor) ''' ''' + def private generateErrorReplyCallback(FBroadcast _broadcast, FInterface _interface, FMethod _method, PropertyAccessor _accessor) ''' + + static void «_broadcast.errorReplyCallbackName(_accessor)»(«_broadcast.generateErrorReplyCallbackSignature(_method, _accessor)») { + «IF _broadcast.errorArgs(_accessor).size > 1» + auto args = std::make_tuple( + «_broadcast.errorArgs(_accessor).map[it.getDeployable(_interface, _accessor) + '(' + '_' + it.elementName + ', ' + getDeploymentRef(it.array, _broadcast, _interface, _accessor) + ')'].join(",\n") + ");"» + «ELSE» + auto args = std::make_tuple(); + «ENDIF» + (void)args; + //sayHelloStubDispatcher.sendErrorReplyMessage(_callId, «_broadcast.errorName(_accessor)», args); + } + ''' } diff --git a/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FTypeCollectionSomeIPDeploymentGenerator.xtend b/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FTypeCollectionSomeIPDeploymentGenerator.xtend index ad1ee72..e860496 100644 --- a/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FTypeCollectionSomeIPDeploymentGenerator.xtend +++ b/org.genivi.commonapi.someip/src/org/genivi/commonapi/someip/generator/FTypeCollectionSomeIPDeploymentGenerator.xtend @@ -90,7 +90,7 @@ class FTypeCollectionSomeIPDeploymentGenerator { // typecollection-specific deployments «FOR t: _tc.types» - «t.generateDeploymentDeclaration(_tc, _accessor)» + «t.generateDeploymentDeclaration(_tc, _accessor)» «ENDFOR» «_tc.generateDeploymentNamespaceEnd» @@ -247,14 +247,14 @@ class FTypeCollectionSomeIPDeploymentGenerator { def protected dispatch String generateDeploymentDeclaration(FArrayType _array, FTypeCollection _tc, PropertyAccessor _accessor) { if (_accessor.hasDeployment(_array)) { return _array.elementType.generateDeploymentDeclaration(_tc, _accessor) + - "extern " + _array.getDeploymentType(_tc, true) + " " + _array.name + "Deployment;" + "COMMONAPI_EXPORT extern " + _array.getDeploymentType(_tc, true) + " " + _array.name + "Deployment;" } return "" } def protected dispatch String generateDeploymentDeclaration(FEnumerationType _enum, FTypeCollection _tc, PropertyAccessor _accessor) { if (_accessor.hasDeployment(_enum)) { - return "extern " + _enum.elementName + "Deployment_t " + _enum.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _enum.elementName + "Deployment_t " + _enum.name + "Deployment;" } return "" } @@ -263,7 +263,7 @@ class FTypeCollectionSomeIPDeploymentGenerator { if (_accessor.hasDeployment(_map)) { return _map.keyType.generateDeploymentDeclaration(_tc, _accessor) + _map.valueType.generateDeploymentDeclaration(_tc, _accessor) + - "extern " + _map.getDeploymentType(_tc, true) + " " + _map.name + "Deployment;" + "COMMONAPI_EXPORT extern " + _map.getDeploymentType(_tc, true) + " " + _map.name + "Deployment;" } } @@ -276,7 +276,7 @@ class FTypeCollectionSomeIPDeploymentGenerator { for (e : _struct.elements) { declaration += e.generateDeploymentDeclaration(_tc, _accessor) } - declaration += "extern " + _struct.getDeploymentType(_tc, true) + " " + _struct.name + "Deployment;" + declaration += "COMMONAPI_EXPORT extern " + _struct.getDeploymentType(_tc, true) + " " + _struct.name + "Deployment;" return declaration + "\n" } return "" @@ -288,7 +288,7 @@ class FTypeCollectionSomeIPDeploymentGenerator { for (e : _union.elements) { declaration += e.generateDeploymentDeclaration(_tc, _accessor) } - declaration += "extern " + _union.getDeploymentType(_tc, true) + " " + _union.name + "Deployment;" + declaration += "COMMONAPI_EXPORT extern " + _union.getDeploymentType(_tc, true) + " " + _union.name + "Deployment;" return declaration + "\n" } return "" @@ -296,7 +296,7 @@ class FTypeCollectionSomeIPDeploymentGenerator { def protected dispatch String generateDeploymentDeclaration(FField _field, FTypeCollection _tc, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_field) || (_field.array && _accessor.hasDeployment(_field))) { - return "extern " + _field.getDeploymentType(_tc, true) + " " + _field.getRelativeName() + "Deployment;\n" + return "COMMONAPI_EXPORT extern " + _field.getDeploymentType(_tc, true) + " " + _field.getRelativeName() + "Deployment;\n" } return "" }