From e440ae310cba1f5fd0a955a2a3195b7e08b3f6a4 Mon Sep 17 00:00:00 2001 From: Juergen Gehring Date: Fri, 7 Apr 2017 01:47:44 -0700 Subject: [PATCH] CommonAPI-D-Bus-Tools 3.1.11.2 --- CHANGES | 3 +++ .../doit.sh | 19 +++++++++++++++++++ .../FInterfaceDBusDeploymentGenerator.xtend | 6 +++--- ...ypeCollectionDBusDeploymentGenerator.xtend | 10 +++++----- 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100755 org.genivi.commonapi.dbus.verification/doit.sh diff --git a/CHANGES b/CHANGES index 1a10492..7929f96 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes ======= +v3.1.11.2 +- Export deployment data + v3.1.11.1 - Support deployment for anonymous arrays diff --git a/org.genivi.commonapi.dbus.verification/doit.sh b/org.genivi.commonapi.dbus.verification/doit.sh new file mode 100755 index 0000000..f88a65a --- /dev/null +++ b/org.genivi.commonapi.dbus.verification/doit.sh @@ -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 \ No newline at end of file diff --git a/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FInterfaceDBusDeploymentGenerator.xtend b/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FInterfaceDBusDeploymentGenerator.xtend index 17962f6..f45b316 100644 --- a/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FInterfaceDBusDeploymentGenerator.xtend +++ b/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FInterfaceDBusDeploymentGenerator.xtend @@ -161,20 +161,20 @@ class FInterfaceDBusDeploymentGenerator extends FTypeCollectionDBusDeploymentGen def protected dispatch String generateDeploymentDeclaration(FAttribute _attribute, FInterface _interface, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_attribute) || (_attribute.array && _accessor.hasDeployment(_attribute))) { - return "extern " + _attribute.getDeploymentType(_interface, true) + " " + _attribute.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _attribute.getDeploymentType(_interface, true) + " " + _attribute.name + "Deployment;" } return "" } def protected String generateDeploymentDeclaration(FArgument _argument, FMethod _method, FInterface _interface, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_argument) || (_argument.array && _accessor.hasDeployment(_argument))) { - return "extern " + _argument.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _argument.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "Deployment;" } } def protected String generateDeploymentDeclaration(FArgument _argument, FBroadcast _broadcast, FInterface _interface, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_argument) || (_argument.array && _accessor.hasDeployment(_argument))) { - return "extern " + _argument.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "Deployment;" + return "COMMONAPI_EXPORT extern " + _argument.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "Deployment;" } } diff --git a/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FTypeCollectionDBusDeploymentGenerator.xtend b/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FTypeCollectionDBusDeploymentGenerator.xtend index b9c1288..f28baa0 100644 --- a/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FTypeCollectionDBusDeploymentGenerator.xtend +++ b/org.genivi.commonapi.dbus/src/org/genivi/commonapi/dbus/generator/FTypeCollectionDBusDeploymentGenerator.xtend @@ -223,7 +223,7 @@ class FTypeCollectionDBusDeploymentGenerator { def protected dispatch String generateDeploymentDeclaration(FArrayType _array, FTypeCollection _tc, PropertyAccessor _accessor) { if (_accessor.hasDeployment(_array)) { return _array.elementType.generateDeploymentDeclaration(_tc, _accessor) + - "extern " + _array.getDeploymentType(null, false) + " " + _array.name + "Deployment;" + "COMMONAPI_EXPORT extern " + _array.getDeploymentType(null, false) + " " + _array.name + "Deployment;" } return "" } @@ -236,7 +236,7 @@ class FTypeCollectionDBusDeploymentGenerator { if (_accessor.hasDeployment(_map)) { return _map.keyType.generateDeploymentDeclaration(_tc, _accessor) + _map.valueType.generateDeploymentDeclaration(_tc, _accessor) + - "extern " + _map.getDeploymentType(null, false) + " " + _map.name + "Deployment;" + "COMMONAPI_EXPORT extern " + _map.getDeploymentType(null, false) + " " + _map.name + "Deployment;" } } @@ -249,7 +249,7 @@ class FTypeCollectionDBusDeploymentGenerator { for (structElement : _struct.elements) { declaration += structElement.generateDeploymentDeclaration(_tc, _accessor) } - declaration += "extern " + _struct.getDeploymentType(null, false) + " " + _struct.name + "Deployment;" + declaration += "COMMONAPI_EXPORT extern " + _struct.getDeploymentType(null, false) + " " + _struct.name + "Deployment;" return declaration + "\n" } return "" @@ -261,7 +261,7 @@ class FTypeCollectionDBusDeploymentGenerator { for (structElement : _union.elements) { declaration += structElement.generateDeploymentDeclaration(_tc, _accessor) } - declaration += "extern " + _union.getDeploymentType(null, false) + " " + _union.name + "Deployment;" + declaration += "COMMONAPI_EXPORT extern " + _union.getDeploymentType(null, false) + " " + _union.name + "Deployment;" return declaration + "\n" } return "" @@ -269,7 +269,7 @@ class FTypeCollectionDBusDeploymentGenerator { def protected dispatch String generateDeploymentDeclaration(FField _field, FTypeCollection _tc, PropertyAccessor _accessor) { if (_accessor.hasSpecificDeployment(_field)) { - return "extern " + _field.getDeploymentType(null, false) + " " + _field.getRelativeName() + "Deployment;\n" + return "COMMONAPI_EXPORT extern " + _field.getDeploymentType(null, false) + " " + _field.getRelativeName() + "Deployment;\n" } return "" }