From c25f7101bae08776a128fe64a306e45b62dfc56f Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Thu, 22 Sep 2016 11:12:02 +0200 Subject: Refinement to facilitate migration to CommonAPI --- api/franca/CMakeLists.txt | 54 ++++++++ api/franca/FuelStopAdvisor.fidl | 221 ------------------------------- api/franca/amb/CMakeLists.txt | 66 ++++++++++ api/franca/amb/Manager.fidl | 69 ++++++++++ api/franca/amb/Properties.fidl | 76 +++++++++++ api/franca/fsa/CMakeLists.txt | 66 ++++++++++ api/franca/fsa/FuelStopAdvisor.fidl | 251 ++++++++++++++++++++++++++++++++++++ 7 files changed, 582 insertions(+), 221 deletions(-) create mode 100644 api/franca/CMakeLists.txt delete mode 100644 api/franca/FuelStopAdvisor.fidl create mode 100644 api/franca/amb/CMakeLists.txt create mode 100644 api/franca/amb/Manager.fidl create mode 100644 api/franca/amb/Properties.fidl create mode 100644 api/franca/fsa/CMakeLists.txt create mode 100644 api/franca/fsa/FuelStopAdvisor.fidl (limited to 'api') 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=") +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=") +endif () + +add_subdirectory(fsa) +add_subdirectory(amb) + diff --git a/api/franca/FuelStopAdvisor.fidl b/api/franca/FuelStopAdvisor.fidl deleted file mode 100644 index dd48aa8..0000000 --- a/api/franca/FuelStopAdvisor.fidl +++ /dev/null @@ -1,221 +0,0 @@ -// 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.genivi.demonstrator - -<** - @description : FuelStopAdvisor = This interface offers functionalities to access the fuel stop advisor features - This interface is defined for the FSA demonstrator and not included into the GENIVI compliance -**> -interface FuelStopAdvisor { - version { - major 1 - minor 0 - } - - enumeration BasicEnum { - INVALID = 0 - } - - enumeration TripNumber { - TRIP1 = 0 - TRIP2 = 1 - } - - enumeration UnitAttribute { - ODOMETER = 32 - FUEL_LEVEL = 33 - TANK_DISTANCE = 34 - INSTANT_FUEL_CONSUMPTION_PER_DISTANCE = 35 - ENHANCED_TANK_DISTANCE = 36 - DISTANCE = 48 - TIME = 49 - AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE = 50 - AVERAGE_SPEED = 51 - ALL = 1 - } - - enumeration Unit extends BasicEnum { - METRICS = 16 - NON_METRICS = 17 - } - - map Units { - UnitAttribute to Unit - } - - enumeration InstantDataAttribute extends BasicEnum { - ODOMETER = 32 - FUEL_LEVEL = 33 - INSTANT_SPEED = 34 - INSTANT_FUEL_CONSUMPTION_PER_DISTANCE = 35 - } - - union InstantDataValue { - UInt16 uint16Value - UInt32 uint32Value - } - - map InstantData { - InstantDataAttribute to InstantDataValue - } - - enumeration TripDataAttribute extends BasicEnum { - DISTANCE = 48 - TIME = 49 - AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE = 50 - AVERAGE_SPEED = 51 - TANK_DISTANCE = 52 - ENHANCED_TANK_DISTANCE = 53 - } - - union TripDataValue { - UInt16 uint16Value - UInt32 uint32Value - } - - map TripData { - TripDataAttribute to TripDataValue - } - - <** @description: version.**> - struct Version { - <** @description : when the major changes, then backward compatibility with previous releases is not granted.**> - UInt16 ^versionMajor - <** @description : when the minor changes, then backward compatibility with previous releases is granted, but something changed in the implementation of the API (e.g. new methods may have been added).**> - UInt16 ^versionMinor - <** @description : when the micro changes, then backward compatibility with previous releases is granted (bug fixes or documentation modifications).**> - UInt16 ^versionMicro - <** @description : release date (e.g. 21-06-2011).**> - String date - } - - <** - @description : getVersion = This method returns the API version implemented by the server application - **> - method getVersion { - out { - Version ^version - } - } - - <** - @description : setUnits = This method sets the calculation unit for a given value - **> - method setUnits { - in { - <** @description : for each key, the value of type 'q' expresses the unit used **> - Units unit - } - } - - <** - @description : getInstantData = This method returns a given set of global (not related to a trip number) trip computer data (e.g. odometer, fuel level, tank distance... ) - **> - method getInstantData { - out { - <** - @description : data = dictionary[key,value] - key = key = enum(INVALID,ODOMETER,FUEL_LEVEL,INSTANT_FUEL_CONSUMPTION_PER_DISTANCE,...,ALL) - key = ODOMETER, value = value of type 'u', that expresses the total distance counter in: METRIC->tenth of kilometers NON_METRIC->tenth of miles - key = INSTANT_SPEED, value = value of type 'q', that expresses the instant speed in METRIC->tenth of kilometers per hour or in NON_METRIC->tenth of miles per hour - key = FUEL_LEVEL, value = value of type 'q', that expresses fuel level in: METRIC->tenth of liters NON_METRIC->hundreth of gallon - key = INSTANT_FUEL_CONSUMPTION_PER_DISTANCE, value = value of type 'q', that expresses the instant fuel consumption per distance in METRIC->tenth of liters per 100 kilometers or the instant distance per fuel consumption in NON_METRIC->tenth of miles per gallon - **> - InstantData data - } - } - - <** - @description : getTripData = This method returns the data of a given trip number - **> - method getTripData { - in { - <** @description : number= value of type 'y' that expresses the trip number (start number is 0) **> - TripNumber number - } - out { - <** @description : - data = dictionary[key,value] - key = enum(INVALID,DISTANCE,TIME,AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE,AVERAGE_SPEED,TANK_DISTANCE,ENHANCED_TANK_DISTANCE,...,ALL) - key = DISTANCE, value = value of type 'q', that expresses the distance since the last reset of the trip computer in METRIC->tenth of kilometers or in NON_METRIC->tenth of miles - key = TIME, value = value of type 'u', that expresses the elapsed time since the last reset of the trip computer in seconds - key = AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE, value = value of type 'q', that expresses the average fuel consumption per distance since the last reset of the trip computer in METRIC->tenth of liters per 100 kilometers or the average distance per fuel consumption in NON_METRIC->tenth of miles per gallon - key = AVERAGE_SPEED, value = value of type 'q', that expresses the average speed since the last reset of the trip computer in METRIC->tenth of kilometers per hour or in NON_METRIC->tenth of miles per hour - key = TANK_DISTANCE, value = value of type 'q', that expresses the tank distance since the last reset of the trip computer in METRIC->kilometers or in NON_METRIC->miles - key = ENHANCED_TANK_DISTANCE, value = value of type 'q', that expresses the tank distance since the last reset of the trip computer in METRIC->kilometers or in NON_METRIC->miles - **> - TripData data - } - } - - <** - @description : getSupportedTripNumbers = This method returns the number of supported trips - **> - method getSupportedTripNumbers { - out { - UInt8 tripNumbers - } - } - - <** - @description : setFuelAdvisorSettings = This method configures the fuel stop advisor settings - **> - method setFuelAdvisorSettings { - in { - <** @description : advisorMode = flag. TRUE means that the advisor is activated **> - Boolean advisorMode - - <** @description : distanceThreshold= value of type 'y' that expresses the distance threshold in METRIC->kilometers or in NON_METRIC->miles **> - UInt8 distanceThreshold - } - } - - <** - @description : getFuelAdvisorSettings = This method gets the fuel stop advisor settings - **> - method getFuelAdvisorSettings { - out { - <** @description : advisorMode = flag. TRUE means that the advisor is activated **> - Boolean advisorMode - - <** @description : distanceThreshold= value of type 'y' that expresses the distance threshold in METRIC->kilometers or in NON_METRIC->miles **> - UInt8 distanceThreshold - - <** @description : destinationCantBeReached= TRUE means that there's a risk of not reaching the destination **> - Boolean destinationCantBeReached - } - } - - <** - @description : setRouteHandle = This method configures the route handle for the enhanced tank distance - **> - method setRouteHandle { - in { - UInt32 routeHandle - } - } - - <** - @description : releaseRouteHandle = This method release the route handle for the enhanced tank distance - **> - method releaseRouteHandle { - in { - UInt32 routeHandle - } - } - - <** - @description : fuelStopAdvisorWarning = This signal is emitted to notify a client application whether there's a risk of not reaching the destination - **> - broadcast fuelStopAdvisorWarning { - out { - <** @description : destinationCantBeReached= TRUE means that there's a risk of not reaching the destination, FALSE means that there's no risk yet **> - Boolean destinationCantBeReached - } - } - -} \ No newline at end of file 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=") +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=") +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=") +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=") +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=") +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=") +endif () + diff --git a/api/franca/fsa/FuelStopAdvisor.fidl b/api/franca/fsa/FuelStopAdvisor.fidl new file mode 100644 index 0000000..1af6ef1 --- /dev/null +++ b/api/franca/fsa/FuelStopAdvisor.fidl @@ -0,0 +1,251 @@ +// 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.genivi.demonstrator + +<** + @description : FuelStopAdvisor = This interface offers functionalities to access the fuel stop advisor features + This interface is defined for the FSA demonstrator and not included into the GENIVI compliance +**> +interface FuelStopAdvisor { + version { + major 1 + minor 0 + } + + enumeration BasicEnum { + INVALID = 0 + } + + enumeration TripNumber { + TRIP1 = 0 + TRIP2 = 1 + } + + enumeration UnitAttribute { + ODOMETER = 32 + FUEL_LEVEL = 33 + TANK_DISTANCE = 34 + INSTANT_FUEL_CONSUMPTION_PER_DISTANCE = 35 + ENHANCED_TANK_DISTANCE = 36 + DISTANCE = 48 + TIME = 49 + AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE = 50 + AVERAGE_SPEED = 51 + ALL = 1 + } + + enumeration Unit extends BasicEnum { + METRICS = 16 + NON_METRICS = 17 + } + + map Units { + UnitAttribute to Unit + } + + enumeration InstantDataAttribute extends BasicEnum { + ODOMETER = 32 + FUEL_LEVEL = 33 + INSTANT_SPEED = 34 + INSTANT_FUEL_CONSUMPTION_PER_DISTANCE = 35 + TANK_DISTANCE = 52 + ENHANCED_TANK_DISTANCE = 53 + } + + union InstantDataValue { + UInt16 uint16Value + UInt32 uint32Value + } + + map InstantData { + InstantDataAttribute to InstantDataValue + } + + enumeration TripDataAttribute extends BasicEnum { + DISTANCE = 48 + TIME = 49 + AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE = 50 + AVERAGE_SPEED = 51 + } + + union TripDataValue { + UInt16 uint16Value + UInt32 uint32Value + } + + map TripData { + TripDataAttribute to TripDataValue + } + + <** @description: version.**> + struct Version { + <** @description : when the major changes, then backward compatibility with previous releases is not granted.**> + UInt16 ^versionMajor + <** @description : when the minor changes, then backward compatibility with previous releases is granted, but something changed in the implementation of the API (e.g. new methods may have been added).**> + UInt16 ^versionMinor + <** @description : when the micro changes, then backward compatibility with previous releases is granted (bug fixes or documentation modifications).**> + UInt16 ^versionMicro + <** @description : release date (e.g. 21-06-2011).**> + String date + } + + <** + @description : getVersion = This method returns the API version implemented by the server application + **> + method getVersion { + out { + Version ^version + } + } + + <** + @description : setUnits = This method sets the calculation unit for a given value + **> + method setUnits { + in { + <** @description : for each key, the value of type 'q' expresses the unit used **> + Units unit + } + } + + <** + @description : getInstantData = This method returns a given set of global (not related to a trip number) trip computer data (e.g. odometer, fuel level, tank distance... ) + **> + method getInstantData { + out { + <** + @description : data = dictionary[key,value] + key = key = enum(INVALID,ODOMETER,FUEL_LEVEL,INSTANT_FUEL_CONSUMPTION_PER_DISTANCE,...,ALL) + key = ODOMETER, value = value of type 'u', that expresses the total distance counter in: METRIC->tenth of kilometers NON_METRIC->tenth of miles + key = INSTANT_SPEED, value = value of type 'q', that expresses the instant speed in METRIC->tenth of kilometers per hour or in NON_METRIC->tenth of miles per hour + key = FUEL_LEVEL, value = value of type 'q', that expresses fuel level in: METRIC->tenth of liters NON_METRIC->hundreth of gallon + key = INSTANT_FUEL_CONSUMPTION_PER_DISTANCE, value = value of type 'q', that expresses the instant fuel consumption per distance in METRIC->tenth of liters per 100 kilometers or the instant distance per fuel consumption in NON_METRIC->tenth of miles per gallon + **> + InstantData data + } + } + + <** + @description : getTripData = This method returns the data of a given trip number + **> + method getTripData { + in { + <** @description : number= value of type 'y' that expresses the trip number (start number is 0) **> + TripNumber number + } + out { + <** @description : + data = dictionary[key,value] + key = enum(INVALID,DISTANCE,TIME,AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE,AVERAGE_SPEED,TANK_DISTANCE,ENHANCED_TANK_DISTANCE,...,ALL) + key = DISTANCE, value = value of type 'q', that expresses the distance since the last reset of the trip computer in METRIC->tenth of kilometers or in NON_METRIC->tenth of miles + key = TIME, value = value of type 'u', that expresses the elapsed time since the last reset of the trip computer in seconds + key = AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE, value = value of type 'q', that expresses the average fuel consumption per distance since the last reset of the trip computer in METRIC->tenth of liters per 100 kilometers or the average distance per fuel consumption in NON_METRIC->tenth of miles per gallon + key = AVERAGE_SPEED, value = value of type 'q', that expresses the average speed since the last reset of the trip computer in METRIC->tenth of kilometers per hour or in NON_METRIC->tenth of miles per hour + key = TANK_DISTANCE, value = value of type 'q', that expresses the tank distance since the last reset of the trip computer in METRIC->kilometers or in NON_METRIC->miles + key = ENHANCED_TANK_DISTANCE, value = value of type 'q', that expresses the tank distance since the last reset of the trip computer in METRIC->kilometers or in NON_METRIC->miles + **> + TripData data + } + } + + <** + @description : getSupportedTripNumbers = This method returns the number of supported trips + **> + method getSupportedTripNumbers { + out { + UInt8 tripNumbers + } + } + + <** + @description : setFuelAdvisorSettings = This method configures the fuel stop advisor settings + **> + method setFuelAdvisorSettings { + in { + <** @description : advisorMode = flag. TRUE means that the advisor is activated **> + Boolean advisorMode + + <** @description : distanceThreshold= value of type 'y' that expresses the distance threshold in METRIC->kilometers or in NON_METRIC->miles **> + UInt8 distanceThreshold + } + } + + <** + @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 { + out { + <** @description : advisorMode = flag. TRUE means that the advisor is activated **> + Boolean advisorMode + + <** @description : distanceThreshold= value of type 'y' that expresses the distance threshold in METRIC->kilometers or in NON_METRIC->miles **> + UInt8 distanceThreshold + + <** @description : destinationCantBeReached= TRUE means that there's a risk of not reaching the destination **> + Boolean destinationCantBeReached + } + } + + <** + @description : setRouteHandle = This method configures the route handle for the enhanced tank distance + **> + method setRouteHandle { + in { + UInt32 routeHandle + } + } + + <** + @description : releaseRouteHandle = This method release the route handle for the enhanced tank distance + **> + method releaseRouteHandle { + in { + UInt32 routeHandle + } + } + + <** + @description : fuelStopAdvisorWarning = This signal is emitted to notify a client application whether there's a risk of not reaching the destination + **> + broadcast fuelStopAdvisorWarning { + out { + <** @description : destinationCantBeReached= TRUE means that there's a risk of not reaching the destination, FALSE means that there's no risk yet **> + Boolean destinationCantBeReached + } + } + +} \ No newline at end of file -- cgit v1.2.1