diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2016-09-22 11:12:02 +0200 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2016-09-22 11:12:02 +0200 |
commit | c25f7101bae08776a128fe64a306e45b62dfc56f (patch) | |
tree | d19a348c1be76882bc4da1935d2b9d5f13a48755 /api | |
parent | b083370474dccf501010bef5a0c6fec4d77f0c8d (diff) | |
download | navigation-c25f7101bae08776a128fe64a306e45b62dfc56f.tar.gz |
Refinement to facilitate migration to CommonAPI
Diffstat (limited to 'api')
-rw-r--r-- | api/franca/CMakeLists.txt | 54 | ||||
-rw-r--r-- | api/franca/amb/CMakeLists.txt | 66 | ||||
-rw-r--r-- | api/franca/amb/Manager.fidl | 69 | ||||
-rw-r--r-- | api/franca/amb/Properties.fidl | 76 | ||||
-rw-r--r-- | api/franca/fsa/CMakeLists.txt | 66 | ||||
-rw-r--r-- | api/franca/fsa/FuelStopAdvisor.fidl (renamed from api/franca/FuelStopAdvisor.fidl) | 34 |
6 files changed, 363 insertions, 2 deletions
diff --git a/api/franca/CMakeLists.txt b/api/franca/CMakeLists.txt new file mode 100644 index 0000000..fcb13ad --- /dev/null +++ b/api/franca/CMakeLists.txt @@ -0,0 +1,54 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: whole franca generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(whole-franca) + +get_directory_property(hasParent PARENT_DIRECTORY) + +if(hasParent) + set(COMMONAPI_GEN_DIR "${COMMONAPI_GEN_DIR}" PARENT_SCOPE) +else() + set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen") +endif() + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +if (COMMONAPI_TOOL_DIR) + message(STATUS "COMMONAPI_TOOL_DIR ${COMMONAPI_TOOL_DIR}") +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif () + +if (COMMONAPI_DBUS_TOOL_DIR) + message(STATUS "COMMONAPI_DBUS_TOOL_DIR ${COMMONAPI_DBUS_TOOL_DIR}") +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif () + +add_subdirectory(fsa) +add_subdirectory(amb) + diff --git a/api/franca/amb/CMakeLists.txt b/api/franca/amb/CMakeLists.txt new file mode 100644 index 0000000..bb06cc6 --- /dev/null +++ b/api/franca/amb/CMakeLists.txt @@ -0,0 +1,66 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca navigation poi service generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-amb) + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) +if("${OS_VERSION}" MATCHES "i686") + set(OS_VERSION "x86") +else() + set(OS_VERSION "x86_64") +endif() +message(STATUS "OS_VERSION = ${OS_VERSION}") + +set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +find_package(PkgConfig REQUIRED) + +include(FindPkgConfig) + +# generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + +file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") + +if (COMMONAPI_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif () + +if (COMMONAPI_DBUS_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif () + diff --git a/api/franca/amb/Manager.fidl b/api/franca/amb/Manager.fidl new file mode 100644 index 0000000..0a98d14 --- /dev/null +++ b/api/franca/amb/Manager.fidl @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright (C) 2014, PCA Peugeot Citro�n, XS Embedded GmbH, TomTom International B.V., Continental Automotive GmbH, BMW Car IT GmbH, Alpine Electronics R&D Europe GmbH, AISIN AW CO., LTD., Neusoft Technology Solutions GmbH, Jaguar Land Rover Limited, Visteon Corporation, Elektrobit Automotive GmbH +// This Source Code Form is subject to the terms of the +// Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +// this file, you can obtain one at http://mozilla.org/MPL/2.0/. + +package org.automotive + +interface Manager { + version { + major 1 + minor 0 + } + + method FindObject { + in { + String searchstring + } + out { + String [] response + } + } + + method FindObjectForZone { + in { + String searchstring + Int32 zone + } + out { + String response + } + } + + method FindObjectForSourceZone { + in { + String searchstring + String source + Int32 zone + } + out { + String response + } + } + + method List { + out { + String [] response + } + } + + method ZonesForObjectName { + in { + String searchstring + } + out { + Int32 [] response + } + } + + method SourceForObjectName { + in { + String searchstring + } + out { + String [] response + } + } + +}
\ No newline at end of file diff --git a/api/franca/amb/Properties.fidl b/api/franca/amb/Properties.fidl new file mode 100644 index 0000000..e7fba8b --- /dev/null +++ b/api/franca/amb/Properties.fidl @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright (C) 2014, PCA Peugeot Citro�n, XS Embedded GmbH, TomTom International B.V., Continental Automotive GmbH, BMW Car IT GmbH, Alpine Electronics R&D Europe GmbH, AISIN AW CO., LTD., Neusoft Technology Solutions GmbH, Jaguar Land Rover Limited, Visteon Corporation, Elektrobit Automotive GmbH +// This Source Code Form is subject to the terms of the +// Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +// this file, you can obtain one at http://mozilla.org/MPL/2.0/. + +package org.freedesktop.DBus + +interface Properties { + version { + major 1 + minor 0 + } + + union PropertyValue { + UInt16 uint16Value + UInt32 uint32Value + Double doubleValue + } + + enumeration PropertyAttribute { + LEVEL = 0 + TIME = 1 + ODOMETER = 2 + } + + map Value { + PropertyAttribute to PropertyValue + } + + enumeration interfaceKey { + ODOMETER = 0 + FUEL = 1 + } + + struct Property { + String name + Value value + } + + method Get { + in { + String interface_name + String property_name + } + out { + Value value + } + } + + method GetAll { + in { + String interface_name + String property_name + } + out { + Property[] value + } + } + + method Set { + in { + String interface_name + String property_name + Value value + } + } + + broadcast PropertiesChanged { + out { + String interface_name + Property[] changed_properties + String[] invalidated_properties + } + } +}
\ No newline at end of file diff --git a/api/franca/fsa/CMakeLists.txt b/api/franca/fsa/CMakeLists.txt new file mode 100644 index 0000000..5ca9699 --- /dev/null +++ b/api/franca/fsa/CMakeLists.txt @@ -0,0 +1,66 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca navigation poi service generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-fsa) + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) +if("${OS_VERSION}" MATCHES "i686") + set(OS_VERSION "x86") +else() + set(OS_VERSION "x86_64") +endif() +message(STATUS "OS_VERSION = ${OS_VERSION}") + +set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +find_package(PkgConfig REQUIRED) + +include(FindPkgConfig) + +# generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + +file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") + +if (COMMONAPI_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif () + +if (COMMONAPI_DBUS_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif () + diff --git a/api/franca/FuelStopAdvisor.fidl b/api/franca/fsa/FuelStopAdvisor.fidl index dd48aa8..1af6ef1 100644 --- a/api/franca/FuelStopAdvisor.fidl +++ b/api/franca/fsa/FuelStopAdvisor.fidl @@ -52,6 +52,8 @@ interface FuelStopAdvisor { FUEL_LEVEL = 33 INSTANT_SPEED = 34 INSTANT_FUEL_CONSUMPTION_PER_DISTANCE = 35 + TANK_DISTANCE = 52 + ENHANCED_TANK_DISTANCE = 53 } union InstantDataValue { @@ -68,8 +70,6 @@ interface FuelStopAdvisor { TIME = 49 AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE = 50 AVERAGE_SPEED = 51 - TANK_DISTANCE = 52 - ENHANCED_TANK_DISTANCE = 53 } union TripDataValue { @@ -175,6 +175,36 @@ interface FuelStopAdvisor { } <** + @description : resetTripData = This method resets the data of a given trip + **> + method resetTripData { + in { + <** @description : number = value of type 'y' that expresses the trip number **> + UInt8 number + } + } + + <** + @description : tripDataResetted = This signal is emitted to notify a client application that the data of the given trip number has been resetted + **> + broadcast tripDataResetted { + out { + <** @description : number = value of type 'y' that expresses the trip number **> + UInt8 number + } + } + + <** + @description : tripDataUpdated = This signal is emitted to notifiy a client application that the data has been updated + **> + broadcast tripDataUpdated { + out { + <** @description : number = value of type 'y' that expresses the trip number **> + UInt8 number + } + } + + <** @description : getFuelAdvisorSettings = This method gets the fuel stop advisor settings **> method getFuelAdvisorSettings { |