From c6fbf117ee4bdee6743d0fe35a189104f47efd17 Mon Sep 17 00:00:00 2001 From: Jacob Keeler Date: Tue, 10 Jul 2018 13:57:52 -0400 Subject: Remove DBus from project --- tools/cmake/modules/FindDBus.cmake | 59 -- tools/cmake/modules/FindQt5DBus.cmake | 10 - tools/intergen/GenerateInterfaceLibrary.cmake | 10 +- tools/intergen/cppgen/CMakeLists.txt | 2 - .../cppgen/include/cppgen/generator_preferences.h | 5 +- .../include/cppgen/message_factory_function.h | 3 +- .../include/cppgen/struct_type_dbus_serializer.h | 88 -- .../src/cppgen/cpp_interface_code_generator.cc | 3 - .../cppgen/src/cppgen/declaration_generator.cc | 38 - .../cppgen/src/cppgen/definition_generator.cc | 29 - .../cppgen/src/cppgen/generator_preferences.cc | 9 +- .../cppgen/src/cppgen/message_factory_function.cc | 6 +- tools/intergen/cppgen/src/cppgen/module_manager.cc | 6 - .../src/cppgen/struct_type_dbus_serializer.cc | 177 ---- tools/intergen/test/CMakeLists.txt | 23 +- .../test/generated_interface_dbus_tests.cc | 127 --- tools/intergen/test/test_hmi_interface.xml | 1099 +++++++------------- tools/intergen/tool/intergen.cc | 7 - 18 files changed, 379 insertions(+), 1322 deletions(-) delete mode 100644 tools/cmake/modules/FindDBus.cmake delete mode 100644 tools/cmake/modules/FindQt5DBus.cmake delete mode 100644 tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h delete mode 100644 tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc delete mode 100644 tools/intergen/test/generated_interface_dbus_tests.cc (limited to 'tools') diff --git a/tools/cmake/modules/FindDBus.cmake b/tools/cmake/modules/FindDBus.cmake deleted file mode 100644 index 1d0f29dd75..0000000000 --- a/tools/cmake/modules/FindDBus.cmake +++ /dev/null @@ -1,59 +0,0 @@ -# - Try to find DBus -# Once done, this will define -# -# DBUS_FOUND - system has DBus -# DBUS_INCLUDE_DIRS - the DBus include directories -# DBUS_LIBRARIES - link these to use DBus -# -# Copyright (C) 2012 Raphael Kubo da Costa -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS -# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(PC_DBUS QUIET dbus-1) - -FIND_LIBRARY(DBUS_LIBRARIES - NAMES dbus-1 - HINTS ${PC_DBUS_LIBDIR} - ${PC_DBUS_LIBRARY_DIRS} -) - -FIND_PATH(DBUS_INCLUDE_DIR - NAMES dbus/dbus.h - HINTS ${PC_DBUS_INCLUDEDIR} - ${PC_DBUS_INCLUDE_DIRS} -) - -GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH) -FIND_PATH(DBUS_ARCH_INCLUDE_DIR - NAMES dbus/dbus-arch-deps.h - HINTS ${PC_DBUS_INCLUDEDIR} - ${PC_DBUS_INCLUDE_DIRS} - ${_DBUS_LIBRARY_DIR} - ${DBUS_INCLUDE_DIR} - PATH_SUFFIXES include -) - -SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR}) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES) \ No newline at end of file diff --git a/tools/cmake/modules/FindQt5DBus.cmake b/tools/cmake/modules/FindQt5DBus.cmake deleted file mode 100644 index d850010e97..0000000000 --- a/tools/cmake/modules/FindQt5DBus.cmake +++ /dev/null @@ -1,10 +0,0 @@ -execute_process( - COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} Qt5DBusConfig.cmake - OUTPUT_VARIABLE config_file -) - -if(config_file STREQUAL "") - message(FATAL_ERROR "Qt5 DBus module not found") -endif(config_file STREQUAL "") - -include(${config_file}) diff --git a/tools/intergen/GenerateInterfaceLibrary.cmake b/tools/intergen/GenerateInterfaceLibrary.cmake index bec35e1e3a..31b06880c6 100644 --- a/tools/intergen/GenerateInterfaceLibrary.cmake +++ b/tools/intergen/GenerateInterfaceLibrary.cmake @@ -11,20 +11,14 @@ set(GENERATED_LIB_HEADER_DEPENDENCIES # |generated_interface_names| should contain list of generated interfaces # if |AUTO_FUNC_IDS| is added to argument list, intergen is called with "-a" # flag telling intergen to generate function ids automatically -# if |DBUS_SUPPORT| is added to argument list, intergen is called with "-d" -# flag that enables DBus serialization code generation # from xml_file (intergen creates separate directory for every interface). # Their names are written lowercase_underscored_style. function (GenerateInterfaceLibrary xml_file_name generated_interface_names) - set(options AUTO_FUNC_IDS DBUS_SUPPORT) + set(options AUTO_FUNC_IDS) cmake_parse_arguments(GenerateInterfaceLibrary "${options}" "" "" ${ARGN}) if (GenerateInterfaceLibrary_AUTO_FUNC_IDS) set(AUTOID "-a") endif() - if (GenerateInterfaceLibrary_DBUS_SUPPORT) - set(NEED_DBUS "-d") - list(APPEND GENERATED_LIB_HEADER_DEPENDENCIES ${DBUS_INCLUDE_DIRS}) - endif() foreach(interface_name ${generated_interface_names}) set(HEADERS @@ -41,7 +35,7 @@ function (GenerateInterfaceLibrary xml_file_name generated_interface_names) ${interface_name}/interface.cc ) add_custom_command( OUTPUT ${HEADERS} ${SOURCES} - COMMAND ${INTERGEN_CMD} -f ${CMAKE_CURRENT_SOURCE_DIR}/${xml_file_name} -j ${AUTOID} ${NEED_DBUS} -i ${interface_name} + COMMAND ${INTERGEN_CMD} -f ${CMAKE_CURRENT_SOURCE_DIR}/${xml_file_name} -j ${AUTOID} -i ${interface_name} DEPENDS ${INTERGEN_CMD} ${xml_file_name} COMMENT "Generating interface ${interface_name} from ${xml_file_name}" VERBATIM diff --git a/tools/intergen/cppgen/CMakeLists.txt b/tools/intergen/cppgen/CMakeLists.txt index c6e052a2ae..d20f3d9ab3 100644 --- a/tools/intergen/cppgen/CMakeLists.txt +++ b/tools/intergen/cppgen/CMakeLists.txt @@ -27,7 +27,6 @@ set (SOURCES src/cppgen/namespace.cc src/cppgen/naming_convention.cc src/cppgen/struct_type_constructor.cc - src/cppgen/struct_type_dbus_serializer.cc src/cppgen/struct_type_from_json_method.cc src/cppgen/struct_type_is_initialized_method.cc src/cppgen/struct_type_is_valid_method.cc @@ -58,7 +57,6 @@ set (HEADERS include/cppgen/namespace.h include/cppgen/naming_convention.h include/cppgen/struct_type_constructor.h - include/cppgen/struct_type_dbus_serializer.h include/cppgen/struct_type_from_json_method.h include/cppgen/struct_type_is_initialized_method.h include/cppgen/struct_type_is_valid_method.h diff --git a/tools/intergen/cppgen/include/cppgen/generator_preferences.h b/tools/intergen/cppgen/include/cppgen/generator_preferences.h index 5278a24417..d0a58950e2 100644 --- a/tools/intergen/cppgen/include/cppgen/generator_preferences.h +++ b/tools/intergen/cppgen/include/cppgen/generator_preferences.h @@ -43,18 +43,15 @@ struct TypePreferences { int minimum_interger_size; bool avoid_unsigned; bool generate_json; - bool generate_dbus; TypePreferences(int minimum_interger_size, bool avoid_unsigned, - bool generate_json, - bool generate_dbus); + bool generate_json); }; struct Preferences { Preferences(int minimum_interger_size, bool avoid_unsigned, bool generate_json, - bool generate_dbus, const std::set& requested_interfaces); TypePreferences type_preferences; std::set requested_interfaces; diff --git a/tools/intergen/cppgen/include/cppgen/message_factory_function.h b/tools/intergen/cppgen/include/cppgen/message_factory_function.h index da63b4453a..aa8a0ab6c4 100644 --- a/tools/intergen/cppgen/include/cppgen/message_factory_function.h +++ b/tools/intergen/cppgen/include/cppgen/message_factory_function.h @@ -46,8 +46,7 @@ class Interface; class MessageFactoryFunction: public CppFunction { public: enum SerializationType { - kJson, - kDbus + kJson }; // Methods diff --git a/tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h b/tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h deleted file mode 100644 index 64872f3265..0000000000 --- a/tools/intergen/cppgen/include/cppgen/struct_type_dbus_serializer.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (c) 2014, Ford Motor Company - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following - * disclaimer in the documentation and/or other materials provided with the - * distribution. - * - * Neither the name of the Ford Motor Company nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef CPPGEN_STRUCT_TYPE_DBUS_SERIALIZER_H -#define CPPGEN_STRUCT_TYPE_DBUS_SERIALIZER_H - -#include "cppgen/cpp_function.h" - -namespace codegen { -class Interface; -class Struct; -class TypePreferences; - -class StructTypeDbusMessageSignatureMethod: public CppFunction { - public: - StructTypeDbusMessageSignatureMethod(const TypePreferences* preferences, - const Struct* strct, - bool substructure); - ~StructTypeDbusMessageSignatureMethod(); - private: - // CppFunction interface - void DefineBody(std::ostream* os) const; - private: - const TypePreferences* preferences_; - bool substructure_; - const Struct* strct_; -}; - -class StructTypeFromDbusReaderConstructor : public CppStructConstructor { - public: - StructTypeFromDbusReaderConstructor(const TypePreferences* preferences, - const Struct* strct, - bool substructure, - const std::string& base_class_name); - ~StructTypeFromDbusReaderConstructor(); - private: - // CppFunction interface - void DefineBody(std::ostream* os) const; - private: - const TypePreferences* preferences_; - bool substructure_; - const Struct* strct_; -}; - -class StructTypeToDbusWriterMethod : public CppFunction { - public: - StructTypeToDbusWriterMethod(const Struct* strct, - bool substructure); - ~StructTypeToDbusWriterMethod(); - private: - // CppFunction interface - void DefineBody(std::ostream* os) const; - private: - bool substructure_; - const Struct* strct_; -}; - -} // namespace codegen - -#endif // CPPGEN_STRUCT_TYPE_DBUS_SERIALIZER_H diff --git a/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc b/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc index 49bd758b6e..519e6a06e2 100644 --- a/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc +++ b/tools/intergen/cppgen/src/cppgen/cpp_interface_code_generator.cc @@ -183,9 +183,6 @@ void CppInterfaceCodeGenerator::GenerateMessageFactories() { if (preferences_->generate_json) { ser_types[ser_types_count++] = MessageFactoryFunction::kJson; } - if (preferences_->generate_dbus) { - ser_types[ser_types_count++] = MessageFactoryFunction::kDbus; - } for (size_t i = 0; i < ser_types_count; ++i) { MessageFactoryFunction request_factory(interface_, diff --git a/tools/intergen/cppgen/src/cppgen/declaration_generator.cc b/tools/intergen/cppgen/src/cppgen/declaration_generator.cc index 46e459198e..649ffd8c68 100644 --- a/tools/intergen/cppgen/src/cppgen/declaration_generator.cc +++ b/tools/intergen/cppgen/src/cppgen/declaration_generator.cc @@ -47,7 +47,6 @@ #include "cppgen/module_manager.h" #include "cppgen/naming_convention.h" #include "cppgen/struct_type_constructor.h" -#include "cppgen/struct_type_dbus_serializer.h" #include "cppgen/struct_type_from_json_method.h" #include "cppgen/struct_type_is_initialized_method.h" #include "cppgen/struct_type_is_valid_method.h" @@ -98,14 +97,6 @@ void DeclareExternalTypes(const TypePreferences& prefs, Namespace* ns) { Namespace::ForwardDeclaration( Namespace::ForwardDeclaration::kClass, "Value")); } - if (prefs.generate_dbus) { - ns->nested("dbus").ForwardDeclare( - Namespace::ForwardDeclaration( - Namespace::ForwardDeclaration::kClass, "MessageReader")); - ns->nested("dbus").ForwardDeclare( - Namespace::ForwardDeclaration( - Namespace::ForwardDeclaration::kClass, "MessageWriter")); - } } } @@ -172,13 +163,6 @@ void DeclarationGenerator::GenerateCodeForStruct(const Struct* strct) { StructTypeFromJsonConstructor(strct, base_class_name).Declare(&o , true); StructTypeToJsonMethod(strct).Declare(&o , true); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor( - preferences_, strct, true, base_class_name).Declare(&o, true); - StructTypeToDbusWriterMethod(strct, true).Declare(&o , true); - StructTypeDbusMessageSignatureMethod(preferences_, - strct, true).Declare(&o, true); - } StructTypeIsValidMethod(strct).Declare(&o, true); StructTypeIsInitializedMethod(strct).Declare(&o, true); StructTypeStructEmptyMethod(strct).Declare(&o, true); @@ -284,13 +268,6 @@ void DeclarationGenerator::GenerateCodeForRequest(const Request& request, StructTypeFromJsonConstructor(&request, base_class_name).Declare(&o , true); StructTypeToJsonMethod(&request).Declare(&o , true); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, &request, false, - base_class_name).Declare(&o, true); - StructTypeToDbusWriterMethod(&request, false).Declare(&o , true); - StructTypeDbusMessageSignatureMethod(preferences_, - &request, false).Declare(&o, true); - } StructTypeIsValidMethod(&request).Declare(&o, true); StructTypeIsInitializedMethod(&request).Declare(&o, true); StructTypeStructEmptyMethod(&request).Declare(&o, true); @@ -336,14 +313,6 @@ void DeclarationGenerator::GenerateCodeForResponse(const Response& response) { StructTypeToJsonMethod(&response).Declare(&o , true); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, &response, false, - base_class_name).Declare(&o, true); - StructTypeToDbusWriterMethod(&response, false).Declare(&o , true); - - StructTypeDbusMessageSignatureMethod(preferences_, - &response, false).Declare(&o, true); - } StructTypeIsValidMethod(&response).Declare(&o, true); StructTypeIsInitializedMethod(&response).Declare(&o, true); StructTypeStructEmptyMethod(&response).Declare(&o, true); @@ -389,13 +358,6 @@ void DeclarationGenerator::GenerateCodeForNotification( StructTypeFromJsonConstructor(¬ification, base_class_name).Declare(&o , true); StructTypeToJsonMethod(¬ification).Declare(&o , true); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, ¬ification, false, - base_class_name).Declare(&o , true); - StructTypeToDbusWriterMethod(¬ification, false).Declare(&o , true); - StructTypeDbusMessageSignatureMethod(preferences_, - ¬ification, false).Declare(&o, true); - } StructTypeIsValidMethod(¬ification).Declare(&o, true); StructTypeIsInitializedMethod(¬ification).Declare(&o, true); StructTypeStructEmptyMethod(¬ification).Declare(&o, true); diff --git a/tools/intergen/cppgen/src/cppgen/definition_generator.cc b/tools/intergen/cppgen/src/cppgen/definition_generator.cc index e2ad0ded04..b5e404fa71 100644 --- a/tools/intergen/cppgen/src/cppgen/definition_generator.cc +++ b/tools/intergen/cppgen/src/cppgen/definition_generator.cc @@ -40,7 +40,6 @@ #include "cppgen/message_handle_with_method.h" #include "cppgen/module_manager.h" #include "cppgen/struct_type_constructor.h" -#include "cppgen/struct_type_dbus_serializer.h" #include "cppgen/struct_type_from_json_method.h" #include "cppgen/struct_type_is_initialized_method.h" #include "cppgen/struct_type_is_valid_method.h" @@ -97,13 +96,6 @@ void DefinitionGenerator::GenerateCodeForStruct(const Struct* strct) { StructTypeFromJsonConstructor(strct, base_class_name).Define(&o , false); StructTypeToJsonMethod(strct).Define(&o , false); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, strct, true, - base_class_name).Define(&o , false); - StructTypeToDbusWriterMethod(strct, true).Define(&o , false); - StructTypeDbusMessageSignatureMethod(preferences_, - strct, true).Define(&o, false); - } StructTypeIsValidMethod(strct).Define(&o, false); StructTypeIsInitializedMethod(strct).Define(&o, false); StructTypeStructEmptyMethod(strct).Define(&o, false); @@ -137,13 +129,6 @@ void DefinitionGenerator::GenerateCodeForResponse(const Response& response) { StructTypeFromJsonConstructor(&response, base_class_name).Define(&o , false); StructTypeToJsonMethod(&response).Define(&o , false); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, &response, false, - base_class_name).Define(&o , false); - StructTypeToDbusWriterMethod(&response, false).Define(&o , false); - StructTypeDbusMessageSignatureMethod(preferences_, - &response, false).Define(&o, false); - } MessageHandleWithMethod(response.name()).Define(&o, false); StructTypeIsValidMethod(&response).Define(&o, false); StructTypeIsInitializedMethod(&response).Define(&o, false); @@ -173,13 +158,6 @@ void DefinitionGenerator::GenerateCodeForNotification( StructTypeFromJsonConstructor(¬ification, base_class_name).Define(&o , false); StructTypeToJsonMethod(¬ification).Define(&o , false); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, ¬ification, false, - base_class_name).Define(&o, false); - StructTypeToDbusWriterMethod(¬ification, false).Define(&o , false); - StructTypeDbusMessageSignatureMethod(preferences_, - ¬ification, false).Define(&o, false); - } MessageHandleWithMethod(notification.name()).Define(&o, false); StructTypeIsValidMethod(¬ification).Define(&o, false); StructTypeIsInitializedMethod(¬ification).Define(&o, false); @@ -209,13 +187,6 @@ void DefinitionGenerator::GenerateCodeForRequest(const Request& request, StructTypeFromJsonConstructor(&request, base_class_name).Define(&o , false); StructTypeToJsonMethod(&request).Define(&o , false); } - if (preferences_->generate_dbus) { - StructTypeFromDbusReaderConstructor(preferences_, &request, false, - base_class_name).Define(&o , false); - StructTypeToDbusWriterMethod(&request, false).Define(&o , false); - StructTypeDbusMessageSignatureMethod(preferences_, - &request, false).Define(&o, false); - } StructTypeIsValidMethod(&request).Define(&o, false); StructTypeIsInitializedMethod(&request).Define(&o, false); StructTypeStructEmptyMethod(&request).Define(&o, false); diff --git a/tools/intergen/cppgen/src/cppgen/generator_preferences.cc b/tools/intergen/cppgen/src/cppgen/generator_preferences.cc index ca5b12e2d9..cc3bbe0819 100644 --- a/tools/intergen/cppgen/src/cppgen/generator_preferences.cc +++ b/tools/intergen/cppgen/src/cppgen/generator_preferences.cc @@ -44,21 +44,18 @@ namespace codegen { TypePreferences::TypePreferences(int minimum_interger_size, bool avoid_unsigned, - bool generate_json, - bool generate_dbus) + bool generate_json) : minimum_interger_size(minimum_interger_size), avoid_unsigned(avoid_unsigned), - generate_json(generate_json), - generate_dbus(generate_dbus) { + generate_json(generate_json) { } Preferences::Preferences(int minimum_interger_size, bool avoid_unsigned, bool generate_json, - bool generate_dbus, const std::set& requested_interfaces) : type_preferences(minimum_interger_size, avoid_unsigned, - generate_json, generate_dbus), + generate_json), requested_interfaces(requested_interfaces) { } diff --git a/tools/intergen/cppgen/src/cppgen/message_factory_function.cc b/tools/intergen/cppgen/src/cppgen/message_factory_function.cc index 2cfc3ea0cd..bce7ef50b2 100644 --- a/tools/intergen/cppgen/src/cppgen/message_factory_function.cc +++ b/tools/intergen/cppgen/src/cppgen/message_factory_function.cc @@ -47,15 +47,15 @@ MessageFactoryFunction::MessageFactoryFunction( SerializationType serialization_type, FunctionMessage::MessageType factory_type) : CppFunction("", - serialization_type == kJson ? "NewFromJson" : "NewFromDbus", + "NewFromJson", Capitalize( FunctionMessage::MessageTypeToString( factory_type)) + "*"), interface_(interface), factory_type_(factory_type) { Add(MessageFactoryFunction::Parameter( - serialization_type == kJson ? "json" : "reader", - serialization_type == kJson ? "const Json::Value*": "dbus::MessageReader*")); + "json", + "const Json::Value*")); Add(MessageFactoryFunction::Parameter("function_id", "FunctionID")); } diff --git a/tools/intergen/cppgen/src/cppgen/module_manager.cc b/tools/intergen/cppgen/src/cppgen/module_manager.cc index 494e279e5c..104e3fa856 100644 --- a/tools/intergen/cppgen/src/cppgen/module_manager.cc +++ b/tools/intergen/cppgen/src/cppgen/module_manager.cc @@ -105,12 +105,6 @@ ModuleManager::ModuleManager(const std::string& name, functions_source_.Include( CppFile::Header("rpc_base/rpc_base_json_inl.h", true)); } - if (prefs.generate_dbus) { - structs_source_.Include( - CppFile::Header("rpc_base/rpc_base_dbus_inl.h", true)); - functions_source_.Include( - CppFile::Header("rpc_base/rpc_base_dbus_inl.h", true)); - } } ModuleManager::~ModuleManager() { diff --git a/tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc b/tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc deleted file mode 100644 index 5040652e43..0000000000 --- a/tools/intergen/cppgen/src/cppgen/struct_type_dbus_serializer.cc +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright (c) 2014, Ford Motor Company - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following - * disclaimer in the documentation and/or other materials provided with the - * distribution. - * - * Neither the name of the Ford Motor Company nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "cppgen/struct_type_dbus_serializer.h" - -#include "cppgen/naming_convention.h" -#include "cppgen/type_name_code_generator.h" -#include "model/composite_type.h" -#include "utils/safeformat.h" - -using typesafe_format::strmfmt; - -namespace codegen { - -StructTypeDbusMessageSignatureMethod::StructTypeDbusMessageSignatureMethod( - const TypePreferences* preferences, - const Struct* strct, - bool substructure) - : CppFunction(strct->name(), "GetDbusSignature", "void", kStatic), - preferences_(preferences), - substructure_(substructure), - strct_(strct) { - Add(Parameter("signature", "std::string*")); -} - -StructTypeDbusMessageSignatureMethod::~StructTypeDbusMessageSignatureMethod() { -} - -void StructTypeDbusMessageSignatureMethod::DefineBody(std::ostream* os) const { - const Struct::FieldsList& fields = strct_->fields(); - if (!fields.empty()) { - if (substructure_) { - *os << "(*signature) += DBUS_STRUCT_BEGIN_CHAR;\n"; - } - for (Struct::FieldsList::const_iterator i = fields.begin(), - end = fields.end(); i != end; ++i) { - // Field is considered optional if it has mandatory=false attribute and - // if it does NOT have default values. Fields that have default values are - // always available no mater if they present in input or not - bool field_is_optional = false; - if (!i->is_mandatory()) { - if (i->default_value() == NULL) { - field_is_optional = true; - } - } - std::string field_type = RpcTypeNameGenerator(&strct_->interface(), - preferences_, - i->type(), - field_is_optional).result(); - strmfmt(*os, "rpc::DbusSignature< {0} >({1});\n", - field_type, parameters_[0].name); - - } - if (substructure_) { - *os << "(*signature) += DBUS_STRUCT_END_CHAR;\n"; - } - } -} - -StructTypeFromDbusReaderConstructor::StructTypeFromDbusReaderConstructor( - const TypePreferences* preferences, - const Struct* strct, - bool substructure, - const std::string& base_class_name) - : CppStructConstructor(strct->name()), - preferences_(preferences), - strct_(strct), - substructure_(substructure) { - Add(Parameter("reader__", "dbus::MessageReader*")); - std::string base_initializer = "reader__"; - if (!strct->frankenstruct()) { - base_initializer = "InitHelper(true)"; - } - Add(Initializer(base_class_name, base_initializer)); - // In case of non-substructure use initializer list to initialize fields - // From MessageReader passed in - if (!substructure_) { - const Struct::FieldsList& fields = strct->fields(); - for (Struct::FieldsList::const_iterator i = fields.begin(), end = fields.end(); - i != end; ++i) { - Add(Initializer(AvoidKeywords(i->name()), - "reader__")); - } - } -} - -StructTypeFromDbusReaderConstructor::~StructTypeFromDbusReaderConstructor() { -} - -void StructTypeFromDbusReaderConstructor::DefineBody(std::ostream* os) const { - const Struct::FieldsList& fields = strct_->fields(); - // If initializing substructure (a structure that is used as - // a field of other structure) additional structure reading iterator - // should be created - if (substructure_ && !fields.empty()) { - *os << "dbus::MessageReader subreader__ = reader__->TakeStructReader();\n"; - for (Struct::FieldsList::const_iterator i = fields.begin(), end = fields.end(); - i != end; ++i) { - // Field is considered optional if it has mandatory=false attribute and - // if it does NOT have default values. Fields that have default values are - // always available no mater if they present in input or not - bool field_is_optional = false; - if (!i->is_mandatory()) { - if (i->default_value() == NULL) { - field_is_optional = true; - } - } - std::string field_type = RpcTypeNameGenerator(&strct_->interface(), - preferences_, - i->type(), - field_is_optional).result(); - strmfmt(*os, "{0} = {1}(&subreader__);\n", i->name(), field_type); - } - } -} - -StructTypeToDbusWriterMethod::StructTypeToDbusWriterMethod( - const Struct* strct, - bool substructure) - : CppFunction(strct->name(), "ToDbusWriter", "void", kConst), - substructure_(substructure), - strct_(strct) { - Add(Parameter("writer__", "dbus::MessageWriter*")); -} - -StructTypeToDbusWriterMethod::~StructTypeToDbusWriterMethod() { - -} - -void StructTypeToDbusWriterMethod::DefineBody(std::ostream* os) const { - const Struct::FieldsList& fields = strct_->fields(); - if (!fields.empty()) { - std::string writer_ptr_name = parameters_[0].name; - if (substructure_) { - strmfmt(*os, "dbus::MessageWriter subwriter__({0}, dbus::kStruct, NULL);\n", - writer_ptr_name); - writer_ptr_name = "&subwriter__"; - } - for (Struct::FieldsList::const_iterator i = fields.begin(), end = fields.end(); - i != end; ++i) { - strmfmt(*os, "{0}.ToDbusWriter({1});\n", - i->name(), - writer_ptr_name); - } - } -} - - -} // namespace codegen diff --git a/tools/intergen/test/CMakeLists.txt b/tools/intergen/test/CMakeLists.txt index f2973dd71c..7695ec419c 100644 --- a/tools/intergen/test/CMakeLists.txt +++ b/tools/intergen/test/CMakeLists.txt @@ -30,11 +30,7 @@ if(BUILD_TESTS) include(${CMAKE_SOURCE_DIR}/tools/intergen/GenerateInterfaceLibrary.cmake) -if (${HMI_DBUS_API}) - GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface DBUS_SUPPORT) -else() - GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface) -endif() +GenerateInterfaceLibrary("test_interface.xml" test_rpc_interface) set (TEST_HMI_INTERFACES common @@ -45,11 +41,7 @@ set (TEST_HMI_INTERFACES ui ) -if (${HMI_DBUS_API}) - GenerateInterfaceLibrary("test_hmi_interface.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS DBUS_SUPPORT) -else() - GenerateInterfaceLibrary("test_hmi_interface.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS) -endif() +GenerateInterfaceLibrary("test_hmi_interface.xml" "${TEST_HMI_INTERFACES}" AUTO_FUNC_IDS) include_directories ( ${CMAKE_SOURCE_DIR}/src/components/rpc_base/include @@ -70,16 +62,5 @@ set (SOURCES generated_interface_json_tests.cc ) -if (${HMI_DBUS_API}) - # Build dbus tests - include_directories( - ${CMAKE_SOURCE_DIR}/src/components/dbus/include - ${DBUS_INCLUDE_DIRS} - ) - set (LIBRARIES ${LIBRARIES} DBus) - set (SOURCES ${SOURCES} generated_interface_dbus_tests.cc) -endif () - - create_test(test_generated_interface "${SOURCES}" "${LIBRARIES}") endif() diff --git a/tools/intergen/test/generated_interface_dbus_tests.cc b/tools/intergen/test/generated_interface_dbus_tests.cc deleted file mode 100644 index a510ccd77a..0000000000 --- a/tools/intergen/test/generated_interface_dbus_tests.cc +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2015, Ford Motor Company - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following - * disclaimer in the documentation and/or other materials provided with the - * distribution. - * - * Neither the name of the Ford Motor Company nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "gmock/gmock.h" - -#include -#include - -#include "dbus/dbus_message.h" - -namespace test { -using namespace rpc::test_rpc_interface; - -TEST(GeneratedInterfaceDbusTests, TestFailedDbusDeserialization) { - dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)); - { - dbus::MessageWriter writer(msg); - } - { - dbus::MessageReader reader(msg); - request::DiagnosticMessage dm(&reader); - ASSERT_TRUE(reader.has_failed()); - ASSERT_TRUE(dm.is_initialized()); - ASSERT_FALSE(dm.is_valid()); - } -} - -TEST(GeneratedInterfaceDbusTests, TestDbusDeserialization) { - dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)); - { - dbus::MessageWriter writer(msg); - writer.PutUint16(22); - writer.PutUint16(42); - dbus::MessageWriter array_writer(&writer, dbus::kArray, DBUS_TYPE_BYTE_AS_STRING); - array_writer.PutByte(11); - } - { - dbus::MessageReader reader(msg); - request::DiagnosticMessage dm(&reader); - ASSERT_FALSE(reader.has_failed()); - ASSERT_FALSE(reader.HasNext()); - ASSERT_TRUE(dm.is_initialized()); - ASSERT_TRUE(dm.is_valid()); - ASSERT_EQ(dm.targetID, 22); - ASSERT_EQ(dm.messageLength, 42); - ASSERT_EQ(dm.messageData.size(), 1u); - } -} - -TEST(GeneratedInterfaceDbusTests, TestDbusSerializationDeserialization) { - dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)); - { - dbus::MessageWriter writer(msg); - request::DiagnosticMessage dm; - dm.targetID = 70; - dm.messageLength = 1; - dm.messageData.push_back(42); - dm.ToDbusWriter(&writer); - } - { - dbus::MessageReader reader(msg); - request::DiagnosticMessage dm(&reader); - ASSERT_FALSE(reader.has_failed()); - ASSERT_FALSE(reader.HasNext()); - ASSERT_TRUE(dm.is_initialized()); - ASSERT_TRUE(dm.is_valid()); - ASSERT_EQ(dm.targetID, 70); - ASSERT_EQ(dm.messageLength, 1); - ASSERT_EQ(dm.messageData.size(), 1u); - ASSERT_EQ(dm.messageData[0], 42u); - } -} - -TEST(GeneratedInterfaceDbusTests, TestDbusAddSubMenuSerializatioDeserialization) { - dbus::MessageRef msg(dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL)); - { - dbus::MessageWriter writer(msg); - notification::DummyNotification dn; - TdStruct tds; - tds.resArrMap["Hello"].push_back(R_SUCCESS); - (*tds.optionalResArrMap)["World"].push_back(R_INVALID_DATA); - dn.tds.push_back(tds); - ASSERT_TRUE(dn.is_valid()); - dn.ToDbusWriter(&writer); - } - { - dbus::MessageReader reader(msg); - notification::DummyNotification dn(&reader); - ASSERT_TRUE(dn.is_initialized()); - ASSERT_TRUE(dn.is_valid()); - ASSERT_FALSE(reader.has_failed()); - ASSERT_FALSE(reader.HasNext()); - ASSERT_EQ(dn.tds[0].resArrMap["Hello"][0], R_SUCCESS); - ASSERT_EQ((*dn.tds[0].optionalResArrMap)["World"][0], R_INVALID_DATA); - } -} - -} // namespace test diff --git a/tools/intergen/test/test_hmi_interface.xml b/tools/intergen/test/test_hmi_interface.xml index 16f2892327..c8d0a789e0 100644 --- a/tools/intergen/test/test_hmi_interface.xml +++ b/tools/intergen/test/test_hmi_interface.xml @@ -2777,938 +2777,573 @@ - - - - - ID of application requested this RPC. - - - - + + + Subscribes for specific published data items. + The data will be only sent if it has changed. + The application will be notified by the onVehicleData notification whenever new data is available. + To unsubscribe the notifications, use unsubscribe with the same subscriptionType. + + See GPSData - - - - - ID of application requested this RPC. - - - - + The vehicle speed in kilometers per hour - - - - - ID of application requested this RPC. - - - - + The number of revolutions per minute of the engine - - - - - ID of application requested this RPC. - - - - + The fuel level in the tank (percentage) - - - - - ID of application requested this RPC. - - - - + The fuel level state - - - - - ID of application requested this RPC. - - - - + The instantaneous fuel consumption in microlitres - - - - - ID of application requested this RPC. - - - - + The external temperature in degrees celsius - - - - - ID of application requested this RPC. - - - - - Vehicle identification number - - - - - - ID of application requested this RPC. - - - - + See PRNDL - - - - - ID of application requested this RPC. - - - - + See TireStatus - - - - - ID of application requested this RPC. - - - - + Odometer in km - - - - - ID of application requested this RPC. - - - - + The status of the seat belts - - - - - ID of application requested this RPC. - - - - + The body information including power modes - - - - - ID of application requested this RPC. - - - - + The device status including signal and battery strength - - - - - ID of application requested this RPC. - - - - + The status of the brake pedal - - - - - ID of application requested this RPC. - - - - + The status of the wipers - - - - - ID of application requested this RPC. - - - - + Status of the head lamps - - - - - ID of application requested this RPC. - - - - + Torque value for engine (in Nm) on non-diesel variants - - - - - ID of application requested this RPC. - - - - + Accelerator pedal position (percentage depressed) - - - - - ID of application requested this RPC. - - - - + Current angle of the steering wheel (in deg) - - - - - ID of application requested this RPC. + + The estimated percentage of remaining oil life of the engine. - - - + + Emergency Call notification and confirmation data - - - - - ID of application requested this RPC. - - - - + The status of the air bags - - - - - ID of application requested this RPC. - - - - + Information related to an emergency event (and if it occurred) - - - - - ID of application requested this RPC. - - - - + The status modes of the cluster - - - - - ID of application requested this RPC. - - - - + Information related to the MyKey feature + - - - - - + + See GPSData - - - - + The vehicle speed in kilometers per hour - - - - + The number of revolutions per minute of the engine - - - - + The fuel level in the tank (percentage) - - - - + The fuel level state - - - - + The instantaneous fuel consumption in microlitres - - - - - The external temperature in degrees celsius - - - - - - Vehicle identification number. + + The external temperature in degrees celsius. - - - - + See PRNDL - - - - + See TireStatus - - - - + Odometer in km - - - - + The status of the seat belts - - - - + The body information including power modes - - - - + The device status including signal and battery strength - - - - + The status of the brake pedal - - - - + The status of the wipers - - - - + Status of the head lamps - - - - + Torque value for engine (in Nm) on non-diesel variants - - - - + Accelerator pedal position (percentage depressed) - - - - + Current angle of the steering wheel (in deg) - - - - - Information related to the MyKey feature - - - - - - - - ID of application requested this RPC. + + The estimated percentage of remaining oil life of the engine. - - - - See GPSData + + + Emergency Call notification and confirmation data - - - - ID of application requested this RPC. + + The status of the air bags - - - - See GPSData + + Information related to an emergency event (and if it occurred) - - - - - ID of application requested this RPC. + + The status modes of the cluster - - - - The vehicle speed in kilometers per hour + + Information related to the MyKey feature + - + + + This function is used to unsubscribe the notifications from the subscribeVehicleData function. + - ID of application requested this RPC. + ID of application that requested this RPC. - - - - The vehicle speed in kilometers per hour + + See GPSData - - - - - ID of application requested this RPC. + + The vehicle speed in kilometers per hour - - - + The number of revolutions per minute of the engine - - - - ID of application requested this RPC. + + The fuel level in the tank (percentage) - - - - The number of revolutions per minute of the engine + + The fuel level state - - - - - ID of application requested this RPC. + + The instantaneous fuel consumption in microlitres - - - - The fuel level in the tank (percentage) + + The external temperature in degrees celsius. - - - - ID of application requested this RPC. + + See PRNDL - - - - The fuel level in the tank (percentage) + + See TireStatus - - - - - ID of application requested this RPC. + + Odometer in km - - - - The fuel level state + + The status of the seat belts - - - - ID of application requested this RPC. + + The body information including power modes - - - - The fuel level state + + The device status including signal and battery strength - - - - - ID of application requested this RPC. + + The status of the brake pedal - - - - The instantaneous fuel consumption in microlitres + + The status of the wipers - - - - ID of application requested this RPC. + + Status of the head lamps - - - - The instantaneous fuel consumption in microlitres + + Torque value for engine (in Nm) on non-diesel variants - - - - - ID of application requested this RPC. + + Accelerator pedal position (percentage depressed) - - - - The external temperature in degrees celsius + + Current angle of the steering wheel (in deg) - - - - ID of application requested this RPC. + + The estimated percentage of remaining oil life of the engine. - - - - The external temperature in degrees celsius + + + Emergency Call notification and confirmation data - - - - - ID of application requested this RPC. + + The status of the air bags - - - - See PRNDL + + Information related to an emergency event (and if it occurred) - - - - ID of application requested this RPC. + + The status modes of the cluster - - - - See PRNDL + + Information related to the MyKey feature + - - - - ID of application requested this RPC. + + + See GPSData - - - - Vehicle identification number + + The vehicle speed in kilometers per hour - - - - ID of application requested this RPC. + + The number of revolutions per minute of the engine - - - - Vehicle identification number + + The fuel level in the tank (percentage) - - - - - ID of application requested this RPC. + + The fuel level state - - - - See TireStatus + + The instantaneous fuel consumption in microlitres - - - - ID of application requested this RPC. + + The external temperature in degrees celsius - - - - See TireStatus + + See PRNDL - - - - - ID of application requested this RPC. + + See TireStatus - - - + Odometer in km - - - - ID of application requested this RPC. + + The status of the seat belts - - - - Odometer in km + + The body information including power modes - - - - - ID of application requested this RPC. + + The device status including signal and battery strength - - - - The status of the seat belts + + The status of the brake pedal - - - - ID of application requested this RPC. + + The status of the wipers - - - - The status of the seat belts + + Status of the head lamps - - - - - ID of application requested this RPC. + + Torque value for engine (in Nm) on non-diesel variants - - - - The body information including power modes + + Accelerator pedal position (percentage depressed) - - - - ID of application requested this RPC. + + Current angle of the steering wheel (in deg) - - - - The body information including power modes + + The estimated percentage of remaining oil life of the engine. - - - - - ID of application requested this RPC. + + + Emergency Call notification and confirmation data - - - - The device status including signal and battery strength + + The status of the air bags - - - - ID of application requested this RPC. + + Information related to an emergency event (and if it occurred) - - - - The device status including signal and battery strength + + The status modes of the cluster - - - - - ID of application requested this RPC. + + Information related to the MyKey feature + - - - The status of the brake pedal + + Non periodic vehicle data read request. + + See GPSData - - - - ID of application requested this RPC. + + The vehicle speed in kilometers per hour - - - - The status of the brake pedal + + The number of revolutions per minute of the engine - - - - - ID of application requested this RPC. + + The fuel level in the tank (percentage) - - - - The status of the wipers + + The fuel level state - - - - ID of application requested this RPC. + + The instantaneous fuel consumption in microlitres - - - - The status of the wipers + + The external temperature in degrees celsius - - - - - ID of application requested this RPC. + + Vehicle identification number - - - - Status of the head lamps + + See PRNDL - - - - ID of application requested this RPC. + + See TireStatus - - - - Status of the head lamps + + Odometer in km - - - - - ID of application requested this RPC. + + The status of the seat belts - - - - Torque value for engine (in Nm) on non-diesel variants + + The body information including ignition status and internal temp - - - - ID of application requested this RPC. + + The device status including signal and battery strength - - - - Torque value for engine (in Nm) on non-diesel variants + + The status of the brake pedal - - - - - ID of application requested this RPC. + + The status of the wipers - - - - Accelerator pedal position (percentage depressed) + + Status of the head lamps - - - - ID of application requested this RPC. + + Torque value for engine (in Nm) on non-diesel variants - - - + Accelerator pedal position (percentage depressed) - - - - - ID of application requested this RPC. - - - - + Current angle of the steering wheel (in deg) - - - - ID of application requested this RPC. + + The estimated percentage of remaining oil life of the engine. + + + Emergency Call notification and confirmation data + + + The status of the air bags + + + Information related to an emergency event (and if it occurred) + + + The status modes of the cluster + + + Information related to the MyKey feature - - + + + See GPSData + + + The vehicle speed in kilometers per hour + + + The number of revolutions per minute of the engine + + + The fuel level in the tank (percentage) + + + The fuel level state + + + The instantaneous fuel consumption in microlitres + + + The external temperature in degrees celsius + + + Vehicle identification number + + + See PRNDL + + + See TireStatus + + + Odometer in km + + + The status of the seat belts + + + The body information including power modes + + + The device status including signal and battery strength + + + The status of the brake pedal + + + The status of the wipers + + + Status of the head lamps + + + Torque value for engine (in Nm) on non-diesel variants + + + Accelerator pedal position (percentage depressed) + + Current angle of the steering wheel (in deg) - - - - - ID of application requested this RPC. + + The estimated percentage of remaining oil life of the engine. - - - + Emergency Call notification and confirmation data - - - - ID of application requested this RPC. + + The status of the air bags - - - - Emergency Call notification and confirmation data + + Information related to an emergency event (and if it occurred) - - - - - ID of application requested this RPC. + + The status modes of the cluster - - - - The status of the air bags + + Information related to the MyKey feature - - - ID of application requested this RPC. + + Callback for the periodic and non periodic vehicle data read function. + + See GPSData - - - - The status of the air bags + + The vehicle speed in kilometers per hour - - - - - ID of application requested this RPC. + + The number of revolutions per minute of the engine - - - - Information related to an emergency event (and if it occurred) + + The fuel level in the tank (percentage) - - - - ID of application requested this RPC. + + The fuel level state - - - - Information related to an emergency event (and if it occurred) + + The instantaneous fuel consumption in microlitres - - - - - ID of application requested this RPC. + + The external temperature in degrees celsius - - - - The status modes of the cluster + + Vehicle identification number. - - - - ID of application requested this RPC. + + See PRNDL - - - - The status modes of the cluster + + See TireStatus - - - - - ID of application requested this RPC. + + Odometer in km - - - - Information related to the MyKey feature + + The status of the seat belts - - - - ID of application requested this RPC. + + The body information including power modes - - - + + The device status including signal and battery strength + + + The status of the brake pedal + + + The status of the wipers + + + Status of the head lamps + + + Torque value for engine (in Nm) on non-diesel variants + + + Accelerator pedal position (percentage depressed) + + + Current angle of the steering wheel (in deg) + + + Emergency Call notification and confirmation data + + + The status of the air bags + + + Information related to an emergency event (and if it occurred) + + + The status modes of the cluster + + Information related to the MyKey feature - diff --git a/tools/intergen/tool/intergen.cc b/tools/intergen/tool/intergen.cc index bad87b178b..8fc8302dcc 100644 --- a/tools/intergen/tool/intergen.cc +++ b/tools/intergen/tool/intergen.cc @@ -54,7 +54,6 @@ struct Options { char* interface_xml; bool auto_generate_function_ids; bool generate_json_code; - bool generate_dbus_code; std::set requested_interfaces; std::set excluded_scopes; bool avoid_unsigned; @@ -63,7 +62,6 @@ struct Options { : interface_xml(NULL), auto_generate_function_ids(false), generate_json_code(false), - generate_dbus_code(false), avoid_unsigned(false), minimum_word_size(8) { } @@ -138,10 +136,6 @@ int main(int argc, char* argv[]) { options.generate_json_code = true; break; } - case 'd': { - options.generate_dbus_code = true; - break; - } default: { cerr << "Invalid option: '" << opt << "'" << '\n'; return EXIT_FAILURE; @@ -165,7 +159,6 @@ int main(int argc, char* argv[]) { codegen::Preferences(options.minimum_word_size, options.avoid_unsigned, options.generate_json_code, - options.generate_dbus_code, options.requested_interfaces)); if (bad.empty()) { return EXIT_SUCCESS; -- cgit v1.2.1