summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürgen Gehring <juergen.gehring@bmw.de>2015-07-28 08:50:57 -0700
committerJürgen Gehring <juergen.gehring@bmw.de>2015-07-28 08:50:57 -0700
commit336db577dc057b7a13aeaf8eb2c777a26a7b607a (patch)
tree014ba65d235fd73364cc9544b5e69bdd09f7301e
parent9b91fba4b4008007847f32630cbe160287f291fd (diff)
downloadgenivi-common-api-runtime-336db577dc057b7a13aeaf8eb2c777a26a7b607a.tar.gz
CommonAPI-Tools 3.1.33.1.3
-rw-r--r--CommonAPI-Examples/E01HelloWorld/CMakeLists.txt12
-rw-r--r--CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld.fdepl2
-rw-r--r--CommonAPI-Examples/E02Attributes/CMakeLists.txt14
-rw-r--r--CommonAPI-Examples/E02Attributes/fidl/E02Attributes.fdepl11
-rw-r--r--CommonAPI-Examples/E02Attributes/vsomeip-local.json30
-rw-r--r--CommonAPI-Examples/E03Methods/CMakeLists.txt12
-rw-r--r--CommonAPI-Examples/E03Methods/fidl/E03Methods.fdepl8
-rw-r--r--CommonAPI-Examples/E03Methods/vsomeip-local.json20
-rw-r--r--CommonAPI-Examples/E03Methods/vsomeip-service.json10
-rw-r--r--CommonAPI-Examples/E04PhoneBook/CMakeLists.txt20
-rw-r--r--CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl10
-rw-r--r--CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fdepl112
-rw-r--r--CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp18
-rw-r--r--CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp4
-rw-r--r--CommonAPI-Examples/E04PhoneBook/vsomeip-client.json30
-rw-r--r--CommonAPI-Examples/E04PhoneBook/vsomeip-local.json80
-rw-r--r--CommonAPI-Examples/E04PhoneBook/vsomeip-service.json74
-rw-r--r--CommonAPI-Examples/E05Manager/CMakeLists.txt52
-rw-r--r--CommonAPI-Examples/E05Manager/commonapi4dbus.ini8
-rw-r--r--CommonAPI-Examples/E05Manager/commonapi4someip.ini8
-rw-r--r--CommonAPI-Examples/E05Manager/fidl/E05Manager.fdepl65
-rw-r--r--CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp4
-rw-r--r--CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp10
-rw-r--r--CommonAPI-Examples/E05Manager/vsomeip-client.json26
-rw-r--r--CommonAPI-Examples/E05Manager/vsomeip-local.json83
-rw-r--r--CommonAPI-Examples/E05Manager/vsomeip-service.json79
-rw-r--r--CommonAPI-Examples/E06Unions/CMakeLists.txt12
-rw-r--r--CommonAPI-Examples/E06Unions/vsomeip-local.json30
-rw-r--r--CommonAPI-Examples/E06Unions/vsomeip-service.json28
-rw-r--r--CommonAPI-Examples/E07Mainloop/CMakeLists.txt12
-rw-r--r--CommonAPI-Examples/E07Mainloop/fidl/E07Mainloop.fdepl3
-rw-r--r--CommonAPI-Examples/E07Mainloop/src/E07MainloopClient.cpp2
-rw-r--r--CommonAPI-Examples/E07Mainloop/src/E07MainloopService.cpp2
-rw-r--r--CommonAPI-Examples/E07Mainloop/vsomeip-client.json26
-rw-r--r--CommonAPI-Examples/E07Mainloop/vsomeip-local.json (renamed from CommonAPI-Examples/E07Mainloop/vsomeip.json)0
-rw-r--r--CommonAPI-Examples/E07Mainloop/vsomeip-service.json (renamed from CommonAPI-Examples/E01HelloWorld/vsomeip.json)18
-rw-r--r--CommonAPI-Examples/README31
-rw-r--r--NEWS23
-rw-r--r--docx/CommonAPICppUserGuide4
-rwxr-xr-xdocx/images/CommonAPI-Dependencies.pngbin0 -> 1804 bytes
-rw-r--r--org.genivi.commonapi.console.feature/feature.xml4
-rw-r--r--org.genivi.commonapi.console.feature/pom.xml2
-rw-r--r--org.genivi.commonapi.console.franca.feature/feature.xml2
-rw-r--r--org.genivi.commonapi.console.franca.feature/pom.xml2
-rw-r--r--org.genivi.commonapi.console/META-INF/MANIFEST.MF2
-rw-r--r--org.genivi.commonapi.console/about.mappings4
-rw-r--r--org.genivi.commonapi.console/pom.xml2
-rw-r--r--org.genivi.commonapi.console/src/org/genivi/commonapi/console/CommandExecuter.java2
-rw-r--r--org.genivi.commonapi.core.cli.feature/feature.xml2
-rw-r--r--org.genivi.commonapi.core.cli.feature/pom.xml2
-rw-r--r--org.genivi.commonapi.core.cli.product/category.xml4
-rw-r--r--org.genivi.commonapi.core.cli.product/commonapi_console.product2
-rw-r--r--org.genivi.commonapi.core.cli.product/pom.xml2
-rw-r--r--org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF6
-rw-r--r--org.genivi.commonapi.core.cli/plugin.xml9
-rw-r--r--org.genivi.commonapi.core.cli/pom.xml2
-rw-r--r--org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandLineHandler.java5
-rw-r--r--org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandlineToolMain.java23
-rw-r--r--org.genivi.commonapi.core.feature/feature.xml2
-rw-r--r--org.genivi.commonapi.core.feature/pom.xml2
-rw-r--r--org.genivi.commonapi.core.releng/pom.xml2
-rw-r--r--org.genivi.commonapi.core.target/pom.xml2
-rw-r--r--org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF4
-rw-r--r--org.genivi.commonapi.core.ui/pom.xml2
-rw-r--r--org.genivi.commonapi.core.ui/src/org/genivi/commonapi/core/ui/handler/GenerationCommand.java8
-rw-r--r--org.genivi.commonapi.core.updatesite/category.xml4
-rw-r--r--org.genivi.commonapi.core.updatesite/pom.xml2
-rw-r--r--org.genivi.commonapi.core.validator.feature/feature.xml4
-rw-r--r--org.genivi.commonapi.core.validator.feature/pom.xml2
-rw-r--r--org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF6
-rw-r--r--org.genivi.commonapi.core.validator/pom.xml2
-rw-r--r--org.genivi.commonapi.core.verification/.gitignore1
-rw-r--r--org.genivi.commonapi.core.verification/CMakeLists.txt107
-rw-r--r--org.genivi.commonapi.core.verification/fidl/ti_communication.fidl4
-rw-r--r--org.genivi.commonapi.core.verification/fidl/ti_datatypes_combined.fidl2
-rw-r--r--org.genivi.commonapi.core.verification/fidl/ti_stability_mp.fidl46
-rw-r--r--org.genivi.commonapi.core.verification/src/CMAttributeSubscription.cpp661
-rw-r--r--org.genivi.commonapi.core.verification/src/CMAttributes.cpp2
-rw-r--r--org.genivi.commonapi.core.verification/src/DTAdvanced.cpp2
-rw-r--r--org.genivi.commonapi.core.verification/src/DTCombined.cpp19
-rw-r--r--org.genivi.commonapi.core.verification/src/DTDerived.cpp2
-rw-r--r--org.genivi.commonapi.core.verification/src/DTPrimitive.cpp2
-rw-r--r--org.genivi.commonapi.core.verification/src/PFComplex.cpp2
-rw-r--r--org.genivi.commonapi.core.verification/src/PFPrimitive.cpp4
-rw-r--r--org.genivi.commonapi.core.verification/src/StabilityMP.cpp666
-rw-r--r--org.genivi.commonapi.core.verification/src/StabilitySP.cpp57
-rw-r--r--org.genivi.commonapi.core.verification/src/THMainLoopIndependence.cpp22
-rw-r--r--org.genivi.commonapi.core.verification/src/THMainLoopTwoThreads.cpp134
-rw-r--r--org.genivi.commonapi.core.verification/src/conf/commonapi4dbus.ini.in286
-rw-r--r--org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in204
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/PFComplexStub.cpp3
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/PFComplexStub.h3
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.cpp3
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.h3
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/StabControlStub.cpp58
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/StabControlStub.h45
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.cpp48
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.h35
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.cpp1
-rw-r--r--org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.h1
-rw-r--r--org.genivi.commonapi.core.verification/src/utils/StopWatch.cpp7
-rw-r--r--org.genivi.commonapi.core.verification/src/utils/VerificationMainLoop.h127
-rw-r--r--org.genivi.commonapi.core.verification/src/utils/VerificationMainLoopWithQueue.h480
-rw-r--r--org.genivi.commonapi.core/META-INF/MANIFEST.MF2
-rw-r--r--org.genivi.commonapi.core/pom.xml2
-rw-r--r--org.genivi.commonapi.core/src-gen/org/genivi/commonapi/core/DeploymentProviderPropertyAccessor.java9
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/deployment/PropertyAccessor.java2
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java54
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceGenerator.xtend2
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend7
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend34
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FTypeGenerator.xtend22
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGenerator.xtend30
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend107
-rw-r--r--org.genivi.commonapi.releng/pom.xml4
115 files changed, 2946 insertions, 1478 deletions
diff --git a/CommonAPI-Examples/E01HelloWorld/CMakeLists.txt b/CommonAPI-Examples/E01HelloWorld/CMakeLists.txt
index 9971079..52e436a 100644
--- a/CommonAPI-Examples/E01HelloWorld/CMakeLists.txt
+++ b/CommonAPI-Examples/E01HelloWorld/CMakeLists.txt
@@ -29,11 +29,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -61,8 +61,8 @@ else()
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
diff --git a/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld.fdepl b/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld.fdepl
index 6d43ef0..0310e23 100644
--- a/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld.fdepl
+++ b/CommonAPI-Examples/E01HelloWorld/fidl/E01HelloWorld.fdepl
@@ -29,6 +29,6 @@ define org.genivi.commonapi.someip.deployment for provider Service {
SomeIpUnicastAddress = "192.168.0.2"
SomeIpReliableUnicastPort = 30499
- SomeIpUneliableUnicastPort = 30499
+ SomeIpUnreliableUnicastPort = 30499
}
} \ No newline at end of file
diff --git a/CommonAPI-Examples/E02Attributes/CMakeLists.txt b/CommonAPI-Examples/E02Attributes/CMakeLists.txt
index fccec2c..63eec7b 100644
--- a/CommonAPI-Examples/E02Attributes/CMakeLists.txt
+++ b/CommonAPI-Examples/E02Attributes/CMakeLists.txt
@@ -29,11 +29,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -61,8 +61,8 @@ else()
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
@@ -140,4 +140,4 @@ target_link_libraries(${PRJ_NAME}-dbus CommonAPI-DBus)
# Build SOME/IP library
add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
-target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
+target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP) \ No newline at end of file
diff --git a/CommonAPI-Examples/E02Attributes/fidl/E02Attributes.fdepl b/CommonAPI-Examples/E02Attributes/fidl/E02Attributes.fdepl
deleted file mode 100644
index 6ff6efd..0000000
--- a/CommonAPI-Examples/E02Attributes/fidl/E02Attributes.fdepl
+++ /dev/null
@@ -1,11 +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.dbus/deployment/CommonAPI-DBus_deployment.fdepl"
-import "E02Attributes.fidl"
-
-define org.genivi.commonapi.dbus.deployment for interface commonapi.examples.E02Attributes {
- PropertiesType = freedesktop
-} \ No newline at end of file
diff --git a/CommonAPI-Examples/E02Attributes/vsomeip-local.json b/CommonAPI-Examples/E02Attributes/vsomeip-local.json
index 2f4c823..ac274e1 100644
--- a/CommonAPI-Examples/E02Attributes/vsomeip-local.json
+++ b/CommonAPI-Examples/E02Attributes/vsomeip-local.json
@@ -36,12 +36,38 @@
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
- "unreliable" : "31000"
+ "unreliable" : "31000",
+ "events" :
+ [
+ {
+ "event" : "0x80F2",
+ "is_field" : "false",
+ "is_reliable" : "true",
+ "update-cycle" : 2000
+ },
+ {
+ "event" : "0x80F3",
+ "is_field" : "true",
+ "is_reliable" : "true",
+ "update-cycle" : 0
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x80F2",
+ "events" : [ "0x80F2" ]
+ },
+ {
+ "eventgroup" : "0x80F3",
+ "events" : [ "0x80F3" ]
+ }
+ ]
}
]
}
],
- "routing" : "client-sample",
+ "routing" : "service-sample",
"service-discovery" :
{
"enable" : "true",
diff --git a/CommonAPI-Examples/E03Methods/CMakeLists.txt b/CommonAPI-Examples/E03Methods/CMakeLists.txt
index 30d1eb2..98b8589 100644
--- a/CommonAPI-Examples/E03Methods/CMakeLists.txt
+++ b/CommonAPI-Examples/E03Methods/CMakeLists.txt
@@ -31,11 +31,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -63,8 +63,8 @@ else()
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
diff --git a/CommonAPI-Examples/E03Methods/fidl/E03Methods.fdepl b/CommonAPI-Examples/E03Methods/fidl/E03Methods.fdepl
deleted file mode 100644
index eb5d918..0000000
--- a/CommonAPI-Examples/E03Methods/fidl/E03Methods.fdepl
+++ /dev/null
@@ -1,8 +0,0 @@
-import "platform:/plugin/org.genivi.commonapi.dbus/deployment/CommonAPI-DBus_deployment.fdepl"
-import "E03Methods.fidl"
-
-define org.genivi.commonapi.dbus.deployment for interface commonapi.examples.E03Methods {
- method foo {
- Timeout = 1234
- }
-} \ No newline at end of file
diff --git a/CommonAPI-Examples/E03Methods/vsomeip-local.json b/CommonAPI-Examples/E03Methods/vsomeip-local.json
index 2f4c823..bda9e87 100644
--- a/CommonAPI-Examples/E03Methods/vsomeip-local.json
+++ b/CommonAPI-Examples/E03Methods/vsomeip-local.json
@@ -36,12 +36,28 @@
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
- "unreliable" : "31000"
+ "unreliable" : "31000",
+ "events" :
+ [
+ {
+ "event" : "0x80F2",
+ "is_field" : "false",
+ "is_reliable" : "false",
+ "update-cycle" : 2000
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x80F2",
+ "events" : [ "0x80F2" ]
+ }
+ ]
}
]
}
],
- "routing" : "client-sample",
+ "routing" : "service-sample",
"service-discovery" :
{
"enable" : "true",
diff --git a/CommonAPI-Examples/E03Methods/vsomeip-service.json b/CommonAPI-Examples/E03Methods/vsomeip-service.json
index 2ab32df..1418e71 100644
--- a/CommonAPI-Examples/E03Methods/vsomeip-service.json
+++ b/CommonAPI-Examples/E03Methods/vsomeip-service.json
@@ -43,12 +43,6 @@
"is_field" : "false",
"is_reliable" : "false",
"update-cycle" : 2000
- },
- {
- "event" : "0x80F3",
- "is_field" : "true",
- "is_reliable" : "false",
- "update-cycle" : 0
}
],
"eventgroups" :
@@ -56,10 +50,6 @@
{
"eventgroup" : "0x80F2",
"events" : [ "0x80F2" ]
- },
- {
- "eventgroup" : "0x80F3",
- "events" : [ "0x80F3" ]
}
]
}
diff --git a/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt b/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt
index 81cafd7..78758de 100644
--- a/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt
+++ b/CommonAPI-Examples/E04PhoneBook/CMakeLists.txt
@@ -31,11 +31,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -63,8 +63,8 @@ else()
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
@@ -81,7 +81,7 @@ 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)
FILE(GLOB PRJ_TYPES_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/E04PhoneBook.cpp)
-set(PRJ_CLIENT_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_CLIENT}.cpp ${PRJ_PROXY_GEN_SRCS})
+set(PRJ_CLIENT_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_CLIENT}.cpp ${PRJ_PROXY_GEN_SRCS} ${PRJ_TYPES_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} ${PRJ_TYPES_GEN_SRCS})
# Boost
@@ -92,7 +92,7 @@ include_directories( ${Boost_INCLUDE_DIR} )
FILE(GLOB PRJ_DBUS_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_DBUS_PATH}/*cpp ${PRJ_TYPES_GEN_SRCS})
# SOME/IP library
-FILE(GLOB PRJ_SOMEIP_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH}/*cpp)
+FILE(GLOB PRJ_SOMEIP_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH}/*cpp ${PRJ_TYPES_GEN_SRCS})
# Paths
OPTION(USE_INSTALLED_DBUS "Set to OFF to use the local (patched) version of dbus" ON)
@@ -141,5 +141,5 @@ add_library (${PRJ_NAME}-dbus SHARED ${PRJ_DBUS_LIB_SRCS})
target_link_libraries(${PRJ_NAME}-dbus CommonAPI-DBus)
# Build SOME/IP library
-#add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
-#target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
+add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
+target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
diff --git a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl
index af57abc..1ca64c2 100644
--- a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl
+++ b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook-SomeIP.fdepl
@@ -11,15 +11,19 @@ define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E
SomeIpEventGroups = { 7000, 7001 }
attribute phoneBook {
- SomeIpGetterID = 7000
+ SomeIpGetterID = 33000
+ SomeIpSetterID = 33001
+ SomeIpNotifierID = 8000
+ SomeIpEventGroups = { 7000 }
}
method setPhoneBookDataFilter {
- SomeIpMethodID = 33000
+ SomeIpMethodID = 33002
}
broadcast phoneBookDataSet {
- SomeIpEventID = 8000
+ SomeIpEventID = 8001
+ SomeIpEventGroups = { 7001 }
}
enumeration phoneNumberEnum {
diff --git a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fdepl b/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fdepl
deleted file mode 100644
index 645b37e..0000000
--- a/CommonAPI-Examples/E04PhoneBook/fidl/E04PhoneBook.fdepl
+++ /dev/null
@@ -1,112 +0,0 @@
-import "platform:/plugin/org.genivi.commonapi.dbus/deployment/CommonAPI-DBus_deployment.fdepl"
-import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-SOMEIP_deployment_spec.fdepl"
-import "E04PhoneBook.fidl"
-
-define org.genivi.commonapi.dbus.deployment for interface commonapi.examples.E04PhoneBook {
- PropertiesType = freedesktop
-}
-
-define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E04PhoneBook {
- SomeIpServiceID = 4660
- SomeIpEventGroups = { 7000, 7001 }
-
- attribute phoneBook {
- SomeIpGetterID = 7000
- }
-
- method setPhoneBookDataFilter {
- SomeIpMethodID = 33000
- }
-
- broadcast phoneBookDataSet {
- SomeIpEventID = 8000
- }
-
- enumeration phoneNumberEnum {
- WORK {
- }
- HOME {
- }
- MOBILE1 {
- }
- MOBILE2 {
- }
- }
-
- struct phoneBookStruct {
- name {
- }
- forename {
- }
- organisation {
- }
- address {
- }
- email {
- }
- phoneNumber {
- }
- }
-
- struct elementFilterStruct {
- addName {
- }
- addForename {
- }
- addOrganisation {
- }
- addAddress {
- }
- addEmail {
- }
- addPhoneNumber {
- }
- }
-
- struct contentFilterStruct {
- element {
- }
- expression {
- }
- }
-
- enumeration phoneBookDataElementEnum {
- NAME {
- }
- FORENAME {
- }
- ORGANISATION {
- }
- ADDRESS {
- }
- EMAIL {
- }
- PHONENUMBER {
- }
- }
-
- struct phoneBookDataElement {
- }
-
- struct phoneBookDataElementString {
- content {
- }
- }
-
- struct phoneBookDataElementPhoneNumber {
- content {
- }
- }
-
-}
-
-define org.genivi.commonapi.someip.deployment for provider Service {
- instance commonapi.examples.E04PhoneBook {
- InstanceId = "commonapi.examples.PhoneBook"
-
- SomeIpInstanceID = 22136
-
- SomeIpUnicastAddress = "192.168.0.2"
- SomeIpUnicastPort = 30499
- }
-} \ No newline at end of file
diff --git a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp
index d1b9d84..7db3313 100644
--- a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp
+++ b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookClient.cpp
@@ -137,31 +137,41 @@ int main() {
const std::string &domain = "local";
const std::string &instance = "commonapi.examples.PhoneBook";
+ const std::string &connection = "client-sample";
- std::shared_ptr < E04PhoneBookProxy<> > myProxyA = runtime->buildProxy < E04PhoneBookProxy > (domain, instance);
+ std::shared_ptr < E04PhoneBookProxy<> > myProxyA = runtime->buildProxy < E04PhoneBookProxy > (domain, instance, connection);
while (!myProxyA->isAvailable()) {
usleep(10);
}
+ std::cout << "Service for Proxy A is available!" << std::endl;
- const CommonAPI::ConnectionId_t otherConnectionId = "42";
-
- std::shared_ptr < E04PhoneBookProxy<> > myProxyB = runtime->buildProxy < E04PhoneBookProxy > (domain, instance, otherConnectionId);
+ const CommonAPI::ConnectionId_t otherConnection = "other-client-sample";
+ std::shared_ptr < E04PhoneBookProxy<> > myProxyB = runtime->buildProxy < E04PhoneBookProxy > (domain, instance, otherConnection);
while (!myProxyB->isAvailable()) {
usleep(10);
}
+ std::cout << "Service for Proxy B is available!" << std::endl;
// Subscribe A to broadcast
myProxyA->getPhoneBookDataSetSelectiveEvent().subscribe(
[&](const std::vector<E04PhoneBook::phoneBookDataElementMap>& phoneBookDataSet) {
+ std::cout << "-- A --" << std::endl;
printFilterResult(phoneBookDataSet, "A");
+ std::cout << "-------" << std::endl;
});
+ std::cout << "Subscribed A" << std::endl;
+
// Subscribe B to broadcast
myProxyB->getPhoneBookDataSetSelectiveEvent().subscribe(
[&](const std::vector<E04PhoneBook::phoneBookDataElementMap>& phoneBookDataSet) {
+ std::cout << "-- B --" << std::endl;
printFilterResult(phoneBookDataSet, "B");
+ std::cout << "-------" << std::endl;
});
+ std::cout << "Subscribed B" << std::endl;
+
// Get actual phoneBook from service
CommonAPI::CallStatus myCallStatus;
std::vector<E04PhoneBook::phoneBookStruct> myValue;
diff --git a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp
index bece39c..020209b 100644
--- a/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp
+++ b/CommonAPI-Examples/E04PhoneBook/src/E04PhoneBookService.cpp
@@ -19,10 +19,12 @@ int main() {
const std::string &domain = "local";
const std::string &instance = "commonapi.examples.PhoneBook";
+ const std::string &connection = "service-sample";
+
std::shared_ptr<E04PhoneBookStubImpl> myService = std::make_shared<E04PhoneBookStubImpl>();
myService->setPhoneBookAttribute(myService->createTestPhoneBook());
- bool successfullyRegistered = runtime->registerService(domain, instance, myService);
+ bool successfullyRegistered = runtime->registerService(domain, instance, myService, connection);
while (!successfullyRegistered) {
std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl;
diff --git a/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json b/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json
new file mode 100644
index 0000000..f3f9cd8
--- /dev/null
+++ b/CommonAPI-Examples/E04PhoneBook/vsomeip-client.json
@@ -0,0 +1,30 @@
+{
+ "unicast" : "10.10.46.59",
+ "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"
+ },
+ {
+ "name" : "other-client-sample",
+ "id" : "0x1344"
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json b/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json
new file mode 100644
index 0000000..d03051d
--- /dev/null
+++ b/CommonAPI-Examples/E04PhoneBook/vsomeip-local.json
@@ -0,0 +1,80 @@
+{
+ "unicast" : "192.168.56.101",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "false"
+ },
+ "applications" :
+ [
+ {
+ "name" : "client-sample",
+ "id" : "0x1343"
+ },
+ {
+ "name" : "other-client-sample",
+ "id" : "0x1482"
+ },
+ {
+ "name" : "service-sample",
+ "id" : "0x1277"
+ }
+ ],
+ "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",
+ "events" :
+ [
+ {
+ "event" : "0x1F40",
+ "is_field" : "true",
+ "update-cycle" : "0"
+ },
+ {
+ "event" : "0x1F41",
+ "is_field" : "false",
+ "update-cycle" : "0"
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x1B58",
+ "events" : [ "0x1F40" ]
+ },
+ {
+ "eventgroup" : "0x1B59",
+ "events" : [ "0x1F41" ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json b/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json
new file mode 100644
index 0000000..3d05bb9
--- /dev/null
+++ b/CommonAPI-Examples/E04PhoneBook/vsomeip-service.json
@@ -0,0 +1,74 @@
+{
+ "unicast" : "10.10.46.59",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "false"
+ },
+ "applications" :
+ [
+ {
+ "name" : "service-sample",
+ "id" : "0x1277"
+ }
+ ],
+ "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",
+ "events" :
+ [
+ {
+ "event" : "0x1F40",
+ "is_field" : "true",
+ "is_reliable" : "true",
+ "update-cycle" : "0"
+ },
+ {
+ "event" : "0x1F41",
+ "is_field" : "false",
+ "is_reliable" : "true",
+ "update-cycle" : "0"
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x1B58",
+ "events" : [ "0x1F40" ]
+ },
+ {
+ "eventgroup" : "0x1B59",
+ "events" : [ "0x1F41" ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "routing" : "service-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E05Manager/CMakeLists.txt b/CommonAPI-Examples/E05Manager/CMakeLists.txt
index ba18ba5..c3d2a88 100644
--- a/CommonAPI-Examples/E05Manager/CMakeLists.txt
+++ b/CommonAPI-Examples/E05Manager/CMakeLists.txt
@@ -1,6 +1,4 @@
-# Copyright (C) 2014, 2015 BMW Group
-# Author: Manfred Bathelt (manfred.bathelt@bmw.de)
-# Author: Juergen Gehring (juergen.gehring@bmw.de)
+# 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/.
@@ -16,7 +14,7 @@ if (MSVC)
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} -pthread -Wall -O0 -std=c++0x -D_GLIBCXX_USE_NANOSLEEP")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -O0 -std=c++0x -D_GLIBCXX_USE_NANOSLEEP -DLINUX")
endif()
message(STATUS "Compiler options: ${CMAKE_CXX_FLAGS}")
@@ -31,11 +29,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -48,23 +46,23 @@ include(FindPkgConfig)
###############################################################################
# find DBus by using the 'pkg-config' tool
if (MSVC)
- #Not beautiful, but it works
- if (DBus_DIR)
- if (DBus_BUILD_DIR)
- set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
- else ()
- message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
- endif ()
- else()
- message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
- endif ()
+ #Not beautiful, but it works
+ if (DBus_DIR)
+ if (DBus_BUILD_DIR)
+ set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
+ else ()
+ message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
+ endif ()
+ else()
+ message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
+ endif ()
else()
- pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
+ pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
@@ -81,7 +79,7 @@ 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_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_STUB_GEN_SRCS} ${PRJ_STUB_IMPL_SRCS} ${PRJ_TYPES_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 )
@@ -99,7 +97,7 @@ message(STATUS "USE_INSTALLED_DBUS is set to value: ${USE_INSTALLED_DBUS}")
include_directories(
src-gen/core
- src-gen/dbus
+ src-gen/dbus
src-gen/someip
${COMMONAPI_INCLUDE_DIRS}
${COMMONAPI_DBUS_INCLUDE_DIRS}
@@ -113,7 +111,7 @@ link_directories(
${COMMONAPI_LIBDIR}
${COMMONAPI_DBUS_LIBDIR}
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
- ${Boost_LIBRARY_DIR}
+ ${Boost_LIBRARY_DIR}
)
else()
link_directories(
@@ -125,7 +123,7 @@ link_directories(
)
endif()
-set(LINK_LIBRARIES -Wl,--no-as-needed CommonAPI-DBus -Wl,--as-needed CommonAPI ${DBUS_LIBRARIES})
+set(LINK_LIBRARIES -Wl,--as-needed CommonAPI)
# Build Client
add_executable(${PRJ_NAME_CLIENT} ${PRJ_CLIENT_SRCS})
@@ -140,5 +138,5 @@ add_library (${PRJ_NAME}-dbus SHARED ${PRJ_DBUS_LIB_SRCS})
target_link_libraries(${PRJ_NAME}-dbus CommonAPI-DBus)
# Build SOME/IP library
-#add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
-#target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
+add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
+target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
diff --git a/CommonAPI-Examples/E05Manager/commonapi4dbus.ini b/CommonAPI-Examples/E05Manager/commonapi4dbus.ini
new file mode 100644
index 0000000..a1de883
--- /dev/null
+++ b/CommonAPI-Examples/E05Manager/commonapi4dbus.ini
@@ -0,0 +1,8 @@
+[default]
+binding=dbus
+
+[logging]
+console = true
+file = ./mylog.log
+dlt = false
+level = verbose
diff --git a/CommonAPI-Examples/E05Manager/commonapi4someip.ini b/CommonAPI-Examples/E05Manager/commonapi4someip.ini
new file mode 100644
index 0000000..53209ee
--- /dev/null
+++ b/CommonAPI-Examples/E05Manager/commonapi4someip.ini
@@ -0,0 +1,8 @@
+[default]
+binding=someip
+
+[logging]
+console = true
+file = ./mylog.log
+dlt = false
+level = verbose
diff --git a/CommonAPI-Examples/E05Manager/fidl/E05Manager.fdepl b/CommonAPI-Examples/E05Manager/fidl/E05Manager.fdepl
index 5befa32..628f18a 100644
--- a/CommonAPI-Examples/E05Manager/fidl/E05Manager.fdepl
+++ b/CommonAPI-Examples/E05Manager/fidl/E05Manager.fdepl
@@ -1,50 +1,79 @@
-/* Copyright (C) 2014 BMW Group
+/* 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 "E05Manager.fidl"
define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E05Manager {
SomeIpServiceID = 4660
- SomeIpEventGroups = { 7000, 7001 }
attribute myDevices {
- SomeIpGetterID = 7000
- SomeIpSetterID = 7004
+ SomeIpGetterID = 3000
+ SomeIpSetterID = 3001
+ SomeIpNotifierID = 33000
+ SomeIpEventGroups = { 17749 }
}
+}
+define org.genivi.commonapi.someip.deployment for provider Service {
+ instance commonapi.examples.E05Manager {
+ InstanceId = "commonapi.examples.Manager"
+
+ SomeIpInstanceID = 1000
+
+ SomeIpUnicastAddress = "127.0.0.1"
+ SomeIpReliableUnicastPort = 30499
+ }
}
define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E05Device {
SomeIpServiceID = 4661
- SomeIpEventGroups = { 7000, 7001 }
method doSomething {
- SomeIpMethodID = 7001
+ SomeIpMethodID = 33001
+ }
+}
+
+
+define org.genivi.commonapi.someip.deployment for provider Service {
+ instance commonapi.examples.E05Device {
+ InstanceId = "commonapi.examples.Manager.device01"
+
+ SomeIpInstanceID = 2000
+
+ SomeIpUnicastAddress = "127.0.0.1"
+ SomeIpUnreliableUnicastPort = 30500
}
+}
+define org.genivi.commonapi.someip.deployment for provider Service {
+ instance commonapi.examples.E05Device {
+ InstanceId = "commonapi.examples.Manager.device02"
+
+ SomeIpInstanceID = 2001
+
+ SomeIpUnicastAddress = "127.0.0.1"
+ SomeIpUnreliableUnicastPort = 30501
+ }
}
define org.genivi.commonapi.someip.deployment for interface commonapi.examples.E05SpecialDevice {
SomeIpServiceID = 4662
- SomeIpEventGroups = { 7000, 7001 }
method doSomethingSpecial {
- SomeIpMethodID = 7002
+ SomeIpMethodID = 33002
}
-
}
define org.genivi.commonapi.someip.deployment for provider Service {
- instance commonapi.examples.E04PhoneBook {
- InstanceId = "commonapi.examples.PhoneBook"
-
- SomeIpInstanceID = 22136
+ instance commonapi.examples.E05SpecialDevice {
+ InstanceId = "commonapi.examples.Manager.specialDevice00"
+
+ SomeIpInstanceID = 3000
- SomeIpUnicastAddress = "192.168.0.2"
- SomeIpReliableUnicastPort = 30500
- SomeIpUnreliableUnicastPort = 30501
+ SomeIpUnicastAddress = "127.0.0.1"
+ SomeIpUnreliableUnicastPort = 30600
+ }
}
-} \ No newline at end of file
diff --git a/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp b/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp
index 983601c..51c7d57 100644
--- a/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp
+++ b/CommonAPI-Examples/E05Manager/src/E05ManagerClient.cpp
@@ -34,7 +34,9 @@ int main() {
const std::string &domain = "local";
const std::string &instance = "commonapi.examples.Manager";
- std::shared_ptr<E05ManagerProxy<>> myProxy = runtime->buildProxy<E05ManagerProxy>(domain, instance);
+ const std::string connectionIdClient = "client-sample";
+
+ std::shared_ptr<E05ManagerProxy<>> myProxy = runtime->buildProxy<E05ManagerProxy>(domain, instance, connectionIdClient);
while (!myProxy->isAvailable()) {
usleep(10);
}
diff --git a/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp b/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp
index c32faa0..a1626c3 100644
--- a/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp
+++ b/CommonAPI-Examples/E05Manager/src/E05ManagerService.cpp
@@ -16,20 +16,20 @@ using namespace v1_0::commonapi::examples;
static unsigned int cnt = 0; // counter for simulating external events
const static unsigned int maxDeviceNumber = 3;
const static std::string managerInstanceName = "commonapi.examples.Manager";
+const std::string connectionIdService = "service-sample";
int main() {
- CommonAPI::Runtime::setProperty("LogContext", "E05S");
- CommonAPI::Runtime::setProperty("LibraryBase", "E05Manager");
-
+ CommonAPI::Runtime::setProperty("LogContext", "E05S");
+ CommonAPI::Runtime::setProperty("LibraryBase", "E05Manager");
std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::get();
std::shared_ptr<E05ManagerStubImpl> myService = std::make_shared < E05ManagerStubImpl > (managerInstanceName);
- bool successfullyRegistered = runtime->registerService("local", managerInstanceName, myService);
+ bool successfullyRegistered = runtime->registerService("local", managerInstanceName, myService, connectionIdService);
while (!successfullyRegistered) {
std::cout << "Register Service failed, trying again in 100 milliseconds..." << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(100));
- successfullyRegistered = runtime->registerService("local", managerInstanceName, myService);
+ successfullyRegistered = runtime->registerService("local", managerInstanceName, myService, connectionIdService);
}
std::cout << "Successfully Registered Service!" << std::endl;
diff --git a/CommonAPI-Examples/E05Manager/vsomeip-client.json b/CommonAPI-Examples/E05Manager/vsomeip-client.json
new file mode 100644
index 0000000..628509d
--- /dev/null
+++ b/CommonAPI-Examples/E05Manager/vsomeip-client.json
@@ -0,0 +1,26 @@
+{
+ "unicast" : "10.10.46.59",
+ "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"
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E05Manager/vsomeip-local.json b/CommonAPI-Examples/E05Manager/vsomeip-local.json
new file mode 100644
index 0000000..9e94d50
--- /dev/null
+++ b/CommonAPI-Examples/E05Manager/vsomeip-local.json
@@ -0,0 +1,83 @@
+{
+ "unicast" : "127.0.0.1",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "false"
+ },
+ "applications" :
+ [
+ {
+ "name" : "client-sample",
+ "id" : "0x1343"
+ },
+ {
+ "name" : "service-sample",
+ "id" : "0x1277"
+ }
+ ],
+ "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" : "0x03e8",
+ "unreliable" : "30499",
+ "events" :
+ [
+ {
+ "event" : "0x80e8",
+ "is_field" : "true"
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x4555",
+ "events" :
+ [
+ "0x80e8"
+ ]
+ }
+ ]
+ },
+ {
+ "service" : "0x1235",
+ "instance" : "0x07d0",
+ "unreliable" : "30500"
+ },
+ {
+ "service" : "0x1235",
+ "instance" : "0x07d1",
+ "unreliable" : "30501"
+ },
+ {
+ "service" : "0x1236",
+ "instance" : "0x0bb8",
+ "unreliable" : "30600"
+ }
+ ]
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E05Manager/vsomeip-service.json b/CommonAPI-Examples/E05Manager/vsomeip-service.json
new file mode 100644
index 0000000..5e1a4b0
--- /dev/null
+++ b/CommonAPI-Examples/E05Manager/vsomeip-service.json
@@ -0,0 +1,79 @@
+{
+ "unicast" : "10.10.46.59",
+ "logging" :
+ {
+ "level" : "debug",
+ "console" : "true",
+ "file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
+ "dlt" : "false"
+ },
+ "applications" :
+ [
+ {
+ "name" : "service-sample",
+ "id" : "0x1277"
+ }
+ ],
+ "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" : "0x03e8",
+ "unreliable" : "30499",
+ "events" :
+ [
+ {
+ "event" : "0x80e8",
+ "is_field" : "true"
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x4555",
+ "events" :
+ [
+ "0x80e8"
+ ]
+ }
+ ]
+ },
+ {
+ "service" : "0x1235",
+ "instance" : "0x07d0",
+ "unreliable" : "30500"
+ },
+ {
+ "service" : "0x1235",
+ "instance" : "0x07d1",
+ "unreliable" : "30501"
+ },
+ {
+ "service" : "0x1236",
+ "instance" : "0x0bb8",
+ "unreliable" : "30600"
+ }
+ ]
+ }
+ ],
+ "routing" : "service-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E06Unions/CMakeLists.txt b/CommonAPI-Examples/E06Unions/CMakeLists.txt
index 1b342a3..6f3f207 100644
--- a/CommonAPI-Examples/E06Unions/CMakeLists.txt
+++ b/CommonAPI-Examples/E06Unions/CMakeLists.txt
@@ -31,11 +31,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -63,8 +63,8 @@ else()
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# Source Files
set(PRJ_SRC_PATH src)
diff --git a/CommonAPI-Examples/E06Unions/vsomeip-local.json b/CommonAPI-Examples/E06Unions/vsomeip-local.json
index 2f4c823..d26710c 100644
--- a/CommonAPI-Examples/E06Unions/vsomeip-local.json
+++ b/CommonAPI-Examples/E06Unions/vsomeip-local.json
@@ -36,12 +36,38 @@
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
- "unreliable" : "31000"
+ "unreliable" : "31000",
+ "events" :
+ [
+ {
+ "event" : "0x80F2",
+ "is_field" : "false",
+ "is_reliable" : "false",
+ "update-cycle" : 0
+ },
+ {
+ "event" : "0x80F3",
+ "is_field" : "true",
+ "is_reliable" : "false",
+ "update-cycle" : 0
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x80F2",
+ "events" : [ "0x80F2" ]
+ },
+ {
+ "eventgroup" : "0x80F3",
+ "events" : [ "0x80F3" ]
+ }
+ ]
}
]
}
],
- "routing" : "client-sample",
+ "routing" : "service-sample",
"service-discovery" :
{
"enable" : "true",
diff --git a/CommonAPI-Examples/E06Unions/vsomeip-service.json b/CommonAPI-Examples/E06Unions/vsomeip-service.json
index 371ecf7..683f59f 100644
--- a/CommonAPI-Examples/E06Unions/vsomeip-service.json
+++ b/CommonAPI-Examples/E06Unions/vsomeip-service.json
@@ -32,7 +32,33 @@
"service" : "0x1234",
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
- "unreliable" : "31000"
+ "unreliable" : "31000",
+ "events" :
+ [
+ {
+ "event" : "0x80F2",
+ "is_field" : "false",
+ "is_reliable" : "false",
+ "update-cycle" : 0
+ },
+ {
+ "event" : "0x80F3",
+ "is_field" : "true",
+ "is_reliable" : "false",
+ "update-cycle" : 0
+ }
+ ],
+ "eventgroups" :
+ [
+ {
+ "eventgroup" : "0x80F2",
+ "events" : [ "0x80F2" ]
+ },
+ {
+ "eventgroup" : "0x80F3",
+ "events" : [ "0x80F3" ]
+ }
+ ]
}
]
}
diff --git a/CommonAPI-Examples/E07Mainloop/CMakeLists.txt b/CommonAPI-Examples/E07Mainloop/CMakeLists.txt
index 0f54006..3249b0b 100644
--- a/CommonAPI-Examples/E07Mainloop/CMakeLists.txt
+++ b/CommonAPI-Examples/E07Mainloop/CMakeLists.txt
@@ -30,11 +30,11 @@ OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
else()
- FIND_PACKAGE(CommonAPI 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
- FIND_PACKAGE(CommonAPI-DBus 3.1.2 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
+ FIND_PACKAGE(CommonAPI-DBus 3.1.3 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
@@ -62,8 +62,8 @@ else()
endif()
# SOME/IP
-find_package (CommonAPI-SomeIP 3.1.2 REQUIRED)
-find_package (vsomeip 1.2.0 REQUIRED)
+find_package (CommonAPI-SomeIP 3.1.3 REQUIRED)
+find_package (vsomeip 1.3.0 REQUIRED)
# GLib
if (MSVC)
diff --git a/CommonAPI-Examples/E07Mainloop/fidl/E07Mainloop.fdepl b/CommonAPI-Examples/E07Mainloop/fidl/E07Mainloop.fdepl
index c617777..d409861 100644
--- a/CommonAPI-Examples/E07Mainloop/fidl/E07Mainloop.fdepl
+++ b/CommonAPI-Examples/E07Mainloop/fidl/E07Mainloop.fdepl
@@ -35,6 +35,7 @@ define org.genivi.commonapi.someip.deployment for provider Service {
SomeIpInstanceID = 22136
SomeIpUnicastAddress = "192.168.0.2"
- SomeIpUnicastPort = 30499
+ SomeIpReliableUnicastPort = 30499
+ SomeIpUnreliableUnicastPort = 30499
}
} \ No newline at end of file
diff --git a/CommonAPI-Examples/E07Mainloop/src/E07MainloopClient.cpp b/CommonAPI-Examples/E07Mainloop/src/E07MainloopClient.cpp
index 304255f..70873a8 100644
--- a/CommonAPI-Examples/E07Mainloop/src/E07MainloopClient.cpp
+++ b/CommonAPI-Examples/E07Mainloop/src/E07MainloopClient.cpp
@@ -121,7 +121,7 @@ gboolean gWatchDispatcher ( GIOChannel *source, GIOCondition condition, gpointer
CommonAPI::Watch* watch = static_cast<CommonAPI::Watch*>(userData);
#ifdef WIN32
- condition = static_cast<GIOCondition>(7);
+ condition = static_cast<GIOCondition>(POLLIN);
#endif
watch->dispatch(condition);
diff --git a/CommonAPI-Examples/E07Mainloop/src/E07MainloopService.cpp b/CommonAPI-Examples/E07Mainloop/src/E07MainloopService.cpp
index 17e7eb7..86be1aa 100644
--- a/CommonAPI-Examples/E07Mainloop/src/E07MainloopService.cpp
+++ b/CommonAPI-Examples/E07Mainloop/src/E07MainloopService.cpp
@@ -72,7 +72,7 @@ gboolean gWatchDispatcher ( GIOChannel *source, GIOCondition condition, gpointer
CommonAPI::Watch* watch = static_cast<CommonAPI::Watch*>(userData);
#ifdef WIN32
- condition = static_cast<GIOCondition>(7);
+ condition = static_cast<GIOCondition>(POLLIN);
#endif
watch->dispatch(condition);
diff --git a/CommonAPI-Examples/E07Mainloop/vsomeip-client.json b/CommonAPI-Examples/E07Mainloop/vsomeip-client.json
new file mode 100644
index 0000000..731852a
--- /dev/null
+++ b/CommonAPI-Examples/E07Mainloop/vsomeip-client.json
@@ -0,0 +1,26 @@
+{
+ "unicast" : "192.168.56.102",
+ "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"
+ }
+ ],
+ "routing" : "client-sample",
+ "service-discovery" :
+ {
+ "enable" : "true",
+ "multicast" : "224.244.224.245",
+ "port" : "30490",
+ "protocol" : "udp"
+ }
+}
diff --git a/CommonAPI-Examples/E07Mainloop/vsomeip.json b/CommonAPI-Examples/E07Mainloop/vsomeip-local.json
index 641f13b..641f13b 100644
--- a/CommonAPI-Examples/E07Mainloop/vsomeip.json
+++ b/CommonAPI-Examples/E07Mainloop/vsomeip-local.json
diff --git a/CommonAPI-Examples/E01HelloWorld/vsomeip.json b/CommonAPI-Examples/E07Mainloop/vsomeip-service.json
index 60c2f12..bd135f6 100644
--- a/CommonAPI-Examples/E01HelloWorld/vsomeip.json
+++ b/CommonAPI-Examples/E07Mainloop/vsomeip-service.json
@@ -1,5 +1,5 @@
{
- "unicast" : "192.168.56.101",
+ "unicast" : "10.10.46.59",
"logging" :
{
"level" : "debug",
@@ -10,14 +10,6 @@
"applications" :
[
{
- "name" : "client-sample",
- "id" : "0x1343"
- },
- {
- "name" : "other-client-sample",
- "id" : "0x1344"
- },
- {
"name" : "service-sample",
"id" : "0x1277"
}
@@ -41,17 +33,11 @@
"instance" : "0x5678",
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
"unreliable" : "31000"
- },
- {
- "service" : "0x1235",
- "instance" : "0x5678",
- "reliable" : { "port" : "30506", "enable-magic-cookies" : false },
- "unreliable" : "31000"
}
]
}
],
- "routing" : "client-sample",
+ "routing" : "service-sample",
"service-discovery" :
{
"enable" : "true",
diff --git a/CommonAPI-Examples/README b/CommonAPI-Examples/README
index 8425ed4..56f9b64 100644
--- a/CommonAPI-Examples/README
+++ b/CommonAPI-Examples/README
@@ -6,24 +6,45 @@ The examples provide a more or less generic CMake file for building the executab
----
$ cd build
-$ cmake -D USE_INSTALLED_COMMONAPI=ON/OFF ..
+$ cmake -DUSE_INSTALLED_COMMONAPI=ON/OFF ..
$ make
----
-Set USE_INSTALLED_COMMONAPI to ON if you use an installed version of CommonAPI; set it to OFF if you use working copy.
+Set +USE_INSTALLED_COMMONAPI+ to +ON+ if you use an installed version of CommonAPI; set it to +OFF+ if you use the working copy.
+
+In case you are using the D-Bus binding and you have not installed the patched D-Bus library (_libdbus_) it might be necessary to set a D-Bus specific option:
+
+----
+cmake -DUSE_INSTALLED_COMMONAPI=OFF -DUSE_INSTALLED_DBUS=OFF ..
+----
+
+Please read also the chapters in the user guide about the configuration files. One possibility to specify the path to the CommonAPI configuration file is to set the environment variable:
+
+----
+export COMMONAPI_CONFIG=<path to CommonAPI-Examples>/E01HelloWorld/commonapi4dbus.ini
+----
+
+If do not specify any configuration file it is assumed that you want to use the D-Bus binding. Other environment variables you might need are:
+
+* +LD_LIBRARY_PATH+ should contain the path to the _libdbus_ if you use the D-Bus binding with an uninstalled _libdbus_ and should contain the path to your gluecode libraries, e.g. +LD_LIBRARY_PATH=<path to libdbus>/dbus-1.8.20/dbus/.libs:<path to CommonAPI-Tools>/CommonAPI-Examples/E01HelloWorld/build+
+
+* +VSOMEIP_CONFIGURATION_FILE+ should contain the path to your vsomeip configuration file if you are using the SOME/IP binding, e.g. +VSOMEIP_CONFIGURATION_FILE=<path to CommonAPI-Tools>/CommonAPI-Examples/E01HelloWorld/vsomeip-local.json+
Here are some hints if you want to configure your eclipse project for the CMake build:
- Install the CMakeEd plug-in which provides an editor for CMake files (http://cmakeed.sourceforge.net/eclipse/).
-- Create a build directory (eg /build) directly in the project directory.
+- Create a build directory (e.g. /build) directly in the project directory.
- Select the projects properties, then C/C++ build and set the Build Command to your make call:
+
----
make -C ${ProjDirPath}/build VERBOSE=1
----
-The Build Directory must be empty. Create a make target (eg via Window->Show View->Make Target). Set the build command to:
+The build directory must be empty. Create a make target (e.g. via _Window->Show View->Make Target_). Set the build command to:
----
-cmake -E chdir build/ cmake ..
+cmake -E chdir build/ cmake <options> ..
----
+The above described environment variables you could specify in the _Run Configuration_ of your executable files (cleint and service).
+
diff --git a/NEWS b/NEWS
deleted file mode 100644
index eac2dd3..0000000
--- a/NEWS
+++ /dev/null
@@ -1,23 +0,0 @@
-This is CommonAPI 3.1.1
-
-Changes since 2.1.6
-- Changes for CommonAPI 3 (see CommonAPI runtime)
-- Franca 0.9.1
-- Extended code generator options
-
-Changes since 2.1.5
-
-- modifying target platform and pom.xml to accomodate incompatible Franca versioning scheme
-- Improved description for maven build of update-site and commandline generator.
-- adding dbus.validator to category.xml
-- extend and restructure documentation with tutorial and specification
-- added O0 optimization flag to CMakeLists.txt.
-- added generation of code for disambiguation needed for attributes on inherited interfaces
-- adding maven xtend plugin for command line build
-- genallincl bug in cli fixed
-- removing obsolete plugins to shrink down size of generator
-- adapted Test "DBusCommunicationTest > RemoteMethodCallSucceeds" to verification test.
-- deleted the old validator, added a validator with general restrictions
-- new feature to generate proxies and stubs into seperate target directories
-- small changes to generate code that can be compiled warning free
-- generator now creates windows compatible code
diff --git a/docx/CommonAPICppUserGuide b/docx/CommonAPICppUserGuide
index cf458e4..624628a 100644
--- a/docx/CommonAPICppUserGuide
+++ b/docx/CommonAPICppUserGuide
@@ -80,6 +80,10 @@ CommonAPI was developed for GENIVI and will run on most Linux platforms. Additio
- Do not use earlier versions of Eclipse as Luna; it could work but there is no warranty.
- The build tool chain for the code generators is Maven; make sure that at least Maven 3 is available. If you use eclipse make sure that the maven plug-in is installed.
+=== Dependencies
+.CommonAPI-Dependencies
+image::{imagedir}/CommonAPI-Dependencies.png[CommonAPI Dependencies]
+
=== Compile Runtime
==== Command-line
diff --git a/docx/images/CommonAPI-Dependencies.png b/docx/images/CommonAPI-Dependencies.png
new file mode 100755
index 0000000..64ccbd8
--- /dev/null
+++ b/docx/images/CommonAPI-Dependencies.png
Binary files differ
diff --git a/org.genivi.commonapi.console.feature/feature.xml b/org.genivi.commonapi.console.feature/feature.xml
index 9cf2768..beb64a2 100644
--- a/org.genivi.commonapi.console.feature/feature.xml
+++ b/org.genivi.commonapi.console.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.genivi.commonapi.console.feature"
label="Command Line Feature"
- version="3.1.2.qualifier"
+ version="3.1.3.qualifier"
provider-name="BMW AG">
<description url="http://www.example.com/description">
@@ -18,7 +18,7 @@
</license>
<requires>
- <import feature="org.genivi.commonapi.console.franca.feature" version="3.1.2" match="compatible"/>
+ <import feature="org.genivi.commonapi.console.franca.feature" version="3.1.3" match="compatible"/>
</requires>
<plugin
diff --git a/org.genivi.commonapi.console.feature/pom.xml b/org.genivi.commonapi.console.feature/pom.xml
index fcdb371..d2d6b00 100644
--- a/org.genivi.commonapi.console.feature/pom.xml
+++ b/org.genivi.commonapi.console.feature/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.releng</relativePath>
</parent>
</project> \ No newline at end of file
diff --git a/org.genivi.commonapi.console.franca.feature/feature.xml b/org.genivi.commonapi.console.franca.feature/feature.xml
index 13bd567..440c4e0 100644
--- a/org.genivi.commonapi.console.franca.feature/feature.xml
+++ b/org.genivi.commonapi.console.franca.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.genivi.commonapi.console.franca.feature"
label="Franca Core Dependencies Feature"
- version="3.1.2.qualifier"
+ version="3.1.3.qualifier"
provider-name="BMW AG">
<description url="http://www.example.com/description">
diff --git a/org.genivi.commonapi.console.franca.feature/pom.xml b/org.genivi.commonapi.console.franca.feature/pom.xml
index 3115c7e..5fb1d01 100644
--- a/org.genivi.commonapi.console.franca.feature/pom.xml
+++ b/org.genivi.commonapi.console.franca.feature/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.releng</relativePath>
</parent>
</project> \ No newline at end of file
diff --git a/org.genivi.commonapi.console/META-INF/MANIFEST.MF b/org.genivi.commonapi.console/META-INF/MANIFEST.MF
index 8b163bb..67cb66a 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: CommonAPI Console
Bundle-SymbolicName: org.genivi.commonapi.console;singleton:=true
-Bundle-Version: 3.1.2.qualifier
+Bundle-Version: 3.1.3.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 da4ab58..7a6e954 100644
--- a/org.genivi.commonapi.console/about.mappings
+++ b/org.genivi.commonapi.console/about.mappings
@@ -1,3 +1,3 @@
-0=3.1.2
-1=20150616
+0=3.1.3
+1=20150728
2=$sun.arch.data.model$
diff --git a/org.genivi.commonapi.console/pom.xml b/org.genivi.commonapi.console/pom.xml
index d67917d..7c5535d 100644
--- a/org.genivi.commonapi.console/pom.xml
+++ b/org.genivi.commonapi.console/pom.xml
@@ -8,7 +8,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.releng</relativePath>
</parent>
diff --git a/org.genivi.commonapi.console/src/org/genivi/commonapi/console/CommandExecuter.java b/org.genivi.commonapi.console/src/org/genivi/commonapi/console/CommandExecuter.java
index a8a97d6..c88ec44 100644
--- a/org.genivi.commonapi.console/src/org/genivi/commonapi/console/CommandExecuter.java
+++ b/org.genivi.commonapi.console/src/org/genivi/commonapi/console/CommandExecuter.java
@@ -86,7 +86,7 @@ public enum CommandExecuter
private final String HELP_ID_TEXT_MESSAGE = "%s: %s";
private final String HELP_WRONG_ID_MESSAGE = HELP_ID_TEXT_MESSAGE + "%nID does not match: %s";
private final String HELP_SEVERAL_COMMANDS_MESSAGE = "Several console commands are compatible to this set of parameters. Add ID option to select the desired one.%n";
- private final String EXECUTE_COMMAND_MESSAGE = "Excuting %s...%n" ;
+ private final String EXECUTE_COMMAND_MESSAGE = "Executing %s...%n" ;
private final String LAUNCHER_NAME;
private final Option ID_OPTION;
diff --git a/org.genivi.commonapi.core.cli.feature/feature.xml b/org.genivi.commonapi.core.cli.feature/feature.xml
index c732143..525d852 100644
--- a/org.genivi.commonapi.core.cli.feature/feature.xml
+++ b/org.genivi.commonapi.core.cli.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.genivi.commonapi.core.cli.feature"
label="CommonAPI Generator Feature"
- version="3.1.2.qualifier"
+ version="3.1.3.qualifier"
provider-name="BMW AG">
<plugin
diff --git a/org.genivi.commonapi.core.cli.feature/pom.xml b/org.genivi.commonapi.core.cli.feature/pom.xml
index b1804f3..755fdb5 100644
--- a/org.genivi.commonapi.core.cli.feature/pom.xml
+++ b/org.genivi.commonapi.core.cli.feature/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.cli.product/category.xml b/org.genivi.commonapi.core.cli.product/category.xml
index 43575e9..7d5a057 100644
--- a/org.genivi.commonapi.core.cli.product/category.xml
+++ b/org.genivi.commonapi.core.cli.product/category.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.genivi.commonapi.console.feature_3.1.2.qualifier.jar" id="org.genivi.commonapi.console.feature" version="3.1.2.qualifier">
+ <feature url="features/org.genivi.commonapi.console.feature_3.1.3.qualifier.jar" id="org.genivi.commonapi.console.feature" version="3.1.3.qualifier">
<category name="GENIVI CommonAPI Console"/>
</feature>
- <feature url="features/org.genivi.commonapi.console.franca.feature_3.1.2.qualifier.jar" id="org.genivi.commonapi.console.franca.feature" version="3.1.2.qualifier">
+ <feature url="features/org.genivi.commonapi.console.franca.feature_3.1.3.qualifier.jar" id="org.genivi.commonapi.console.franca.feature" version="3.1.3.qualifier">
<category name="GENIVI CommonAPI Console"/>
</feature>
<category-def name="GENIVI CommonAPI Console" label="GENIVI CommonAPI Console Generators">
diff --git a/org.genivi.commonapi.core.cli.product/commonapi_console.product b/org.genivi.commonapi.core.cli.product/commonapi_console.product
index baff218..969744b 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 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product name="CommonAPI Code Generator" uid="org.genivi.commonapi.core.cli.product" id="org.genivi.commonapi.console.product" application="org.genivi.commonapi.console.application" version="3.1.2" useFeatures="true" includeLaunchers="true">
+<product name="CommonAPI Code Generator" uid="org.genivi.commonapi.core.cli.product" id="org.genivi.commonapi.console.product" application="org.genivi.commonapi.console.application" version="3.1.3" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
diff --git a/org.genivi.commonapi.core.cli.product/pom.xml b/org.genivi.commonapi.core.cli.product/pom.xml
index c9c2152..0568d1b 100644
--- a/org.genivi.commonapi.core.cli.product/pom.xml
+++ b/org.genivi.commonapi.core.cli.product/pom.xml
@@ -127,7 +127,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project> \ No newline at end of file
diff --git a/org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF b/org.genivi.commonapi.core.cli/META-INF/MANIFEST.MF
index b3e32c1..55e499a 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: commonapi generator Console Interface
Bundle-SymbolicName: org.genivi.commonapi.core.cli;singleton:=true
-Bundle-Version: 3.1.2.qualifier
+Bundle-Version: 3.1.3.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.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.2";visibility:=reexport,
- org.genivi.commonapi.console;bundle-version="3.1.2"
+ org.genivi.commonapi.core;bundle-version="3.1.3";visibility:=reexport,
+ org.genivi.commonapi.console;bundle-version="3.1.3"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Vendor: BMW AG
diff --git a/org.genivi.commonapi.core.cli/plugin.xml b/org.genivi.commonapi.core.cli/plugin.xml
index cbbd9d3..44db8ad 100644
--- a/org.genivi.commonapi.core.cli/plugin.xml
+++ b/org.genivi.commonapi.core.cli/plugin.xml
@@ -86,6 +86,15 @@
</option>
<option
argCount="1"
+ description="Switch on/off validation of the fidl file"
+ hasOptionalArg="false"
+ id="org.genivi.commonapi.core.cli.option.validation"
+ longName="validation"
+ required="false"
+ shortName="val">
+ </option>
+ <option
+ argCount="1"
description="The file path to the license text that will be added to each generated file"
hasOptionalArg="false"
id="org.genivi.commonapi.core.cli.option.license"
diff --git a/org.genivi.commonapi.core.cli/pom.xml b/org.genivi.commonapi.core.cli/pom.xml
index 7e19acb..9395a3b 100644
--- a/org.genivi.commonapi.core.cli/pom.xml
+++ b/org.genivi.commonapi.core.cli/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandLineHandler.java b/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandLineHandler.java
index 07f43ea..b17e75f 100644
--- a/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandLineHandler.java
+++ b/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandLineHandler.java
@@ -108,6 +108,11 @@ public class CommandLineHandler extends AbstractCommandLineHandler implements
cliTool.setEnumPrefix(parsedArguments.getOptionValue("pre"));
}
+ // Switch on/off validation
+ if(parsedArguments.hasOption("val")) {
+ cliTool.enableValidation(parsedArguments.getOptionValue("val"));
+ }
+
// finally invoke the generator.
// the remaining arguments are assumed to be files !
cliTool.generateCore(files);
diff --git a/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandlineToolMain.java b/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandlineToolMain.java
index 5756906..54f1c26 100644
--- a/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandlineToolMain.java
+++ b/org.genivi.commonapi.core.cli/src/org/genivi/commonapi/core/cli/CommandlineToolMain.java
@@ -64,7 +64,9 @@ public class CommandlineToolMain
protected ValidatorCore validator;
private int validationErrorCount;
protected String SCOPE = "Core validation: ";
-
+ private boolean isValidation = true;
+ public static final int ERROR_STATE = 1;
+
private ValidationMessageAcceptor cliMessageAcceptor = new AbstractValidationMessageAcceptor() {
@Override
@@ -201,19 +203,22 @@ public class CommandlineToolMain
URI uri = URI.createFileURI(file);
Resource resource = rsset.createResource(uri);
validationErrorCount = 0;
- validate(resource);
+ if(isValidation) {
+ validate(resource);
+ }
if(validationErrorCount == 0) {
ConsoleLogger.printLog("Generating code for " + file);
try {
francaGenerator.doGenerate(resource, fsa);
}
catch (Exception e) {
- ConsoleLogger.printErrorLog("Failed to generate code !");
- ConsoleLogger.printErrorLog(e.getMessage());
+ System.err.println("Failed to generate code for " + file );
+ System.exit(ERROR_STATE);
}
}
else {
- ConsoleLogger.printErrorLog(file + " contains errors !");
+ ConsoleLogger.printErrorLog(file + " contains validation errors !");
+ System.exit(ERROR_STATE);
}
}
}
@@ -229,7 +234,6 @@ public class CommandlineToolMain
} catch (IOException e) {
e.printStackTrace();
}
-
ConsoleLogger.printLog("validating...");
// check for (internal )resource validation errors
@@ -428,4 +432,11 @@ public class CommandlineToolMain
pref.setPreference(PreferenceConstants.P_SKELETONPOSTFIX, postfix);
ConsoleLogger.printLog("Skeleton postfix: " + postfix);
}
+
+ public void enableValidation(String optionValue) {
+ if(optionValue.equals("no") || optionValue.equals("off")) {
+ ConsoleLogger.printLog("Validation is off");
+ isValidation = false;
+ }
+ }
}
diff --git a/org.genivi.commonapi.core.feature/feature.xml b/org.genivi.commonapi.core.feature/feature.xml
index f954c13..b1fd26a 100644
--- a/org.genivi.commonapi.core.feature/feature.xml
+++ b/org.genivi.commonapi.core.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.genivi.commonapi.core.feature"
label="%featureName"
- version="3.1.2.qualifier"
+ version="3.1.3.qualifier"
provider-name="%providerName">
<copyright>
diff --git a/org.genivi.commonapi.core.feature/pom.xml b/org.genivi.commonapi.core.feature/pom.xml
index aef7098..738f630 100644
--- a/org.genivi.commonapi.core.feature/pom.xml
+++ b/org.genivi.commonapi.core.feature/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.releng/pom.xml b/org.genivi.commonapi.core.releng/pom.xml
index 0bafea6..57b2a0b 100644
--- a/org.genivi.commonapi.core.releng/pom.xml
+++ b/org.genivi.commonapi.core.releng/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.target/pom.xml b/org.genivi.commonapi.core.target/pom.xml
index 6a084ff..bc18d62 100644
--- a/org.genivi.commonapi.core.target/pom.xml
+++ b/org.genivi.commonapi.core.target/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project> \ No newline at end of file
diff --git a/org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF b/org.genivi.commonapi.core.ui/META-INF/MANIFEST.MF
index de6d276..6026889 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 Common API UI
Bundle-SymbolicName: org.genivi.commonapi.core.ui;singleton:=true
-Bundle-Version: 3.1.2.qualifier
+Bundle-Version: 3.1.3.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,
@@ -15,7 +15,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="[3.0.0,4.0.0)";visibility:=reexport,
- org.genivi.commonapi.core;bundle-version="3.1.2";visibility:=reexport,
+ org.genivi.commonapi.core;bundle-version="3.1.3";visibility:=reexport,
org.franca.core.dsl.ui;bundle-version="0.9.1",
org.franca.deploymodel.dsl.ui;bundle-version="0.9.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/org.genivi.commonapi.core.ui/pom.xml b/org.genivi.commonapi.core.ui/pom.xml
index 3a9452f..7022959 100644
--- a/org.genivi.commonapi.core.ui/pom.xml
+++ b/org.genivi.commonapi.core.ui/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.ui/src/org/genivi/commonapi/core/ui/handler/GenerationCommand.java b/org.genivi.commonapi.core.ui/src/org/genivi/commonapi/core/ui/handler/GenerationCommand.java
index 5bd5b38..a842602 100644
--- a/org.genivi.commonapi.core.ui/src/org/genivi/commonapi/core/ui/handler/GenerationCommand.java
+++ b/org.genivi.commonapi.core.ui/src/org/genivi/commonapi/core/ui/handler/GenerationCommand.java
@@ -316,7 +316,7 @@ public class GenerationCommand extends AbstractHandler {
System.err.println("Failed to get property for " + resource.getName());
}
- // Set defaults in the case, where nothing was specified from the user.
+ // Set defaults from the preference store in the case, where the value was not specified in the properties.
if(outputFolderCommon == null) {
outputFolderCommon = store.getString(PreferenceConstants.P_OUTPUT_COMMON);
}
@@ -339,13 +339,13 @@ public class GenerationCommand extends AbstractHandler {
licenseHeader = store.getString(PreferenceConstants.P_LICENSE);
}
if(generateProxy == null) {
- generateProxy = "true";
+ generateProxy = store.getString(PreferenceConstants.P_GENERATEPROXY);
}
if(generatStub == null) {
- generatStub = "true";
+ generatStub = store.getString(PreferenceConstants.P_GENERATESTUB);
}
if(generatSkeleton == null) {
- generatSkeleton = "false";
+ generatSkeleton = store.getString(PreferenceConstants.P_GENERATESKELETON);
}
// finally, store the properties for the code generator
diff --git a/org.genivi.commonapi.core.updatesite/category.xml b/org.genivi.commonapi.core.updatesite/category.xml
index 89b94f1..50f10cf 100644
--- a/org.genivi.commonapi.core.updatesite/category.xml
+++ b/org.genivi.commonapi.core.updatesite/category.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.genivi.commonapi.core.validator.feature_3.1.2.qualifier.jar" id="org.genivi.commonapi.core.validator.feature" version="3.1.2.qualifier">
+ <feature url="features/org.genivi.commonapi.core.validator.feature_3.1.3.qualifier.jar" id="org.genivi.commonapi.core.validator.feature" version="3.1.3.qualifier">
<category name="GENIVI CommonAPI"/>
</feature>
- <feature url="features/org.genivi.commonapi.core.feature_3.1.2.qualifier.jar" id="org.genivi.commonapi.core.feature" version="3.1.2.qualifier">
+ <feature url="features/org.genivi.commonapi.core.feature_3.1.3.qualifier.jar" id="org.genivi.commonapi.core.feature" version="3.1.3.qualifier">
<category name="GENIVI CommonAPI"/>
</feature>
<category-def name="GENIVI CommonAPI" label="GENIVI CommonAPI Generators">
diff --git a/org.genivi.commonapi.core.updatesite/pom.xml b/org.genivi.commonapi.core.updatesite/pom.xml
index a263d41..67763ba 100644
--- a/org.genivi.commonapi.core.updatesite/pom.xml
+++ b/org.genivi.commonapi.core.updatesite/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project> \ No newline at end of file
diff --git a/org.genivi.commonapi.core.validator.feature/feature.xml b/org.genivi.commonapi.core.validator.feature/feature.xml
index 364e052..ae39e49 100644
--- a/org.genivi.commonapi.core.validator.feature/feature.xml
+++ b/org.genivi.commonapi.core.validator.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.genivi.commonapi.core.validator.feature"
label="%featureName"
- version="3.1.2.qualifier"
+ version="3.1.3.qualifier"
provider-name="%providerName">
<copyright>
@@ -14,7 +14,7 @@
</license>
<requires>
- <import plugin="org.genivi.commonapi.core.ui" version="3.1.2" match="compatible"/>
+ <import plugin="org.genivi.commonapi.core.ui" version="3.1.3" match="compatible"/>
</requires>
<plugin
diff --git a/org.genivi.commonapi.core.validator.feature/pom.xml b/org.genivi.commonapi.core.validator.feature/pom.xml
index 60e893d..caa05a6 100644
--- a/org.genivi.commonapi.core.validator.feature/pom.xml
+++ b/org.genivi.commonapi.core.validator.feature/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF b/org.genivi.commonapi.core.validator/META-INF/MANIFEST.MF
index 786a859..6a97d70 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: General
Bundle-Vendor: BMW AG
Bundle-SymbolicName: org.genivi.commonapi.core.validator;singleton:=true
-Bundle-Version: 3.1.2.qualifier
+Bundle-Version: 3.1.3.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
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="3.0.0",
- org.genivi.commonapi.core;bundle-version="3.1.2",
- org.genivi.commonapi.core.ui;bundle-version="3.1.2",
+ org.genivi.commonapi.core;bundle-version="3.1.3",
+ org.genivi.commonapi.core.ui;bundle-version="3.1.3",
org.franca.core.dsl;bundle-version="[0.9.0,0.10.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 643cb84..b0f9dc4 100644
--- a/org.genivi.commonapi.core.validator/pom.xml
+++ b/org.genivi.commonapi.core.validator/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core.verification/.gitignore b/org.genivi.commonapi.core.verification/.gitignore
index 2053e13..d13ee43 100644
--- a/org.genivi.commonapi.core.verification/.gitignore
+++ b/org.genivi.commonapi.core.verification/.gitignore
@@ -5,4 +5,5 @@
/.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 ffdb9f2..4005ac0 100644
--- a/org.genivi.commonapi.core.verification/CMakeLists.txt
+++ b/org.genivi.commonapi.core.verification/CMakeLists.txt
@@ -90,30 +90,38 @@ message("UPPER_CMAKE_BUILD_TYPE: ${UPPER_CMAKE_BUILD_TYPE}")
if(NOT "${CMAKE_GLUECODE_DBUS_NAME}" STREQUAL "na")
get_property(GLUECODE_LIB_PATH_NAME_DBUS TARGET ${CMAKE_GLUECODE_DBUS_NAME} PROPERTY IMPORTED_LOCATION_${UPPER_CMAKE_BUILD_TYPE})
message("GLUECODE_LIB_PATH_NAME_DBUS value: ${GLUECODE_LIB_PATH_NAME_DBUS}")
- # Strip the trailing .0.0.0 from the path as otherwise libCommonAPI won't load the .so
- string(LENGTH ${GLUECODE_LIB_PATH_NAME_DBUS} GLUECODE_LIB_PATH_NAME_DBUS_LENGTH)
- math(EXPR GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_ADJUSTED '${GLUECODE_LIB_PATH_NAME_DBUS_LENGTH}-6')
- string(SUBSTRING ${GLUECODE_LIB_PATH_NAME_DBUS}
- 0 ${GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_ADJUSTED}
- GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_CLEAN
- )
- # GLUECODE_SO_DBUS is used in commonapi4dbus.ini.in file
- SET(GLUECODE_SO_DBUS ${GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_CLEAN})
+ if (MSVC)
+ SET(GLUECODE_SO_DBUS ${GLUECODE_LIB_PATH_NAME_DBUS})
+ else()
+ # Strip the trailing .0.0.0 from the path as otherwise libCommonAPI won't load the .so
+ string(LENGTH ${GLUECODE_LIB_PATH_NAME_DBUS} GLUECODE_LIB_PATH_NAME_DBUS_LENGTH)
+ math(EXPR GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_ADJUSTED '${GLUECODE_LIB_PATH_NAME_DBUS_LENGTH}-6')
+ string(SUBSTRING ${GLUECODE_LIB_PATH_NAME_DBUS}
+ 0 ${GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_ADJUSTED}
+ GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_CLEAN
+ )
+ # GLUECODE_SO_DBUS is used in commonapi4dbus.ini.in file
+ SET(GLUECODE_SO_DBUS ${GLUECODE_LIB_PATH_NAME_DBUS_LENGTH_CLEAN})
+ endif()
endif()
# libSomeIPGlue
if(NOT "${CMAKE_GLUECODE_SOMEIP_NAME}" STREQUAL "na")
get_property(GLUECODE_LIB_PATH_NAME_SOMEIP TARGET ${CMAKE_GLUECODE_SOMEIP_NAME} PROPERTY IMPORTED_LOCATION_${UPPER_CMAKE_BUILD_TYPE})
message("GLUECODE_LIB_PATH_NAME_SOMEIP value: ${GLUECODE_LIB_PATH_NAME_SOMEIP}")
- # Strip the trailing .0.0.0 from the path as otherwise libCommonAPI won't load the .so
- string(LENGTH ${GLUECODE_LIB_PATH_NAME_SOMEIP} GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH)
- math(EXPR GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_ADJUSTED '${GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH}-6')
- string(SUBSTRING ${GLUECODE_LIB_PATH_NAME_SOMEIP}
- 0 ${GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_ADJUSTED}
- GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_CLEAN
- )
- # GLUECODE_SO_SOMEIP is used in commonapi4dbus.ini.in file
- SET(GLUECODE_SO_SOMEIP ${GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_CLEAN})
+ if (MSVC)
+ SET(GLUECODE_SO_SOMEIP ${GLUECODE_LIB_PATH_NAME_SOMEIP})
+ else()
+ # Strip the trailing .0.0.0 from the path as otherwise libCommonAPI won't load the .so
+ string(LENGTH ${GLUECODE_LIB_PATH_NAME_SOMEIP} GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH)
+ math(EXPR GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_ADJUSTED '${GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH}-6')
+ string(SUBSTRING ${GLUECODE_LIB_PATH_NAME_SOMEIP}
+ 0 ${GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_ADJUSTED}
+ GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_CLEAN
+ )
+ # GLUECODE_SO_SOMEIP is used in commonapi4dbus.ini.in file
+ SET(GLUECODE_SO_SOMEIP ${GLUECODE_LIB_PATH_NAME_SOMEIP_LENGTH_CLEAN})
+ endif()
endif()
##############################################################################
@@ -143,6 +151,12 @@ if ("${BUILD_SHARED_LIBS}" STREQUAL "ON")
set(BUILD_SHARED_LIBS OFF)
set(BUILD_SHARED_LIBS_AUTOMATIC_OFF 1)
endif()
+
+# ...but visual studio needs a shared CRT for gtest, otherwise the linker won't work correctly with the testcases.
+if (MSVC)
+ set(gtest_force_shared_crt ON)
+endif()
+
add_subdirectory($ENV{GTEST_ROOT} ${CMAKE_CURRENT_BINARY_DIR}/gtest EXCLUDE_FROM_ALL)
if ("${BUILD_SHARED_LIBS_AUTOMATIC_OFF}" STREQUAL "1")
set(BUILD_SHARED_LIBS ON)
@@ -154,12 +168,13 @@ endif()
if (MSVC)
# Visual C++ is not always sure whether he is really C++
-set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -DCOMMONAPI_INTERNAL_COMPILATION /EHsc")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOMMONAPI_INTERNAL_COMPILATION /EHsc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCOMMONAPI_INTERNAL_COMPILATION")
+set(USE_RT "")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wno-reorder -Wno-unused-variable -DCOMMONAPI_INTERNAL_COMPILATION")
-endif()
set(USE_RT "rt")
+endif()
message("Compiler options: ${CMAKE_CXX_FLAGS}")
@@ -203,7 +218,8 @@ target_link_libraries(CMAttributes ${TEST_LINK_LIBRARIES})
add_executable(CMAttributeSubscription
src/CMAttributeSubscription.cpp
- src-gen/v1_0/commonapi/communication/TestInterfaceStubDefault.cpp)
+ src-gen/v1_0/commonapi/communication/TestInterfaceStubDefault.cpp
+ src-gen/v1_0/commonapi/communication/DaemonStubDefault.cpp)
target_link_libraries(CMAttributeSubscription ${TEST_LINK_LIBRARIES})
add_executable(DTPrimitive
@@ -226,12 +242,12 @@ add_executable(DTDerived
src-gen/v1_0/commonapi/datatypes/derived/TestInterface.cpp)
target_link_libraries(DTDerived ${TEST_LINK_LIBRARIES})
-#add_executable(DTCombined
-# src/DTCombined.cpp
-# src/stub/DTCombinedStub.cpp
-# src-gen/v1_0/commonapi/datatypes/combined/TestInterface.cpp
-# src-gen/v1_0/commonapi/datatypes/combined/TestInterfaceStubDefault.cpp)
-#target_link_libraries(DTCombined ${TEST_LINK_LIBRARIES})
+add_executable(DTCombined
+ src/DTCombined.cpp
+ src/stub/DTCombinedStub.cpp
+ src-gen/v1_0/commonapi/datatypes/combined/TestInterface.cpp
+ src-gen/v1_0/commonapi/datatypes/combined/TestInterfaceStubDefault.cpp)
+target_link_libraries(DTCombined ${TEST_LINK_LIBRARIES})
add_executable(THMainLoopIntegration
src/THMainLoopIntegration.cpp
@@ -244,6 +260,11 @@ add_executable(THMainLoopIndependence
src-gen/v1_0/commonapi/threading/TestInterfaceStubDefault.cpp)
target_link_libraries(THMainLoopIndependence ${TEST_LINK_LIBRARIES})
+add_executable(THMainLoopTwoThreads
+ src/THMainLoopTwoThreads.cpp
+ src-gen/v1_0/commonapi/threading/TestInterfaceStubDefault.cpp)
+target_link_libraries(THMainLoopTwoThreads ${TEST_LINK_LIBRARIES})
+
add_executable(PFPrimitive
src/PFPrimitive.cpp
src/stub/PFPrimitiveStub.cpp
@@ -265,14 +286,6 @@ add_executable(StabilitySP
src-gen/v1_0/commonapi/stability/sp/TestInterfaceStubDefault.cpp)
target_link_libraries(StabilitySP ${TEST_LINK_LIBRARIES})
-add_executable(StabilityMP
- src/StabilityMP.cpp
- src/stub/StabControlStub.cpp
- src/stub/StabilityMPStub.cpp
- src-gen/v1_0/commonapi/stability/mp/ControlInterfaceStubDefault.cpp
- src-gen/v1_0/commonapi/stability/mp/TestInterfaceStubDefault.cpp)
-target_link_libraries(StabilityMP ${TEST_LINK_LIBRARIES})
-
add_dependencies(RTLoadingRuntime gtest)
add_dependencies(RTBuildProxiesAndStubs gtest)
add_dependencies(CMMethodCalls gtest)
@@ -281,13 +294,13 @@ add_dependencies(CMAttributeSubscription gtest)
add_dependencies(DTPrimitive gtest)
add_dependencies(DTAdvanced gtest)
add_dependencies(DTDerived gtest)
-#add_dependencies(DTCombined gtest)
+add_dependencies(DTCombined gtest)
add_dependencies(THMainLoopIntegration gtest)
add_dependencies(THMainLoopIndependence gtest)
+add_dependencies(THMainLoopTwoThreads gtest)
add_dependencies(PFPrimitive gtest)
add_dependencies(PFComplex gtest)
add_dependencies(StabilitySP gtest)
-add_dependencies(StabilityMP gtest)
add_dependencies(check RTLoadingRuntime)
add_dependencies(check RTBuildProxiesAndStubs)
@@ -297,13 +310,13 @@ add_dependencies(check CMAttributeSubscription)
add_dependencies(check DTPrimitive)
add_dependencies(check DTAdvanced)
add_dependencies(check DTDerived)
-#add_dependencies(check DTCombined)
+add_dependencies(check DTCombined)
add_dependencies(check THMainLoopIntegration)
add_dependencies(check THMainLoopIndependence)
+add_dependencies(check THMainLoopTwoThreads)
add_dependencies(check PFPrimitive)
add_dependencies(check PFComplex)
add_dependencies(check StabilitySP)
-add_dependencies(check StabilityMP)
# Tests for DBus
if(NOT "${CMAKE_GLUECODE_DBUS_NAME}" STREQUAL "na")
@@ -329,20 +342,20 @@ if(NOT "${CMAKE_GLUECODE_DBUS_NAME}" STREQUAL "na")
set_property(TEST DTAdvancedDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
add_test(NAME DTDerivedDBus COMMAND DTDerived)
set_property(TEST DTDerivedDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
- #add_test(NAME DTCombinedDBus COMMAND DTCombined)
- #set_property(TEST DTCombinedDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
+ add_test(NAME DTCombinedDBus COMMAND DTCombined)
+ set_property(TEST DTCombinedDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
add_test(NAME THMainLoopIntegrationDBus COMMAND THMainLoopIntegration)
set_property(TEST THMainLoopIntegrationDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
add_test(NAME THMainLoopIndependenceDBus COMMAND THMainLoopIndependence)
set_property(TEST THMainLoopIndependenceDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
+ add_test(NAME THMainLoopTwoThreadsDBus COMMAND THMainLoopTwoThreads)
+ set_property(TEST THMainLoopTwoThreadsDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
add_test(NAME PFPrimitiveDBus COMMAND PFPrimitive)
set_property(TEST PFPrimitiveDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
add_test(NAME PFComplexDBus COMMAND PFComplex)
set_property(TEST PFComplexDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
add_test(NAME StabilitySPDBus COMMAND StabilitySP)
set_property(TEST StabilitySPDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
- add_test(NAME StabilityMPDBus COMMAND StabilityMP)
- set_property(TEST StabilityMPDBus APPEND PROPERTY ENVIRONMENT ${DBUS_TEST_ENVIRONMENT})
endif()
# Tests for SomeIP
@@ -371,20 +384,20 @@ if(NOT "${CMAKE_GLUECODE_SOMEIP_NAME}" STREQUAL "na")
set_property(TEST DTAdvancedSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
add_test(NAME DTDerivedSomeIP COMMAND DTDerived)
set_property(TEST DTDerivedSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
- #add_test(NAME DTCombinedSomeIP COMMAND DTCombined)
- #set_property(TEST DTCombinedSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
+ add_test(NAME DTCombinedSomeIP COMMAND DTCombined)
+ set_property(TEST DTCombinedSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
add_test(NAME THMainLoopIntegrationSomeIP COMMAND THMainLoopIntegration)
set_property(TEST THMainLoopIntegrationSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
add_test(NAME THMainLoopIndependenceSomeIP COMMAND THMainLoopIndependence)
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 PFPrimitiveSomeIP COMMAND PFPrimitive)
set_property(TEST PFPrimitiveSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
add_test(NAME PFComplexSomeIP COMMAND PFComplex)
set_property(TEST PFComplexSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
add_test(NAME StabilitySPSomeIP COMMAND StabilitySP)
set_property(TEST StabilitySPSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
- add_test(NAME StabilityMPSomeIP COMMAND StabilityMP)
- set_property(TEST StabilityMPSomeIP APPEND PROPERTY ENVIRONMENT ${SOMEIP_TEST_ENVIRONMENT})
endif()
##############################################################################
diff --git a/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl b/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl
index 50329be..0740b6f 100644
--- a/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl
+++ b/org.genivi.commonapi.core.verification/fidl/ti_communication.fidl
@@ -20,4 +20,8 @@ interface TestInterface {
UInt8 y
}
}
+}
+
+interface Daemon {
+ version { major 1 minor 0 }
} \ No newline at end of file
diff --git a/org.genivi.commonapi.core.verification/fidl/ti_datatypes_combined.fidl b/org.genivi.commonapi.core.verification/fidl/ti_datatypes_combined.fidl
index 0db1c70..eab2007 100644
--- a/org.genivi.commonapi.core.verification/fidl/ti_datatypes_combined.fidl
+++ b/org.genivi.commonapi.core.verification/fidl/ti_datatypes_combined.fidl
@@ -67,7 +67,7 @@ interface TestInterface {
union tUnionL1 {
tEnum enumMember
tArray arrayMember
- //tStruct structMember
+ tStruct structMember
tUnion unionMember
tMap mapMember
}
diff --git a/org.genivi.commonapi.core.verification/fidl/ti_stability_mp.fidl b/org.genivi.commonapi.core.verification/fidl/ti_stability_mp.fidl
deleted file mode 100644
index 0b89dcb..0000000
--- a/org.genivi.commonapi.core.verification/fidl/ti_stability_mp.fidl
+++ /dev/null
@@ -1,46 +0,0 @@
-/* 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.stability.mp
-
-interface TestInterface {
- version { major 1 minor 0 }
-
- attribute tArray testAttribute
-
- method testMethod {
- in {
- tArray x
- }
- out {
- tArray y
- }
- }
-
- broadcast testBroadcast {
- out {
- tArray y
- }
- }
-
- array tArray of UInt8
-}
-
-interface ControlInterface {
- version { major 1 minor 0 }
- method controlMethod {
- in {
- UInt8 id
- UInt32 data
- }
- out {
- UInt8 command
- UInt32 data1
- UInt32 data2
- }
- }
-
-
-}
-
-
diff --git a/org.genivi.commonapi.core.verification/src/CMAttributeSubscription.cpp b/org.genivi.commonapi.core.verification/src/CMAttributeSubscription.cpp
index d7e9c9d..4a0c01c 100644
--- a/org.genivi.commonapi.core.verification/src/CMAttributeSubscription.cpp
+++ b/org.genivi.commonapi.core.verification/src/CMAttributeSubscription.cpp
@@ -18,14 +18,18 @@
#include "CommonAPI/CommonAPI.hpp"
#include "v1_0/commonapi/communication/TestInterfaceProxy.hpp"
#include "v1_0/commonapi/communication/TestInterfaceStubDefault.hpp"
+#include "v1_0/commonapi/communication/DaemonStubDefault.hpp"
+#include "stub/CMAttributesStub.h"
-const std::string serviceId = "service-sample";
+const std::string daemonId = "service-sample";
const std::string clientId = "client-sample";
+const std::string serviceId = "test-service";
const std::string domain = "local";
const std::string testAddress = "commonapi.communication.TestInterface";
+const std::string daemonAddress = "commonapi.communication.Daemon";
-const unsigned int wt = 500000;
+const unsigned int wt = 100000;
typedef std::shared_ptr<v1_0::commonapi::communication::TestInterfaceProxy<>> ProxyPtr;
@@ -33,6 +37,8 @@ std::mutex mut;
std::deque<uint32_t> data_queue;
std::condition_variable data_cond;
+using namespace v1_0::commonapi::communication;
+
class SubscriptionHandler {
public:
@@ -65,7 +71,17 @@ public:
/* for test purposes, magic value 99 unsubscribes the attribute. */
if (val == 99) {
- cancelSubscribe();
+
+ // We can't call cancleSubscribe() within the async handler
+ // because it lead to a dead lock with the SomeIP-binding.
+ // Therefore we unsubscribe within the main thread of the test case!
+ //
+ // The reason for the dead lock is because within the async handler
+ // the connection thread is holding the Connection::sendReceiveMutex_
+ // which will locked again when calling Connection::removeEventHandler
+ // which is implicitly called when unsubscribing!
+
+ // cancelSubscribe();
}
}
@@ -93,6 +109,10 @@ public:
return testAttribute_;
}
+ void resetSubcriptedTestAttribute() {
+ testAttribute_ = 0;
+ }
+
std::deque<uint8_t> myQueue_;
private:
@@ -138,6 +158,67 @@ private:
uint8_t notOkAttribute_;
};
+class ThreeCallbackHandler {
+public:
+ ThreeCallbackHandler() :
+ callbackCounter_1_(0),
+ callbackCounter_2_(0),
+ callbackCounter_3_(0),
+ callbackValue_1_(0),
+ callbackValue_2_(0),
+ callbackValue_3_(0) {
+
+ }
+
+ void callback_1(const uint8_t& val) {
+ callbackCounter_1_++;
+ callbackValue_1_ = val;
+ }
+
+ void callback_2(const uint8_t& val) {
+ callbackCounter_2_++;
+ callbackValue_2_ = val;
+ }
+
+ void callback_3(const uint8_t& val) {
+ callbackCounter_3_++;
+ callbackValue_3_ = val;
+ }
+
+ uint8_t getCallbackCounter_1() {
+ return callbackCounter_1_;
+ }
+
+ uint8_t getCallbackCounter_2() {
+ return callbackCounter_2_;
+ }
+
+ uint8_t getCallbackCounter_3() {
+ return callbackCounter_3_;
+ }
+
+ uint8_t getCallbackValue_1() {
+ return callbackValue_1_;
+ }
+
+ uint8_t getCallbackValue_2() {
+ return callbackValue_2_;
+ }
+
+ uint8_t getCallbackValue_3() {
+ return callbackValue_3_;
+ }
+
+private:
+ uint8_t callbackCounter_1_;
+ uint8_t callbackCounter_2_;
+ uint8_t callbackCounter_3_;
+
+ uint8_t callbackValue_1_;
+ uint8_t callbackValue_2_;
+ uint8_t callbackValue_3_;
+};
+
void testSubscription(ProxyPtr pp) {
SubscriptionHandler subscriptionHandler(pp);
@@ -169,19 +250,29 @@ protected:
runtime_ = CommonAPI::Runtime::get();
ASSERT_TRUE((bool)runtime_);
- testProxy_ = runtime_->buildProxy<v1_0::commonapi::communication::TestInterfaceProxy>(domain, testAddress, clientId);
+ testProxy_ = runtime_->buildProxy<TestInterfaceProxy>(domain, testAddress, clientId);
ASSERT_TRUE((bool)testProxy_);
- testStub_ = std::make_shared<v1_0::commonapi::communication::TestInterfaceStubDefault>();
+ testStub_ = std::make_shared<TestInterfaceStubDefault>();
+
+ deregisterService_ = false;
}
void TearDown() {
+ // secure, that service is deregistered by finishing the test
+ if (deregisterService_) {
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+ }
}
std::shared_ptr<CommonAPI::Runtime> runtime_;
- std::shared_ptr<v1_0::commonapi::communication::TestInterfaceProxy<>> testProxy_;
- std::shared_ptr<v1_0::commonapi::communication::TestInterfaceStubDefault> testStub_;
+ std::shared_ptr<TestInterfaceProxy<>> testProxy_;
+ std::shared_ptr<TestInterfaceStubDefault> testStub_;
+
+ bool deregisterService_;
};
class Environment: public ::testing::Environment {
@@ -191,12 +282,17 @@ public:
}
virtual void SetUp() {
+ stubDaemon_ = std::make_shared<DaemonStubDefault>();
+ CommonAPI::Runtime::get()->registerService(domain, daemonAddress, stubDaemon_, daemonId);
}
virtual void TearDown() {
+ CommonAPI::Runtime::get()->unregisterService(domain, DaemonStubDefault::StubInterface::getInterface(),
+ daemonAddress);
}
private:
+ std::shared_ptr<DaemonStubDefault> stubDaemon_;
};
/**
@@ -210,35 +306,58 @@ private:
*/
TEST_F(CMAttributeSubscription, SubscriptionStandard) {
+ deregisterService_ = true;
+
+ uint8_t defaultValue = 33;
+
+ // initialize test stub with default value
+ testStub_->setTestAttributeAttribute(defaultValue);
+
bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
ASSERT_TRUE(serviceRegistered);
- for(unsigned int i = 0; !testProxy_->isAvailable() && i < 100; ++i) {
- usleep(10000);
- }
+ testProxy_->isAvailableBlocking();
ASSERT_TRUE(testProxy_->isAvailable());
SubscriptionHandler subscriptionHandler(testProxy_);
- std::function<void (const uint8_t&)> myCallback = std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
- //CommonAPI::Event<uint8_t>::Subscription subscribedListener =
- testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
+ std::function<void (const uint8_t&)> myCallback =
+ std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
+
+ CommonAPI::Event<uint8_t>::Subscription subscribedListener =
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
const uint8_t testNumber = 10;
for (uint8_t i=1; i<testNumber+1; i++) {
- testStub_->setTestAttributeAttribute(i);
+ usleep(100000);
+ testStub_->setTestAttributeAttribute(i);
}
usleep(wt);
- ASSERT_EQ(subscriptionHandler.myQueue_.size(), testNumber);
+ ASSERT_EQ(subscriptionHandler.myQueue_.size(), testNumber + 1); // + 1 due to the reason, that by subscribtion the current value is returned
- uint8_t t = 1;
+ uint8_t t = 0;
for(std::deque<uint8_t>::iterator it = subscriptionHandler.myQueue_.begin(); it != subscriptionHandler.myQueue_.end(); ++it) {
- EXPECT_EQ(*it, t);
- t++;
+ if (t == 0) {
+ EXPECT_EQ(*it, defaultValue);
+ t++;
+ } else {
+ EXPECT_EQ(*it, t);
+ t++;
+ }
}
- runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().unsubscribe(subscribedListener);
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ usleep(wt);
+
+ deregisterService_ = !isUnregistered;
}
+
/**
* @test Subscription test with subscription on available-event.
* - Subscribe for available-event.
@@ -252,7 +371,8 @@ TEST_F(CMAttributeSubscription, SubscriptionOnAvailable) {
SubscriptionHandler subscriptionHandler(testProxy_);
- std::function<void (CommonAPI::AvailabilityStatus)> callbackAvailabilityStatus = std::bind(&SubscriptionHandler::receiveServiceAvailable, &subscriptionHandler, std::placeholders::_1);
+ std::function<void (CommonAPI::AvailabilityStatus)> callbackAvailabilityStatus =
+ std::bind(&SubscriptionHandler::receiveServiceAvailable, &subscriptionHandler, std::placeholders::_1);
testProxy_->getProxyStatusEvent().subscribe(callbackAvailabilityStatus);
testStub_->setTestAttributeAttribute(1);
@@ -262,11 +382,14 @@ TEST_F(CMAttributeSubscription, SubscriptionOnAvailable) {
bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
ASSERT_TRUE(serviceRegistered);
usleep(wt);
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
testStub_->setTestAttributeAttribute(2);
usleep(wt);
ASSERT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 2);
- bool serviceUnregistered = runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ bool serviceUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
ASSERT_TRUE(serviceUnregistered);
usleep(wt);
ASSERT_EQ(subscriptionHandler.getAvailabilityStatus(), CommonAPI::AvailabilityStatus::NOT_AVAILABLE);
@@ -307,7 +430,8 @@ TEST_F(CMAttributeSubscription, SubscriptionMultithreading) {
usleep(wt);
- bool serviceUnregistered = runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ bool serviceUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
ASSERT_TRUE(serviceUnregistered);
uint32_t data = 0;
@@ -354,15 +478,14 @@ TEST_F(CMAttributeSubscription, SubscriptionUnsubscribeFromCallback) {
bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
ASSERT_TRUE(serviceRegistered);
- for(unsigned int i = 0; !testProxy_->isAvailable() && i < 100; ++i) {
- usleep(10000);
- }
+ testProxy_->isAvailableBlocking();
ASSERT_TRUE(testProxy_->isAvailable());
SubscriptionHandler subscriptionHandler(testProxy_);
- std::function<void (const uint8_t&)> myCallback = std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
- subscriptionHandler.startSubscribe();
+ std::function<void (const uint8_t&)> myCallback = std::bind(&SubscriptionHandler::myCallback,
+ &subscriptionHandler, std::placeholders::_1);
+ subscriptionHandler.startSubscribe();
testStub_->setTestAttributeAttribute(42);
usleep(wt);
@@ -372,11 +495,16 @@ TEST_F(CMAttributeSubscription, SubscriptionUnsubscribeFromCallback) {
usleep(wt);
EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 99);
+ subscriptionHandler.cancelSubscribe();
+ usleep(wt);
+
testStub_->setTestAttributeAttribute(250);
usleep(wt);
EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 99);
- runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
}
/**
@@ -395,8 +523,10 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeTwoCallbacksCoexistent) {
CommonAPI::Event<uint8_t>::Subscription subscribedListenerCallOk;
CommonAPI::Event<uint8_t>::Subscription subscribedListenerCallNotOk;
- std::function<void (uint8_t)> callbackOk = std::bind(&SubscribeUnsubscribeHandler::okCallback, &subUnsubHandler, std::placeholders::_1);
- std::function<void (uint8_t)> callbackNotOk = std::bind(&SubscribeUnsubscribeHandler::notOkCallback, &subUnsubHandler, std::placeholders::_1);
+ std::function<void (uint8_t)> callbackOk =
+ std::bind(&SubscribeUnsubscribeHandler::okCallback, &subUnsubHandler, std::placeholders::_1);
+ std::function<void (uint8_t)> callbackNotOk =
+ std::bind(&SubscribeUnsubscribeHandler::notOkCallback, &subUnsubHandler, std::placeholders::_1);
subscribedListenerCallOk = testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(callbackOk);
subscribedListenerCallNotOk = testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(callbackNotOk);
@@ -408,7 +538,10 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeTwoCallbacksCoexistent) {
bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
ASSERT_TRUE(serviceRegistered);
- usleep(wt);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
testStub_->setTestAttributeAttribute(2);
usleep(wt);
EXPECT_EQ(subUnsubHandler.getSubscribedOkAttribute(), 2);
@@ -422,7 +555,7 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeTwoCallbacksCoexistent) {
EXPECT_EQ(subUnsubHandler.getSubscribedOkAttribute(), 2);
EXPECT_EQ(subUnsubHandler.getSubscribedNotOkAttribute(), 2);
- bool serviceUnregistered = runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ bool serviceUnregistered = runtime_->unregisterService(domain, TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
ASSERT_TRUE(serviceUnregistered);
usleep(wt);
}
@@ -442,12 +575,16 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeImmediatelyUnsubscribing)
CommonAPI::Event<uint8_t>::Subscription subscribedListenerCallOk;
CommonAPI::Event<uint8_t>::Subscription subscribedListenerCallNotOk;
- std::function<void (uint8_t)> callbackOk = std::bind(&SubscribeUnsubscribeHandler::okCallback, &subUnsubHandler, std::placeholders::_1);
- std::function<void (uint8_t)> callbackNotOk = std::bind(&SubscribeUnsubscribeHandler::notOkCallback, &subUnsubHandler, std::placeholders::_1);
+ std::function<void (uint8_t)> callbackOk =
+ std::bind(&SubscribeUnsubscribeHandler::okCallback, &subUnsubHandler, std::placeholders::_1);
+ std::function<void (uint8_t)> callbackNotOk =
+ std::bind(&SubscribeUnsubscribeHandler::notOkCallback, &subUnsubHandler, std::placeholders::_1);
bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
ASSERT_TRUE(serviceRegistered);
- usleep(wt);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
// subscribe ok callback
subscribedListenerCallOk = testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(callbackOk);
@@ -470,7 +607,7 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeImmediatelyUnsubscribing)
testProxy_->getTestAttributeAttribute().getChangedEvent().unsubscribe(subscribedListenerCallNotOk);
testProxy_->getTestAttributeAttribute().getChangedEvent().unsubscribe(subscribedListenerCallOk);
- bool serviceUnregistered = runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ bool serviceUnregistered = runtime_->unregisterService(domain, TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
ASSERT_TRUE(serviceUnregistered);
usleep(wt);
}
@@ -495,12 +632,16 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeSequentially) {
CommonAPI::Event<uint8_t>::Subscription subscribedListenerCallOk;
CommonAPI::Event<uint8_t>::Subscription subscribedListenerCallNotOk;
- std::function<void (uint8_t)> callbackOk = std::bind(&SubscribeUnsubscribeHandler::okCallback, &subUnsubHandler, std::placeholders::_1);
- std::function<void (uint8_t)> callbackNotOk = std::bind(&SubscribeUnsubscribeHandler::notOkCallback, &subUnsubHandler, std::placeholders::_1);
+ std::function<void (uint8_t)> callbackOk =
+ std::bind(&SubscribeUnsubscribeHandler::okCallback, &subUnsubHandler, std::placeholders::_1);
+ std::function<void (uint8_t)> callbackNotOk =
+ std::bind(&SubscribeUnsubscribeHandler::notOkCallback, &subUnsubHandler, std::placeholders::_1);
bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
ASSERT_TRUE(serviceRegistered);
- usleep(wt);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
// subscribe ok and notOk callback
subscribedListenerCallOk = testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(callbackOk);
@@ -527,11 +668,451 @@ TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeSequentially) {
EXPECT_EQ(subUnsubHandler.getSubscribedOkAttribute(), 12);
EXPECT_EQ(subUnsubHandler.getSubscribedNotOkAttribute(), 14);
- bool serviceUnregistered = runtime_->unregisterService(domain, v1_0::commonapi::communication::TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ bool serviceUnregistered = runtime_->unregisterService(domain, TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
ASSERT_TRUE(serviceUnregistered);
usleep(wt);
}
+
+/**
+ * @test Test of behaviour in case unsubscribe is called two times
+ * - set default value
+ * - register service
+ * - subscribe for the attribute
+ * - current value must be communicated to the proxy
+ * - value of attribute is changed
+ * - changed value must be communicated to the proxy
+ * - proxy unsubscribes for the attribute
+ * - value of attribute is changed
+ * - changed value must not be communicated to the proxy
+ * - proxy unsubscribes again for the attribute
+ * - value of attribute is changed
+ * - changed value must not be communicated to the proxy
+ * - unregister service
+ */
+TEST_F(CMAttributeSubscription, SubscribeAndUnsubscribeUnsubscribe) {
+
+ testStub_->setTestAttributeAttribute(42);
+
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ SubscriptionHandler subscriptionHandler(testProxy_);
+ std::function<void (const uint8_t&)> myCallback =
+ std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
+
+ CommonAPI::Event<uint8_t>::Subscription subscribedListener =
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
+
+ usleep(wt);
+
+ // check for initial value
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 42);
+
+ testStub_->setTestAttributeAttribute(12);
+ usleep(wt);
+
+ // check for changed value
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 12);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().unsubscribe(subscribedListener);
+
+ testStub_->setTestAttributeAttribute(24);
+ usleep(wt);
+
+ // value must not be changed
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 12);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().unsubscribe(subscribedListener);
+
+ testStub_->setTestAttributeAttribute(26);
+ usleep(wt);
+
+ // value must not be changed
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 12);
+
+ bool serviceUnregistered = runtime_->unregisterService(domain, TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(serviceUnregistered);
+ usleep(wt);
+}
+
+/**
+ * @test Test of subscribing in case that service is not available
+ * - set default value
+ * - subscribe for the attribute
+ * - no value is communicated to the proxy
+ * - register service
+ * - current value must be communicated to the proxy
+ * - value of attribute is changed
+ * - changed value must be communicated to the proxy
+ * - unregister service
+ */
+TEST_F(CMAttributeSubscription, SubscribeServiceNotAvailable) {
+
+ deregisterService_ = true;
+
+ uint8_t defaultValue = 33;
+
+ // initialize test stub with default value
+ testStub_->setTestAttributeAttribute(defaultValue);
+
+ // subscribe for attribute change by the proxy
+ SubscriptionHandler subscriptionHandler(testProxy_);
+ std::function<void (const uint8_t&)> myCallback =
+ std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
+
+ usleep(wt);
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 0);
+
+ // register service
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ usleep(wt);
+
+ // check received attribute value
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), defaultValue);
+
+ int8_t newValue = 123;
+
+ testStub_->setTestAttributeAttribute(newValue);
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), newValue);
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ deregisterService_ = !isUnregistered;
+}
+
+/**
+ * @test Test of unregister a service in case a proxy is subscribed for an attribute of this service.
+ * During the unregistered time of the service the value of the attribute is changed.
+ * - register service
+ * - proxy subscribes for an attribute of the service
+ * - value of attribute is set
+ * - changed value must be communicated to the proxy
+ * - unregister service
+ * - value of attribute is changed
+ * - changed value must not be communicated to the proxy
+ * - register service
+ * - current attribute value must be communicated to the proxy
+ * - value of attribute is changed
+ * - changed value must be communicated to the proxy
+ * - unregister service
+ */
+TEST_F(CMAttributeSubscription, SubscribeUnregisterSetValueRegisterService) {
+ deregisterService_ = true;
+
+ uint8_t firstValue = 35;
+ uint8_t secondValue = 43;
+ uint8_t thirdValue = 198;
+
+ // register service
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ // subscribe for attribute change by the proxy
+ SubscriptionHandler subscriptionHandler(testProxy_);
+ std::function<void (const uint8_t&)> myCallback =
+ std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
+
+ // initialize test stub with default value
+ testStub_->setTestAttributeAttribute(firstValue);
+ usleep(wt);
+
+ // check received attribute value
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), firstValue);
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+ deregisterService_ = !isUnregistered;
+
+ testStub_->setTestAttributeAttribute(secondValue);
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), firstValue);
+
+ // register service
+ serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), secondValue);
+
+ testStub_->setTestAttributeAttribute(thirdValue);
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), thirdValue);
+
+ isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ deregisterService_ = !isUnregistered;
+}
+
+/**
+ * @test Test of unregister a service in case a proxy is subscribed for an attribute of this service.
+ * During the unregistered time of the service the value of the attribute is not changed.
+ * - register service
+ * - proxy subscribes for an attribute of the service
+ * - value of attribute is set
+ * - changed value must be communicated to the proxy
+ * - unregister service
+ * - register service
+ * - current attribute value must be communicated to the proxy
+ * - value of attribute is changed
+ * - changed value must be communicated to the proxy
+ * - unregister service
+ */
+TEST_F(CMAttributeSubscription, SubscribeUnregisterNoValueSetRegisterService) {
+
+ deregisterService_ = true;
+
+ uint8_t firstValue = 35;
+ uint8_t secondValue = 43;
+
+ // register service
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ // subscribe for attribute change by the proxy
+ SubscriptionHandler subscriptionHandler(testProxy_);
+ std::function<void (const uint8_t&)> myCallback =
+ std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
+
+ // initialize test stub with default value
+ testStub_->setTestAttributeAttribute(firstValue);
+ usleep(wt);
+
+ // check received attribute value
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), firstValue);
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ subscriptionHandler.resetSubcriptedTestAttribute();
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), 0);
+
+ // register service
+ serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), firstValue);
+
+ testStub_->setTestAttributeAttribute(secondValue);
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), secondValue);
+
+ isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ deregisterService_ = !isUnregistered;
+}
+
+/**
+ * @test Test of subscribing a second proxy a little bit later
+ * - proxy subscribes for an attribute of the service
+ * - register service
+ * - initial value must be communicated to the proxy
+ * - create a second proxy
+ * - second proxy subscribes for the same attribute of the service
+ * - current attribute value must be communicated to the proxy
+ * - value of attribute is changed
+ * - changed value must be communicated to both proxies
+ * - unregister service
+ */
+TEST_F(CMAttributeSubscription, SubscribeSecondProxyLater) {
+
+ deregisterService_ = true;
+
+ uint8_t defaultValue = 33;
+
+ // initialize test stub with default value
+ testStub_->setTestAttributeAttribute(defaultValue);
+
+ // subscribe for attribute change by the proxy
+ SubscriptionHandler subscriptionHandler(testProxy_);
+ std::function<void (const uint8_t&)> myCallback =
+ std::bind(&SubscriptionHandler::myCallback, &subscriptionHandler, std::placeholders::_1);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback);
+
+ // register service
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ usleep(wt);
+
+ // check received attribute value
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), defaultValue);
+
+ // create second proxy
+ std::shared_ptr<TestInterfaceProxy<>> secondTestProxy =
+ runtime_->buildProxy<TestInterfaceProxy>(domain, testAddress, clientId);
+ ASSERT_TRUE((bool)secondTestProxy);
+
+ SubscriptionHandler secondSubscriptionHandler(secondTestProxy);
+ std::function<void (const uint8_t&)> secondMyCallback =
+ std::bind(&SubscriptionHandler::myCallback, &secondSubscriptionHandler, std::placeholders::_1);
+
+ secondTestProxy->getTestAttributeAttribute().getChangedEvent().subscribe(secondMyCallback);
+
+ usleep(wt);
+
+ EXPECT_EQ(secondSubscriptionHandler.getSubscriptedTestAttribute(), defaultValue);
+
+ int8_t newValue = 123;
+
+ testStub_->setTestAttributeAttribute(newValue);
+ usleep(wt);
+
+ EXPECT_EQ(subscriptionHandler.getSubscriptedTestAttribute(), newValue);
+ EXPECT_EQ(secondSubscriptionHandler.getSubscriptedTestAttribute(), newValue);
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ deregisterService_ = !isUnregistered;
+}
+
+/**
+ * @test Test of subscribing three callbacks before registering the service
+ * - proxy subscribes three callbacks for an attribute of the service
+ * - register service
+ * - initial value must be communicated to every callback
+ */
+TEST_F(CMAttributeSubscription, SubscribeThreeCallbacksServiceNotAvailable) {
+
+ deregisterService_ = true;
+
+ ThreeCallbackHandler threeCallbackHandler;
+
+ uint8_t defaultValue = 33;
+
+ // initialize test stub with default value
+ testStub_->setTestAttributeAttribute(defaultValue);
+
+ std::function<void (const uint8_t&)> myCallback1 =
+ std::bind(&ThreeCallbackHandler::callback_1, &threeCallbackHandler, std::placeholders::_1);
+ std::function<void (const uint8_t&)> myCallback2 =
+ std::bind(&ThreeCallbackHandler::callback_2, &threeCallbackHandler, std::placeholders::_1);
+ std::function<void (const uint8_t&)> myCallback3 =
+ std::bind(&ThreeCallbackHandler::callback_3, &threeCallbackHandler, std::placeholders::_1);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback1);
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback2);
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback3);
+
+ usleep(wt);
+
+ // register service
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ usleep(100000);
+
+ EXPECT_EQ(1, threeCallbackHandler.getCallbackCounter_1());
+ EXPECT_EQ(1, threeCallbackHandler.getCallbackCounter_2());
+ EXPECT_EQ(1, threeCallbackHandler.getCallbackCounter_3());
+
+ EXPECT_EQ(defaultValue, threeCallbackHandler.getCallbackValue_1());
+ EXPECT_EQ(defaultValue, threeCallbackHandler.getCallbackValue_2());
+ EXPECT_EQ(defaultValue, threeCallbackHandler.getCallbackValue_3());
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ deregisterService_ = !isUnregistered;
+}
+
+/**
+ * @test Test of subscribing three callbacks after registering the service
+ * - register service
+ * - proxy subscribes three callbacks for an attribute of the service
+ * - initial value must be communicated to every callback
+ */
+TEST_F(CMAttributeSubscription, SubscribeThreeCallbacksServiceAvailable) {
+ deregisterService_ = true;
+
+ uint8_t defaultValue = 35;
+
+ ThreeCallbackHandler threeCallbackHandler;
+
+ testStub_->setTestAttributeAttribute(defaultValue);
+ usleep(wt);
+
+ // register service
+ bool serviceRegistered = runtime_->registerService(domain, testAddress, testStub_, serviceId);
+ ASSERT_TRUE(serviceRegistered);
+
+ testProxy_->isAvailableBlocking();
+ ASSERT_TRUE(testProxy_->isAvailable());
+
+ std::function<void (const uint8_t&)> myCallback1 =
+ std::bind(&ThreeCallbackHandler::callback_1, &threeCallbackHandler, std::placeholders::_1);
+ std::function<void (const uint8_t&)> myCallback2 =
+ std::bind(&ThreeCallbackHandler::callback_2, &threeCallbackHandler, std::placeholders::_1);
+ std::function<void (const uint8_t&)> myCallback3 =
+ std::bind(&ThreeCallbackHandler::callback_3, &threeCallbackHandler, std::placeholders::_1);
+
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback1);
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback2);
+ testProxy_->getTestAttributeAttribute().getChangedEvent().subscribe(myCallback3);
+
+ usleep(100000);
+
+ EXPECT_EQ(1, threeCallbackHandler.getCallbackCounter_1());
+ EXPECT_EQ(1, threeCallbackHandler.getCallbackCounter_2());
+ EXPECT_EQ(1, threeCallbackHandler.getCallbackCounter_3());
+
+ EXPECT_EQ(defaultValue, threeCallbackHandler.getCallbackValue_1());
+ EXPECT_EQ(defaultValue, threeCallbackHandler.getCallbackValue_2());
+ EXPECT_EQ(defaultValue, threeCallbackHandler.getCallbackValue_3());
+
+ bool isUnregistered = runtime_->unregisterService(domain,
+ TestInterfaceStubDefault::StubInterface::getInterface(), testAddress);
+ ASSERT_TRUE(isUnregistered);
+
+ deregisterService_ = !isUnregistered;
+}
+
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
::testing::AddGlobalTestEnvironment(new Environment());
diff --git a/org.genivi.commonapi.core.verification/src/CMAttributes.cpp b/org.genivi.commonapi.core.verification/src/CMAttributes.cpp
index b577770..9556ae4 100644
--- a/org.genivi.commonapi.core.verification/src/CMAttributes.cpp
+++ b/org.genivi.commonapi.core.verification/src/CMAttributes.cpp
@@ -61,9 +61,9 @@ protected:
bool proxyAvailable = false;
std::thread t1([this, &proxyAvailable, &cv, &availabilityMutex]() {
+ std::lock_guard<std::mutex> lock(availabilityMutex);
testProxy_ = runtime_->buildProxy<TestInterfaceProxy>(domain, testAddress, clientId);
testProxy_->isAvailableBlocking();
- std::lock_guard<std::mutex> lock(availabilityMutex);
ASSERT_TRUE((bool)testProxy_);
proxyAvailable = true;
cv.notify_one();
diff --git a/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp b/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp
index 52b6451..acd47d9 100644
--- a/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp
+++ b/org.genivi.commonapi.core.verification/src/DTAdvanced.cpp
@@ -48,9 +48,9 @@ protected:
bool proxyAvailable = false;
std::thread t1([this, &proxyAvailable, &cv, &availabilityMutex]() {
+ std::lock_guard<std::mutex> lock(availabilityMutex);
testProxy_ = runtime_->buildProxy<v1_0::commonapi::datatypes::advanced::TestInterfaceProxy>(domain, testAddress, connectionIdClient);
testProxy_->isAvailableBlocking();
- std::lock_guard<std::mutex> lock(availabilityMutex);
ASSERT_TRUE((bool)testProxy_);
proxyAvailable = true;
cv.notify_one();
diff --git a/org.genivi.commonapi.core.verification/src/DTCombined.cpp b/org.genivi.commonapi.core.verification/src/DTCombined.cpp
index 08eead6..8780c01 100644
--- a/org.genivi.commonapi.core.verification/src/DTCombined.cpp
+++ b/org.genivi.commonapi.core.verification/src/DTCombined.cpp
@@ -26,21 +26,6 @@ const std::string connectionIdClient = "client-sample";
using namespace v1_0::commonapi::datatypes::combined;
-class DTCombinedStub : public TestInterfaceStubDefault {
-
-public:
- DTCombinedStub() {};
- virtual ~DTCombinedStub() {};
-
- void fTest(const std::shared_ptr<CommonAPI::ClientId> clientId,
- TestInterface::tStructL3 tStructL3In,
- TestInterface::tStructL3& tStructL3Out) {
-
- tStructL3Out = tStructL3In;
- }
-
-};
-
class Environment: public ::testing::Environment {
public:
virtual ~Environment() {
@@ -66,9 +51,9 @@ protected:
bool proxyAvailable = false;
std::thread t1([this, &proxyAvailable, &cv, &availabilityMutex]() {
+ std::lock_guard<std::mutex> lock(availabilityMutex);
testProxy_ = runtime_->buildProxy<v1_0::commonapi::datatypes::combined::TestInterfaceProxy>(domain, testAddress, connectionIdClient);
testProxy_->isAvailableBlocking();
- std::lock_guard<std::mutex> lock(availabilityMutex);
ASSERT_TRUE((bool)testProxy_);
proxyAvailable = true;
cv.notify_one();
@@ -118,7 +103,7 @@ TEST_F(DTCombined, SendAndReceive) {
TestInterface::tUnion unionTV0 = true;
TestInterface::tUnion unionTV1 = (uint8_t)42;
TestInterface::tUnion unionTV2 = std::string("Hello World");
- TestInterface::tUnion unionTV3 = TestInterface::tEnum::VALUE1;
+ TestInterface::tUnion unionTV3 = static_cast<TestInterface::tEnum>(TestInterface::tEnum::VALUE1);
TestInterface::tMap mapTV0 = {{1, "Hello"}, {2, "World"}};
TestInterface::tMap mapTV1 = {{123, "ABC"}, {456, "DEF"}};
diff --git a/org.genivi.commonapi.core.verification/src/DTDerived.cpp b/org.genivi.commonapi.core.verification/src/DTDerived.cpp
index bbb1785..e63159d 100644
--- a/org.genivi.commonapi.core.verification/src/DTDerived.cpp
+++ b/org.genivi.commonapi.core.verification/src/DTDerived.cpp
@@ -48,9 +48,9 @@ protected:
bool proxyAvailable = false;
std::thread t1([this, &proxyAvailable, &cv, &availabilityMutex]() {
+ std::lock_guard<std::mutex> lock(availabilityMutex);
testProxy_ = runtime_->buildProxy<v1_0::commonapi::datatypes::derived::TestInterfaceProxy>(domain, testAddress, connectionId_client);
testProxy_->isAvailableBlocking();
- std::lock_guard<std::mutex> lock(availabilityMutex);
ASSERT_TRUE((bool)testProxy_);
proxyAvailable = true;
cv.notify_one();
diff --git a/org.genivi.commonapi.core.verification/src/DTPrimitive.cpp b/org.genivi.commonapi.core.verification/src/DTPrimitive.cpp
index 3091b3f..b60f851 100644
--- a/org.genivi.commonapi.core.verification/src/DTPrimitive.cpp
+++ b/org.genivi.commonapi.core.verification/src/DTPrimitive.cpp
@@ -49,9 +49,9 @@ protected:
bool proxyAvailable = false;
std::thread t1([this, &proxyAvailable, &cv, &availabilityMutex]() {
+ std::lock_guard<std::mutex> lock(availabilityMutex);
testProxy_ = runtime_->buildProxy<v1_0::commonapi::datatypes::primitive::TestInterfaceProxy>(domain, testAddress, connectionIdClient);
testProxy_->isAvailableBlocking();
- std::lock_guard<std::mutex> lock(availabilityMutex);
ASSERT_TRUE((bool)testProxy_);
proxyAvailable = true;
cv.notify_one();
diff --git a/org.genivi.commonapi.core.verification/src/PFComplex.cpp b/org.genivi.commonapi.core.verification/src/PFComplex.cpp
index 2730ce1..1393213 100644
--- a/org.genivi.commonapi.core.verification/src/PFComplex.cpp
+++ b/org.genivi.commonapi.core.verification/src/PFComplex.cpp
@@ -1,7 +1,5 @@
/* Copyright (C) 2014 BMW Group
- * Copyright (C) 2015 Mentor Graphics
* Author: Juergen Gehring (juergen.gehring@bmw.de)
- * Author: Felix Scherzinger (felix_scherzinger@mentor.com)
* 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/PFPrimitive.cpp b/org.genivi.commonapi.core.verification/src/PFPrimitive.cpp
index ca71952..bc0c6a7 100644
--- a/org.genivi.commonapi.core.verification/src/PFPrimitive.cpp
+++ b/org.genivi.commonapi.core.verification/src/PFPrimitive.cpp
@@ -1,7 +1,5 @@
/* Copyright (C) 2014 BMW Group
- * Copyright (C) 2015 Mentor Graphics
* Author: Juergen Gehring (juergen.gehring@bmw.de)
- * Author: Felix Scherzinger (felix_scherzinger@mentor.com)
* 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/. */
@@ -114,7 +112,7 @@ protected:
* - Using double payload every cycle, starting with 1 end with maxPrimitiveArraySize
* - Doing primitiveLoopSize loops to build the mean time
*/
-TEST_F(PFPrimitive, DISABLED_Ping_Pong_Primitive_Synchronous) {
+TEST_F(PFPrimitive, Ping_Pong_Primitive_Synchronous) {
CommonAPI::CallStatus callStatus;
watch_.reset();
diff --git a/org.genivi.commonapi.core.verification/src/StabilityMP.cpp b/org.genivi.commonapi.core.verification/src/StabilityMP.cpp
deleted file mode 100644
index cd19625..0000000
--- a/org.genivi.commonapi.core.verification/src/StabilityMP.cpp
+++ /dev/null
@@ -1,666 +0,0 @@
-/* stability tests, control program. */
-/* this program takes care of setting up a test and then making sure things happen in proper sequence. */
-
-#include <functional>
-#include <fstream>
-#include <algorithm>
-#include <gtest/gtest.h>
-#include <CommonAPI/CommonAPI.hpp>
-#include "v1_0/commonapi/stability/mp/TestInterfaceProxy.hpp"
-#include "v1_0/commonapi/stability/mp/ControlInterfaceProxy.hpp"
-#include "stub/StabControlStub.h"
-#include "stub/StabilityMPStub.h"
-
-#ifdef WIN32
-#include <Windows.h>
-#else
-#include <unistd.h>
-#include <sys/wait.h>
-#endif
-
-using namespace v1_0::commonapi::stability::mp;
-
-const std::string serviceId = "service-sample";
-const std::string clientId = "client-sample";
-
-const std::string domain = "local";
-const std::string testAddress = "commonapi.stability.mp.TestInterface";
-const std::string controlAddress = "commonapi.stability.mp.ControlInterface";
-const std::string COMMONAPI_CONFIG_SUFFIX = ".conf";
-
-// test magnitude constants - the bigger the numbers, the more stressful the test
-const int N_SERVERS = 100;
-const int N_THREADS = 100;
-
-const int MAX_WAIT = 10000;
-
-const int N_TEST_PROXY_PROCESSES = 3;
-const int N_CHILDREN = 2 + 2 * N_TEST_PROXY_PROCESSES; // needs to be large enough to cover for all created processes
-
-#ifdef WIN32
-HANDLE childpids[N_CHILDREN];
-#else
-pid_t childpids[N_CHILDREN];
-#endif
-
-bool idChild;
-bool controlServiceRegistered = false;
-std::shared_ptr<CommonAPI::Runtime> runtime_;
-std::shared_ptr<CommonAPI::Factory> stubFactory_;
-std::shared_ptr<StabControlStub> controlServiceStub_;
-class Environment: public :: testing::Environment {
-public:
- virtual ~Environment() {
- }
-
- virtual void SetUp() {
- }
-
- virtual void TearDown() {
- }
-
-};
-
-// server states:
-const int WAITING_FOR_CHILDREN = 0;
-// commands from child to parent:
-const uint32_t QUERY_NEW_ID = 0;
-const uint32_t GET_COMMAND = 1;
-const uint32_t CMD_DONE = 2;
-const uint32_t PROXIES_CONNECTED_OK = 3;
-const uint32_t PROXIES_CONNECTED_FAIL = 4;
-
-// child states:
-const int CHILD_SETUP = 1;
-const int CHILD_IDLE = 2;
-const int CHILD_RESERVED_IDLE = 3;
-const int CHILD_PROCESSING_CMD = 4;
-const int CONNECTION_STATUS_OK = 5;
-const int CONNECTION_STATUS_FAIL = 6;
-const int DEAD = 7;
-
-// commands from parent to child
-const uint8_t KEEP_IDLE = 1;
-const uint8_t PROXY_CREATE = 2;
-const uint8_t WAIT_UNTIL_CONNECTED = 3;
-const uint8_t WAIT_UNTIL_DISCONNECTED = 4;
-const uint8_t KILL_YOURSELF = 5;
-const uint8_t SERVER_CREATE = 6;
-
-class ControledChild {
-public:
- uint8_t id;
- int state = CHILD_SETUP;
- uint8_t next_cmd;
-};
-
-std::vector<ControledChild *> children;
-bool allChildrenRegistered = false;
-
-bool isFree(ControledChild * pChild)
-{
- return (pChild->state == CHILD_IDLE);
-}
-ControledChild * findFreeChild(void)
-{
- std::vector<ControledChild *>::iterator i = std::find_if(children.begin(), children.end(), isFree);
- if (i == children.end())
- return 0;
- (*i)->state = CHILD_RESERVED_IDLE;
- return *i;
-}
-ControledChild * findChild(uint8_t id)
-{
-
- std::vector<ControledChild *>::iterator i = children.begin();
- while (i != children.end()) {
- if ((*i)->id == id)
- return *i;
- i++;
- }
- return 0;
-}
-
-class ProxyThread {
-public:
- std::shared_ptr<TestInterfaceProxy<>> proxy_[N_SERVERS];
- void createProxies(void) {
- // create a proxy for each of the servers
- for (unsigned int proxycount = 0; proxycount < N_SERVERS; proxycount++) {
- proxy_[proxycount] = runtime_->buildProxy<TestInterfaceProxy>(domain, testAddress + std::to_string(proxycount), clientId);
- success_ = success_ && (bool)proxy_[proxycount];
- }
- }
- void pollForAvailability(void) {
- success_ = false;
- for (int wait = 0; wait < 100; wait++) {
- bool allAvailable = true;
- for (unsigned int proxycount = 0; proxycount < N_SERVERS; proxycount++) {
- if (!proxy_[proxycount]->isAvailable()) {
- allAvailable = false;
- break;
- }
- }
- if (allAvailable) {
- success_ = true;
- break;
- }
- usleep(20000);
- }
- }
- void pollForUnavailability(void) {
- success_ = false;
- for (int wait = 0; wait < 100; wait++) {
- bool allUnAvailable = true;
- for (unsigned int proxycount = 0; proxycount < N_SERVERS; proxycount++) {
- if (proxy_[proxycount]->isAvailable()) {
- allUnAvailable = false;
- break;
- }
- }
- if (allUnAvailable) {
- success_ = true;
- break;
- }
- usleep(10000);
- }
- }
- void setThread(std::thread *thread) {
- thread_ = thread;
- }
- std::thread * getThread(void) {
- return thread_;
- }
- bool getSuccess(void) {
- return success_;
- }
- std::thread *thread_ = 0;
- bool success_ = true;
-};
-
-class ChildProcess {
-public:
- bool setup()
- {
- runtime_ = CommonAPI::Runtime::get();
- testProxy_ = runtime_->buildProxy<ControlInterfaceProxy>(domain, controlAddress, clientId);
- while(!testProxy_->isAvailable())
- usleep(10000);
- // send register message through command interface
- uint8_t cmd;
- uint32_t data1, data2;
- bool status = sendMessage(0, QUERY_NEW_ID, cmd, data1, data2);
- if (!status)
- // problems with communication.
- return false;
- id = cmd;
- state = CHILD_IDLE;
- return true;
- }
-
- bool sendMessage(const uint8_t &id,
- const uint32_t &data,
- uint8_t &command,
- uint32_t &data1,
- uint32_t &data2
- )
- {
- CommonAPI::CallStatus callStatus;
- testProxy_->controlMethod(id, data, callStatus, command, data1, data2);
- if (callStatus == CommonAPI::CallStatus::SUCCESS)
- return true;
- // on error, exit - the control service has most likely just died.
- exit(1);
- return false;
- }
-
- void processCommands()
- {
- ProxyThread * proxyrunners[N_THREADS];
- while (true) {
- switch(state)
- {
- case CHILD_IDLE:
- // send polling message
- uint8_t cmd;
- uint32_t data1, data2;
- bool status = sendMessage(id, GET_COMMAND, cmd, data1, data2);
- if (cmd == KEEP_IDLE) {
- usleep(10000);
- break;
- }
- if (cmd == PROXY_CREATE) {
- // create threads with proxies to test services.
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- proxyrunners[threadcount] = new ProxyThread();
- std::thread * thread = new std::thread(std::bind(&ProxyThread::createProxies, proxyrunners[threadcount]));
- proxyrunners[threadcount]->setThread(thread);
- }
-
- // wait until all threads have completed creating the proxies.
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- proxyrunners[threadcount]->getThread()->join();
- delete proxyrunners[threadcount]->getThread();
- proxyrunners[threadcount]->setThread(0);
- }
-
- // once done with all, send CMD_DONE message.
- sendMessage(id, CMD_DONE, cmd, data1, data2);
- // then start polling again.
- state = CHILD_IDLE;
- }
- else if (cmd == SERVER_CREATE) {
- // create services for a number of addresses
- std::shared_ptr<StabilityMPStub> testMultiRegisterStub_;
- testMultiRegisterStub_ = std::make_shared<StabilityMPStub>();
- for (unsigned int regcount = 0; regcount < N_SERVERS; regcount++) {
- bool serviceRegistered_ = runtime_->registerService(domain, testAddress + std::to_string( regcount ), testMultiRegisterStub_, serviceId);
- }
-
- sendMessage(id, CMD_DONE, cmd, data1, data2);
- state = CHILD_IDLE;
- }
- else if (cmd == WAIT_UNTIL_CONNECTED) {
- // create threads to test the proxy availability
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- std::thread * thread = new std::thread(std::bind(&ProxyThread::pollForAvailability, proxyrunners[threadcount]));
- proxyrunners[threadcount]->setThread(thread);
- }
- // wait until all threads have completed
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- proxyrunners[threadcount]->getThread()->join();
- delete proxyrunners[threadcount]->getThread();
- proxyrunners[threadcount]->setThread(0);
- }
- // check for succession status
- bool success = true;
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- success = success & proxyrunners[threadcount]->getSuccess();
- }
-
- // send message with the succession status
- if (success)
- sendMessage(id, PROXIES_CONNECTED_OK, cmd, data1, data2);
- else
- sendMessage(id, PROXIES_CONNECTED_FAIL, cmd, data1, data2);
-
- // then start polling again.
- state = CHILD_IDLE;
-
- }
- else if (cmd == WAIT_UNTIL_DISCONNECTED) {
- // create threads to test the proxy unavailability
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- std::thread * thread = new std::thread(std::bind(&ProxyThread::pollForUnavailability, proxyrunners[threadcount]));
- proxyrunners[threadcount]->setThread(thread);
- }
- // wait until all threads have completed
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- proxyrunners[threadcount]->getThread()->join();
- delete proxyrunners[threadcount]->getThread();
- proxyrunners[threadcount]->setThread(0);
- }
- // check for succession status
- bool success = true;
- for (unsigned int threadcount = 0; threadcount < N_THREADS; threadcount++) {
- success = success & proxyrunners[threadcount]->getSuccess();
- }
-
- // send message with the succession status
- if (success)
- sendMessage(id, PROXIES_CONNECTED_OK, cmd, data1, data2);
- else
- sendMessage(id, PROXIES_CONNECTED_FAIL, cmd, data1, data2);
-
- // then start polling again.
- state = CHILD_IDLE;
-
- }
- else if (cmd == KILL_YOURSELF) {
- exit(0);
- }
-
- }
- }
- return;
- }
-
-
- std::shared_ptr<ControlInterfaceProxy<>> testProxy_;
-
- uint8_t id = 0;
- int state = CHILD_SETUP;
-};
-
-int state = WAITING_FOR_CHILDREN;
-static int8_t next_id = 1;
-
-void listener(uint8_t id,uint32_t data, uint8_t& command, uint32_t& min, uint32_t &max) {
- command = 0;
- min = 0;
- max = 0;
- switch(data) {
- case QUERY_NEW_ID:
- {
- // create a child data structure
- ControledChild * child = new ControledChild();
-
- // add this to the structure
- child->id = next_id;
- // increment id
- next_id++;
- child->state = CHILD_IDLE;
- // prepare to return id to child
- command = child->id;
- children.push_back(child);
- child->next_cmd = KEEP_IDLE;
- }
- if (children.size() == N_CHILDREN)
- allChildrenRegistered = true;
- break;
-
- case GET_COMMAND:
- {
- // find the child with this id
- ControledChild * child = findChild(id);
- ASSERT_TRUE((bool)child);
- uint8_t cmd = child->next_cmd;
- if (cmd != KEEP_IDLE) {
- child->next_cmd = KEEP_IDLE;
- child->state = CHILD_PROCESSING_CMD;
- }
- command = cmd;
- }
- break;
-
- case CMD_DONE:
- {
- // find the child with this id
- ControledChild * child = findChild(id);
- ASSERT_TRUE((bool)child);
- child->state = CHILD_RESERVED_IDLE;
- }
- break;
-
- case PROXIES_CONNECTED_OK:
- {
- // find the child with this id
- ControledChild * child = findChild(id);
- ASSERT_TRUE((bool)child);
- child->state = CONNECTION_STATUS_OK;
- }
- break;
-
- case PROXIES_CONNECTED_FAIL:
- {
- // find the child with this id
- ControledChild * child = findChild(id);
- ASSERT_TRUE((bool)child);
- child->state = CONNECTION_STATUS_FAIL;
- }
- break;
- }
-}
-
-
-/* this class is instantiated only for the control process. */
-class Stability: public ::testing::Test {
-protected:
- void SetUp() {
-
- }
-
- void TearDown() {
-
- }
-};
-
-TEST_F(Stability, BasicFunctionality) {
- ASSERT_TRUE(allChildrenRegistered);
-}
-
-
-TEST_F(Stability, ProxyCreation_ProxyFirst) {
- /*
- DO for N child processes
- get free child entry (proxy process)
- setup 'proxy c' command
- wait until child proc is in 'CMD DONE'
- END
- get free child entry (server)
- setup 'server c' command
- wait until server is in 'CMD DONE'
- DO for N proxy processes
- setup 'query status' c
- wait until child proc is in 'CMD DONE'
- assert child proc status is okay
- END
- setup 'kill' command to server
- wait until server is in 'CMD SENT'
- DO for N proxy processes
- setup 'query status' cmd
- wait until child proc is in 'CMD DONE'
- assert child proc status is okay
- setup 'kill' to child
- wait until child proc is in CMD SENT
- END
- */
- ControledChild * proxyprocs[N_TEST_PROXY_PROCESSES];
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = findFreeChild();
- ASSERT_TRUE((bool)child);
- proxyprocs[i] = child;
- child->state = CHILD_PROCESSING_CMD;
- child->next_cmd = PROXY_CREATE;
- }
- // wait until children are ready for more commands
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (child->state == CHILD_RESERVED_IDLE) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(child->state == CHILD_RESERVED_IDLE);
- }
- // setup server test proc
- ControledChild * srvChild = findFreeChild();
- ASSERT_TRUE((bool)srvChild);
- srvChild->state = CHILD_PROCESSING_CMD;
- srvChild->next_cmd = SERVER_CREATE;
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (srvChild->state == CHILD_RESERVED_IDLE) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(srvChild->state == CHILD_RESERVED_IDLE);
- // send proxy status query messages
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- child->state = CHILD_PROCESSING_CMD;
- child->next_cmd = WAIT_UNTIL_CONNECTED;
- }
- // wait until children return connection status
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (child->state == CONNECTION_STATUS_OK) {
- break;
- }
- if (child->state == CONNECTION_STATUS_FAIL) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(child->state == CONNECTION_STATUS_OK);
- }
- // kill server
- srvChild->next_cmd = KILL_YOURSELF;
- srvChild->state = DEAD;
- // send proxy status query messages
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- child->next_cmd = WAIT_UNTIL_DISCONNECTED;
- }
- // wait until children return connection status
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (child->state == CONNECTION_STATUS_OK) {
- break;
- }
- if (child->state == CONNECTION_STATUS_FAIL) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(child->state == CONNECTION_STATUS_OK);
- }
- // kill children
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- child->next_cmd = KILL_YOURSELF;
- child->state = DEAD;
- }
-
- usleep(1 * 1000 * 1000);
-}
-
-TEST_F(Stability, ProxyCreation_ServerFirst) {
-
- ControledChild * proxyprocs[N_TEST_PROXY_PROCESSES];
-
- // setup server test proc
- ControledChild * srvChild = findFreeChild();
- ASSERT_TRUE((bool)srvChild);
- srvChild->state = CHILD_PROCESSING_CMD;
- srvChild->next_cmd = SERVER_CREATE;
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (srvChild->state == CHILD_RESERVED_IDLE) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(srvChild->state == CHILD_RESERVED_IDLE);
-
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = findFreeChild();
- ASSERT_TRUE((bool)child);
- proxyprocs[i] = child;
- child->state = CHILD_PROCESSING_CMD;
- child->next_cmd = PROXY_CREATE;
- }
- // wait until children are ready for more commands
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (child->state == CHILD_RESERVED_IDLE) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(child->state == CHILD_RESERVED_IDLE);
- }
-
- // send proxy status query messages
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- child->state = CHILD_PROCESSING_CMD;
- child->next_cmd = WAIT_UNTIL_CONNECTED;
- }
- // wait until children return connection status
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (child->state == CONNECTION_STATUS_OK) {
- break;
- }
- if (child->state == CONNECTION_STATUS_FAIL) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(child->state == CONNECTION_STATUS_OK);
- }
- // kill server
- srvChild->next_cmd = KILL_YOURSELF;
- srvChild->state = DEAD;
- // send proxy status query messages
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- child->next_cmd = WAIT_UNTIL_DISCONNECTED;
- }
- // wait until children return connection status
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- for (int wait = 0; wait < MAX_WAIT; wait++) {
- if (child->state == CONNECTION_STATUS_OK) {
- break;
- }
- if (child->state == CONNECTION_STATUS_FAIL) {
- break;
- }
- usleep(100000);
- }
- ASSERT_TRUE(child->state == CONNECTION_STATUS_OK);
- }
- // kill children
- for (int i = 0; i < N_TEST_PROXY_PROCESSES; i++) {
- ControledChild * child = proxyprocs[i];
- child->next_cmd = KILL_YOURSELF;
- child->state = DEAD;
- }
-
- usleep(1 * 1000 * 1000);
-}
-
-int main(int argc, char ** argv)
-{
- /* create the necessary child processes */
- /* forking is best done before the google test environment is set up */
- bool isChild = false;
- for (int i = 0; i < N_CHILDREN; i++) {
-#ifdef WIN32
- // TODO!!!
- HANDLE child = 0;
-#else
- pid_t child = fork();
-#endif
- if (child == 0) {
- isChild = true;
- break;
- }
- childpids[i] = child;
- }
-
- /* if we are not a child, set up test environment */
- if (!isChild) {
- // do this just once
- runtime_ = CommonAPI::Runtime::get();
- // register control service
- StabControlStub::registerListener(&listener);
- controlServiceStub_ = std::make_shared<StabControlStub>();
- controlServiceRegistered = runtime_->registerService(domain, controlAddress, controlServiceStub_, serviceId);
- std::cout << "Control service registered at " << controlAddress << std::endl;
-
- // wait until children have been registered
- while (!allChildrenRegistered) {
- usleep(10000);
- }
- ::testing::InitGoogleTest(&argc, argv);
- ::testing::AddGlobalTestEnvironment(new Environment());
- return RUN_ALL_TESTS();
- }
- /* otherwise, start acting as a child process */
- ChildProcess child;
- child.setup();
- child.processCommands();
-
- /* TBD */
-
- return 0;
-}
-
-
diff --git a/org.genivi.commonapi.core.verification/src/StabilitySP.cpp b/org.genivi.commonapi.core.verification/src/StabilitySP.cpp
index 3a1b42e..d98d5b6 100644
--- a/org.genivi.commonapi.core.verification/src/StabilitySP.cpp
+++ b/org.genivi.commonapi.core.verification/src/StabilitySP.cpp
@@ -1,5 +1,4 @@
/* Copyright (C) 2015 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
* 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/. */
@@ -105,6 +104,7 @@ public:
std::shared_ptr<TestInterfaceProxy<>> proxy_[MAXSERVERCOUNT];
// callback for asynchronous attribute functions.
void recvValue(const CommonAPI::CallStatus& callStatus, TestInterface::tArray arrayResultValue) {
+ std::lock_guard<std::mutex> lock(recvValue_mutex_);
EXPECT_EQ(callStatus, CommonAPI::CallStatus::SUCCESS);
asyncCounter++;
@@ -114,13 +114,27 @@ public:
for (unsigned int messageindex = 0; messageindex < MESSAGESIZE; messageindex++) {
arrayTestValue.push_back((unsigned char)(messageindex & 0xFF));
}
+ arrayTestValue.shrink_to_fit();
EXPECT_EQ(arrayTestValue, arrayResultValue);
-
- }
+ ASSERT_EQ(arrayTestValue.size(), arrayResultValue.size()) << "Vectors arrayTestValue and arrayResultValue are of unequal length";
+ if(arrayTestValue.size() == arrayResultValue.size()) {
+ for (std::uint32_t i = 0; i < arrayTestValue.size(); ++i) {
+ EXPECT_EQ(arrayTestValue[i], arrayResultValue[i]) << "Vectors arrayTestValue and arrayResultValue differ at index " << i;
+ }
+ }
+ }
// callback for attribute subscriptions.
void recvSubscribedValue(TestInterface::tArray arrayResultValue) {
+ std::lock_guard<std::mutex> lock(recvSubscribedValue_mutex_);
+
+ // The following may happen because of the initial response
+ if (arrayResultValue.size() == 0)
+ return;
+
asyncCounter++;
+// std::cout << "asyncCounter<" << this << ">: " << asyncCounter << std::endl;
+
TestInterface::tArray arrayTestValue;
// check the contents of the attribute.
@@ -130,7 +144,15 @@ public:
arrayTestValue.push_back((unsigned char)(messageindex & 0xFF));
}
+ arrayTestValue.shrink_to_fit();
+
EXPECT_EQ(arrayTestValue, arrayResultValue);
+ ASSERT_EQ(arrayTestValue.size(), arrayResultValue.size()) << "Vectors arrayTestValue and arrayResultValue are of unequal length";
+ if(arrayTestValue.size() == arrayResultValue.size()) {
+ for (std::uint32_t i = 0; i < arrayTestValue.size(); ++i) {
+ EXPECT_EQ(arrayTestValue[i], arrayResultValue[i]) << "Vectors arrayTestValue and arrayResultValue differ at index " << i;
+ }
+ }
}
// helper function for creating proxies.
@@ -146,6 +168,10 @@ public:
for (unsigned int wait = 0; !proxy_[proxycount]->isAvailable() && wait < 100; ++wait) {
usleep(10000);
}
+
+ if (!proxy_[proxycount]->isAvailable())
+ std::cout << testAddress + std::to_string(proxycount) << std::endl;
+
ASSERT_TRUE(proxy_[proxycount]->isAvailable());
}
}
@@ -185,7 +211,7 @@ public:
if (previousCount != asyncCounter) {
break;
}
- usleep(10 * 1000);
+ usleep(10000);
}
if (previousCount == asyncCounter) {
break;
@@ -196,7 +222,6 @@ public:
}
void runSetSubscribedAttributes(unsigned int id) {
-
unsigned char message1 = id;
unsigned char message2 = message1 + MAXTHREADCOUNT;
unsigned char message = message1;
@@ -295,6 +320,7 @@ public:
bool exerciseSetSubscribedAttribute(std::shared_ptr<TestInterfaceProxy<>> proxy, unsigned char message_number) {
TestInterface::tArray arrayTestValue;
TestInterface::tArray arrayResultValue;
+
arrayTestValue.push_back(message_number);
for (unsigned int messageindex = 0; messageindex < MESSAGESIZE; messageindex++) {
arrayTestValue.push_back((unsigned char)(messageindex & 0xFF));
@@ -328,7 +354,7 @@ public:
std::bind(&ProxyThread::recvValue, this, std::placeholders::_1, std::placeholders::_2);
CommonAPI::CallStatus callStatus;
- CommonAPI::CallInfo* callInfo = new CommonAPI::CallInfo(30 * 1000);
+ CommonAPI::CallInfo* callInfo = new CommonAPI::CallInfo(50 * 1000);
proxy->getTestAttributeAttribute().getValueAsync(myCallback, callInfo);
return true;
@@ -342,7 +368,7 @@ public:
arrayTestValue.push_back((unsigned char)(messageindex & 0xFF));
}
- CommonAPI::CallInfo* callInfo = new CommonAPI::CallInfo(45 * 1000);
+ CommonAPI::CallInfo* callInfo = new CommonAPI::CallInfo(100 * 1000);
proxy->getTestAttributeAttribute().setValueAsync(arrayTestValue, myCallback, callInfo);
return true;
@@ -350,6 +376,8 @@ public:
std::thread *thread_ = 0;
bool success_ = true;
+ std::mutex recvValue_mutex_;
+ std::mutex recvSubscribedValue_mutex_;
};
/**
* @test Create a number of services and proxies and send messages through them.
@@ -370,17 +398,20 @@ TEST_F(StabilitySP, MultipleMethodCalls) {
serviceRegistered_ = runtime_->registerService(domain, testAddress + std::to_string( regcount ), testMultiRegisterStub_, serviceId);
ASSERT_TRUE(serviceRegistered_);
}
+
ProxyThread * proxyrunners[MAXTHREADCOUNT];
for (unsigned int threadcount = 0; threadcount < MAXTHREADCOUNT; threadcount++) {
proxyrunners[threadcount] = new ProxyThread();
std::thread * thread = new std::thread(std::bind(&ProxyThread::runMethodCalls, proxyrunners[threadcount]));
proxyrunners[threadcount]->setThread(thread);
}
+
for (unsigned int threadcount = 0; threadcount < MAXTHREADCOUNT; threadcount++) {
proxyrunners[threadcount]->getThread()->join();
delete proxyrunners[threadcount]->getThread();
proxyrunners[threadcount]->setThread(0);
}
+
for (unsigned int regcount = 0; regcount < MAXSERVERCOUNT; regcount++) {
serviceRegistered_ = runtime_->unregisterService(domain, StabilitySPStub::StubInterface::getInterface(), testAddress + std::to_string( regcount ));
ASSERT_TRUE(serviceRegistered_);
@@ -576,9 +607,9 @@ TEST_F(StabilitySP, MultipleAttributeSubscriptions) {
ASSERT_TRUE(serviceRegistered_);
}
TestInterface::tArray arrayTestValue;
-
+ arrayTestValue.push_back(0);
for (unsigned int messageindex = 0; messageindex < MESSAGESIZE; messageindex++) {
- arrayTestValue.push_back((unsigned char)(messageindex & 0xFF));
+ arrayTestValue.push_back((unsigned char)(messageindex & 0xFF));
}
testMultiRegisterStub_->setTestValues(arrayTestValue);
@@ -594,10 +625,16 @@ TEST_F(StabilitySP, MultipleAttributeSubscriptions) {
proxyrunners[threadcount]->setThread(0);
}
+ arrayTestValue.clear();
+ testMultiRegisterStub_->setTestValues(arrayTestValue);
// sleep here a while to let the subscriptions sink in
usleep(100000);
for (unsigned int threadcount = 0; threadcount < MAXTHREADCOUNT; threadcount++) {
+ proxyrunners[threadcount]->asyncCounter = 0;
+ }
+
+ for (unsigned int threadcount = 0; threadcount < MAXTHREADCOUNT; threadcount++) {
std::thread * thread = new std::thread(std::bind(&ProxyThread::runSetSubscribedAttributes, proxyrunners[threadcount], threadcount));
proxyrunners[threadcount]->setThread(thread);
}
@@ -617,5 +654,3 @@ int main(int argc, char** argv) {
::testing::AddGlobalTestEnvironment(new Environment());
return RUN_ALL_TESTS();
}
-
-
diff --git a/org.genivi.commonapi.core.verification/src/THMainLoopIndependence.cpp b/org.genivi.commonapi.core.verification/src/THMainLoopIndependence.cpp
index db221c5..8e9c167 100644
--- a/org.genivi.commonapi.core.verification/src/THMainLoopIndependence.cpp
+++ b/org.genivi.commonapi.core.verification/src/THMainLoopIndependence.cpp
@@ -143,9 +143,15 @@ protected:
mainLoopThread1_ = std::thread([&]() { threadCtx1_.mainLoop_->run(); });
mainLoopThread2_ = std::thread([&]() { threadCtx2_.mainLoop_->run(); });
- usleep(200000);
+ for (unsigned int i = 0; !threadCtx1_.proxy_->isAvailable() && i < 100; ++i) {
+ usleep(10000);
+ }
- ASSERT_TRUE(threadCtx1_.proxy_->isAvailable());
+ for (unsigned int i = 0; !threadCtx2_.proxy_->isAvailable() && i < 100; ++i) {
+ usleep(10000);
+ }
+
+ ASSERT_TRUE(threadCtx1_.proxy_->isAvailable());
ASSERT_TRUE(threadCtx2_.proxy_->isAvailable());
if (threadCtx1_.mainLoop_->isRunning()) {
@@ -165,17 +171,14 @@ protected:
threadCtx1_.runtime_->unregisterService(domain, PingPongTestStub::StubInterface::getInterface(), instance6);
threadCtx1_.runtime_->unregisterService(domain, PingPongTestStub::StubInterface::getInterface(), instance7);
threadCtx2_.runtime_->unregisterService(domain, PingPongTestStub::StubInterface::getInterface(), instance8);
- usleep(2000);
- threadCtx1_.mainLoop_->stop();
- threadCtx2_.mainLoop_->stop();
if (threadCtx1_.mainLoop_->isRunning()) {
std::future<bool> threadCtx1MainStopped = threadCtx1_.mainLoop_->stop();
- threadCtx1MainStopped.get();
+ //threadCtx1MainStopped.get();
}
if (threadCtx2_.mainLoop_->isRunning()) {
std::future<bool> threadCtx2MainStopped = threadCtx2_.mainLoop_->stop();
- threadCtx2MainStopped.get();
+ //threadCtx2MainStopped.get();
}
if(mainLoopThread1_.joinable()) {
@@ -184,6 +187,8 @@ protected:
if(mainLoopThread2_.joinable()) {
mainLoopThread2_.join();
}
+
+ usleep(20000);
}
MainLoopThreadContext threadCtx1_, threadCtx2_;
@@ -231,9 +236,6 @@ TEST_F(THMainLoopIndependence, ProxyReceivesAnswerOnlyIfStubMainLoopRuns) {
* - now each proxy should have received the answer to his own request
*/
TEST_F(THMainLoopIndependence, ProxyReceivesJustHisOwnAnswers) {
-
- usleep(1000000);
-
std::shared_ptr<PingPongTestStub> stubThirdParty = std::make_shared<PingPongTestStub>();
auto runtime = CommonAPI::Runtime::get();
ASSERT_TRUE(runtime->registerService(domain, instance6, stubThirdParty, thirdPartyServiceId));
diff --git a/org.genivi.commonapi.core.verification/src/THMainLoopTwoThreads.cpp b/org.genivi.commonapi.core.verification/src/THMainLoopTwoThreads.cpp
new file mode 100644
index 0000000..e7158bd
--- /dev/null
+++ b/org.genivi.commonapi.core.verification/src/THMainLoopTwoThreads.cpp
@@ -0,0 +1,134 @@
+/* Copyright (C) 2014 - 2015 BMW Group
+ * Author: Andrei Yagoubov
+ * 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/. */
+
+/**
+* @file Threading
+*/
+
+#include <gtest/gtest.h>
+#include "CommonAPI/CommonAPI.hpp"
+#include "utils/VerificationMainLoopWithQueue.h"
+#include "v1_0/commonapi/threading/TestInterfaceProxy.hpp"
+#include "v1_0/commonapi/threading/TestInterfaceStubDefault.hpp"
+
+const std::string domain = "local";
+const std::string instance = "my.test.commonapi.address";
+
+class PingPongTestStub : public v1_0::commonapi::threading::TestInterfaceStubDefault {
+ virtual void testMethod(const std::shared_ptr<CommonAPI::ClientId> _client,
+ uint8_t _x,
+ testMethodReply_t _reply) {
+
+ _reply(_x);
+ }
+};
+
+class THMainLoopTwoThreads: public ::testing::Test {
+protected:
+ void SetUp() {
+ runtime_ = CommonAPI::Runtime::get();
+ ASSERT_TRUE((bool)runtime_);
+
+ context_ = std::make_shared<CommonAPI::MainLoopContext>("client-sample");
+ ASSERT_TRUE((bool)context_);
+
+ eventQueue_ = std::make_shared<CommonAPI::VerificationMainLoopEventQueue>();
+ mainLoop_ = new CommonAPI::VerificationMainLoop(context_, eventQueue_);
+
+ stub_ = std::make_shared<PingPongTestStub>();
+
+ bool stubRegistered = runtime_->registerService(domain, instance, stub_, "service-sample");
+ ASSERT_TRUE((bool)stubRegistered);
+
+ proxy_ = runtime_->buildProxy<v1_0::commonapi::threading::TestInterfaceProxy>(domain, instance, context_);
+ ASSERT_TRUE((bool)proxy_);
+
+ eventQueueThread_ = new std::thread([&]() { eventQueue_->run(); });
+ mainLoopThread_ = new std::thread([&]() { mainLoop_->run(); });
+ }
+
+ void TearDown() {
+ runtime_->unregisterService(domain, stub_->getStubAdapter()->getInterface(), instance);
+ mainLoop_->stop();
+ //mainLoopThread_->join();
+
+ usleep(1000000);
+ }
+
+ std::shared_ptr<CommonAPI::Runtime> runtime_;
+ std::shared_ptr<CommonAPI::MainLoopContext> context_;
+ std::shared_ptr<CommonAPI::VerificationMainLoopEventQueue> eventQueue_;
+
+ std::shared_ptr<PingPongTestStub> stub_;
+ std::shared_ptr<v1_0::commonapi::threading::TestInterfaceProxy<>> proxy_;
+
+ CommonAPI::VerificationMainLoop* mainLoop_;
+
+ std::thread* eventQueueThread_;
+ std::thread* mainLoopThread_;
+};
+
+/**
+* @test Proxy Receives Available when MainLoop Dispatched sourced out to other thread.
+*/
+TEST_F(THMainLoopTwoThreads, ProxyGetsAvailableStatus) {
+ std::condition_variable available;
+ std::mutex m;
+ bool isAvailable(false);
+
+ proxy_->getProxyStatusEvent().subscribe([&](const CommonAPI::AvailabilityStatus& val) {
+ if (val == CommonAPI::AvailabilityStatus::AVAILABLE) {
+ isAvailable = true;
+ available.notify_one();
+ }
+ });
+
+ if (!isAvailable) {
+ std::unique_lock<std::mutex> uniqueLock(m);
+ available.wait_for(uniqueLock, std::chrono::seconds(10));
+ }
+
+ ASSERT_TRUE(proxy_->isAvailable());
+}
+
+/**
+* @test Proxy gets function response when MainLoop Dispatched sourced out to other thread.
+*/
+TEST_F(THMainLoopTwoThreads, ProxyGetsFunctionResponse) {
+ std::condition_variable available;
+ std::mutex m;
+ bool isAvailable(false);
+
+ proxy_->getProxyStatusEvent().subscribe([&](const CommonAPI::AvailabilityStatus& val) {
+ if (val == CommonAPI::AvailabilityStatus::AVAILABLE) {
+ isAvailable = true;
+ available.notify_one();
+ }
+ });
+
+ if (!isAvailable) {
+ std::unique_lock<std::mutex> uniqueLock(m);
+ available.wait_for(uniqueLock, std::chrono::seconds(10));
+ }
+
+ ASSERT_TRUE(proxy_->isAvailable());
+
+ CommonAPI::CallStatus callStatus;
+
+ uint8_t x, y;
+ x = 1;
+ y = 0;
+
+ proxy_->testMethod(x, callStatus, y);
+
+ ASSERT_EQ(CommonAPI::CallStatus::SUCCESS, callStatus);
+ ASSERT_EQ(1, y);
+}
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
diff --git a/org.genivi.commonapi.core.verification/src/conf/commonapi4dbus.ini.in b/org.genivi.commonapi.core.verification/src/conf/commonapi4dbus.ini.in
index fb35209..f03d53f 100644
--- a/org.genivi.commonapi.core.verification/src/conf/commonapi4dbus.ini.in
+++ b/org.genivi.commonapi.core.verification/src/conf/commonapi4dbus.ini.in
@@ -21,7 +21,149 @@ local:commonapi.threading.TestInterface:my.test.commonapi.address.seven=@GLUECOD
local:commonapi.threading.TestInterface:my.test.commonapi.address.eight=@GLUECODE_SO_DBUS@
local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface0=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface1=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface2=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface3=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface4=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface5=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface6=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface7=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface8=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface9=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface10=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface11=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface12=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface13=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface14=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface15=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface16=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface17=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface18=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface19=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface20=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface21=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface22=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface23=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface24=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface25=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface26=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface27=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface28=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface29=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface30=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface31=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface32=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface33=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface34=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface35=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface36=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface37=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface38=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface39=@GLUECODE_SO_DBUS@
+
local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface0=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface1=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface2=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface3=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface4=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface5=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface6=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface7=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface8=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface9=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface10=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface11=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface12=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface13=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface14=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface15=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface16=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface17=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface18=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface19=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface20=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface21=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface22=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface23=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface24=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface25=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface26=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface27=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface28=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface29=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface30=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface31=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface32=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface33=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface34=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface35=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface36=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface37=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface38=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface39=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface40=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface41=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface42=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface43=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface44=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface45=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface46=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface47=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface48=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface49=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface50=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface51=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface52=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface53=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface54=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface55=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface56=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface57=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface58=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface59=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface60=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface61=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface62=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface63=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface64=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface65=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface66=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface67=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface68=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface69=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface70=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface71=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface72=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface73=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface74=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface75=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface76=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface77=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface78=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface79=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface80=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface81=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface82=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface83=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface84=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface85=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface86=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface87=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface88=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface89=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface90=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface91=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface92=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface93=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface94=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface95=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface96=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface97=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface98=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface99=@GLUECODE_SO_DBUS@
+
local:commonapi.stability.mp.ControlInterface:commonapi.stability.mp.ControlInterface=@GLUECODE_SO_DBUS@
[stub]
@@ -34,11 +176,155 @@ local:commonapi.datatypes.combined.TestInterface:commonapi.datatypes.combined.Te
local:commonapi.performance.primitive.TestInterface:commonapi.performance.primitive.TestInterface=@GLUECODE_SO_DBUS@
local:commonapi.performance.complex.TestInterface:commonapi.performance.complex.TestInterface=@GLUECODE_SO_DBUS@
+local:commonapi.communication.Daemon:commonapi.communication.Daemon=@GLUECODE_SO_DBUS@
+
local:commonapi.threading.TestInterface:my.test.commonapi.address=@GLUECODE_SO_DBUS@
local:commonapi.threading.TestInterface:my.test.commonapi.address.six=@GLUECODE_SO_DBUS@
local:commonapi.threading.TestInterface:my.test.commonapi.address.seven=@GLUECODE_SO_DBUS@
local:commonapi.threading.TestInterface:my.test.commonapi.address.eight=@GLUECODE_SO_DBUS@
local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface0=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface1=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface2=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface3=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface4=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface5=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface6=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface7=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface8=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface9=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface10=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface11=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface12=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface13=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface14=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface15=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface16=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface17=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface18=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface19=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface20=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface21=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface22=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface23=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface24=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface25=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface26=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface27=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface28=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface29=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface30=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface31=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface32=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface33=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface34=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface35=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface36=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface37=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface38=@GLUECODE_SO_DBUS@
+local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface39=@GLUECODE_SO_DBUS@
+
local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface0=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface1=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface2=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface3=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface4=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface5=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface6=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface7=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface8=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface9=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface10=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface11=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface12=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface13=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface14=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface15=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface16=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface17=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface18=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface19=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface20=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface21=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface22=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface23=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface24=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface25=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface26=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface27=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface28=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface29=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface30=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface31=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface32=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface33=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface34=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface35=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface36=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface37=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface38=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface39=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface40=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface41=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface42=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface43=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface44=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface45=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface46=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface47=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface48=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface49=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface50=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface51=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface52=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface53=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface54=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface55=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface56=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface57=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface58=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface59=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface60=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface61=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface62=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface63=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface64=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface65=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface66=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface67=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface68=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface69=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface70=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface71=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface72=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface73=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface74=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface75=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface76=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface77=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface78=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface79=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface80=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface81=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface82=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface83=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface84=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface85=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface86=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface87=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface88=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface89=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface90=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface91=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface92=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface93=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface94=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface95=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface96=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface97=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface98=@GLUECODE_SO_DBUS@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface99=@GLUECODE_SO_DBUS@
+
local:commonapi.stability.mp.ControlInterface:commonapi.stability.mp.ControlInterface=@GLUECODE_SO_DBUS@
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 7bc55f8..554e1f8 100644
--- a/org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in
+++ b/org.genivi.commonapi.core.verification/src/conf/commonapi4someip.ini.in
@@ -57,12 +57,115 @@ local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface3
local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface37=@GLUECODE_SO_SOMEIP@
local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface38=@GLUECODE_SO_SOMEIP@
local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface39=@GLUECODE_SO_SOMEIP@
+
local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface0=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface1=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface2=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface3=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface4=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface5=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface6=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface7=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface8=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface9=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface10=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface11=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface12=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface13=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface14=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface15=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface16=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface17=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface18=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface19=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface20=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface21=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface22=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface23=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface24=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface25=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface26=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface27=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface28=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface29=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface30=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface31=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface32=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface33=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface34=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface35=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface36=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface37=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface38=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface39=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface40=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface41=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface42=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface43=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface44=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface45=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface46=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface47=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface48=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface49=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface50=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface51=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface52=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface53=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface54=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface55=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface56=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface57=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface58=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface59=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface60=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface61=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface62=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface63=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface64=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface65=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface66=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface67=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface68=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface69=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface70=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface71=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface72=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface73=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface74=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface75=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface76=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface77=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface78=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface79=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface80=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface81=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface82=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface83=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface84=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface85=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface86=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface87=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface88=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface89=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface90=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface91=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface92=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface93=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface94=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface95=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface96=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface97=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface98=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface99=@GLUECODE_SO_SOMEIP@
+
local:commonapi.stability.mp.ControlInterface:commonapi.stability.mp.ControlInterface=@GLUECODE_SO_SOMEIP@
[stub]
local:commonapi.runtime.TestInterface:commonapi.runtime.TestInterface=@GLUECODE_SO_SOMEIP@
local:commonapi.communication.TestInterface:commonapi.communication.TestInterface=@GLUECODE_SO_SOMEIP@
+local:commonapi.communication.Daemon:commonapi.communication.Daemon=@GLUECODE_SO_SOMEIP@
local:commonapi.datatypes.primitive.TestInterface:commonapi.datatypes.primitive.TestInterface=@GLUECODE_SO_SOMEIP@
local:commonapi.datatypes.advanced.TestInterface:commonapi.datatypes.advanced.TestInterface=@GLUECODE_SO_SOMEIP@
local:commonapi.datatypes.derived.TestInterface:commonapi.datatypes.derived.TestInterface=@GLUECODE_SO_SOMEIP@
@@ -118,4 +221,105 @@ local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface3
local:commonapi.stability.sp.TestInterface:commonapi.stability.sp.TestInterface39=@GLUECODE_SO_SOMEIP@
local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface0=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface1=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface2=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface3=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface4=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface5=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface6=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface7=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface8=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface9=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface10=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface11=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface12=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface13=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface14=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface15=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface16=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface17=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface18=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface19=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface20=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface21=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface22=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface23=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface24=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface25=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface26=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface27=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface28=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface29=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface30=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface31=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface32=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface33=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface34=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface35=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface36=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface37=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface38=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface39=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface40=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface41=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface42=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface43=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface44=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface45=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface46=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface47=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface48=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface49=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface50=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface51=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface52=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface53=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface54=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface55=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface56=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface57=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface58=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface59=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface60=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface61=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface62=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface63=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface64=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface65=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface66=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface67=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface68=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface69=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface70=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface71=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface72=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface73=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface74=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface75=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface76=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface77=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface78=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface79=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface80=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface81=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface82=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface83=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface84=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface85=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface86=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface87=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface88=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface89=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface90=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface91=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface92=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface93=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface94=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface95=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface96=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface97=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface98=@GLUECODE_SO_SOMEIP@
+local:commonapi.stability.mp.TestInterface:commonapi.stability.mp.TestInterface99=@GLUECODE_SO_SOMEIP@
+
local:commonapi.stability.mp.ControlInterface:commonapi.stability.mp.ControlInterface=@GLUECODE_SO_SOMEIP@
diff --git a/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.cpp b/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.cpp
index 9a4e64d..fa70170 100644
--- a/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.cpp
+++ b/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.cpp
@@ -1,5 +1,4 @@
-/* Copyright (C) 2015 Mentor Graphics
- * Author: Felix Scherzinger (felix_scherzinger@mentor.com)
+/* Copyright (C) 2015 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.h b/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.h
index e261911..626b975 100644
--- a/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.h
+++ b/org.genivi.commonapi.core.verification/src/stub/PFComplexStub.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 2015 Mentor Graphics
- * Author: Felix Scherzinger (felix_scherzinger@mentor.com)
+/* Copyright (C) 2015 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.cpp b/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.cpp
index 107d04b..1769ed5 100644
--- a/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.cpp
+++ b/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.cpp
@@ -1,5 +1,4 @@
-/* Copyright (C) 2015 Mentor Graphics
- * Author: Felix Scherzinger (felix_scherzinger@mentor.com)
+/* Copyright (C) 2015 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.h b/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.h
index f6595f6..aa934d4 100644
--- a/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.h
+++ b/org.genivi.commonapi.core.verification/src/stub/PFPrimitiveStub.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 2015 Mentor Graphics
- * Author: Felix Scherzinger (felix_scherzinger@mentor.com)
+/* Copyright (C) 2015 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/stub/StabControlStub.cpp b/org.genivi.commonapi.core.verification/src/stub/StabControlStub.cpp
deleted file mode 100644
index b512e70..0000000
--- a/org.genivi.commonapi.core.verification/src/stub/StabControlStub.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Copyright (C) 2015 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
- * 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 <iostream>
-#include "StabControlStub.h"
-
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
-namespace v1_0 {
-namespace commonapi {
-namespace stability {
-namespace mp {
-
-using namespace v1_0::commonapi::stability::mp;
-
-StabControlStub::StabControlStub() {
-}
-
-StabControlStub::~StabControlStub() {
-}
-
-CommandListener StabControlStub::listener_ = 0;
-
-
-void StabControlStub::controlMethod(const std::shared_ptr<CommonAPI::ClientId> clientId,
- uint8_t id,
- uint32_t data,
- controlMethodReply_t _reply)
-{
- // client sends commands and responses through this interface.
- // call the listener with the data.
- uint8_t command;
- uint32_t min;
- uint32_t max;
-
- if (StabControlStub::listener_) {
- StabControlStub::listener_(id, data, command, min, max);
- }
- _reply(command, min, max);
-
-}
-
-void StabControlStub::registerListener(CommandListener listener ) {
- StabControlStub::listener_ = listener;
-}
-
-} /* namespace v1_0 */
-} /* namespace mp */
-} /* namespace stability */
-} /* namespace commonapi */
-
-
-
diff --git a/org.genivi.commonapi.core.verification/src/stub/StabControlStub.h b/org.genivi.commonapi.core.verification/src/stub/StabControlStub.h
deleted file mode 100644
index 7b844a4..0000000
--- a/org.genivi.commonapi.core.verification/src/stub/StabControlStub.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Copyright (C) 2014 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
- * 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 STABCONTROLSTUB_H_
-#define STABCONTROLSTUB_H_
-
-#include "v1_0/commonapi/stability/mp/ControlInterfaceStubDefault.hpp"
-#include "v1_0/commonapi/stability/mp/ControlInterface.hpp"
-
-namespace v1_0 {
-namespace commonapi {
-namespace stability {
-namespace mp {
-
-using namespace v1_0::commonapi::stability::mp;
-
-typedef std::function<void (uint8_t id, uint32_t data, uint8_t& command, uint32_t& data1, uint32_t &data2)> CommandListener;
-
-class StabControlStub : public ControlInterfaceStubDefault {
-
-public:
- StabControlStub();
- virtual ~StabControlStub();
-
- virtual void controlMethod(const std::shared_ptr<CommonAPI::ClientId> clientId,
- uint8_t id,
- uint32_t data,
- controlMethodReply_t _reply);
-
- static void registerListener(CommandListener listener);
-
- static CommandListener listener_;
-
-};
-
-} /* namespace v1_0 */
-} /* namespace mp */
-} /* namespace stability */
-} /* namespace commonapi */
-#endif /* STABCONTROLSTUB_H_ */
-
-
diff --git a/org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.cpp b/org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.cpp
deleted file mode 100644
index 1468e8e..0000000
--- a/org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright (C) 2015 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
- * 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 "StabilityMPStub.h"
-
-#ifndef WIN32
-#include <unistd.h>
-#endif
-
-namespace v1_0 {
-namespace commonapi {
-namespace stability {
-namespace mp {
-
-using namespace v1_0::commonapi::stability::mp;
-
-StabilityMPStub::StabilityMPStub() {
-}
-
-StabilityMPStub::~StabilityMPStub() {
-}
-
-void StabilityMPStub::testMethod(const std::shared_ptr<CommonAPI::ClientId> clientId,
- TestInterface::tArray tArrayIn,
- testMethodReply_t _reply) {
-
- TestInterface::tArray tArrayOut;
- tArrayOut = tArrayIn;
-
- fireTestBroadcastEvent(
- tArrayOut
- );
- _reply(tArrayOut);
-}
-
-void StabilityMPStub::setTestValues(TestInterface::tArray x) {
- setTestAttributeAttribute(x);
-}
-
-} /* namespace v1_0 */
-} /* namespace mp */
-} /* namespace stability */
-} /* namespace commonapi */
-
-
diff --git a/org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.h b/org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.h
deleted file mode 100644
index 328f047..0000000
--- a/org.genivi.commonapi.core.verification/src/stub/StabilityMPStub.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 2015 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
- * 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 STABILITYMPSTUB_H_
-#define STABILITYMPSTUB_H_
-
-#include "v1_0/commonapi/stability/mp/TestInterfaceStubDefault.hpp"
-#include "v1_0/commonapi/stability/mp/TestInterface.hpp"
-
-namespace v1_0 {
-namespace commonapi {
-namespace stability {
-namespace mp {
-
-class StabilityMPStub : public TestInterfaceStubDefault {
-
-public:
- StabilityMPStub();
- virtual ~StabilityMPStub();
-
- virtual void testMethod(const std::shared_ptr<CommonAPI::ClientId> clientId,
- TestInterface::tArray tArrayIn,
- testMethodReply_t _reply);
- virtual void setTestValues(TestInterface::tArray x);
-};
-
-} /* namespace v1_0 */
-} /* namespace mp */
-} /* namespace stability */
-} /* namespace commonapi */
-#endif /* STABILITYMPSTUB_H_ */
-
diff --git a/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.cpp b/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.cpp
index 472d39a..373636e 100644
--- a/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.cpp
+++ b/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.cpp
@@ -1,5 +1,4 @@
/* Copyright (C) 2015 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
* 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.h b/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.h
index 86b8c3c..d9a4071 100644
--- a/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.h
+++ b/org.genivi.commonapi.core.verification/src/stub/StabilitySPStub.h
@@ -1,5 +1,4 @@
/* Copyright (C) 2015 BMW Group
- * Author: JP Ikaheimonen (jp_ikaheimonen@mentor.com)
* 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/. */
diff --git a/org.genivi.commonapi.core.verification/src/utils/StopWatch.cpp b/org.genivi.commonapi.core.verification/src/utils/StopWatch.cpp
index cd2eef3..49fd14f 100644
--- a/org.genivi.commonapi.core.verification/src/utils/StopWatch.cpp
+++ b/org.genivi.commonapi.core.verification/src/utils/StopWatch.cpp
@@ -9,6 +9,9 @@
#include <cassert>
#include <ctime>
+#ifdef WIN32
+ #include <chrono>
+#endif
#define USEC_PER_SEC 1000000ULL
#define NSEC_PER_USEC 1000ULL
@@ -28,10 +31,14 @@ StopWatch::usec_t StopWatch::getTotalElapsedSeconds() const {
}
StopWatch::usec_t StopWatch::now() {
+#ifdef WIN32
+ return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
+#else
struct timespec ts;
assert(!clock_gettime(CLOCK_MONOTONIC, &ts));
return (usec_t) ts.tv_sec * USEC_PER_SEC + (usec_t) ts.tv_nsec / NSEC_PER_USEC;
+#endif
}
diff --git a/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoop.h b/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoop.h
index 52f7024..beac7a6 100644
--- a/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoop.h
+++ b/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoop.h
@@ -45,18 +45,18 @@ class VerificationMainLoop {
explicit VerificationMainLoop(std::shared_ptr<MainLoopContext> context) :
context_(context), currentMinimalTimeoutInterval_(TIMEOUT_INFINITE), running_(false), breakLoop_(false), dispatchWatchesTooLong(false) {
#ifdef WIN32
- WSAEVENT wsaEvent = WSACreateEvent();
+ wsaEvents_.push_back(WSACreateEvent());
- if (wsaEvent != WSA_INVALID_EVENT) {
- wakeFd_.fd = PtrToInt(wsaEvent);
+ if (wsaEvents_[0] == WSA_INVALID_EVENT) {
+ printf("Invalid Event Created!");
}
#else
- wakeFd_.fd = eventfd(0, EFD_SEMAPHORE | EFD_NONBLOCK);
+ wakeFd_.fd = eventfd(0, EFD_SEMAPHORE | EFD_NONBLOCK);
+ wakeFd_.events = POLLIN;
+ assert(wakeFd_.fd != -1);
+ registerFileDescriptor(wakeFd_);
#endif
- wakeFd_.events = POLLIN;
- assert(wakeFd_.fd != -1);
- registerFileDescriptor(wakeFd_);
dispatchSourceListenerSubscription_ = context_->subscribeForDispatchSources(
std::bind(&CommonAPI::VerificationMainLoop::registerDispatchSource, this, std::placeholders::_1, std::placeholders::_2),
@@ -74,15 +74,16 @@ class VerificationMainLoop {
}
~VerificationMainLoop() {
- deregisterFileDescriptor(wakeFd_);
-
+#ifndef WIN32
+ deregisterFileDescriptor(wakeFd_);
+#endif
context_->unsubscribeForDispatchSources(dispatchSourceListenerSubscription_);
context_->unsubscribeForWatches(watchListenerSubscription_);
context_->unsubscribeForTimeouts(timeoutSourceListenerSubscription_);
context_->unsubscribeForWakeupEvents(wakeupListenerSubscription_);
#ifdef WIN32
- WSACloseEvent(IntToPtr(wakeFd_.fd));
+ WSACloseEvent(wsaEvents_[0]);
#else
close(wakeFd_.fd);
#endif
@@ -199,17 +200,34 @@ class VerificationMainLoop {
}
void poll() {
- for (auto fileDescriptor = managedFileDescriptors_.begin() + 1; fileDescriptor != managedFileDescriptors_.end(); ++fileDescriptor) {
- (*fileDescriptor).revents = 0;
- }
+#ifdef WIN32
+ int managedFileDescriptorOffset = 0;
+#else
+ int managedFileDescriptorOffset = 1;
+#endif
+
+ for (auto fileDescriptor = managedFileDescriptors_.begin() + managedFileDescriptorOffset; fileDescriptor != managedFileDescriptors_.end(); ++fileDescriptor) {
+ (*fileDescriptor).revents = 0;
+ }
#if WIN32
- INT currentMinimalTimeoutIntervalWin32_ = 1;
- size_t numReadyFileDescriptors = ::WSAPoll(&(managedFileDescriptors_[0]), managedFileDescriptors_.size(), currentMinimalTimeoutIntervalWin32_);
+ size_t numReadyFileDescriptors = 0;
- if (numReadyFileDescriptors == SOCKET_ERROR) {
- int iError = WSAGetLastError();
- //printf("WSAPoll failed with error: %ld\n", iError);
+ int errorCode = WSAWaitForMultipleEvents(wsaEvents_.size(), wsaEvents_.data(), FALSE, currentMinimalTimeoutInterval_, FALSE);
+
+ if (errorCode == WSA_WAIT_IO_COMPLETION) {
+ printf("WSAWaitForMultipleEvents failed with error: WSA_WAIT_IO_COMPLETION");
+ }
+ else if (errorCode == WSA_WAIT_FAILED) {
+ printf("WSAWaitForMultipleEvents failed with error: %ld\n", WSAGetLastError());
+ }
+ else {
+ for (uint32_t i = 0; i < managedFileDescriptors_.size(); i++) {
+ if (WaitForSingleObjectEx(wsaEvents_[i + 1], 0, true) != WAIT_TIMEOUT) {
+ numReadyFileDescriptors++;
+ managedFileDescriptors_[i].revents = POLLIN;
+ }
+ }
}
#else
size_t numReadyFileDescriptors = ::poll(&(managedFileDescriptors_[0]), managedFileDescriptors_.size(), currentMinimalTimeoutInterval_);
@@ -233,14 +251,23 @@ class VerificationMainLoop {
}
}
- if (wakeFd_.revents) {
- acknowledgeWakeup();
- }
+#ifdef WIN32
+ acknowledgeWakeup();
+#else
+ if (managedFileDescriptors_[0].revents) {
+ acknowledgeWakeup();
+ }
+#endif
}
bool check() {
- //The first file descriptor always is the loop's wakeup-descriptor. All others need to be linked to a watch.
- for (auto fileDescriptor = managedFileDescriptors_.begin() + 1; fileDescriptor != managedFileDescriptors_.end(); ++fileDescriptor) {
+ //The first file descriptor always is the loop's wakeup-descriptor (but not for windows anymore). All others need to be linked to a watch.
+#ifdef WIN32
+ int managedFileDescriptorOffset = 0;
+#else
+ int managedFileDescriptorOffset = 1;
+#endif
+ for (auto fileDescriptor = managedFileDescriptors_.begin() + managedFileDescriptorOffset; fileDescriptor != managedFileDescriptors_.end(); ++fileDescriptor) {
for (auto registeredWatchIterator = registeredWatches_.begin();
registeredWatchIterator != registeredWatches_.end();
registeredWatchIterator++) {
@@ -276,11 +303,14 @@ class VerificationMainLoop {
void wakeup() {
#ifdef WIN32
- HANDLE h = IntToPtr(wakeFd_.fd);
- SetEvent(h);
+ if (!WSASetEvent(wsaEvents_[0]))
+ {
+ printf("SetEvent failed (%d)\n", GetLastError());
+ return;
+ }
#else
int64_t wake = 1;
- ::write(wakeFd_.fd, &wake, sizeof(int64_t));
+ ::write(managedFileDescriptors_[0].fd, &wake, sizeof(int64_t));
#endif
}
@@ -350,6 +380,24 @@ class VerificationMainLoop {
}
}
+#ifdef WIN32
+ void registerEvent(
+ const HANDLE& wsaEvent) {
+ wsaEvents_.push_back(wsaEvent);
+ }
+
+ void unregisterEvent(
+ const HANDLE& wsaEvent) {
+ for (auto it = wsaEvents_.begin();
+ it != wsaEvents_.end(); it++) {
+ if ((*it) == wsaEvent) {
+ wsaEvents_.erase(it);
+ break;
+ }
+ }
+ }
+#endif
+
void registerDispatchSource(DispatchSource* dispatchSource, const DispatchPriority dispatchPriority) {
registeredDispatchSources_.insert( {dispatchPriority, dispatchSource} );
}
@@ -369,16 +417,26 @@ class VerificationMainLoop {
void registerWatch(Watch* watch, const DispatchPriority dispatchPriority) {
registerFileDescriptor(watch->getAssociatedFileDescriptor());
+
+#ifdef WIN32
+ registerEvent(watch->getAssociatedEvent());
+#endif
+
registeredWatches_.insert( { dispatchPriority, {watch->getAssociatedFileDescriptor().fd, watch} } );
}
void deregisterWatch(Watch* watch) {
+#ifdef WIN32
+ unregisterEvent(watch->getAssociatedEvent());
+#endif
+
for(auto watchIterator = registeredWatches_.begin();
watchIterator != registeredWatches_.end();
watchIterator++) {
if(watchIterator->second.second == watch) {
registeredWatches_.erase(watchIterator);
+ break;
}
}
}
@@ -401,11 +459,16 @@ class VerificationMainLoop {
void acknowledgeWakeup() {
#ifdef WIN32
- HANDLE h = IntToPtr(wakeFd_.fd);
- ResetEvent(h);
+ for (unsigned int i = 0; i < wsaEvents_.size(); i++) {
+ if (!WSAResetEvent(wsaEvents_[i]))
+ {
+ printf("ResetEvent failed (%d)\n", GetLastError());
+ return;
+ }
+ }
#else
int64_t buffer;
- while (::read(wakeFd_.fd, &buffer, sizeof(int64_t)) == sizeof(buffer));
+ while (::read(managedFileDescriptors_[0].fd, &buffer, sizeof(int64_t)) == sizeof(buffer));
#endif
}
@@ -430,7 +493,11 @@ class VerificationMainLoop {
bool breakLoop_;
bool running_;
- pollfd wakeFd_;
+#ifdef WIN32
+ std::vector<HANDLE> wsaEvents_;
+#else
+ pollfd wakeFd_;
+#endif
std::promise<bool>* stopPromise;
};
diff --git a/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoopWithQueue.h b/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoopWithQueue.h
new file mode 100644
index 0000000..5bf3af4
--- /dev/null
+++ b/org.genivi.commonapi.core.verification/src/utils/VerificationMainLoopWithQueue.h
@@ -0,0 +1,480 @@
+// Copyright (C) 2013-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/.
+
+#ifndef DEMO_MAIN_LOOP_H_
+#define DEMO_MAIN_LOOP_H_
+
+#include <CommonAPI/CommonAPI.hpp>
+
+#include <vector>
+#include <set>
+#include <map>
+#include <memory>
+#include <condition_variable>
+#ifdef WIN32
+#include <WinSock2.h>
+#else
+#include <poll.h>
+#include <sys/eventfd.h>
+#include <unistd.h>
+#endif
+
+#include <cassert>
+
+namespace CommonAPI {
+
+typedef pollfd DemoMainLoopPollFd;
+
+class VerificationMainLoopEventQueue {
+public:
+ void run(const int64_t& timeoutInterval = TIMEOUT_INFINITE) {
+ running_ = true;
+ while (running_) {
+ std::unique_lock<std::mutex> queueUniqueLock(queueLock_);
+ queueCondition_.wait(queueUniqueLock);
+
+ for (unsigned int i = 0; i < queue_.size(); i++) {
+ queue_.at(i)();
+ }
+
+ queueUniqueLock.unlock();
+ queueCondition_.notify_one();
+ }
+ }
+
+ void stop() {
+ running_ = false;
+ }
+
+ void pushToQueue(std::function<void()> func) {
+ std::lock_guard<std::mutex> queueUniqueLock(queueLock_);
+ queue_.push_back(func);
+ queueCondition_.notify_one();
+ }
+
+private:
+ bool running_;
+ std::vector<std::function<void()>> queue_;
+ std::condition_variable queueCondition_;
+ std::mutex queueLock_;
+};
+
+class VerificationMainLoop {
+ public:
+ VerificationMainLoop() = delete;
+ VerificationMainLoop(const VerificationMainLoop&) = delete;
+ VerificationMainLoop& operator=(const VerificationMainLoop&) = delete;
+ VerificationMainLoop(VerificationMainLoop&&) = delete;
+ VerificationMainLoop& operator=(VerificationMainLoop&&) = delete;
+
+ explicit VerificationMainLoop(std::shared_ptr<MainLoopContext> context, std::shared_ptr<VerificationMainLoopEventQueue> eventQueue) :
+ context_(context),
+ eventQueue_(eventQueue),
+ currentMinimalTimeoutInterval_(TIMEOUT_INFINITE),
+ breakLoop_(false),
+ running_(false),
+ m_bNeedWakeup(false)
+ {
+#ifdef WIN32
+ wsaEvents_.push_back(WSACreateEvent());
+
+ if (wsaEvents_[0] == WSA_INVALID_EVENT) {
+ printf("Invalid Event Created!");
+ }
+#else
+ wakeFd_.fd = eventfd(0, EFD_SEMAPHORE | EFD_NONBLOCK);
+ wakeFd_.events = POLLIN;
+ assert(wakeFd_.fd != -1);
+ registerFileDescriptor(wakeFd_);
+#endif
+
+ dispatchSourceListenerSubscription_ = context_->subscribeForDispatchSources(
+ std::bind(&VerificationMainLoop::registerDispatchSource, this, std::placeholders::_1, std::placeholders::_2),
+ std::bind(&VerificationMainLoop::deregisterDispatchSource, this, std::placeholders::_1));
+ watchListenerSubscription_ = context_->subscribeForWatches(
+ std::bind(&VerificationMainLoop::registerWatch, this, std::placeholders::_1, std::placeholders::_2),
+ std::bind(&VerificationMainLoop::deregisterWatch, this, std::placeholders::_1));
+ timeoutSourceListenerSubscription_ = context_->subscribeForTimeouts(
+ std::bind(&VerificationMainLoop::registerTimeout, this, std::placeholders::_1, std::placeholders::_2),
+ std::bind(&VerificationMainLoop::deregisterTimeout, this, std::placeholders::_1));
+ wakeupListenerSubscription_ = context_->subscribeForWakeupEvents(
+ std::bind(&VerificationMainLoop::wakeup, this));
+ }
+
+ ~VerificationMainLoop() {
+#ifndef WIN32
+ deregisterFileDescriptor(wakeFd_);
+#endif
+ context_->unsubscribeForDispatchSources(dispatchSourceListenerSubscription_);
+ context_->unsubscribeForWatches(watchListenerSubscription_);
+ context_->unsubscribeForTimeouts(timeoutSourceListenerSubscription_);
+ context_->unsubscribeForWakeupEvents(wakeupListenerSubscription_);
+
+#ifdef WIN32
+ WSACloseEvent(wsaEvents_[0]);
+#else
+ close(wakeFd_.fd);
+#endif
+ }
+
+ /**
+ * \brief Runs the mainloop indefinitely until stop() is called.
+ *
+ * Runs the mainloop indefinitely until stop() is called. The given timeout (milliseconds)
+ * will be overridden if a timeout-event is present that defines an earlier ready time.
+ */
+ void run(const int64_t& timeoutInterval = TIMEOUT_INFINITE) {
+ running_ = true;
+ while(running_) {
+ doSingleIteration(timeoutInterval);
+ }
+ }
+
+ void stop() {
+ running_ = false;
+ wakeup();
+ }
+
+ /**
+ * \brief Executes a single cycle of the mainloop.
+ *
+ * Subsequently calls prepare(), poll(), check() and, if necessary, dispatch().
+ * The given timeout (milliseconds) represents the maximum time
+ * this iteration will remain in the poll state. All other steps
+ * are handled in a non-blocking way. Note however that a source
+ * might claim to have infinite amounts of data to dispatch.
+ * This demo-implementation of a Mainloop will dispatch a source
+ * until it no longer claims to have data to dispatch.
+ * Dispatch will not be called if no sources, watches and timeouts
+ * claim to be ready during the check()-phase.
+ *
+ * @param timeout The maximum poll-timeout for this iteration.
+ */
+ void doSingleIteration(const int64_t& timeout = TIMEOUT_INFINITE) {
+ prepare(timeout);
+ poll();
+ if(check()) {
+ dispatch();
+ //dispatchCondition_.notify_one();
+ }
+ }
+
+ /*
+ * The given timeout is a maximum timeout in ms, measured from the current time in the future
+ * (a value of 0 means "no timeout"). It will be overridden if a timeout-event is present
+ * that defines an earlier ready time.
+ */
+ void prepare(const int64_t& timeout = TIMEOUT_INFINITE) {
+ currentMinimalTimeoutInterval_ = timeout;
+
+ for (auto dispatchSourceIterator = registeredDispatchSources_.begin();
+ dispatchSourceIterator != registeredDispatchSources_.end();
+ dispatchSourceIterator++) {
+
+ int64_t dispatchTimeout = TIMEOUT_INFINITE;
+ if(dispatchSourceIterator->second->prepare(dispatchTimeout)) {
+ sourcesToDispatch_.insert(*dispatchSourceIterator);
+ } else if (dispatchTimeout < currentMinimalTimeoutInterval_) {
+ currentMinimalTimeoutInterval_ = dispatchTimeout;
+ }
+ }
+
+ int64_t currentContextTime = getCurrentTimeInMs();
+
+ for (auto timeoutPriorityRange = registeredTimeouts_.begin();
+ timeoutPriorityRange != registeredTimeouts_.end();
+ timeoutPriorityRange++) {
+
+ int64_t intervalToReady = timeoutPriorityRange->second->getReadyTime() - currentContextTime;
+
+ if (intervalToReady <= 0) {
+ timeoutsToDispatch_.insert(*timeoutPriorityRange);
+ currentMinimalTimeoutInterval_ = TIMEOUT_NONE;
+ } else if (intervalToReady < currentMinimalTimeoutInterval_) {
+ currentMinimalTimeoutInterval_ = intervalToReady;
+ }
+ }
+ }
+
+ void poll() {
+#ifdef WIN32
+ int managedFileDescriptorOffset = 0;
+#else
+ int managedFileDescriptorOffset = 1;
+#endif
+
+ for (auto fileDescriptor = managedFileDescriptors_.begin() + managedFileDescriptorOffset; fileDescriptor != managedFileDescriptors_.end(); ++fileDescriptor) {
+ (*fileDescriptor).revents = 0;
+ }
+
+#ifdef WIN32
+ size_t numReadyFileDescriptors = 0;
+
+ int errorCode = WSAWaitForMultipleEvents(wsaEvents_.size(), wsaEvents_.data(), FALSE, currentMinimalTimeoutInterval_, FALSE);
+
+ if (errorCode == WSA_WAIT_IO_COMPLETION) {
+ printf("WSAWaitForMultipleEvents failed with error: WSA_WAIT_IO_COMPLETION");
+ }
+ else if (errorCode == WSA_WAIT_FAILED) {
+ printf("WSAWaitForMultipleEvents failed with error: %ld\n", WSAGetLastError());
+ }
+ else {
+ for (uint32_t i = 0; i < managedFileDescriptors_.size(); i++) {
+ if (WaitForSingleObjectEx(wsaEvents_[i + 1], 0, true) != WAIT_TIMEOUT) {
+ numReadyFileDescriptors++;
+ managedFileDescriptors_[i].revents = POLLIN;
+ }
+ }
+ }
+#else
+ size_t numReadyFileDescriptors = ::poll(&(managedFileDescriptors_[0]), managedFileDescriptors_.size(), currentMinimalTimeoutInterval_);
+#endif
+ // If no FileDescriptors are ready, poll returned because of a timeout that has expired.
+ // The only case in which this is not the reason is when the timeout handed in "prepare"
+ // expired before any other timeouts.
+ if (!numReadyFileDescriptors) {
+ int64_t currentContextTime = getCurrentTimeInMs();
+
+ for (auto timeoutPriorityRange = registeredTimeouts_.begin();
+ timeoutPriorityRange != registeredTimeouts_.end();
+ timeoutPriorityRange++) {
+
+ int64_t intervalToReady = timeoutPriorityRange->second->getReadyTime() - currentContextTime;
+
+ if (intervalToReady <= 0) {
+ timeoutsToDispatch_.insert(*timeoutPriorityRange);
+ }
+ }
+ }
+
+#ifdef WIN32
+ acknowledgeWakeup();
+#else
+ if (wakeFd_.revents) {
+ acknowledgeWakeup();
+ }
+#endif
+ }
+
+ bool check() {
+//The first file descriptor always is the loop's wakeup-descriptor (but not for windows anymore). All others need to be linked to a watch.
+#ifdef WIN32
+ int managedFileDescriptorOffset = 0;
+#else
+ int managedFileDescriptorOffset = 1;
+#endif
+ for (auto fileDescriptor = managedFileDescriptors_.begin() + managedFileDescriptorOffset; fileDescriptor != managedFileDescriptors_.end(); ++fileDescriptor) {
+ for (auto registeredWatchIterator = registeredWatches_.begin();
+ registeredWatchIterator != registeredWatches_.end();
+ registeredWatchIterator++) {
+ const auto& correspondingWatchPriority = registeredWatchIterator->first;
+ const auto& correspondingWatchPair = registeredWatchIterator->second;
+
+ if (std::get<0>(correspondingWatchPair) == fileDescriptor->fd && fileDescriptor->revents) {
+ watchesToDispatch_.insert({ correspondingWatchPriority, { std::get<1>(correspondingWatchPair) } });
+ }
+ }
+ }
+
+ for(auto dispatchSourceIterator = registeredDispatchSources_.begin(); dispatchSourceIterator != registeredDispatchSources_.end(); ++dispatchSourceIterator) {
+ if((std::get<1>(*dispatchSourceIterator))->check()) {
+ sourcesToDispatch_.insert( {std::get<0>(*dispatchSourceIterator), std::get<1>(*dispatchSourceIterator)});
+ }
+ }
+
+ return !timeoutsToDispatch_.empty() || !watchesToDispatch_.empty() || !sourcesToDispatch_.empty();
+ }
+
+ void dispatch() {
+ eventQueue_->pushToQueue(std::bind(&VerificationMainLoop::doExternalIteration, this));
+ }
+
+ void doExternalIteration()
+ {
+ for (auto timeoutIterator = timeoutsToDispatch_.begin();
+ timeoutIterator != timeoutsToDispatch_.end();
+ timeoutIterator++) {
+ std::get<1>(*timeoutIterator)->dispatch();
+ }
+
+ for (auto watchIterator = watchesToDispatch_.begin();
+ watchIterator != watchesToDispatch_.end();
+ watchIterator++) {
+ Watch* watch = watchIterator->second;
+ const unsigned int flags = POLLIN | POLLOUT | POLLERR;
+ watch->dispatch(flags);
+ }
+
+ breakLoop_ = false;
+ for (auto dispatchSourceIterator = sourcesToDispatch_.begin();
+ dispatchSourceIterator != sourcesToDispatch_.end() && !breakLoop_;
+ dispatchSourceIterator++) {
+
+ while(std::get<1>(*dispatchSourceIterator)->dispatch());
+ }
+
+ sourcesToDispatch_.clear();
+ timeoutsToDispatch_.clear();
+ watchesToDispatch_.clear();
+ }
+
+ void wakeup() {
+#ifdef WIN32
+ if (!WSASetEvent(wsaEvents_[0]))
+ {
+ printf("SetEvent failed (%d)\n", GetLastError());
+ return;
+ }
+#else
+ int64_t wake = 1;
+ ::write(wakeFd_.fd, &wake, sizeof(int64_t));
+#endif
+ }
+
+ private:
+ void registerFileDescriptor(const DemoMainLoopPollFd& fileDescriptor) {
+ managedFileDescriptors_.push_back(fileDescriptor);
+ }
+
+ void deregisterFileDescriptor(const DemoMainLoopPollFd& fileDescriptor) {
+ for (auto it = managedFileDescriptors_.begin(); it != managedFileDescriptors_.end(); it++) {
+ if ((*it).fd == fileDescriptor.fd) {
+ managedFileDescriptors_.erase(it);
+ break;
+ }
+ }
+ }
+
+#ifdef WIN32
+ void registerEvent(
+ const HANDLE& wsaEvent) {
+ wsaEvents_.push_back(wsaEvent);
+ }
+
+ void unregisterEvent(
+ const HANDLE& wsaEvent) {
+ for (auto it = wsaEvents_.begin();
+ it != wsaEvents_.end(); it++) {
+ if ((*it) == wsaEvent) {
+ wsaEvents_.erase(it);
+ break;
+ }
+ }
+ }
+#endif
+
+ void registerDispatchSource(DispatchSource* dispatchSource, const DispatchPriority dispatchPriority) {
+ registeredDispatchSources_.insert( {dispatchPriority, dispatchSource} );
+ }
+
+ void deregisterDispatchSource(DispatchSource* dispatchSource) {
+ for(auto dispatchSourceIterator = registeredDispatchSources_.begin();
+ dispatchSourceIterator != registeredDispatchSources_.end();
+ dispatchSourceIterator++) {
+
+ if(dispatchSourceIterator->second == dispatchSource) {
+ registeredDispatchSources_.erase(dispatchSourceIterator);
+ break;
+ }
+ }
+ breakLoop_ = true;
+ }
+
+ void registerWatch(Watch* watch, const DispatchPriority dispatchPriority) {
+ DemoMainLoopPollFd fdToRegister = watch->getAssociatedFileDescriptor();
+ registerFileDescriptor(fdToRegister);
+
+#ifdef WIN32
+ registerEvent(watch->getAssociatedEvent());
+#endif
+
+ registeredWatches_.insert( {dispatchPriority, {watch->getAssociatedFileDescriptor().fd, watch}});
+ }
+
+ void deregisterWatch(Watch* watch) {
+ deregisterFileDescriptor(watch->getAssociatedFileDescriptor());
+
+#ifdef WIN32
+ unregisterEvent(watch->getAssociatedEvent());
+#endif
+
+ for(auto watchIterator = registeredWatches_.begin();
+ watchIterator != registeredWatches_.end();
+ watchIterator++) {
+
+ if(watchIterator->second.second == watch) {
+ registeredWatches_.erase(watchIterator);
+ break;
+ }
+ }
+ }
+
+ void registerTimeout(Timeout* timeout, const DispatchPriority dispatchPriority) {
+ registeredTimeouts_.insert( {dispatchPriority, timeout} );
+ }
+
+ void deregisterTimeout(Timeout* timeout) {
+ for(auto timeoutIterator = registeredTimeouts_.begin();
+ timeoutIterator != registeredTimeouts_.end();
+ timeoutIterator++) {
+
+ if(timeoutIterator->second == timeout) {
+ registeredTimeouts_.erase(timeoutIterator);
+ break;
+ }
+ }
+ }
+
+ void acknowledgeWakeup() {
+#ifdef WIN32
+ for (unsigned int i = 0; i < wsaEvents_.size(); i++) {
+ if (!WSAResetEvent(wsaEvents_[i]))
+ {
+ printf("ResetEvent failed (%d)\n", GetLastError());
+ return;
+ }
+ }
+#else
+ int64_t buffer;
+ while (::read(wakeFd_.fd, &buffer, sizeof(int64_t)) == sizeof(buffer))
+ ;
+#endif
+ }
+
+ bool m_bNeedWakeup;
+ std::shared_ptr<MainLoopContext> context_;
+
+ std::vector<DemoMainLoopPollFd> managedFileDescriptors_;
+
+ std::multimap<DispatchPriority, DispatchSource*> registeredDispatchSources_;
+ std::multimap<DispatchPriority, std::pair<int, Watch*>> registeredWatches_;
+ std::multimap<DispatchPriority, Timeout*> registeredTimeouts_;
+
+ std::set<std::pair<DispatchPriority, DispatchSource*>> sourcesToDispatch_;
+ std::set<std::pair<DispatchPriority, Watch*>> watchesToDispatch_;
+ std::set<std::pair<DispatchPriority, Timeout*>> timeoutsToDispatch_;
+
+ DispatchSourceListenerSubscription dispatchSourceListenerSubscription_;
+ WatchListenerSubscription watchListenerSubscription_;
+ TimeoutSourceListenerSubscription timeoutSourceListenerSubscription_;
+ WakeupListenerSubscription wakeupListenerSubscription_;
+
+ int64_t currentMinimalTimeoutInterval_;
+ bool breakLoop_;
+ bool running_;
+
+#ifdef WIN32
+ std::vector<HANDLE> wsaEvents_;
+#else
+ DemoMainLoopPollFd wakeFd_;
+#endif
+
+ std::shared_ptr<VerificationMainLoopEventQueue> eventQueue_;
+};
+
+
+} // namespace CommonAPI
+
+#endif /* DEMO_MAIN_LOOP_H_ */
diff --git a/org.genivi.commonapi.core/META-INF/MANIFEST.MF b/org.genivi.commonapi.core/META-INF/MANIFEST.MF
index 9063bd5..8516801 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 Common API Generator
Bundle-Vendor: BMW AG
-Bundle-Version: 3.1.2.qualifier
+Bundle-Version: 3.1.3.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 380c30d..0ee58d6 100644
--- a/org.genivi.commonapi.core/pom.xml
+++ b/org.genivi.commonapi.core/pom.xml
@@ -7,7 +7,7 @@
<parent>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.core.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<relativePath>../org.genivi.commonapi.core.releng</relativePath>
</parent>
</project>
diff --git a/org.genivi.commonapi.core/src-gen/org/genivi/commonapi/core/DeploymentProviderPropertyAccessor.java b/org.genivi.commonapi.core/src-gen/org/genivi/commonapi/core/DeploymentProviderPropertyAccessor.java
index 66e58e0..bb88250 100644
--- a/org.genivi.commonapi.core/src-gen/org/genivi/commonapi/core/DeploymentProviderPropertyAccessor.java
+++ b/org.genivi.commonapi.core/src-gen/org/genivi/commonapi/core/DeploymentProviderPropertyAccessor.java
@@ -5,11 +5,10 @@
package org.genivi.commonapi.core;
import java.util.List;
-
import org.franca.core.franca.FInterface;
-import org.franca.deploymodel.core.FDeployedProvider;
-import org.franca.deploymodel.dsl.fDeploy.FDInterfaceInstance;
import org.franca.deploymodel.dsl.fDeploy.FDProvider;
+import org.franca.deploymodel.dsl.fDeploy.FDInterfaceInstance;
+import org.franca.deploymodel.core.FDeployedProvider;
/**
* Accessor for deployment properties for 'org.genivi.commonapi.core.deployment' specification
@@ -35,8 +34,8 @@ public class DeploymentProviderPropertyAccessor
return target.getString(obj, "InstanceId");
}
- public Integer getDefaultMethodTimeout (FDInterfaceInstance obj) {
- return target.getInteger(obj, "DefaultMethodTimeout");
+ public Integer getDefaultTimeout (FDInterfaceInstance obj) {
+ return target.getInteger(obj, "DefaultTimeout");
}
public List<String> getPreregisteredProperties (FDInterfaceInstance obj) {
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/deployment/PropertyAccessor.java b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/deployment/PropertyAccessor.java
index b733fdf..734292b 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/deployment/PropertyAccessor.java
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/deployment/PropertyAccessor.java
@@ -140,7 +140,7 @@ public class PropertyAccessor {
public Integer getDefaultMethodTimeout (FDInterfaceInstance obj) {
try {
if (type_ == DeploymentType.PROVIDER)
- return provider_.getDefaultMethodTimeout(obj);
+ return provider_.getDefaultTimeout(obj);
}
catch (java.lang.NullPointerException e) {}
return null;
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java
index a6c62a9..d23896f 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java
@@ -11,8 +11,11 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.franca.core.dsl.FrancaImportsProvider;
+import org.franca.core.franca.FModel;
import org.franca.core.utils.ImportsProvider;
import org.franca.deploymodel.dsl.FDeployImportsProvider;
+import org.franca.deploymodel.dsl.fDeploy.FDModel;
+import org.franca.deploymodel.dsl.fDeploy.Import;
/**
* The FDeployManager loads models from fdepl files and from fidl files that are imported in a fdepl file.
@@ -57,11 +60,12 @@ public class FDeployManager {
// add this pair to URI converter so that others can get the URI by its relative path
resourceSet.getURIConverter().getURIMap().put(uri, absURI);
}
-
// load root model
Resource resource = null;
try {
resource = resourceSet.getResource(absURI, true);
+ // Set the isLoaded flag to false in order to force reloading of fdepl or imported fidl files
+ resource.unload();
resource.load(Collections.EMPTY_MAP);
} catch (Exception e) {
// Don't show an error message here, because code may be generated from an included fidl file.
@@ -73,16 +77,17 @@ public class FDeployManager {
// load all its imports recursively
for (Iterator<String> it = fileHandlerRegistry.get(absURI.fileExtension()).importsIterator(model); it.hasNext();) {
String importURIStr = it.next();
- URI importURI = URI.createURI(importURIStr);
- URI resolvedURI = importURI.resolve(absURI);
-
- // add this pair to URI converter so that others can get the URI by its relative path
- resourceSet.getURIConverter().getURIMap().put(importURI, resolvedURI);
- //System.out.println("trying to load model " + resolvedURI);
- model = loadModel(resolvedURI, root);
- if(model == null) {
- // something went wrong with this import, go on with the next one
- continue;
+ if(importURIStr != null) {
+ URI importURI = URI.createURI(importURIStr);
+ URI resolvedURI = importURI.resolve(absURI);
+ // add this pair to URI converter so that others can get the URI by its relative path
+ resourceSet.getURIConverter().getURIMap().put(importURI, resolvedURI);
+ //System.out.println("trying to load model " + resolvedURI);
+ EObject localModel = loadModel(resolvedURI, root);
+ if(localModel == null) {
+ // something went wrong with this import, go on with the next one
+ continue;
+ }
}
}
return model;
@@ -95,5 +100,32 @@ public class FDeployManager {
return fileExtension;
}
+ /**
+ * Load the model from fdepl that has an fidl file import
+ * @param fdmodel - the deployment model from fdepl
+ * @param input - the fdepl uri
+ * @return the model defined in the fidl file import
+ */
+ public FModel getModelFromFdepl(FDModel fdmodel, URI input) {
+ for(Import fdimport : fdmodel.getImports()) {
+ String uriString = fdimport.getImportURI();
+ if (uriString.endsWith("fidl")) {
+ URI newUri = URI.createURI(uriString);
+ URI fidlUri = newUri.resolve(input);
+ // load model
+ Resource resource = null;
+ try {
+ resource = resourceSet.getResource(fidlUri, true);
+ resource.load(Collections.EMPTY_MAP);
+ } catch (Exception e) {
+ // failed to load model from fidl
+ return null;
+ }
+ return (FModel) resource.getContents().get(0);
+ }
+ }
+ return null;
+ }
+
}
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceGenerator.xtend
index 4402ac6..a0b301c 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceGenerator.xtend
@@ -21,7 +21,7 @@ class FInterfaceGenerator {
@Inject private extension FTypeCommonAreaGenerator
@Inject private extension FrancaGeneratorExtensions
- def generate(FInterface fInterface, IFileSystemAccess fileSystemAccess, PropertyAccessor deploymentAccessor, IResource modelid) {
+ def generateInterface(FInterface fInterface, IFileSystemAccess fileSystemAccess, PropertyAccessor deploymentAccessor, IResource modelid) {
fileSystemAccess.generateFile(fInterface.headerPath, IFileSystemAccess.DEFAULT_OUTPUT, fInterface.generateHeader(modelid, deploymentAccessor))
if (fInterface.hasSourceFile)
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend
index 52c5fd3..9c9eec5 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceProxyGenerator.xtend
@@ -423,14 +423,17 @@ class FInterfaceProxyGenerator {
def private generateSyncVariableList(FMethod fMethod) {
val syncVariableList = new ArrayList(fMethod.inArgs.map['_' + elementName])
- syncVariableList.add('_status')
+ syncVariableList.add('_internalCallStatus')
if (fMethod.hasError)
syncVariableList.add('_error')
syncVariableList.addAll(fMethod.outArgs.map['_' + elementName])
- return syncVariableList.join(', ') + ", _info"
+ if (!fMethod.isFireAndForget)
+ return syncVariableList.join(', ') + ", _info"
+ else
+ return syncVariableList.join(', ')
}
def private generateASyncVariableList(FMethod fMethod) {
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend
index 7001423..4ca7c01 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FInterfaceStubGenerator.xtend
@@ -401,8 +401,8 @@ class FInterfaceStubGenerator {
void «fInterface.stubDefaultClassName»::«attribute.stubDefaultClassSetMethodName»(«typeName» _value) {
«IF attribute.isObservable»const bool valueChanged = «ENDIF»«attribute.stubDefaultClassTrySetMethodName»(std::move(_value));
«IF attribute.isObservable»
- if (valueChanged && stubAdapter_ != NULL) {
- «IF fInterface.base != null»CommonAPI::Stub<«fInterface.stubAdapterClassName», «fInterface.stubRemoteEventClassName»>::«ENDIF»stubAdapter_->«attribute.stubAdapterClassFireChangedMethodName»(«attribute.stubDefaultClassVariableName»);
+ if (valueChanged && «fInterface.stubCommonAPIClassName»::stubAdapter_ != NULL) {
+ «fInterface.stubCommonAPIClassName»::stubAdapter_->«attribute.stubAdapterClassFireChangedMethodName»(«attribute.stubDefaultClassVariableName»);
}
«ENDIF»
}
@@ -461,8 +461,8 @@ class FInterfaceStubGenerator {
«FTypeGenerator::generateComments(broadcast, false)»
«IF broadcast.selective»
void «fInterface.stubDefaultClassName»::«broadcast.stubAdapterClassFireSelectiveMethodName»(«generateSendSelectiveSignatur(broadcast, fInterface, false)») {
- assert(stubAdapter_ !=NULL);
- stubAdapter_->«broadcast.stubAdapterClassSendSelectiveMethodName»(«broadcast.outArgs.map["_" + elementName].join(', ')»«IF(!broadcast.outArgs.empty)», «ENDIF»_receivers);
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ «fInterface.stubCommonAPIClassName»::stubAdapter_->«broadcast.stubAdapterClassSendSelectiveMethodName»(«broadcast.outArgs.map["_" + elementName].join(', ')»«IF(!broadcast.outArgs.empty)», «ENDIF»_receivers);
}
void «fInterface.stubDefaultClassName»::«broadcast.subscriptionChangedMethodName»(const std::shared_ptr<CommonAPI::ClientId> _client, const CommonAPI::SelectiveBroadcastSubscriptionEvent _event) {
// No operation in default
@@ -472,14 +472,14 @@ class FInterfaceStubGenerator {
return true;
}
std::shared_ptr<CommonAPI::ClientIdList> const «fInterface.stubDefaultClassName»::«broadcast.stubAdapterClassSubscribersMethodName»() {
- assert(stubAdapter_ !=NULL);
- return(stubAdapter_->«broadcast.stubAdapterClassSubscribersMethodName»());
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ return(«fInterface.stubCommonAPIClassName»::stubAdapter_->«broadcast.stubAdapterClassSubscribersMethodName»());
}
«ELSE»
void «fInterface.stubDefaultClassName»::«broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map['const ' + getTypeName(fInterface, true) + ' &_' + elementName].join(', ')») {
- assert(stubAdapter_ !=NULL);
- stubAdapter_->«broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map["_" + elementName].join(', ')»);
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ «fInterface.stubCommonAPIClassName»::stubAdapter_->«broadcast.stubAdapterClassFireEventMethodName»(«broadcast.outArgs.map["_" + elementName].join(', ')»);
}
«ENDIF»
«ENDFOR»
@@ -488,22 +488,22 @@ class FInterfaceStubGenerator {
bool «fInterface.stubDefaultClassName»::«managed.stubRegisterManagedAutoName»(std::shared_ptr<«managed.stubClassName»> _stub) {
autoInstanceCounter_++;
std::stringstream ss;
- ss << stubAdapter_->getAddress().getInstance() << ".i" << autoInstanceCounter_;
+ ss << «fInterface.stubCommonAPIClassName»::stubAdapter_->getAddress().getInstance() << ".i" << autoInstanceCounter_;
std::string instance = ss.str();
- assert(stubAdapter_ !=NULL);
- return stubAdapter_->«managed.stubRegisterManagedName»(_stub, instance);
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ return «fInterface.stubCommonAPIClassName»::stubAdapter_->«managed.stubRegisterManagedName»(_stub, instance);
}
bool «fInterface.stubDefaultClassName»::«managed.stubRegisterManagedMethodImpl» {
- assert(stubAdapter_ !=NULL);
- return stubAdapter_->«managed.stubRegisterManagedName»(_stub, _instance);
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ return «fInterface.stubCommonAPIClassName»::stubAdapter_->«managed.stubRegisterManagedName»(_stub, _instance);
}
bool «fInterface.stubDefaultClassName»::«managed.stubDeregisterManagedName»(const std::string &_instance) {
- assert(stubAdapter_ !=NULL);
- return stubAdapter_->«managed.stubDeregisterManagedName»(_instance);
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ return «fInterface.stubCommonAPIClassName»::stubAdapter_->«managed.stubDeregisterManagedName»(_instance);
}
std::set<std::string>& «fInterface.stubDefaultClassName»::«managed.stubManagedSetGetterName»() {
- assert(stubAdapter_ !=NULL);
- return stubAdapter_->«managed.stubManagedSetGetterName»();
+ assert((«fInterface.stubCommonAPIClassName»::stubAdapter_) !=NULL);
+ return «fInterface.stubCommonAPIClassName»::stubAdapter_->«managed.stubManagedSetGetterName»();
}
«ENDFOR»
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FTypeGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FTypeGenerator.xtend
index b86b126..2139344 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FTypeGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FTypeGenerator.xtend
@@ -207,7 +207,7 @@ class FTypeGenerator {
«type.generateFTypeDeclaration(deploymentAccessor)»
«ENDFOR»
«IF fTypeCollection instanceof FInterface»
- «FOR method : (fTypeCollection as FInterface).methodsWithError»
+ «FOR method : fTypeCollection.methodsWithError»
«generateComments(method, false)»
«method.errors.generateDeclaration(method.errors, deploymentAccessor)»
«ENDFOR»
@@ -244,7 +244,7 @@ class FTypeGenerator {
def dispatch generateFTypeDeclaration(FTypeDef fTypeDef, PropertyAccessor deploymentAccessor) '''
«generateComments(fTypeDef, false)»
- typedef «fTypeDef.actualType.getElementType(null, true)» «fTypeDef.elementName»;
+ typedef «fTypeDef.actualType.getElementType(fTypeDef, false)» «fTypeDef.elementName»;
'''
def dispatch generateFTypeDeclaration(FArrayType fArrayType, PropertyAccessor deploymentAccessor) '''
@@ -577,7 +577,7 @@ class FTypeGenerator {
}
def void generateRequiredTypeIncludes(FInterface fInterface, Collection<String> generatedHeaders, Collection<String> libraryHeaders) {
- if (!fInterface.attributes.filter[array].nullOrEmpty) {
+ if (!fInterface.attributes.filter[array].nullOrEmpty) {
libraryHeaders.add('vector')
}
if (!fInterface.methods.map[inArgs.filter[array]].nullOrEmpty) {
@@ -594,6 +594,7 @@ class FTypeGenerator {
fInterface.methods.forEach[
inArgs.forEach[type.derived?.addRequiredHeaders(generatedHeaders, libraryHeaders)]
outArgs.forEach[type.derived?.addRequiredHeaders(generatedHeaders, libraryHeaders)]
+ errorEnum?.addRequiredHeaders(generatedHeaders, libraryHeaders)
]
fInterface.managedInterfaces.forEach[
generatedHeaders.add(stubHeaderPath)
@@ -682,9 +683,8 @@ class FTypeGenerator {
def private generateHasher(FMapType fMap) {
if (fMap.keyType.derived instanceof FEnumerationType) {
- return ''', CommonAPI::EnumHasher<«fMap.keyType.getElementType(null, true)»>'''
+ return ''', CommonAPI::EnumHasher<«fMap.keyType.derived.getFullName»>'''
}
-
return ""
}
@@ -692,8 +692,10 @@ class FTypeGenerator {
if (fMap.keyType.polymorphic) {
return "std::shared_ptr<" + fMap.keyType.getElementType(null, true) + ">"
}
- else {
- return fMap.keyType.getElementType(null, true)
+ if(fMap.keyType.derived != null) {
+ return fMap.keyType.derived.getFullName
+ } else {
+ return fMap.keyType.getElementType(null, true)
}
}
@@ -701,8 +703,10 @@ class FTypeGenerator {
if (fMap.valueType.polymorphic) {
return "std::shared_ptr<" + fMap.valueType.getElementType(null, true) + ">"
}
- else {
- return fMap.valueType.getElementType(null, true)
+ if(fMap.valueType.derived != null) {
+ return fMap.valueType.derived.getFullName
+ } else {
+ return fMap.valueType.getElementType(null, true)
}
}
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGenerator.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGenerator.xtend
index 55e12e1..5d48902 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGenerator.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGenerator.xtend
@@ -29,7 +29,6 @@ import org.franca.core.franca.FTypeCollection
import org.franca.core.franca.FTypeDef
import org.franca.core.franca.FTypeRef
import org.franca.core.franca.FUnionType
-import org.franca.deploymodel.core.FDModelExtender
import org.franca.deploymodel.core.FDeployedInterface
import org.franca.deploymodel.core.FDeployedTypeCollection
import org.franca.deploymodel.dsl.fDeploy.FDInterface
@@ -41,6 +40,7 @@ import org.genivi.commonapi.core.preferences.PreferenceConstants
import static com.google.common.base.Preconditions.*
import org.franca.deploymodel.dsl.fDeploy.FDModel
+import org.franca.deploymodel.core.FDModelExtender
class FrancaGenerator implements IGenerator
{
@@ -60,6 +60,7 @@ class FrancaGenerator implements IGenerator
var List<FDTypes> deployedTypeCollections
var List<FDProvider> deployedProviders
var IResource res = null
+ val String CORE_SPECIFICATION_TYPE = "core.deployment"
// load the model from a fidl file
if(input.URI.fileExtension.equals(francaPersistenceManager.fileExtension))
@@ -74,11 +75,20 @@ class FrancaGenerator implements IGenerator
var model = fDeployManager.loadModel(input.URI, input.URI);
if(model instanceof FDModel) {
val fModelExtender = new FDModelExtender(model);
- checkArgument(fModelExtender.getFDInterfaces().size > 0, "No Interfaces were deployed, nothing to generate.")
- fModel = fModelExtender.getFDInterfaces().get(0).target.model
- deployedInterfaces = fModelExtender.getFDInterfaces()
- deployedTypeCollections = fModelExtender.getFDTypesList()
- deployedProviders = fModelExtender.getFDProviders()
+ var fdinterfaces = fModelExtender.getFDInterfaces()
+ // we need at least one FDInterface to access the model !
+ if(fdinterfaces.size > 0) {
+ fModel = fdinterfaces.get(0).target.model
+ } else {
+ // empty deployment !
+ // try to load the fidl file from the imports of the fdpl
+ fModel = fDeployManager.getModelFromFdepl(model, input.URI)
+ }
+ checkArgument(fModel != null, "\nFailed to load the model from fdepl file,\ncannot generate code.")
+ // read deployment information
+ deployedInterfaces = getFDInterfaces(model, CORE_SPECIFICATION_TYPE)
+ deployedTypeCollections = getFDTypesList(model, CORE_SPECIFICATION_TYPE)
+ deployedProviders = getFDProviders(model, CORE_SPECIFICATION_TYPE)
} else if(model instanceof FModel) {
fModel = model
deployedInterfaces = new LinkedList<FDInterface>()
@@ -129,11 +139,11 @@ class FrancaGenerator implements IGenerator
val generateTypeCollections = fModel.typeCollections.toSet
generateTypeCollections.addAll(allFTypeTypeCollections)
- val generateInterfaces = fModel.allReferencedFInterfaces.toSet
- generateInterfaces.addAll(allFTypeFInterfaces)
+ val interfacesToGenerate = fModel.allReferencedFInterfaces.toSet
+ interfacesToGenerate.addAll(allFTypeFInterfaces)
val defaultDeploymentAccessor = new PropertyAccessor()
- generateInterfaces.forEach [
+ interfacesToGenerate.forEach [
val currentInterface = it
var PropertyAccessor deploymentAccessor
if (deployedInterfaces != null && deployedInterfaces.exists[it.target == currentInterface])
@@ -145,7 +155,7 @@ class FrancaGenerator implements IGenerator
{
deploymentAccessor = defaultDeploymentAccessor
}
- generate(it, fileSystemAccess, deploymentAccessor, res)
+ generateInterface(it, fileSystemAccess, deploymentAccessor, res)
]
generateTypeCollections.forEach [
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend
index 1f7ccfc..3eb9d6e 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FrancaGeneratorExtensions.xtend
@@ -54,6 +54,10 @@ import org.franca.core.franca.FTypedElement
import org.franca.core.franca.FUnionType
import org.franca.core.franca.FVersion
import org.franca.core.franca.FrancaFactory
+import org.franca.deploymodel.dsl.fDeploy.FDInterface
+import org.franca.deploymodel.dsl.fDeploy.FDModel
+import org.franca.deploymodel.dsl.fDeploy.FDTypes
+import org.franca.deploymodel.dsl.fDeploy.FDProvider
import org.genivi.commonapi.core.deployment.PropertyAccessor
import org.genivi.commonapi.core.deployment.PropertyAccessor.DefaultEnumBackingType
import org.genivi.commonapi.core.deployment.PropertyAccessor.EnumBackingType
@@ -65,6 +69,7 @@ import static com.google.common.base.Preconditions.*
import static extension java.lang.Integer.*
+
class FrancaGeneratorExtensions {
def boolean isComplex(String _typeName) {
@@ -323,6 +328,10 @@ class FrancaGeneratorExtensions {
def getStubClassName(FInterface fInterface) {
fInterface.elementName + 'Stub'
}
+
+ def getStubFullClassName(FInterface fInterface) {
+ fInterface.getFullName + 'Stub'
+ }
def hasAttributes(FInterface fInterface) {
!fInterface.attributes.empty
@@ -382,7 +391,7 @@ class FrancaGeneratorExtensions {
if (!fMethod.inArgs.empty)
signature = signature + ', '
- signature = signature + 'CommonAPI::CallStatus &_status'
+ signature = signature + 'CommonAPI::CallStatus &_internalCallStatus'
if (fMethod.hasError)
signature = signature + ', ' + fMethod.getErrorNameReference(fMethod.eContainer) + ' &_error'
@@ -721,6 +730,7 @@ class FrancaGeneratorExtensions {
for (outArg : fMethod.outArgs) {
mangledName = mangledName + outArg.type.mangledName
}
+ mangledName = mangledName + fMethod.errorEnum?.name
return baseName + mangledName.int16Hash
}
@@ -1466,6 +1476,14 @@ class FrancaGeneratorExtensions {
].join(',\n')
}
+ def generateSomeIPBaseInstantiations(FInterface _interface) {
+ val Set<FInterface> baseInterfaces = getBaseInterfaces(_interface)
+ return baseInterfaces.map[
+ getTypeCollectionName(_interface) +
+ "SomeIPProxy(_address, _connection)"
+ ].join(',\n')
+ }
+
def String generateBaseRemoteHandlerConstructorsCalls(FInterface _interface) {
val Set<FInterface> baseInterfaces = getBaseInterfaces(_interface)
var String itsCalls = ""
@@ -1645,7 +1663,7 @@ class FrancaGeneratorExtensions {
var EObject container = _me
while (container != null) {
if (container instanceof FTypeCollection) {
- prefix = (container as FTypeCollection).versionPrefix
+ prefix = container.versionPrefix
}
val containerName = getContainerName(container)
if (containerName != null && containerName != "") {
@@ -1734,4 +1752,89 @@ class FrancaGeneratorExtensions {
return elements
}
+ /**
+ * Get all interfaces from the deployment model that have a specification that contains
+ * the given selector string (e.g.: "dbus" for commonapi.dbus specification)
+ * @return the list of FDInterfaces
+ */
+ def List<FDInterface> getFDInterfaces(FDModel fdmodel, String selector) {
+ var List<FDInterface> fdinterfaces = new ArrayList<FDInterface>()
+
+ for(depl : fdmodel.getDeployments()) {
+ if (depl instanceof FDInterface) {
+ var specname = depl.spec.name
+ if(specname.contains(selector)) {
+ fdinterfaces.add(depl);
+ }
+ }
+ }
+ return fdinterfaces;
+ }
+
+ /**
+ * Get all type collections from the deployment model that have a specification that contains
+ * the given selector string (e.g.: "dbus" for commonapi.dbus specification)
+ * @return the list of FDTypes
+ */
+ def List<FDTypes> getFDTypesList(FDModel fdmodel, String selector) {
+ var List<FDTypes> fdTypes = new ArrayList<FDTypes>()
+
+ for(depl : fdmodel.getDeployments()) {
+ if (depl instanceof FDTypes) {
+ var specname = depl.spec?.name
+ if(specname.contains(selector)) {
+ fdTypes.add(depl);
+ }
+ }
+ }
+ return fdTypes;
+ }
+
+ /**
+ * Get all providers from the deployment model that have a specification that contains
+ * the given selector string (e.g.: "dbus" for commonapi.dbus specification)
+ * @return the list of FDTypes
+ */
+ def List<FDProvider> getFDProviders(FDModel fdmodel, String selector) {
+ var List<FDProvider> fdProviders = new ArrayList<FDProvider>()
+
+ for(depl : fdmodel.getDeployments()) {
+ if (depl instanceof FDProvider) {
+ var specname = depl.spec?.name
+ if(specname != null && specname.contains(selector)) {
+ fdProviders.add(depl);
+ }
+ }
+ }
+ return fdProviders;
+ }
+
+ /**
+ * Copy deployment attributes into the destination deployment
+ */
+ def mergeDeployments(FDInterface source, FDInterface destination) {
+
+ if(source.target.equals(destination.target)) {
+ if(source.attributes.size > 0) {
+ if( destination.attributes.size == 0) {
+ // e.g: attribute timeout
+ destination.attributes.addAll(source.attributes)
+ }
+ }
+ if(source.methods.size > 0) {
+ destination.methods.addAll(source.methods)
+ }
+ // e.g: EnumBackingType
+ if(source.types.size > 0) {
+ destination.types.addAll(source.types)
+ }
+// Not used so far:
+// if(source.broadcasts != null) {
+// destination.broadcasts.addAll(source.broadcasts)
+// }
+ } else {
+ throw new IllegalArgumentException("Cannot merge deployments for different interfaces \n(" + source.target + " != " + destination.target + ")!");
+ }
+ }
+
}
diff --git a/org.genivi.commonapi.releng/pom.xml b/org.genivi.commonapi.releng/pom.xml
index 8a660e6..3e1be03 100644
--- a/org.genivi.commonapi.releng/pom.xml
+++ b/org.genivi.commonapi.releng/pom.xml
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>commonapi</groupId>
<artifactId>org.genivi.commonapi.releng</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<tycho-version>0.22.0</tycho-version>
@@ -46,7 +46,7 @@
<artifact>
<groupId>commonapi</groupId>
<artifactId>${target.id}</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.3-SNAPSHOT</version>
</artifact>
</target>
<filters>