Skip to content

Commit

Permalink
CommonAPI-D-Bus-Tools 3.1.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
juergengehring committed Apr 7, 2017
1 parent 613e5ee commit 60a6889
Show file tree
Hide file tree
Showing 11 changed files with 464 additions and 382 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Changes
=======
v3.1.11.1
- Support deployment for anonymous arrays

v3.1.10
- Upgrade to JDK-1.8.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<?compositeArtifactRepository version='1.0.0'?>
<repository name='&quot;GENIVI CommonAPI 3.1 releases&quot;'
type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='1426002734609'/>
</properties>
<children size='3'>
<child location='content'/>
<child location='http://genivi.github.io/capicxx-core-tools/updatesite/'/>
<child location='http://franca.github.io/franca/update_site/releases/0.9.1'/>
</children>
</repository>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<?compositeMetadataRepository version='1.0.0'?>
<repository name='&quot;GENIVI CommonAPI 3.1 releases&quot;'
type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='1'>
<property name='p2.timestamp' value='1426002734609'/>
</properties>
<children size='3'>
<child location='content'/>
<child location='http://genivi.github.io/capicxx-core-tools/updatesite/'/>
<child location='http://franca.github.io/franca/update_site/releases/0.9.1'/>
</children>
</repository>
2 changes: 1 addition & 1 deletion org.genivi.commonapi.dbus.validator/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<page
class="org.genivi.commonapi.dbus.validator.preference.ValidatorDBusPreferencesPage"
id="org.genivi.commonapi.dbus.validator.preference"
name="Validator DBus">
name="CommonAPI-DBus Validator">
</page>
</extension>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,10 @@ public class ValidatorDBusUi extends ValidatorDBus {
@Override
public void validateModel(FModel model,
ValidationMessageAcceptor messageAcceptor) {
try {
if (!isValidatorEnabled()) {
return;
}
super.validateModel(model, messageAcceptor);
}
catch (Exception ex) {
ex.printStackTrace();
throw ex;
if (!isValidatorEnabled()) {
return;
}
super.validateModel(model, messageAcceptor);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ public void checkState() {
@Override
public void createFieldEditors() {
addField(new BooleanFieldEditor(PreferenceConstantsDBus.P_ENABLE_DBUS_VALIDATOR,
"validator enabled", getFieldEditorParent()));
"Enable CommonAPI-DBus specific validation of Franca IDL files", getFieldEditorParent()));
addField(new BooleanFieldEditor(
ENABLED_WORKSPACE_CHECK,
"enable the whole workspace check (Note: Validations takes up to two minutes if enabled)",
"Enable whole workspace check",
getFieldEditorParent()));
}

@Override
public void init(IWorkbench workbench) {
IPreferenceStore prefStore = CommonApiDBusUiPlugin.getValidatorPreferences();
setPreferenceStore(prefStore);
setDescription("Disable or enable the dbus validator!");
}

}
71 changes: 39 additions & 32 deletions org.genivi.commonapi.dbus.verification/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ SET(COMMONAPI_CMAKE_INSTALL_PATH "na" CACHE STRING "CommonAPI install path of th
SET(COMMONAPI_DBUS_CMAKE_INSTALL_PATH "na" CACHE STRING "CommonAPI-DBus install path of the cmake files")
SET(COMMONAPI_DBUS_TOOL_GENERATOR "na" CACHE STRING "CommonAPI-DBus-Tools generator install path")
SET(COMMONAPI_TEST_FIDL_PATH "na" CACHE STRING "Path to directory with test fidl files for code generation")
SET(COMMONAPI_SRC_GEN_DEST "src-gen" CACHE STRING "Path to the destination directory of the generated sources")

if("${COMMONAPI_DBUS_TOOL_GENERATOR}" STREQUAL "na")
message(FATAL_ERROR "The file path for the commonapi_dbus_generator needs to be specified! Use '-DCOMMONAPI_DBUS_TOOL_GENERATOR' to do so.")
Expand All @@ -54,6 +55,8 @@ else()
endif()
message("Build type: ${CMAKE_BUILD_TYPE}")

message("The path to the destination directory of the generated sources is set to: ${COMMONAPI_SRC_GEN_DEST}")

##############################################################################
# add COMMONAPI install path to cmake find root path

Expand Down Expand Up @@ -105,10 +108,10 @@ endif()
# generate code from fidl
file(GLOB FIDL_FILES "${COMMONAPI_TEST_FIDL_PATH}/*.fidl")
message("FIDL_FILES: ${FIDL_FILES}")
execute_process(COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -dest src-gen ${FIDL_FILES}
execute_process(COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -dest ${COMMONAPI_SRC_GEN_DEST} ${FIDL_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(COMMAND ${COMMONAPI_TOOL_GENERATOR} -dest src-gen ${FIDL_FILES}
execute_process(COMMAND ${COMMONAPI_TOOL_GENERATOR} -dest ${COMMONAPI_SRC_GEN_DEST} ${FIDL_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
##############################################################################
Expand Down Expand Up @@ -137,50 +140,54 @@ message("Compiler options: ${CMAKE_CXX_FLAGS}")

include_directories(
src
src-gen
${COMMONAPI_SRC_GEN_DEST}
${COMMONAPI_INCLUDE_DIRS}
${DBus_INCLUDE_DIRS}
${COMMONAPI_DBUS_INCLUDE_DIRS}
)

if ("${USE_INSTALLED_DBUS}" STREQUAL "OFF")
if ("${USE_INSTALLED_DBUS}" STREQUAL "ON")
link_directories(
${DBus_LIBRARY_DIRS}
)
else()
link_directories(
${DBus_INCLUDE_DIRS}/dbus/.libs
)
endif()

if (MSVC)
# source files
file(GLOB GLUE_SRCS "src-gen/v1/commonapi/runtime/*.cpp"
"src-gen/v1/commonapi/communication/*.cpp"
"src-gen/v1/commonapi/advanced/bselective/*.cpp"
"src-gen/v1/commonapi/advanced/managed/*.cpp"
"src-gen/v1/commonapi/advanced/extended/*.cpp"
"src-gen/v1/commonapi/advanced/polymorph/*.cpp"
"src-gen/v1/commonapi/datatypes/primitive/*.cpp"
"src-gen/v1/commonapi/datatypes/advanced/*.cpp"
"src-gen/v1/commonapi/datatypes/derived/*.cpp"
"src-gen/v1/commonapi/datatypes/combined/*.cpp"
"src-gen/v1/commonapi/threading/*.cpp"
"src-gen/v1/commonapi/performance/primitive/*.cpp"
"src-gen/v1/commonapi/performance/complex/*.cpp"
"src-gen/v1/commonapi/stability/sp/*.cpp")
file(GLOB GLUE_SRCS "${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/runtime/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/communication/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/bselective/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/managed/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/extended/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/polymorph/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/primitive/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/advanced/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/derived/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/combined/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/threading/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/performance/primitive/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/performance/complex/*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/stability/sp/*.cpp")
else()
# source files
file(GLOB GLUE_SRCS "src-gen/v1/commonapi/runtime/*DBus*.cpp"
"src-gen/v1/commonapi/communication/*DBus*.cpp"
"src-gen/v1/commonapi/advanced/bselective/*DBus*.cpp"
"src-gen/v1/commonapi/advanced/managed/*DBus*.cpp"
"src-gen/v1/commonapi/advanced/extended/*DBus*.cpp"
"src-gen/v1/commonapi/advanced/polymorph/*DBus*.cpp"
"src-gen/v1/commonapi/datatypes/primitive/*DBus*.cpp"
"src-gen/v1/commonapi/datatypes/advanced/*DBus*.cpp"
"src-gen/v1/commonapi/datatypes/derived/*DBus*.cpp"
"src-gen/v1/commonapi/datatypes/combined/*DBus*.cpp"
"src-gen/v1/commonapi/threading/*DBus*.cpp"
"src-gen/v1/commonapi/performance/primitive/*DBus*.cpp"
"src-gen/v1/commonapi/performance/complex/*DBus*.cpp"
"src-gen/v1/commonapi/stability/sp/*DBus*.cpp")
file(GLOB GLUE_SRCS "${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/runtime/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/communication/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/bselective/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/managed/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/extended/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/advanced/polymorph/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/primitive/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/advanced/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/derived/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/datatypes/combined/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/threading/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/performance/primitive/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/performance/complex/*DBus*.cpp"
"${COMMONAPI_SRC_GEN_DEST}/v1/commonapi/stability/sp/*DBus*.cpp")
endif()

# CommonAPI-DBus library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,27 +180,57 @@ class FInterfaceDBusDeploymentGenerator extends FTypeCollectionDBusDeploymentGen
def protected dispatch String generateDeploymentDefinition(FAttribute _attribute, FInterface _interface, PropertyAccessor _accessor) {
if (_accessor.hasSpecificDeployment(_attribute) || (_attribute.array && _accessor.hasDeployment(_attribute))) {
var String definition = _attribute.getDeploymentType(_interface, true) + " " + _attribute.name + "Deployment("
definition += _attribute.getDeploymentParameter(_attribute, _accessor)
var String definition = ""
if (_attribute.array) {
definition += _attribute.type.getDeploymentType(_interface, true) + " " + _attribute.name + "ElementDeployment("
definition += getDeploymentParameter(_attribute.type, _attribute, _accessor)
definition += ");\n";
}
definition += _attribute.getDeploymentType(_interface, true) + " " + _attribute.name + "Deployment("
if (_attribute.array) {
definition += "&" + _attribute.name + "ElementDeployment"
} else {
definition += _attribute.getDeploymentParameter(_attribute, _accessor)
}
definition += ");"
return definition
}
return ""
return ""
}
def protected String generateDeploymentDefinition(FArgument _argument, FMethod _method, FInterface _interface, PropertyAccessor _accessor) {
if (_accessor.hasSpecificDeployment(_argument) || (_argument.array && _accessor.hasDeployment(_argument))) {
var String definition = _argument.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "Deployment("
definition += _argument.getDeploymentParameter(_argument, _accessor)
var String definition = ""
if (_argument.array) {
definition += _argument.type.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "ElementDeployment("
definition += getDeploymentParameter(_argument.type, _argument, _accessor)
definition += ");\n";
}
definition += _argument.getDeploymentType(_interface, true) + " " + _method.name + "_" + _argument.name + "Deployment("
if (_argument.array) {
definition += "&" + _method.name + "_" + _argument.name + "ElementDeployment"
} else {
definition += _argument.getDeploymentParameter(_argument, _accessor)
}
definition += ");"
return definition
}
}
def protected String generateDeploymentDefinition(FArgument _argument, FBroadcast _broadcast, FInterface _interface, PropertyAccessor _accessor) {
if (_accessor.hasSpecificDeployment(_argument) || (_argument.array && _accessor.hasDeployment(_argument))) {
var String definition = _argument.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "Deployment("
definition += _argument.getDeploymentParameter(_argument, _accessor)
var String definition = ""
if (_argument.array) {
definition += _argument.type.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "ElementDeployment("
definition += getDeploymentParameter(_argument.type, _argument, _accessor)
definition += ");\n";
}
definition += _argument.getDeploymentType(_interface, true) + " " + _broadcast.name + "_" + _argument.name + "Deployment("
if (_argument.array) {
definition += "&" + _broadcast.name + "_" + _argument.name + "ElementDeployment"
} else {
definition += _argument.getDeploymentParameter(_argument, _accessor)
}
definition += ");"
return definition
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ class FInterfaceDBusStubAdapterGenerator {
«val PropertyAccessor providerAccessor = new PropertyAccessor(new FDeployedProvider(p))»
«FOR i : p.instances.filter[target == fInterface]»
CommonAPI::DBus::DBusAddressTranslator::get()->insert(
"local:«fInterface.fullyQualifiedNameWithVersion»»:«providerAccessor.getInstanceId(i)»",
"local:«fInterface.fullyQualifiedNameWithVersion»:«providerAccessor.getInstanceId(i)»",
"«providerAccessor.getDBusServiceName(i)»",
"«providerAccessor.getDBusObjectPath(i)»",
"«providerAccessor.getDBusInterfaceName(i)»");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,18 @@ class FTypeCollectionDBusDeploymentGenerator {
def protected dispatch String generateDeploymentDefinition(FField _field, FTypeCollection _tc, PropertyAccessor _accessor) {
if (_accessor.hasSpecificDeployment(_field)) {
var String definition = _field.getDeploymentType(null, false) + " " + _field.getRelativeName() + "Deployment("
definition += getDeploymentParameter(_field.type, _field, _accessor)
var String definition = "";
if (_field.array) {
definition += _field.type.getDeploymentType(null, false) + " " + _field.getRelativeName() + "ElementDeployment("
definition += getDeploymentParameter(_field.type, _field, _accessor)
definition += ");\n";
}
definition += _field.getDeploymentType(null, false) + " " + _field.getRelativeName() + "Deployment("
if (_field.array) {
definition += "&" + _field.getRelativeName() + "ElementDeployment"
} else {
definition += getDeploymentParameter(_field.type, _field, _accessor)
}
definition += ");\n"
return definition
}
Expand All @@ -352,16 +362,6 @@ class FTypeCollectionDBusDeploymentGenerator {
return ""
}
def protected dispatch String generateDeploymentDefinition(FAttribute _attribute, FTypeCollection _tc, PropertyAccessor _accessor) {
if (_accessor.hasSpecificDeployment(_attribute)) {
var String definition = _attribute.getDeploymentType(null, false) + " " + _attribute.name + "Deployment("
definition += _attribute.getDeploymentParameter(_attribute, _accessor)
definition += ");"
return definition
}
return ""
}
def protected dispatch String getDeploymentParameter(FArrayType _array, EObject _source, PropertyAccessor _accessor) {
var String parameter = getArrayElementTypeDeploymentParameter(_array.elementType, _array, _accessor)
var String arrayDeploymentParameter = getArrayDeploymentParameter(_array, _source, _accessor)
Expand Down
Loading

0 comments on commit 60a6889

Please sign in to comment.