diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2018-07-12 13:32:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-12 13:32:52 -0700 |
commit | 7911d4a89a46651168ff69b5eb1c859464d40685 (patch) | |
tree | a6108b6502b53f2f942e00d32138d31b40ec31a1 /tools/intergen | |
parent | c3179ce99d1bb664fe84078243e46a0de358b88b (diff) | |
parent | 0e70eea7754b5724ef910319cca7ec624c7c756e (diff) | |
download | sdl_core-feature/remove_auto_ptr.tar.gz |
Merge branch 'develop' into feature/remove_auto_ptrfeature/remove_auto_ptr
Diffstat (limited to 'tools/intergen')
16 files changed, 377 insertions, 1251 deletions
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<std::string>& requested_interfaces); TypePreferences type_preferences; std::set<std::string> 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<std::string>& 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 <test_rpc_interface/interface.h> -#include <test_rpc_interface/functions.h> - -#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 @@ </description> </param> </function> - -<!--Qt HMI version of GetVehicleData--> - <function name="GetGpsData" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetGpsData" messagetype="response"> - <param name="gps" type="Common.GPSData" mandatory="true"> + <function name="SubscribeVehicleData" messagetype="request"> + <description> + 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. + </description> + <param name="gps" type="Boolean" mandatory="false"> <description>See GPSData</description> </param> - </function> - - <function name="GetSpeed" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetSpeed" messagetype="response"> - <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true"> + <param name="speed" type="Boolean" mandatory="false"> <description>The vehicle speed in kilometers per hour</description> </param> - </function> - - <function name="GetRpm" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetRpm" messagetype="response"> - <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true"> + <param name="rpm" type="Boolean" mandatory="false"> <description>The number of revolutions per minute of the engine</description> </param> - </function> - - <function name="GetFuelLevel" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetFuelLevel" messagetype="response"> - <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true"> + <param name="fuelLevel" type="Boolean" mandatory="false"> <description>The fuel level in the tank (percentage)</description> </param> - </function> - - <function name="GetFuelLevelState" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetFuelLevelState" messagetype="response"> - <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true"> + <param name="fuelLevel_State" type="Boolean" mandatory="false"> <description>The fuel level state</description> </param> - </function> - - <function name="GetInstantFuelConsumption" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetInstantFuelConsumption" messagetype="response"> - <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true"> + <param name="instantFuelConsumption" type="Boolean" mandatory="false"> <description>The instantaneous fuel consumption in microlitres</description> </param> - </function> - - <function name="GetExternalTemperature" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetExternalTemperature" messagetype="response"> - <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true"> + <param name="externalTemperature" type="Boolean" mandatory="false"> <description>The external temperature in degrees celsius</description> </param> - </function> - - <function name="GetVin" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetVin" messagetype="response"> - <param name="vin" type="String" maxlength="17" mandatory="true"> - <description>Vehicle identification number</description> - </param> - </function> - - <function name="GetPrndl" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetPrndl" messagetype="response"> - <param name="prndl" type="Common.PRNDL" mandatory="true"> + <param name="prndl" type="Boolean" mandatory="false"> <description>See PRNDL</description> </param> - </function> - - <function name="GetTirePressure" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetTirePressure" messagetype="response"> - <param name="tirePressure" type="Common.TireStatus" mandatory="true"> + <param name="tirePressure" type="Boolean" mandatory="false"> <description>See TireStatus</description> </param> - </function> - - <function name="GetOdometer" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetOdometer" messagetype="response"> - <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="true"> + <param name="odometer" type="Boolean" mandatory="false"> <description>Odometer in km</description> </param> - </function> - - <function name="GetBeltStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetBeltStatus" messagetype="response"> - <param name="beltStatus" type="Common.BeltStatus" mandatory="true"> + <param name="beltStatus" type="Boolean" mandatory="false"> <description>The status of the seat belts</description> </param> - </function> - - <function name="GetBodyInformation" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetBodyInformation" messagetype="response"> - <param name="bodyInformation" type="Common.BodyInformation" mandatory="true"> + <param name="bodyInformation" type="Boolean" mandatory="false"> <description>The body information including power modes</description> </param> - </function> - - <function name="GetDeviceStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetDeviceStatus" messagetype="response"> - <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true"> + <param name="deviceStatus" type="Boolean" mandatory="false"> <description>The device status including signal and battery strength</description> </param> - </function> - - <function name="GetDriverBraking" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetDriverBraking" messagetype="response"> - <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true"> + <param name="driverBraking" type="Boolean" mandatory="false"> <description>The status of the brake pedal</description> </param> - </function> - - <function name="GetWiperStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetWiperStatus" messagetype="response"> - <param name="wiperStatus" type="Common.WiperStatus" mandatory="true"> + <param name="wiperStatus" type="Boolean" mandatory="false"> <description>The status of the wipers</description> </param> - </function> - - <function name="GetHeadLampStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetHeadLampStatus" messagetype="response"> - <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true"> + <param name="headLampStatus" type="Boolean" mandatory="false"> <description>Status of the head lamps</description> </param> - </function> - - <function name="GetEngineTorque" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetEngineTorque" messagetype="response"> - <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true"> + <param name="engineTorque" type="Boolean" mandatory="false"> <description>Torque value for engine (in Nm) on non-diesel variants</description> </param> - </function> - - <function name="GetAccPedalPosition" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetAccPedalPosition" messagetype="response"> - <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true"> + <param name="accPedalPosition" type="Boolean" mandatory="false"> <description>Accelerator pedal position (percentage depressed)</description> </param> - </function> - - <function name="GetSteeringWheelAngle" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetSteeringWheelAngle" messagetype="response"> - <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true"> + <param name="steeringWheelAngle" type="Boolean" mandatory="false"> <description>Current angle of the steering wheel (in deg)</description> </param> - </function> - - <function name="GetECallInfo" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="engineOilLife" type="Boolean" mandatory="false"> + <description>The estimated percentage of remaining oil life of the engine.</description> </param> - </function> - <function name="GetECallInfo" messagetype="response"> - <param name="eCallInfo" type="Common.ECallInfo" mandatory="true"> + <!-- Ford Specific Data Items --> + <param name="eCallInfo" type="Boolean" mandatory="false"> <description>Emergency Call notification and confirmation data</description> </param> - </function> - - <function name="GetAirbagStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetAirbagStatus" messagetype="response"> - <param name="airbagStatus" type="Common.AirbagStatus" mandatory="true"> + <param name="airbagStatus" type="Boolean" mandatory="false"> <description>The status of the air bags</description> </param> - </function> - - <function name="GetEmergencyEvent" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetEmergencyEvent" messagetype="response"> - <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="true"> + <param name="emergencyEvent" type="Boolean" mandatory="false"> <description>Information related to an emergency event (and if it occurred)</description> </param> - </function> - - <function name="GetClusterModeStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetClusterModeStatus" messagetype="response"> - <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="true"> + <param name="clusterModeStatus" type="Boolean" mandatory="false"> <description>The status modes of the cluster</description> </param> - </function> - - <function name="GetMyKey" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> - </param> - </function> - <function name="GetMyKey" messagetype="response"> - <param name="myKey" type="Common.MyKey" mandatory="true"> + <param name="myKey" type="Boolean" mandatory="false"> <description>Information related to the MyKey feature</description> </param> + <!-- / Ford Specific Data Items --> </function> -<!--end Qt HMI version of GetVehicleData--> - -<!--Qt HMI version of OnVehicleData--> - <function name="OnGpsData" messagetype="notification"> - <param name="gps" type="Common.GPSData" mandatory="true"> + <function name="SubscribeVehicleData" messagetype="response"> + <param name="gps" type="Common.VehicleDataResult" mandatory="false"> <description>See GPSData</description> </param> - </function> - - <function name="OnSpeed" messagetype="notification"> - <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="true"> + <param name="speed" type="Common.VehicleDataResult" mandatory="false"> <description>The vehicle speed in kilometers per hour</description> </param> - </function> - - <function name="OnRpm" messagetype="notification"> - <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="true"> + <param name="rpm" type="Common.VehicleDataResult" mandatory="false"> <description>The number of revolutions per minute of the engine</description> </param> - </function> - - <function name="OnFuelLevel" messagetype="notification"> - <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="true"> + <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false"> <description>The fuel level in the tank (percentage)</description> </param> - </function> - - <function name="OnFuelLevelState" messagetype="notification"> - <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="true"> + <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false"> <description>The fuel level state</description> </param> - </function> - - <function name="OnInstantFuelConsumption" messagetype="notification"> - <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="true"> + <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false"> <description>The instantaneous fuel consumption in microlitres</description> </param> - </function> - - <function name="OnExternalTemperature" messagetype="notification"> - <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="true"> - <description>The external temperature in degrees celsius</description> - </param> - </function> - - <function name="OnVin" messagetype="notification"> - <param name="vin" type="String" maxlength="17" mandatory="true"> - <description>Vehicle identification number.</description> + <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false"> + <description>The external temperature in degrees celsius.</description> </param> - </function> - - <function name="OnPrndl" messagetype="notification"> - <param name="prndl" type="Common.PRNDL" mandatory="true"> + <param name="prndl" type="Common.VehicleDataResult" mandatory="false"> <description>See PRNDL</description> </param> - </function> - - <function name="OnTirePressure" messagetype="notification"> - <param name="tirePressure" type="Common.TireStatus" mandatory="true"> + <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false"> <description>See TireStatus</description> </param> - </function> - - <function name="OnOdometer" messagetype="notification"> - <param name="odometer" type="Integer" minvalue="0" maxvalue="2000000" mandatory="true"> + <param name="odometer" type="Common.VehicleDataResult" mandatory="false"> <description>Odometer in km</description> </param> - </function> - - <function name="OnBeltStatus" messagetype="notification"> - <param name="beltStatus" type="Common.BeltStatus" mandatory="true"> + <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false"> <description>The status of the seat belts</description> </param> - </function> - - <function name="OnBodyInformation" messagetype="notification"> - <param name="bodyInformation" type="Common.BodyInformation" mandatory="true"> + <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false"> <description>The body information including power modes</description> </param> - </function> - - <function name="OnDeviceStatus" messagetype="notification"> - <param name="deviceStatus" type="Common.DeviceStatus" mandatory="true"> + <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false"> <description>The device status including signal and battery strength</description> </param> - </function> - - <function name="OnDriverBraking" messagetype="notification"> - <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="true"> + <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false"> <description>The status of the brake pedal</description> </param> - </function> - - <function name="OnWiperStatus" messagetype="notification"> - <param name="wiperStatus" type="Common.WiperStatus" mandatory="true"> + <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false"> <description>The status of the wipers</description> </param> - </function> - - <function name="OnHeadLampStatus" messagetype="notification"> - <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="true"> + <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false"> <description>Status of the head lamps</description> </param> - </function> - - <function name="OnEngineTorque" messagetype="notification"> - <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="true"> + <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false"> <description>Torque value for engine (in Nm) on non-diesel variants</description> </param> - </function> - - <function name="OnAccPedalPosition" messagetype="notification"> - <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="true"> + <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false"> <description>Accelerator pedal position (percentage depressed)</description> </param> - </function> - - <function name="OnSteeringWheelAngle" messagetype="notification"> - <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="true"> + <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false"> <description>Current angle of the steering wheel (in deg)</description> </param> - </function> - - <function name="OnMyKey" messagetype="notification"> - <param name="myKey" type="Common.MyKey" mandatory="true"> + <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false"> + <description>The estimated percentage of remaining oil life of the engine.</description> + </param> + <!-- Ford Specific Data Items --> + <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false"> + <description>Emergency Call notification and confirmation data</description> + </param> + <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false"> + <description>The status of the air bags</description> + </param> + <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false"> + <description>Information related to an emergency event (and if it occurred)</description> + </param> + <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false"> + <description>The status modes of the cluster</description> + </param> + <param name="myKey" type="Common.VehicleDataResult" mandatory="false"> <description>Information related to the MyKey feature</description> </param> + <!-- / Ford Specific Data Items --> </function> -<!--end Qt HMI version of OnVehicleData--> - -<!--Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData--> - <function name="SubscribeGps" messagetype="request"> + <function name="UnsubscribeVehicleData" messagetype="request"> + <description> + This function is used to unsubscribe the notifications from the subscribeVehicleData function. + </description> <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <description>ID of application that requested this RPC.</description> </param> - </function> - <function name="SubscribeGps" messagetype="response"> - <param name="gps" type="Common.VehicleDataResult" mandatory="true"> + <param name="gps" type="Boolean" mandatory="false"> <description>See GPSData</description> </param> - </function> - <function name="UnsubscribeGps" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="speed" type="Boolean" mandatory="false"> + <description>The vehicle speed in kilometers per hour</description> </param> - </function> - <function name="UnsubscribeGps" messagetype="response"> - <param name="gps" type="Common.VehicleDataResult" mandatory="true"> - <description>See GPSData</description> + <param name="rpm" type="Boolean" mandatory="false"> + <description>The number of revolutions per minute of the engine</description> </param> - </function> - - <function name="SubscribeSpeed" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="fuelLevel" type="Boolean" mandatory="false"> + <description>The fuel level in the tank (percentage)</description> </param> - </function> - <function name="SubscribeSpeed" messagetype="response"> - <param name="speed" type="Common.VehicleDataResult" mandatory="true"> - <description>The vehicle speed in kilometers per hour</description> + <param name="fuelLevel_State" type="Boolean" mandatory="false"> + <description>The fuel level state</description> </param> - </function> - <function name="UnsubscribeSpeed" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="instantFuelConsumption" type="Boolean" mandatory="false"> + <description>The instantaneous fuel consumption in microlitres</description> </param> - </function> - <function name="UnsubscribeSpeed" messagetype="response"> - <param name="speed" type="Common.VehicleDataResult" mandatory="true"> - <description>The vehicle speed in kilometers per hour</description> + <param name="externalTemperature" type="Boolean" mandatory="false"> + <description>The external temperature in degrees celsius.</description> </param> - </function> - - <function name="SubscribeRpm" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="prndl" type="Boolean" mandatory="false"> + <description>See PRNDL</description> </param> - </function> - <function name="SubscribeRpm" messagetype="response"> - <param name="rpm" type="Common.VehicleDataResult" mandatory="true"> - <description>The number of revolutions per minute of the engine</description> + <param name="tirePressure" type="Boolean" mandatory="false"> + <description>See TireStatus</description> </param> - </function> - <function name="UnsubscribeRpm" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="odometer" type="Boolean" mandatory="false"> + <description>Odometer in km</description> </param> - </function> - <function name="UnsubscribeRpm" messagetype="response"> - <param name="rpm" type="Common.VehicleDataResult" mandatory="true"> - <description>The number of revolutions per minute of the engine</description> + <param name="beltStatus" type="Boolean" mandatory="false"> + <description>The status of the seat belts</description> </param> - </function> - - <function name="SubscribeFuelLevel" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="bodyInformation" type="Boolean" mandatory="false"> + <description>The body information including power modes</description> </param> - </function> - <function name="SubscribeFuelLevel" messagetype="response"> - <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true"> - <description>The fuel level in the tank (percentage)</description> + <param name="deviceStatus" type="Boolean" mandatory="false"> + <description>The device status including signal and battery strength</description> </param> - </function> - <function name="UnsubscribeFuelLevel" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="driverBraking" type="Boolean" mandatory="false"> + <description>The status of the brake pedal</description> </param> - </function> - <function name="UnsubscribeFuelLevel" messagetype="response"> - <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="true"> - <description>The fuel level in the tank (percentage)</description> + <param name="wiperStatus" type="Boolean" mandatory="false"> + <description>The status of the wipers</description> </param> - </function> - - <function name="SubscribeFuelLevel_State" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="headLampStatus" type="Boolean" mandatory="false"> + <description>Status of the head lamps</description> </param> - </function> - <function name="SubscribeFuelLevel_State" messagetype="response"> - <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true"> - <description>The fuel level state</description> + <param name="engineTorque" type="Boolean" mandatory="false"> + <description>Torque value for engine (in Nm) on non-diesel variants</description> </param> - </function> - <function name="UnsubscribeFuelLevel_State" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="accPedalPosition" type="Boolean" mandatory="false"> + <description>Accelerator pedal position (percentage depressed)</description> </param> - </function> - <function name="UnsubscribeFuelLevel_State" messagetype="response"> - <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="true"> - <description>The fuel level state</description> + <param name="steeringWheelAngle" type="Boolean" mandatory="false"> + <description>Current angle of the steering wheel (in deg)</description> </param> - </function> - - <function name="SubscribeInstantFuelConsumption" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="engineOilLife" type="Boolean" mandatory="false"> + <description>The estimated percentage of remaining oil life of the engine.</description> </param> - </function> - <function name="SubscribeInstantFuelConsumption" messagetype="response"> - <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true"> - <description>The instantaneous fuel consumption in microlitres</description> + <!-- Ford Specific Data Items --> + <param name="eCallInfo" type="Boolean" mandatory="false"> + <description>Emergency Call notification and confirmation data</description> </param> - </function> - <function name="UnsubscribeInstantFuelConsumption" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="airbagStatus" type="Boolean" mandatory="false"> + <description>The status of the air bags</description> </param> - </function> - <function name="UnsubscribeInstantFuelConsumption" messagetype="response"> - <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="true"> - <description>The instantaneous fuel consumption in microlitres</description> + <param name="emergencyEvent" type="Boolean" mandatory="false"> + <description>Information related to an emergency event (and if it occurred)</description> </param> - </function> - - <function name="SubscribeExternalTemperature" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="clusterModeStatus" type="Boolean" mandatory="false"> + <description>The status modes of the cluster</description> </param> - </function> - <function name="SubscribeExternalTemperature" messagetype="response"> - <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true"> - <description>The external temperature in degrees celsius</description> + <param name="myKey" type="Boolean" mandatory="false"> + <description>Information related to the MyKey feature</description> </param> + <!-- / Ford Specific Data Items --> </function> - <function name="UnsubscribeExternalTemperature" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <function name="UnsubscribeVehicleData" messagetype="response"> + <param name="gps" type="Common.VehicleDataResult" mandatory="false"> + <description>See GPSData</description> </param> - </function> - <function name="UnsubscribeExternalTemperature" messagetype="response"> - <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="true"> - <description>The external temperature in degrees celsius</description> + <param name="speed" type="Common.VehicleDataResult" mandatory="false"> + <description>The vehicle speed in kilometers per hour</description> </param> - </function> - - <function name="SubscribePrndl" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="rpm" type="Common.VehicleDataResult" mandatory="false"> + <description>The number of revolutions per minute of the engine</description> </param> - </function> - <function name="SubscribePrndl" messagetype="response"> - <param name="prndl" type="Common.VehicleDataResult" mandatory="true"> - <description>See PRNDL</description> + <param name="fuelLevel" type="Common.VehicleDataResult" mandatory="false"> + <description>The fuel level in the tank (percentage)</description> </param> - </function> - <function name="UnsubscribePrndl" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="fuelLevel_State" type="Common.VehicleDataResult" mandatory="false"> + <description>The fuel level state</description> </param> - </function> - <function name="UnsubscribePrndl" messagetype="response"> - <param name="prndl" type="Common.VehicleDataResult" mandatory="true"> + <param name="instantFuelConsumption" type="Common.VehicleDataResult" mandatory="false"> + <description>The instantaneous fuel consumption in microlitres</description> + </param> + <param name="externalTemperature" type="Common.VehicleDataResult" mandatory="false"> + <description>The external temperature in degrees celsius</description> + </param> + <param name="prndl" type="Common.VehicleDataResult" mandatory="false"> <description>See PRNDL</description> </param> - </function> - - <function name="SubscribeVin" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="tirePressure" type="Common.VehicleDataResult" mandatory="false"> + <description>See TireStatus</description> </param> - </function> - <function name="SubscribeVin" messagetype="response"> - <param name="vin" type="String" maxlength="17" mandatory="true"> - <description>Vehicle identification number</description> + <param name="odometer" type="Common.VehicleDataResult" mandatory="false"> + <description>Odometer in km</description> </param> - </function> - <function name="UnsubscribeVin" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="beltStatus" type="Common.VehicleDataResult" mandatory="false"> + <description>The status of the seat belts</description> </param> - </function> - <function name="UnsubscribeVin" messagetype="response"> - <param name="vin" type="String" maxlength="17" mandatory="true"> - <description>Vehicle identification number</description> + <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="false"> + <description>The body information including power modes</description> </param> - </function> - - <function name="SubscribeTirePressure" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="false"> + <description>The device status including signal and battery strength</description> </param> - </function> - <function name="SubscribeTirePressure" messagetype="response"> - <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true"> - <description>See TireStatus</description> + <param name="driverBraking" type="Common.VehicleDataResult" mandatory="false"> + <description>The status of the brake pedal</description> </param> - </function> - <function name="UnsubscribeTirePressure" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="false"> + <description>The status of the wipers</description> </param> - </function> - <function name="UnsubscribeTirePressure" messagetype="response"> - <param name="tirePressure" type="Common.VehicleDataResult" mandatory="true"> - <description>See TireStatus</description> + <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="false"> + <description>Status of the head lamps</description> </param> - </function> - - <function name="SubscribeOdometer" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="engineTorque" type="Common.VehicleDataResult" mandatory="false"> + <description>Torque value for engine (in Nm) on non-diesel variants</description> </param> - </function> - <function name="SubscribeOdometer" messagetype="response"> - <param name="odometer" type="Common.VehicleDataResult" mandatory="true"> - <description>Odometer in km</description> + <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="false"> + <description>Accelerator pedal position (percentage depressed)</description> </param> - </function> - <function name="UnsubscribeOdometer" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false"> + <description>Current angle of the steering wheel (in deg)</description> </param> - </function> - <function name="UnsubscribeOdometer" messagetype="response"> - <param name="odometer" type="Common.VehicleDataResult" mandatory="true"> - <description>Odometer in km</description> + <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false"> + <description>The estimated percentage of remaining oil life of the engine.</description> </param> - </function> - - <function name="SubscribeBeltStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <!-- Ford Specific Data Items --> + <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false"> + <description>Emergency Call notification and confirmation data</description> </param> - </function> - <function name="SubscribeBeltStatus" messagetype="response"> - <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the seat belts</description> + <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="false"> + <description>The status of the air bags</description> </param> - </function> - <function name="UnsubscribeBeltStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="false"> + <description>Information related to an emergency event (and if it occurred)</description> </param> - </function> - <function name="UnsubscribeBeltStatus" messagetype="response"> - <param name="beltStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the seat belts</description> + <param name="clusterModes" type="Common.VehicleDataResult" mandatory="false"> + <description>The status modes of the cluster</description> </param> - </function> - - <function name="SubscribeBodyInformation" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="myKey" type="Common.VehicleDataResult" mandatory="false"> + <description>Information related to the MyKey feature</description> </param> + <!-- / Ford Specific Data Items --> </function> - <function name="SubscribeBodyInformation" messagetype="response"> - <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true"> - <description>The body information including power modes</description> + <function name="GetVehicleData" messagetype="request"> + <description>Non periodic vehicle data read request.</description> + <param name="gps" type="Boolean" mandatory="false"> + <description>See GPSData</description> </param> - </function> - <function name="UnsubscribeBodyInformation" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="speed" type="Boolean" mandatory="false"> + <description>The vehicle speed in kilometers per hour</description> </param> - </function> - <function name="UnsubscribeBodyInformation" messagetype="response"> - <param name="bodyInformation" type="Common.VehicleDataResult" mandatory="true"> - <description>The body information including power modes</description> + <param name="rpm" type="Boolean" mandatory="false"> + <description>The number of revolutions per minute of the engine</description> </param> - </function> - - <function name="SubscribeDeviceStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="fuelLevel" type="Boolean" mandatory="false"> + <description>The fuel level in the tank (percentage)</description> </param> - </function> - <function name="SubscribeDeviceStatus" messagetype="response"> - <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The device status including signal and battery strength</description> + <param name="fuelLevel_State" type="Boolean" mandatory="false"> + <description>The fuel level state</description> </param> - </function> - <function name="UnsubscribeDeviceStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="instantFuelConsumption" type="Boolean" mandatory="false"> + <description>The instantaneous fuel consumption in microlitres</description> </param> - </function> - <function name="UnsubscribeDeviceStatus" messagetype="response"> - <param name="deviceStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The device status including signal and battery strength</description> + <param name="externalTemperature" type="Boolean" mandatory="false"> + <description>The external temperature in degrees celsius</description> </param> - </function> - - <function name="SubscribeDriverBraking" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="vin" type="Boolean" mandatory="false"> + <description>Vehicle identification number</description> </param> - </function> - <function name="SubscribeDriverBraking" messagetype="response"> - <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the brake pedal</description> + <param name="prndl" type="Boolean" mandatory="false"> + <description>See PRNDL</description> </param> - </function> - <function name="UnsubscribeDriverBraking" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="tirePressure" type="Boolean" mandatory="false"> + <description>See TireStatus</description> </param> - </function> - <function name="UnsubscribeDriverBraking" messagetype="response"> - <param name="driverBraking" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the brake pedal</description> + <param name="odometer" type="Boolean" mandatory="false"> + <description>Odometer in km</description> </param> - </function> - - <function name="SubscribeWiperStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="beltStatus" type="Boolean" mandatory="false"> + <description>The status of the seat belts</description> </param> - </function> - <function name="SubscribeWiperStatus" messagetype="response"> - <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the wipers</description> + <param name="bodyInformation" type="Boolean" mandatory="false"> + <description>The body information including ignition status and internal temp</description> </param> - </function> - <function name="UnsubscribeWiperStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="deviceStatus" type="Boolean" mandatory="false"> + <description>The device status including signal and battery strength</description> </param> - </function> - <function name="UnsubscribeWiperStatus" messagetype="response"> - <param name="wiperStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the wipers</description> + <param name="driverBraking" type="Boolean" mandatory="false"> + <description>The status of the brake pedal</description> </param> - </function> - - <function name="SubscribeHeadLampStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="wiperStatus" type="Boolean" mandatory="false"> + <description>The status of the wipers</description> </param> - </function> - <function name="SubscribeHeadLampStatus" messagetype="response"> - <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true"> + <param name="headLampStatus" type="Boolean" mandatory="false"> <description>Status of the head lamps</description> </param> - </function> - <function name="UnsubscribeHeadLampStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="engineTorque" type="Boolean" mandatory="false"> + <description>Torque value for engine (in Nm) on non-diesel variants</description> </param> - </function> - <function name="UnsubscribeHeadLampStatus" messagetype="response"> - <param name="headLampStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>Status of the head lamps</description> + <param name="accPedalPosition" type="Boolean" mandatory="false"> + <description>Accelerator pedal position (percentage depressed)</description> </param> - </function> - - <function name="SubscribeEngineTorque" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="steeringWheelAngle" type="Boolean" mandatory="false"> + <description>Current angle of the steering wheel (in deg)</description> </param> - </function> - <function name="SubscribeEngineTorque" messagetype="response"> - <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true"> - <description>Torque value for engine (in Nm) on non-diesel variants</description> + <param name="engineOilLife" type="Boolean" mandatory="false"> + <description>The estimated percentage of remaining oil life of the engine.</description> </param> - </function> - <function name="UnsubscribeEngineTorque" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="eCallInfo" type="Boolean" mandatory="false"> + <description>Emergency Call notification and confirmation data</description> </param> - </function> - <function name="UnsubscribeEngineTorque" messagetype="response"> - <param name="engineTorque" type="Common.VehicleDataResult" mandatory="true"> - <description>Torque value for engine (in Nm) on non-diesel variants</description> + <param name="airbagStatus" type="Boolean" mandatory="false"> + <description>The status of the air bags</description> </param> - </function> - - <function name="SubscribeAccPedalPosition" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="emergencyEvent" type="Boolean" mandatory="false"> + <description>Information related to an emergency event (and if it occurred)</description> </param> - </function> - <function name="SubscribeAccPedalPosition" messagetype="response"> - <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true"> - <description>Accelerator pedal position (percentage depressed)</description> + <param name="clusterModeStatus" type="Boolean" mandatory="false"> + <description>The status modes of the cluster</description> </param> - </function> - <function name="UnsubscribeAccPedalPosition" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="myKey" type="Boolean" mandatory="false"> + <description>Information related to the MyKey feature</description> </param> </function> - <function name="UnsubscribeAccPedalPosition" messagetype="response"> - <param name="accPedalPosition" type="Common.VehicleDataResult" mandatory="true"> - <description>Accelerator pedal position (percentage depressed)</description> + <function name="GetVehicleData" messagetype="response"> + <param name="gps" type="Common.GPSData" mandatory="false"> + <description>See GPSData</description> </param> - </function> - - <function name="SubscribeSteeringWheelAngle" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false"> + <description>The vehicle speed in kilometers per hour</description> </param> - </function> - <function name="SubscribeSteeringWheelAngle" messagetype="response"> - <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true"> - <description>Current angle of the steering wheel (in deg)</description> + <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false"> + <description>The number of revolutions per minute of the engine</description> </param> - </function> - <function name="UnsubscribeSteeringWheelAngle" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false"> + <description>The fuel level in the tank (percentage)</description> </param> - </function> - <function name="UnsubscribeSteeringWheelAngle" messagetype="response"> - <param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="true"> + <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false"> + <description>The fuel level state</description> + </param> + <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false"> + <description>The instantaneous fuel consumption in microlitres</description> + </param> + <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false"> + <description>The external temperature in degrees celsius</description> + </param> + <param name="vin" type="String" maxlength="17" mandatory="false"> + <description>Vehicle identification number</description> + </param> + <param name="prndl" type="Common.PRNDL" mandatory="false"> + <description>See PRNDL</description> + </param> + <param name="tirePressure" type="Common.TireStatus" mandatory="false"> + <description>See TireStatus</description> + </param> + <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false"> + <description>Odometer in km</description> + </param> + <param name="beltStatus" type="Common.BeltStatus" mandatory="false"> + <description>The status of the seat belts</description> + </param> + <param name="bodyInformation" type="Common.BodyInformation" mandatory="false"> + <description>The body information including power modes</description> + </param> + <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false"> + <description>The device status including signal and battery strength</description> + </param> + <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false"> + <description>The status of the brake pedal</description> + </param> + <param name="wiperStatus" type="Common.WiperStatus" mandatory="false"> + <description>The status of the wipers</description> + </param> + <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false"> + <description>Status of the head lamps</description> + </param> + <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false"> + <description>Torque value for engine (in Nm) on non-diesel variants</description> + </param> + <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false"> + <description>Accelerator pedal position (percentage depressed)</description> + </param> + <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false"> <description>Current angle of the steering wheel (in deg)</description> </param> - </function> - - <function name="SubscribeECallInfo" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false"> + <description>The estimated percentage of remaining oil life of the engine.</description> </param> - </function> - <function name="SubscribeECallInfo" messagetype="response"> - <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true"> + <param name="eCallInfo" type="Common.ECallInfo" mandatory="false"> <description>Emergency Call notification and confirmation data</description> </param> - </function> - <function name="UnsubscribeECallInfo" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false"> + <description>The status of the air bags</description> </param> - </function> - <function name="UnsubscribeECallInfo" messagetype="response"> - <param name="eCallInfo" type="Common.VehicleDataResult" mandatory="true"> - <description>Emergency Call notification and confirmation data</description> + <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false"> + <description>Information related to an emergency event (and if it occurred)</description> </param> - </function> - - <function name="SubscribeAirbagStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false"> + <description>The status modes of the cluster</description> </param> - </function> - <function name="SubscribeAirbagStatus" messagetype="response"> - <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the air bags</description> + <param name="myKey" type="Common.MyKey" mandatory="false"> + <description>Information related to the MyKey feature</description> </param> </function> - <function name="UnsubscribeAirbagStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <function name="OnVehicleData" messagetype="notification"> + <description>Callback for the periodic and non periodic vehicle data read function.</description> + <param name="gps" type="Common.GPSData" mandatory="false"> + <description>See GPSData</description> </param> - </function> - <function name="UnsubscribeAirbagStatus" messagetype="response"> - <param name="airbagStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status of the air bags</description> + <param name="speed" type="Float" minvalue="0" maxvalue="700" mandatory="false"> + <description>The vehicle speed in kilometers per hour</description> </param> - </function> - - <function name="SubscribeEmergencyEvent" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="rpm" type="Integer" minvalue="0" maxvalue="20000" mandatory="false"> + <description>The number of revolutions per minute of the engine</description> </param> - </function> - <function name="SubscribeEmergencyEvent" messagetype="response"> - <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true"> - <description>Information related to an emergency event (and if it occurred)</description> + <param name="fuelLevel" type="Float" minvalue="-6" maxvalue="106" mandatory="false"> + <description>The fuel level in the tank (percentage)</description> </param> - </function> - <function name="UnsubscribeEmergencyEvent" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="fuelLevel_State" type="Common.ComponentVolumeStatus" mandatory="false"> + <description>The fuel level state</description> </param> - </function> - <function name="UnsubscribeEmergencyEvent" messagetype="response"> - <param name="emergencyEvent" type="Common.VehicleDataResult" mandatory="true"> - <description>Information related to an emergency event (and if it occurred)</description> + <param name="instantFuelConsumption" type="Float" minvalue="0" maxvalue="25575" mandatory="false"> + <description>The instantaneous fuel consumption in microlitres</description> </param> - </function> - - <function name="SubscribeClusterModeStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="externalTemperature" type="Float" minvalue="-40" maxvalue="100" mandatory="false"> + <description>The external temperature in degrees celsius</description> </param> - </function> - <function name="SubscribeClusterModeStatus" messagetype="response"> - <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status modes of the cluster</description> + <param name="vin" type="String" maxlength="17" mandatory="false"> + <description>Vehicle identification number.</description> </param> - </function> - <function name="UnsubscribeClusterModeStatus" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="prndl" type="Common.PRNDL" mandatory="false"> + <description>See PRNDL</description> </param> - </function> - <function name="UnsubscribeClusterModeStatus" messagetype="response"> - <param name="clusterModeStatus" type="Common.VehicleDataResult" mandatory="true"> - <description>The status modes of the cluster</description> + <param name="tirePressure" type="Common.TireStatus" mandatory="false"> + <description>See TireStatus</description> </param> - </function> - - <function name="SubscribeMyKey" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="odometer" type="Integer" minvalue="0" maxvalue="17000000" mandatory="false"> + <description>Odometer in km</description> </param> - </function> - <function name="SubscribeMyKey" messagetype="response"> - <param name="myKey" type="Common.VehicleDataResult" mandatory="true"> - <description>Information related to the MyKey feature</description> + <param name="beltStatus" type="Common.BeltStatus" mandatory="false"> + <description>The status of the seat belts</description> </param> - </function> - <function name="UnsubscribeMyKey" messagetype="request"> - <param name="appID" type="Integer" mandatory="true"> - <description>ID of application requested this RPC.</description> + <param name="bodyInformation" type="Common.BodyInformation" mandatory="false"> + <description>The body information including power modes</description> </param> - </function> - <function name="UnsubscribeMyKey" messagetype="response"> - <param name="myKey" type="Common.VehicleDataResult" mandatory="true"> + <param name="deviceStatus" type="Common.DeviceStatus" mandatory="false"> + <description>The device status including signal and battery strength</description> + </param> + <param name="driverBraking" type="Common.VehicleDataEventStatus" mandatory="false"> + <description>The status of the brake pedal</description> + </param> + <param name="wiperStatus" type="Common.WiperStatus" mandatory="false"> + <description>The status of the wipers</description> + </param> + <param name="headLampStatus" type="Common.HeadLampStatus" mandatory="false"> + <description>Status of the head lamps</description> + </param> + <param name="engineTorque" type="Float" minvalue="-1000" maxvalue="2000" mandatory="false"> + <description>Torque value for engine (in Nm) on non-diesel variants</description> + </param> + <param name="accPedalPosition" type="Float" minvalue="0" maxvalue="100" mandatory="false"> + <description>Accelerator pedal position (percentage depressed)</description> + </param> + <param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false"> + <description>Current angle of the steering wheel (in deg)</description> + </param> + <param name="eCallInfo" type="Common.ECallInfo" mandatory="false"> + <description>Emergency Call notification and confirmation data</description> + </param> + <param name="airbagStatus" type="Common.AirbagStatus" mandatory="false"> + <description>The status of the air bags</description> + </param> + <param name="emergencyEvent" type="Common.EmergencyEvent" mandatory="false"> + <description>Information related to an emergency event (and if it occurred)</description> + </param> + <param name="clusterModeStatus" type="Common.ClusterModeStatus" mandatory="false"> + <description>The status modes of the cluster</description> + </param> + <param name="myKey" type="Common.MyKey" mandatory="false"> <description>Information related to the MyKey feature</description> </param> </function> -<!--end Qt HMI version of SubscribeVehicleData/UnsubscribeVehicleData--> </interface> </interfaces> 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<std::string> requested_interfaces; std::set<std::string> 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; |