Skip to content

Commit

Permalink
capicxx-dbus-tools 3.1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
juergengehring committed Jan 25, 2018
1 parent 2e4d3f3 commit 128d4d0
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 49 deletions.
43 changes: 0 additions & 43 deletions .gitattributes

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changes
=======

v3.1.12.1
- support 'lock functors' in AttributeDispatcher(s)

v3.1.12
- Add support for Unix FD type in DBus
- Fix compiler warnings in generated code
Expand Down
19 changes: 19 additions & 0 deletions org.genivi.commonapi.dbus.verification/doit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
rm -rf src-gen
rm -rf build
mkdir build
cd build/

export PKG_CONFIG_PATH=$(readlink -f ../../../ascgit017.CommonAPI-D-Bus/patched-dbus/lib/pkgconfig/)
export LD_LIBRARY_PATH=$(readlink -f ../../../ascgit017.CommonAPI-D-Bus/patched-dbus/lib)
export LIBRARY_PATH=$(readlink -f ../../../ascgit017.CommonAPI-D-Bus/patched-dbus/lib)

cmake \
-DCOMMONAPI_TOOL_GENERATOR=$(readlink -f ../../../ascgit017.CommonAPI-Tools/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/x86_64/commonapi-generator-linux-x86_64) \
-DCOMMONAPI_DBUS_TOOL_GENERATOR=$(readlink -f ../../../ascgit017.CommonAPI-D-Bus-Tools/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/x86_64/commonapi-dbus-generator-linux-x86_64) \
-DCommonAPI_DIR=$(readlink -f ../../../ascgit017.CommonAPI/build) \
-DCommonAPI-DBus_DIR=$(readlink -f ../../../ascgit017.CommonAPI-D-Bus/build) \
-DCOMMONAPI_TEST_FIDL_PATH=$(readlink -f ../../../ascgit017.CommonAPI-Tools/org.genivi.commonapi.core.verification/fidl) \
..

make
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class FInterfaceDBusStubAdapterGenerator {
CommonAPI::DBus::DBusGetAttributeStubDispatcher<
«fInterface.stubFullClassName»,
CommonAPI::Version
> «fInterface.dbusStubAdapterClassNameInternal»<_Stub, _Stubs...>::get«fInterface.elementName»InterfaceVersionStubDispatcher(&«fInterface.stubClassName»::getInterfaceVersion, "uu");
> «fInterface.dbusStubAdapterClassNameInternal»<_Stub, _Stubs...>::get«fInterface.elementName»InterfaceVersionStubDispatcher(&«fInterface.stubClassName»::lockInterfaceVersionAttribute, &«fInterface.stubClassName»::getInterfaceVersion, "uu");

«FOR attribute : fInterface.attributes»
«generateAttributeDispatcherDefinitions(attribute, fInterface, deploymentAccessor)»
Expand Down Expand Up @@ -611,6 +611,7 @@ class FInterfaceDBusStubAdapterGenerator {
«typeName»«IF deploymentType != "CommonAPI::EmptyDeployment" && deploymentType != ""»,
«deploymentType»«ENDIF»
> «fInterface.dbusStubAdapterClassNameInternal»<_Stub, _Stubs...>::«fAttribute.dbusGetStubDispatcherVariable»(
&«fInterface.stubFullClassName»::«fAttribute.stubClassLockMethodName»,
&«fInterface.stubFullClassName»::«fAttribute.stubClassGetMethodName»
«IF deploymentAccessor.getPropertiesType(fInterface)!=PropertyAccessor.PropertiesType.freedesktop», "«fAttribute.dbusSignature(deploymentAccessor)»"«ENDIF»
«IF deploymentAccessor.hasDeployment(fAttribute)», «fAttribute.getDeploymentRef(fAttribute.array, null, fInterface, deploymentAccessor)»«ENDIF»
Expand All @@ -622,6 +623,7 @@ class FInterfaceDBusStubAdapterGenerator {
«typeName»«IF deploymentType != "CommonAPI::EmptyDeployment" && deploymentType != ""»,
«deploymentType»«ENDIF»
> «fInterface.dbusStubAdapterClassNameInternal»<_Stub, _Stubs...>::«fAttribute.dbusSetStubDispatcherVariable»(
&«fInterface.stubFullClassName»::«fAttribute.stubClassLockMethodName»,
&«fInterface.stubFullClassName»::«fAttribute.stubClassGetMethodName»,
&«fInterface.stubRemoteEventClassName»::«fAttribute.stubRemoteEventClassSetMethodName»,
&«fInterface.stubRemoteEventClassName»::«fAttribute.stubRemoteEventClassChangedMethodName»
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ private void buildAllInfo(String path) {
File folder = new File(path);
for (File file : folder.listFiles()) {
if (file.isDirectory()) {
if (!(file.getName().equals("bin") || file.equals(".settings")))
buildAllInfo(path + "/" + file.getName());
String directoryName = file.getName();
if (!(directoryName.equals("bin") || directoryName.equals(".settings")))
buildAllInfo(path + "/" + directoryName);
}
if (file.isFile()) {
if (file.getName().endsWith(".fidl")) {
Expand Down
15 changes: 13 additions & 2 deletions test/src/DBusCommunicationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,14 @@ TEST_F(DBusCommunicationTest, RemoteAsyncMethodCallWithErrorReply) {
errorReplyResponseReceived = true;
});

for(unsigned int i = 0; !errorReplyResponseReceived && i < 100; ++i) {
for(unsigned int i = 0; !errorReplyEventReceived && i < 100; ++i) {
std::this_thread::sleep_for(std::chrono::microseconds(10000));
}

ASSERT_TRUE(errorReplyEventReceived);

for(unsigned int i = 0; !errorReplyResponseReceived && i < 100; ++i) {
std::this_thread::sleep_for(std::chrono::microseconds(10000));
}
ASSERT_TRUE(errorReplyResponseReceived);
}

Expand Down Expand Up @@ -278,7 +281,15 @@ TEST_F(DBusCommunicationTest, RemoteAsyncMethodCallWithErrorReplyProxyBecomesAva
std::this_thread::sleep_for(std::chrono::microseconds(20000));
}
ASSERT_TRUE(defaultTestProxy->isAvailable());

for(unsigned int i = 0; !errorReplyEventReceived && i < 100; ++i) {
std::this_thread::sleep_for(std::chrono::microseconds(10000));
}
ASSERT_TRUE(errorReplyEventReceived);

for(unsigned int i = 0; !errorReplyResponseReceived && i < 100; ++i) {
std::this_thread::sleep_for(std::chrono::microseconds(10000));
}
ASSERT_TRUE(errorReplyResponseReceived);
}

Expand Down

0 comments on commit 128d4d0

Please sign in to comment.