diff options
Diffstat (limited to 'api/franca')
21 files changed, 2933 insertions, 0 deletions
diff --git a/api/franca/enhancedpositionservice/CMakeLists.txt b/api/franca/enhancedpositionservice/CMakeLists.txt new file mode 100644 index 0000000..eb4ee54 --- /dev/null +++ b/api/franca/enhancedpositionservice/CMakeLists.txt @@ -0,0 +1,81 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca enhanced position service generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2018, PSA Groupe +# +# 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-enhancedpositionservice) + +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_GENERATOR + "Absolute path to CommonAPI code generator" "") +option(COMMONAPI_DBUS_TOOL_GENERATOR + "Absolute path to CommonAPI-DBus code generator" "") +option(COMMONAPI_WAMP_TOOL_GENERATOR + "Absolute path to CommonAPI-Wamp code generator" "") +option(WITH_WAMP_GENERATION + "Generate Wamp files" OFF) + +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_GENERATOR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<tool>") +endif () + +if (WITH_WAMP_GENERATION) + if (COMMONAPI_WAMP_TOOL_GENERATOR) + foreach(RAW_FILE ${FIDL_FILES}) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND java -jar ${COMMONAPI_WAMP_TOOL_GENERATOR} -f ${RAW_FILE} -d ${COMMONAPI_GEN_DIR} ) + endforeach() + else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_WAMP_TOOL_GENERATOR=<tool>") + endif () +else() + if (COMMONAPI_DBUS_TOOL_GENERATOR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<tool>") + endif () +endif() + diff --git a/api/franca/enhancedpositionservice/Configuration.fidl b/api/franca/enhancedpositionservice/Configuration.fidl new file mode 100755 index 0000000..0bc9b57 --- /dev/null +++ b/api/franca/enhancedpositionservice/Configuration.fidl @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: MPL-2.0
+ Component Name: EnhancedPositionService
+ Compliance Level: Abstract Component
+ Copyright (C) 2012, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH
+ 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/.
+*/
+
+package org.genivi.enhancedpositionservice
+
+import org.genivi.enhancedpositionservice.EnhancedPositionServiceTypes.* from "EnhancedPositionServiceTypes.fidl"
+
+<** @description : Configuration = This interface allows a client application to set and retrieve configuration options **>
+interface Configuration {
+ version {
+ major 5
+ minor 0
+ }
+
+ <** @description : SatSystem = satellite system (GPS, GLONASS, ...) **>
+ attribute SatelliteSystem SatSystem
+
+ <** @description : UpdateInterval = update interval **>
+ attribute Int32 UpdateInterval
+
+ <** @description : GetVersion = This method returns the API version implemented by the server application **>
+ method GetVersion {
+ out {
+ Version ^version
+ }
+ }
+
+ <** @description : GetSupportedSatelliteSystems = This method returns a list of supported satellite systems **>
+ method GetSupportedSatelliteSystems {
+ out {
+ <** @description : satelliteSystems = list of supported satellite systems **>
+ SatelliteSystem[] satelliteSystems
+ }
+ }
+
+
+}
diff --git a/api/franca/enhancedpositionservice/EnhancedPosition.fidl b/api/franca/enhancedpositionservice/EnhancedPosition.fidl new file mode 100755 index 0000000..2733b3d --- /dev/null +++ b/api/franca/enhancedpositionservice/EnhancedPosition.fidl @@ -0,0 +1,78 @@ +/* SPDX-License-Identifier: MPL-2.0
+ Component Name: EnhancedPositionService
+ Compliance Level: Abstract Component
+ Copyright (C) 2012, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH
+ 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/.
+*/
+
+package org.genivi.enhancedpositionservice
+
+import org.genivi.enhancedpositionservice.EnhancedPositionServiceTypes.* from "EnhancedPositionServiceTypes.fidl"
+
+<** @description : EnhancedPosition = This interface offers functionalities to retrieve the enhanced position of the vehicle **>
+interface EnhancedPosition {
+ version {
+ major 5
+ minor 0
+ }
+
+ <** @description : GetVersion = This method returns the API version implemented by the server application **>
+ method GetVersion {
+ out {
+ Version ^version
+ }
+ }
+
+ <** @description : GetPositionInfo = This method returns a given set of positioning data (e.g. Position, Course, Accuracy, Status, ... )
+ Note: If a requested value is invalid, it's not returned to the client application
+ **>
+ method GetPositionInfo {
+ in {
+ <** @description : valuesToReturn = Bitmask obtained as result of a bitwise OR operation on the keys corresponding to the values to be returned **>
+ Bitmask valuesToReturn
+ }
+ out {
+ <** @description : timestamp = Timestamp of the acquisition of the position data [ms] **>
+ Timestamp timestamp
+ <** @description : data = Position data **>
+ PositionInfo data
+ }
+ }
+
+ <**
+ @description : GetSatelliteInfo = This method returns information about the current satellite constellation
+ Note: If a requested value is invalid, it's not returned to the client application
+ **>
+ method GetSatelliteInfo {
+ out {
+ <** @description : timestamp = Timestamp of the acquisition of the satellite detail data [ms] **>
+ Timestamp timestamp
+ <** @description : satelliteInfo = satellite information **>
+ SatelliteInfo satelliteInfo
+ }
+ }
+
+ <** @description : GetTime = This method returns UTC time and date.
+ Note: If a requested value is invalid, it's not returned to the client application
+ **>
+ method GetTime {
+ out {
+ <** @description : timestamp = Timestamp of the acquisition of the UTC date/time [ms] **>
+ Timestamp timestamp
+ <** @description : time = UTC date/time **>
+ TimeInfo time
+ }
+ }
+
+ <** @description : PositionUpdate = This signal is called to notify a client application of a position change. The update frequency is implementation specific. The maximal allowed frequency is 10Hz **>
+ broadcast PositionUpdate {
+ out {
+ <** @description : valuesToReturn = Bitmask obtained as result of a bitwise OR operation on the keys corresponding to the values that changed **>
+ Bitmask changedValues
+ }
+ }
+
+}
diff --git a/api/franca/enhancedpositionservice/EnhancedPositionServiceTypes.fidl b/api/franca/enhancedpositionservice/EnhancedPositionServiceTypes.fidl new file mode 100755 index 0000000..fd748ae --- /dev/null +++ b/api/franca/enhancedpositionservice/EnhancedPositionServiceTypes.fidl @@ -0,0 +1,183 @@ +/* SPDX-License-Identifier: MPL-2.0
+ Component Name: EnhancedPositionService
+ Compliance Level: Abstract Component
+ Copyright (C) 2012, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH
+ 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/.
+*/
+
+package org.genivi.enhancedpositionservice
+
+typeCollection EnhancedPositionServiceTypes {
+
+ version {
+ major 5
+ minor 0
+ }
+
+ typedef Timestamp is UInt64
+
+ <** @description: bitmask obtained as a result of an OR operation on enum values of type PositionInfoKey **>
+ typedef Bitmask is UInt64
+
+ <** @description: version **>
+ struct Version {
+ <** @description : when the major changes, then backward compatibility with previous releases is not granted **>
+ UInt16 maj
+ <** @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 min
+ <** @description : when the micro changes, then backward compatibility with previous releases is granted (bug fixes or documentation modifications) **>
+ UInt16 mic
+ <** @description : release date (e.g. 21-06-2011) **>
+ String date
+ }
+
+ <** @description : Value = generic value (mapped to a dbus variant ('v') data type)**>
+ union Value {
+ UInt64 uInt64Value
+ Double doubleValue
+ Float floatValue
+ String stringValue
+ }
+
+ enumeration PositionInfoKey {
+ LATITUDE = 1
+ LONGITUDE = 2
+ ALTITUDE = 4
+ HEADING = 8
+ SPEED = 16
+ CLIMB = 32
+ ROLL_RATE = 64
+ PITCH_RATE = 128
+ YAW_RATE = 256
+ PDOP = 512
+ HDOP = 1024
+ VDOP = 2048
+ USED_SATELLITES = 4096
+ TRACKED_SATELLITES = 8192
+ VISIBLE_SATELLITES = 16384
+ SIGMA_HPOSITION = 32768
+ SIGMA_ALTITUDE = 65536
+ SIGMA_HEADING = 131072
+ SIGMA_SPEED = 262144
+ SIGMA_CLIMB = 524288
+ GNSS_FIX_STATUS = 1048576
+ DR_STATUS = 2097152
+ RELIABILTY_INDEX = 4194304
+ }
+
+ <** @description : PositionInfo = array of tuples (key,value)
+ key = enumeration PositionInfoKey
+ key = LATITUDE, value = value of type 'Double', that expresses the latitude of the current position. Range [-90:+90]. Example: 48.053250
+ key = LONGITUDE, value = value of type 'Double', that expresses the longitude of the current position. Range [-180:+180]. Example: 8.324500
+ key = ALTITUDE, value = value of type 'Double', that expresses the altitude above the sea level of the current position in meters
+ key = HEADING, value = value of type 'Double', that expresses the course angle in degree. Range [0:360]. 0 = north, 90 = east, 180 = south, 270 = west
+ key = SPEED, value = value of type 'Double', that expresses speed measured in m/s. A negative value indicates that the vehicle is moving backwards
+ key = CLIMB, value = value of type 'Double', that expresses the road gradient in degrees
+ key = ROLL_RATE, value = value of type 'Double', rotation rate around the X-axis in degrees/s. Range [-100:+100]
+ key = PITCH_RATE, value = value of type 'Double', rotation rate around the Y-axis in degrees/s. Range [-100:+100]
+ key = YAW_RATE, value = value of type 'Double', rotation rate around the Z-axis in degrees/s. Range [-100:+100]
+ key = PDOP, value = value of type 'Double', that represents the positional (3D) dilution of precision
+ key = HDOP, value = value of type 'Double', that represents the horizontal (2D) dilution of precision
+ key = VDOP, value = value of type 'Double', that represents vertical (altitude) dilution of precision
+ key = USED_SATELLITES, value = value of type 'UInt8', that represents the number of used satellites
+ key = TRACKED_SATELLITES, value = value of type 'UInt8', that represents the number of tracked satellites
+ key = VISIBLE_SATELLITES, value = value of type 'UInt8', that represents the number of visible satellites
+ key = SIGMA_HPOSITION, value = value of type 'Double', that represents the standard deviation for the horizontal position in m
+ key = SIGMA_ALTITUDE, value = value of type 'Double', that represents the standard deviation for altitude in m
+ key = SIGMA_HEADING, value = value of type 'Double', that represents the standard deviation for altitude in degrees
+ key = SIGMA_SPEED, value = value of type 'Double', that represents the standard error estimate of the speed in m/s</line>
+ key = SIGMA_CLIMB, value = value of type 'Double', that represents the standard error estimate of the climb in degrees</line>
+ key = GNSS_FIX_STATUS, value = value of type 'UInt16', that represents an enum(NO_FIX(0x01),TIME_FIX(0x01),2D_FIX(0x02),3D_FIX(0x03), ... )
+ key = DR_STATUS, value = value of type 'Boolean', where TRUE means that a dead-reckoning algorithm has been used to calculate the current position
+ **>
+ map PositionInfo {
+ PositionInfoKey to Value
+ }
+
+ enumeration SatelliteSystem {
+ GPS = 1
+ GLONASS = 2
+ GALILEO = 3
+ COMPASS = 4
+ }
+
+ <** @description : SatelliteInfo = array(struct(system,satelliteId,azimuth,elevation,cNo,inUse))
+ system = enum(GPS, GLONASS, GALILEO, COMPASS, ... )
+ satelliteId = satellite ID. This ID is unique within one satellite system
+ azimuth = satellite azimuth in degrees. Value range 0..359
+ elevation = satellite elevation in degrees. Value range 0..90
+ cNo = C/No (SNR) in dBHz. Range 0 to 99, 0 when not tracking
+ inUse = flag indicating if the satellite is used for the fix (inUse=true)
+ **>
+ struct SatelliteInfo {
+ SatelliteSystem system
+ UInt32 satellitId
+ UInt32 azimuth
+ UInt32 elevation
+ UInt32 cNo
+ Boolean inUse
+ }
+
+ <** @description: since the hexadecimal format is not supported by Franca yet
+ the bitmask below is expressed using numbers in decimal format.
+ Example: 0x01000000 = 16777216 **>
+ enumeration TimeInfoKey {
+ YEAR = 16777216
+ MONTH = 33554432
+ DAY = 67108864
+ HOUR = 134217728
+ MINUTE = 268435456
+ SECOND = 536870912
+ MS = 1073741824
+ }
+
+ <** @description : TimeInfo = array of tuples (key,value)
+ key = enumeration TimeInfoKey
+ key = YEAR, value = value of type 'UInt16', 4 digits number that indicates the year. Example: 2012
+ key = MONTH, value = value of type 'UInt8', 2 digits number that indicates the month. Example: 03 means March
+ key = DAY, value = value of type 'UInt8', 2 digits number that indicates the day. Range [0:31]. Example: 07
+ key = HOUR, value = value of type 'UInt8', 2 digits number that indicates the hour. Range [0:23]. Example: 01
+ key = MINUTE, value = value of type 'UInt8', 2 digits number that represents the minutes. Range [0:59]. Example: 01
+ key = SECOND, value = value of type 'UInt8', 2 digits number that represents the seconds. Range [0:59]. Example: 01
+ key = MS, value = value of type 'UInt16', 3 digits number that represents the milliseconds. Range [0:999]. Example: 007
+ **>
+ map TimeInfo {
+ TimeInfoKey to Value
+ }
+
+ enumeration PositionFeedbackKey {
+ LATITUDE = 1
+ LONGITUDE = 2
+ ALTITUDE = 4
+ HEADING = 8
+ SPEED = 16
+ CLIMB = 32
+ RELIABILTY_INDEX = 64
+ }
+
+ enumeration PositionFeedbackType {
+ MAP_MATCHED_FEEDBACK = 1
+ TEST_FEEDBACK = 2
+ }
+
+ <**
+ @description : PositionFeedback = array of tuples (key,value)</line>
+ key = enum(LATITUDE,LONGITUDE,ALTITUDE,HEADING,SPEED,CLIMB,RELIABILTY_INDEX, ... )</line>
+ key = LATITUDE, value = value of type ´d´, that expresses the latitude of the current position in format %3.6f. [-90,+90]. Example: 48.053250
+ key = LONGITUDE, value = value of type ´d´, that expresses the longitude of the current position in format %3.6f. [-180,+180]. Example: 8.324500
+ key = ALTITUDE, value = value of type ´i´, that expresses the altitude above the sea level of the current position in meters
+ key = HEADING, value = value of type ´i´, that expresses the course angle in degree. [0,360]. Example: 0 => north, 90 => east, 180 => south, 270 => west
+ key = SPEED, value = value of type ´d´, that expresses speed measured in m/s
+ key = CLIMB, value = value of type ´i´, that expresses the inclination measured in degrees
+ key = RELIABILTY_INDEX, value = value of type ´y´, that indicates the position feedabck reliabilty. It can assume values from 0 to 100
+ **>
+ map PositionFeedbackInfo {
+ PositionFeedbackType to Value
+ }
+
+}
+
+
diff --git a/api/franca/enhancedpositionservice/PositionFeedback.fidl b/api/franca/enhancedpositionservice/PositionFeedback.fidl new file mode 100755 index 0000000..5e391f9 --- /dev/null +++ b/api/franca/enhancedpositionservice/PositionFeedback.fidl @@ -0,0 +1,54 @@ +/* SPDX-License-Identifier: MPL-2.0
+ Component Name: EnhancedPositionService
+ Compliance Level: Abstract Component
+ Copyright (C) 2012, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH
+ 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/.
+*/
+
+package org.genivi.enhancedpositionservice
+
+import org.genivi.enhancedpositionservice.EnhancedPositionServiceTypes.* from "EnhancedPositionServiceTypes.fidl"
+
+<**
+ @description : PositionFeedback = This interface allows the application implementing the map-matching algorithm to provide a position feedback to the EnhancedPositionService
+**>
+
+interface PositionFeedback {
+ version {
+ major 5
+ minor 0
+ }
+
+ <**
+ @description : GetVersion = This method returns the API version implemented by the server application
+ **>
+ method GetVersion {
+ out {
+ Version ^version
+ }
+ }
+
+ <**
+ @description : SetPositionFeedback = This method allows a client application to provide the EnhancedPositionService with a position feedback
+ **>
+ method SetPositionFeedback {
+ in {
+ PositionFeedbackInfo feedback
+
+ <**
+ @description : timestamp = timestamp in ms
+ **>
+ UInt64 timestamp
+
+ <**
+ @description : feedbackType = enum(INVALID,MAP_MATCHED_FEEDBACK,TEST_FEEDBACK, ... )
+ **>
+ PositionFeedbackType feedbackType
+ }
+ }
+
+
+}
diff --git a/api/franca/gnssservice/CMakeLists.txt b/api/franca/gnssservice/CMakeLists.txt new file mode 100644 index 0000000..9c9dffc --- /dev/null +++ b/api/franca/gnssservice/CMakeLists.txt @@ -0,0 +1,81 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca gnss service generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2018, PSA Groupe +# +# 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-gnssservice) + +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_GENERATOR + "Absolute path to CommonAPI code generator" "") +option(COMMONAPI_DBUS_TOOL_GENERATOR + "Absolute path to CommonAPI-DBus code generator" "") +option(COMMONAPI_WAMP_TOOL_GENERATOR + "Absolute path to CommonAPI-Wamp code generator" "") +option(WAMP_GENERATION + "Generate Wamp files" OFF) + +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_GENERATOR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<tool>") +endif () + +if (WITH_WAMP_GENERATION) + if (COMMONAPI_WAMP_TOOL_GENERATOR) + foreach(RAW_FILE ${FIDL_FILES}) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND java -jar ${COMMONAPI_WAMP_TOOL_GENERATOR} -f ${RAW_FILE} -d ${COMMONAPI_GEN_DIR} ) + endforeach() + else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_WAMP_TOOL_GENERATOR=<tool>") + endif () +else() + if (COMMONAPI_DBUS_TOOL_GENERATOR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<tool>") + endif () +endif() + diff --git a/api/franca/gnssservice/GnssService.fidl b/api/franca/gnssservice/GnssService.fidl new file mode 100644 index 0000000..040e981 --- /dev/null +++ b/api/franca/gnssservice/GnssService.fidl @@ -0,0 +1,192 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: GnssService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.gnssservice + +import org.genivi.gnssservice.GnssServiceTypes.* from "GnssServiceTypes.fidl" + +<** @description : Gnss = This interface offers functionalities to retrieve the GNSS position of the vehicle **> +interface Gnss { + version { + major 5 + minor 0 + } + + <** @description: getTime = get the UTC date and time data of the GNSS receiver at a specific point in time. **> + method getTime { + out { + TGNSSTime utc + <** @description: provided = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean provided + } + } + + <** @description: notifyTimeChanged + The signal will be emitted when new time data is available from the GNSS receiver. + The valid flags is updated. The data is only guaranteed to be updated when the valid flag is true. + This signal may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + **> + broadcast notifyTimeChanged selective { + out { + <** @description: time = array of TGNSSTime with size numElements**> + TGNSSTime[] time + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: getSatelliteDetails = get the GNSS satellite details at a specific point in time. **> + method getSatelliteDetails { + in { + <** @description: count = Number of elements of the array satelliteDetails. + This should be at least TGnssMetaData::numChannels **> + UInt16 count + } + out { + TGNSSSatelliteDetail satelliteDetails + <** @description: numSatelliteDetails = Number of elements written to the array satelliteDetails. **> + UInt16 numSatelliteDetails + <** @description: provided = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean provided + } + } + + <** @description: notifySatelliteDetailChanged + The signal will be emitted when new date data is available from the GNSS receiver. + The valid flags is updated. The data is only guaranteed to be updated when the valid flag is true. + This signal may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + **> + broadcast notifySatelliteDetailChanged selective { + out { + <** @description: satelliteDetail = array of TGNSSSatelliteDetail with size numElements. **> + TGNSSSatelliteDetail[] satelliteDetail + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided. **> + UInt16 numElements + } + } + + <** @description: getPosition = get the GNSS position data at a specific point in time. **> + method getPosition { + out { + TGNSSPosition position + <** @description: provided = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean provided + } + } + + <** @description: notifyPositionChanged + The signal will be emitted when new position data data is available from the GNSS receiver. + The valid flags is updated. The data is only guaranteed to be updated when the valid flag is true. + This signal may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + **> + broadcast notifyPositionChanged selective { + out { + <** @description: position = array of TGNSSPosition with size numElements. **> + TGNSSPosition[] position + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided. **> + UInt16 numElements + } + } + + <** @description: getPrecisionTimingOffset = get the precision timing information as signaled by the GNSS PPS signal. + For accurate timing the 1 PPS (pulse per second) signal from the GNSS receiver is used within the positioning framework. + The PPS is a hardware signal which is a UTC synchronized pulse. + The duration between the pulses is 1s +/- 40ns and the duration of the pulse is configurable (about 100-200ms). + The PPS signal can be provided in the positioning framework as an interrupt service routine and this method provides the access + to the delta from UTC to system time. + If you really need precision timing you have to have the system time set within a range of +/-2s of UTC. + **> + method getPrecisionTimingOffset { + out { + <** @description: delta = The result is provided in this parameter in nanoseconds. It gives the deviation of the system time (+/-) in respect to the PPS pulse and UTC. + If the deviation is is greater than a value that can be represented with 32 Bits (i.e. more or less than about 2s) the + maximum values are written to this parameter and the return value will be false. + **> + Int32 delta + <** @description: available = Is true if the precision timing is available and fits in the range which can be represented by the delta parameter. **> + Boolean available + } + } + + <** @description: setGNSSSystems = set a specific set of GNSS satellite systems. + No immediate confirmation is provided as the configuration request + is typically executed asynchronously by the GNSS receiver. + To verify when the configuration change has been executed, + the corresponding fields TGNSSPosition::activatedSystems and TGNSSPosition::usedSystems + in TGNSSPosition updates have to be monitored + **> + method setGNSSSystems { + in { + <** @description: activateSystems = Bit mask indicating the satellite systems which shall be activated for use + [bitwise or'ed EGNSSSystem values]. **> + UInt32 activateSystems + } + out { + <** @description: accepted = True if the configuration request has been accepted. + False if the configuration request has not been accepted or is not supported at all. **> + Boolean accepted + } + } + + <** @description: getStatus = get the GNSS status at a specific point in time. **> + method getStatus { + out { + TGNSSStatus status + <** @description: provided = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean provided + } + } + + <** @description: notifyStatusChanged + The signal will be emitted when when new GNSS status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TGNSSStatus status + } + } + + <** @description: getMetaData = get the meta information about GNSS service. **> + method getMetaData { + out { + TGnssMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: init = Initialization of the GNSS service. + Must be called before using the GNSS service to set up the service. **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: destroy = Destroy the GNSS service. + Must be called after using the GNSS service to shut down the service. **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + +} diff --git a/api/franca/gnssservice/GnssServiceConfiguration.fidl b/api/franca/gnssservice/GnssServiceConfiguration.fidl new file mode 100644 index 0000000..139d9ed --- /dev/null +++ b/api/franca/gnssservice/GnssServiceConfiguration.fidl @@ -0,0 +1,68 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: GnssService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.gnssservice + +import org.genivi.gnssservice.GnssServiceTypes.* from "GnssServiceTypes.fidl" + +<** @description : Gnss = This interface offers functionalities to retrieve the GNSS position of the vehicle **> +interface Configuration { + version { + major 5 + minor 0 + } + + <** @description: + 3 dimensional distance used for description of geometric descriptions within the vehicle reference system. + The vehicle axis system as defined in ISO 8855:2011(E). + In this system, the axes (Xv, Yv, Zv) are oriented as follows + - Xv is in the horizontal plane, pointing forwards + - Yv is in the horizontal plane, pointing to the left + - Zv is perpendicular to the horizontal plane, pointing upwards + For an illustration, see https://collab.genivi.org/wiki/display/genivi/LBSSensorServiceRequirementsBorg#LBSSensorServiceRequirementsBorg-ReferenceSystem + The reference point of the vehicle lies underneath the center of the rear axle on the surface of the road. + **> + struct TGNSSDistance3D { + Float x // Distance in x direction in [m] according to the reference coordinate system. + Float y // Distance in y direction in [m] according to the reference coordinate system. + Float z // Distance in z direction in [m] according to the reference coordinate system. + } + + <** @description: + TGNSSConfiguration::validityBits provides information about the currently valid signals of the GNSS configuration data. + It is a or'ed bitmask of the EGNSSConfigValidityBits values. + **> + enumeration EGNSSConfigValidityBits { + GNSS_CONFIG_ANTPOS_VALID = 1 //0x00000001 Validity bit for field TGNSSConfiguration::antennaPosition. + GNSS_CONFIG_SATSYS_VALID = 2 //0x00000002 Validity bit for field TGNSSConfiguration::supportedSystems. + } + + <** @description: + Static configuration data related to the GNSS service. + **> + struct TGNSSConfiguration { + TGNSSDistance3D antennaPosition // GNSS antenna position relative to the vehicle reference point. + UInt32 supportedSystems // Bit mask indicating the satellite systems which are supported by the GNSS hardware + // [bitwise or'ed see ref EGNSSSystem values]. + UInt32 validityBits // Bit mask indicating the validity of each corresponding value. + // [bitwise or'ed see ref EGNSSConfigValidityBits values]. + // Must be checked before usage. + } + + <** @description: getConfiguration = Accessing static configurationdata related to the GNSS service. **> + method getConfiguration { + out { + TGNSSConfiguration gnssConfig + <** @description: provided = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean provided + } + } + +} diff --git a/api/franca/gnssservice/GnssServiceTypes.fidl b/api/franca/gnssservice/GnssServiceTypes.fidl new file mode 100644 index 0000000..6ca2216 --- /dev/null +++ b/api/franca/gnssservice/GnssServiceTypes.fidl @@ -0,0 +1,355 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: GnssService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.gnssservice + +typeCollection GnssServiceTypes { + version { + major 5 + minor 0 + } + + <** @description: + Description of the fix status of the GNSS reveiver. + **> + enumeration EGNSSFixStatus { + GNSS_FIX_STATUS_NO // GNSS has no fix, i.e. position, velocity, time cannot be determined + GNSS_FIX_STATUS_TIME // GNSS can only determine the time, but not position and velocity + GNSS_FIX_STATUS_2D // GNSS has a 2D fix, i.e. the horizontal position can be determined but not the altitude. + // This implies that also velocity and time are available. + GNSS_FIX_STATUS_3D // GNSS has a 3D fix, i.e. position can be determined including the altitude. + // This implies that also velocity and time are available. + } + + <** @description: + TGNSSPosition::fixTypeBits provides GNSS Fix Type indication. + I.e. it identifies the sources actually used for the GNSS calculation + It is a or'ed bitmask of the EGNSSFixType values. + The bit values have been grouped logically with gaps where future extensions can be foreseen + Within one group, not all combinations make necessarily sense + Between different groups, all combinations should make sense + **> + enumeration EGNSSFixType { + //Information about the used satellite data + GNSS_FIX_TYPE_SINGLE_FREQUENCY = 1 //0x00000001 GNSS satellite data are received on a single frequency. + // A typical example is GPS using only the C/A code on the L1 frequency. + // It e.g. also applies to a combined GPS(L1)/Galileo(E1) fix since L1 and E1 share the same frequency. + GNSS_FIX_TYPE_MULTI_FREQUENCY = 2 //0x00000002 GNSS satellite data are received on a multiple frequencies. + // This enables the receiver to correct frequency-dependent errors such as for ionospheric delays. + // An example could be a GPS receiver receiving on the L1 and L2C band. + GNSS_FIX_TYPE_MULTI_CONSTELLATION = 4 //0x00000004 GNSS satellite data are received and used for the fix from more than one GNSS system. + // For example, the fix could be calculated from GPS and GLONASS. + // This is also possible for single frequency as several GNSS systems share the same frequencies. + //Information of improvement techniques based on the satellite signals + GNSS_FIX_TYPE_PPP = 16 //0x00000010 PPP = Precise Point Positioning + // An improved precision is achieved without differential corrections. + // This is possible even for single frequency receivers, e.g. by using carrier phase tracking + GNSS_FIX_TYPE_INTEGRITY_CHECKED = 32 //0x00000020 Additional integrity checks have been done to ensure the correctness of the fix. + //Information about used correction data + GNSS_FIX_TYPE_SBAS = 4096 //0x00001000 SBAS = Satellite Based Augmentation System + // Correction data from an SBAS system such as WAAS, EGNOS, ... are taken into account + GNSS_FIX_TYPE_DGNSS = 8192 //0x00002000 DGNSS = Differential GNSS + // Correction data from Differential GNSS is taken into account + GNSS_FIX_TYPE_RTK_FIXED = 16384 //0x00004000 RTK = Real Time Kinematic + // Correction data from a RTK fixed solution is taken into account + GNSS_FIX_TYPE_RTK_Float = 32768 //0x00008000 RTK = Real Time Kinematic + // Correction data from a RTK Floating solution is taken into account + GNSS_FIX_TYPE_SSR = 65536 //0x00010000 SSR = State Space Representation + // Correction data according the SSR standard from RTCM SC104 or similar are taken into account + //Information about position propagation + GNSS_FIX_TYPE_ESTIMATED = 1048576 //0x00100000 The position is propagated without additional sensor input + GNSS_FIX_TYPE_DEAD_RECKONING = 2097152 //0x00200000 The position is propagated with support of additional sensor input, e.g. from inertial and/or vehicle sensors + //Information to identify artificial GNSS fixes + GNSS_FIX_TYPE_MANUAL = 268435456 //0x10000000 Position is set by manual input + GNSS_FIX_TYPE_SIMULATOR_MODE = 536870912 //0x20000000 Position is simulated + } + + <** @description: + Description of the time scale used. + **> + enumeration EGNSSTimeScale { + GNSS_TIME_SCALE_UTC = 0 // GNSS time is provided according UTC time scale (with leap seconds). This is the preferred time scale. + GNSS_TIME_SCALE_GPS = 1 // GNSS time is provided according GPS time scale (no leap seconds since 06-Jan-1980). This time scale will only be used if UTC is not available. + } + + <** @description: + TGNSSTime::validityBits provides information about the currently valid parts of UTC date/time. + It is a or'ed bitmask of the EGNSSUTCValidityBits values. + There are separate validity bits for date end time since a GPS receiver may be able to provide time earlier than date. + **> + enumeration EGNSSTimeValidityBits { + GNSS_TIME_TIME_VALID = 1 //0x00000001 Validity bit for field TGNSSTime fields hour, minute, second, ms. + GNSS_TIME_DATE_VALID = 2 //0x00000002 Validity bit for field TGNSSTime fields year, month, day. + GNSS_TIME_SCALE_VALID = 4 //0x00000004 Validity bit for field TGNSSTime field scale. + GNSS_TIME_LEAPSEC_VALID = 8 //0x00000008 Validity bit for field TGNSSTime field leapSeconds. + } + + <** @description: + Provides the current date and time according UTC (Coordinated Universal Time) + Note: the uncommon numbering of day and month is chosen to be compatible with the struct tm from the standard C-Library + **> + struct TGNSSTime { + UInt64 timestamp // Timestamp of the acquisition of the UTC date/time [ms]. + // All sensor/GNSS timestamps must be based on the same time source. + UInt16 year // Year fraction of the UTC time. Unit: [year] Number equivalent to the year (4 digits) + UInt8 month // Month fraction of the UTC time. Unit: [month] Number betweeen 0 and 11 + UInt8 day // Day of month fraction of the UTC time. Unit: [day]. Number between 1 and 31 + UInt8 hour // Hour fraction of the UTC time. Unit: [hour] Number between 0 and 23 + UInt8 minute // Minute fraction of the UTC time. Unit: [minutes] Number between 0 and 59 + UInt8 second // Second fraction of the UTC time. Unit: [seconds] Number between 0 and 59. + // In case of a leap second this value is 60. + UInt16 ms // Millisecond fraction of the UTC time. Unit: [milliseconds] Number between 0 and 999 + EGNSSTimeScale scale // Time scale used: UTC or GPS. + Int8 leapSeconds // Number of leap seconds, i.e. difference between GPS time and UTC. Unit: [seconds]. + // Note: value before 01-July-2015: 16; from 01-July-2015: 17; further changes possible. + UInt32 validityBits // Bit mask indicating the validity of each corresponding value. + // [bitwise or'ed see ref EGNSSTimeValidityBits values]. + // Must be checked before usage. + } + + <** @description: + Enumeration to describe the type of GNSS system to which a particular GNSS satellite belongs. + For GNSS systems providing different signals (frequencies), separate values are provided for each signal. + The enumeration values can be used in bitmasks to represent combinations of satellite systems, + e.g. in case of multiconstellation GNSS or GNSS + augmentation systems + **> + enumeration EGNSSSystem { + GNSS_SYSTEM_GPS = 1 //0x00000001 GPS (L1 signal)*/ + GNSS_SYSTEM_GLONASS = 2 //0x00000002 GLONASS (L1 signal) + GNSS_SYSTEM_GALILEO = 4 //0x00000004 GALILEO (E1 signal) + GNSS_SYSTEM_BEIDOU = 8 //0x00000008 BeiDou aka COMPASS (B1 signal) + GNSS_SYSTEM_GPS_L2 = 16 //0x00000010 GPS (L2 signal) + GNSS_SYSTEM_GPS_L5 = 32 //0x00000020 GPS (L5 signal) + GNSS_SYSTEM_GLONASS_L2 = 64 //0x00000040 GLONASS (L2 signal) + GNSS_SYSTEM_BEIDOU_B2 = 128 //0x00000080 BeiDou aka COMPASS (B2 signal) + // Numbers >= 0x00010000 are used to identify SBAS (satellite based augmentation system) + GNSS_SYSTEM_SBAS_WAAS = 65536 //0x00010000 WAAS (North America) + GNSS_SYSTEM_SBAS_EGNOS = 131072 //0x00020000 EGNOS (Europe) + GNSS_SYSTEM_SBAS_MSAS = 262144 //0x00040000 MSAS (Japan) + GNSS_SYSTEM_SBAS_QZSS_SAIF = 524288 //0x00080000 QZSS-SAIF (Japan) + GNSS_SYSTEM_SBAS_SDCM = 1048576 //0x00100000 SDCM (Russia) + GNSS_SYSTEM_SBAS_GAGAN = 2097152 //0x00200000 GAGAN (India) + } + + <** @description: + TGNSSSatelliteDetail::statusBits provides additional status information about a GNSS satellite. + It is a or'ed bitmask of the EGNSSSatelliteFlag values. + **> + enumeration EGNSSSatelliteFlag { + GNSS_SATELLITE_USED = 1 //0x00000001 Bit is set when satellite is used for fix. + GNSS_SATELLITE_EPHEMERIS_AVAILABLE = 2 //0x00000002 Bit is set when ephemeris is available for this satellite. + } + + <** @description: + TGNSSSatelliteDetail::validityBits provides information about the currently valid values of GNSS satellite data. + It is a or'ed bitmask of the EGNSSSatelliteDetailValidityBits values. + **> + enumeration EGNSSSatelliteDetailValidityBits { + GNSS_SATELLITE_SYSTEM_VALID = 1 //0x00000001 Validity bit for field TGNSSSatelliteDetail::system. + GNSS_SATELLITE_ID_VALID = 2 //0x00000002 Validity bit for field TGNSSSatelliteDetail::satelliteId. + GNSS_SATELLITE_AZIMUTH_VALID = 4 //0x00000004 Validity bit for field TGNSSSatelliteDetail::azimuth. + GNSS_SATELLITE_ELEVATION_VALID = 8 //0x00000008 Validity bit for field TGNSSSatelliteDetail::elevation. + GNSS_SATELLITE_CNO_VALID = 16 //0x00000010 Validity bit for field TGNSSSatelliteDetail::CNo. + GNSS_SATELLITE_USED_VALID = 32 //0x00000020 Validity bit for field TGNSSSatelliteDetail::statusBits::GNSS_SATELLITE_USED. + GNSS_SATELLITE_EPHEMERIS_AVAILABLE_VALID = 64 //0x00000040 Validity bit for field TGNSSSatelliteDetail::statusBits::GNSS_SATELLITE_EPHEMERIS_AVAILABLE. + GNSS_SATELLITE_RESIDUAL_VALID = 128 //0x00000080 Validity bit for field TGNSSSatelliteDetail::posResidual. + } + + <** @description: + Detailed data from one GNSS satellite. + **> + struct TGNSSSatelliteDetail { + UInt64 timestamp // Timestamp of the acquisition of the satellite detail data [ms]. + // All sensor/GNSS timestamps must be based on the same time source. + EGNSSSystem system // Value representing the GNSS system. + UInt16 satelliteId // Satellite ID. + // Satellite IDs are only unique within one satellite system. + // Satellites of different systems can be distinguished by see ref TGNSSSatelliteDetail::system. + // Ranges: + // 1..32: GPS satellites (by PRN) + // 33..64: SBAS/WAAS satellites + // 65..96: GLONASS satellites + // 1..64: GALILEO satellites, see Galileo OS SIS ICD, http://www.gsc-europa.eu/gnss-markets/segments-applications/os-sis-icd. + + UInt16 azimuth // Satellite Azimuth in degrees. Value range 0..359 + UInt16 elevation // Satellite Elevation in degrees. Value range 0..90 + UInt16 CNo // C/No (SNR) in dBHz. Range 0 to 99, 0 when not tracking + UInt32 statusBits // Bit mask of additional status flags. + // [bitwise or'ed see ref EGNSSSatelliteFlag values]. + Int16 posResidual // Residual in m of position calculation. Range -999 to +999, 0 if not tracking + UInt32 validityBits // Bit mask indicating the validity of each corresponding value. + // [bitwise or'ed see ref EGNSSSatelliteDetailValidityBits values]. + // Must be checked before usage. + } + + <** @description: + TGNSSPosition::validityBits provides information about the currently valid signals + of the GNSS position and velocity including status and accuracy data. + It is a or'ed bitmask of the EGNSSPositionValidityBits values. + **> + enumeration EGNSSPositionValidityBits { + //position + GNSS_POSITION_LATITUDE_VALID = 1 //0x00000001 Validity bit for field TGNSSPosition::latitude. + GNSS_POSITION_LONGITUDE_VALID = 2 //0x00000002 Validity bit for field TGNSSPosition::longitude. + GNSS_POSITION_ALTITUDEMSL_VALID = 4 //0x00000004 Validity bit for field TGNSSPosition::altitudeMSL. + GNSS_POSITION_ALTITUDEELL_VALID = 8 //0x00000008 Validity bit for field TGNSSPosition::altitudeEll. + //velocity + GNSS_POSITION_HSPEED_VALID = 16 //0x00000010 Validity bit for field TGNSSPosition::hSpeed. + GNSS_POSITION_VSPEED_VALID = 32 //0x00000020 Validity bit for field TGNSSPosition::vSpeed. + GNSS_POSITION_HEADING_VALID = 64 //0x00000040 Validity bit for field TGNSSPosition::heading. + //quality parameters: satellite constellation + GNSS_POSITION_PDOP_VALID = 128 //0x00000080 Validity bit for field TGNSSPosition::pdop. + GNSS_POSITION_HDOP_VALID = 256 //0x00000100 Validity bit for field TGNSSPosition::hdop. + GNSS_POSITION_VDOP_VALID = 512 //0x00000200 Validity bit for field TGNSSPosition::vdop. + + GNSS_POSITION_USAT_VALID = 1024 //0x00000400 Validity bit for field TGNSSPosition::usedSatellites. + GNSS_POSITION_TSAT_VALID = 2048 //0x00000800 Validity bit for field TGNSSPosition::trackedSatellites. + GNSS_POSITION_VSAT_VALID = 4096 //0x00001000 Validity bit for field TGNSSPosition::visibleSatellites. + //quality parameters: error estimates + GNSS_POSITION_SHPOS_VALID = 8192 //0x00002000 Validity bit for field TGNSSPosition::sigmaHPosition. + GNSS_POSITION_SALT_VALID = 16384 //0x00004000 Validity bit for field TGNSSPosition::sigmaAltitude. + GNSS_POSITION_SHSPEED_VALID = 32768 //0x00008000 Validity bit for field TGNSSPosition::sigmaHSpeed. + GNSS_POSITION_SVSPEED_VALID = 65536 //0x00010000 Validity bit for field TGNSSPosition::sigmaVSpeed. + GNSS_POSITION_SHEADING_VALID = 131072 //0x00020000 Validity bit for field TGNSSPosition::sigmaHeading. + //quality parameters: overall GNSS fix status + GNSS_POSITION_STAT_VALID = 262144 //0x00040000 Validity bit for field TGNSSPosition::fixStatus. + GNSS_POSITION_TYPE_VALID = 524288 //0x00080000 Validity bit for field TGNSSPosition::fixTypeBits. + //gnss system information + GNSS_POSITION_ASYS_VALID = 1048576 //0x00100000 Validity bit for field TGNSSPosition::activatedSystems. + GNSS_POSITION_USYS_VALID = 2097152 //0x00200000 Validity bit for field TGNSSPosition::usedSystems. + //correction data information + GNSS_POSITION_CORRAGE_VALID = 4194304 //0x00400000 Validity bit for field TGNSSPosition::correctionAge. + } + + <** @description: + GNSS position data including velocity, status and accuracy. + This data structure provides all GNSS information which is typically needed + for positioning applications such as GNSS/Dead Reckoning sensor fusion. + Note: For an optimum sensor fusion with vehicle and inertial sensors, + the velocity vector (see ref hSpeed, see ref vSpeed, see ref heading) + is preferred to be low latency or instantaneous velocity output + from the GNSS chipset. + This may require a specific configuration of the GNSS chipset + which is out of the scope of this API. + **> + struct TGNSSPosition { + UInt64 timestamp // Timestamp of the acquisition of the GNSS data [ms]. + // All sensor/GNSS timestamps must be based on the same time source. + //position + Double latitude // Latitude in WGS84 in [degree]. + Double longitude // Longitude in WGS84 in [degree]. + Float altitudeMSL // Altitude above mean sea level (geoid) in [m]. + Float altitudeEll // Altitude above WGS84 ellipsoid in [m]. + //velocity + Float hSpeed // Horizontal speed [m/s], in direction as given by see ref heading. + Float vSpeed // Vertical speed [m/s]. + // A positive value indicates an upwards movement, i.e. an ascending altitude. + Float heading // GNSS course angle [degree] (0 => north, 90 => east, 180 => south, 270 => west, no negative values). + //quality parameters: satellite constellation + Float pdop // The positional (3D) dilution of precision. [Note: pdop^2 = hdop^2+vdop^2] + Float hdop // The horizontal (2D) dilution of precision. + Float vdop // The vertical (altitude) dilution of precision. + UInt16 usedSatellites // Number of satellites used for the GNSS fix. + UInt16 trackedSatellites // Number of satellites from which a signal is received. + UInt16 visibleSatellites // Number of satellites expected to be receivable, i.e. above horizon or elevation mask. + //quality parameters: error estimates + Float sigmaHPosition // Standard error estimate of the horizontal position in [m]. + Float sigmaAltitude // Standard error estimate of altitude in [m]. + Float sigmaHSpeed // Standard error estimate of horizontal speed in [m/s]. + Float sigmaVSpeed // Standard error estimate of vertical speed in [m/s]. + Float sigmaHeading // Standard error estimate of horizontal heading/course in [degree]. + //quality parameters: overall GNSS fix status + EGNSSFixStatus fixStatus // Value representing the GNSS mode. + UInt32 fixTypeBits // Bit mask indicating the sources actually used for the GNSS calculation. + // [bitwise or'ed see ref EGNSSFixType values]. + //gnss system information + UInt32 activatedSystems // Bit mask indicating the satellite systems that are activated for use + // [bitwise or'ed see ref EGNSSSystem values]. + UInt32 usedSystems // Bit mask indicating the satellite systems that are actually used for the position fix + // [bitwise or'ed see ref EGNSSSystem values]. + //correction data information + UInt16 correctionAge // Age of used correction data in [s]. + // Note: The kind of used correction data is identified by the corresponding bit in see ref fixTypeBits. + //validity bits + UInt32 validityBits // Bit mask indicating the validity of each corresponding value. + // [bitwise or'ed see ref EGNSSPositionValidityBits values]. + // Must be checked before usage. + } + + <** @description: Enumeration to describe the status of the GNSS receiver. **> + enumeration EGNSSStatus { + GNSS_STATUS_NOTAVAILABLE = 0 // GNSS is not available at all, based on configuration data. + GNSS_STATUS_INITIALIZING = 1 // Initial status when the connection to the GNSS is set up for the first time. + GNSS_STATUS_AVAILABLE = 2 // GNSS is available and running as expected. + GNSS_STATUS_RESTARTING = 3 // GNSS is restarted, i.e. due to communication loss. + GNSS_STATUS_FAILURE = 4 // GNSS is not operating properly. Restarting did not help. + GNSS_STATUS_OUTOFSERVICE = 5 // GNSS is temporarily not available, due to some known external condition, e.g. firmware update or switch off for antenna supervision. + } + + <** @description: Enumeration to describe the status of the GNSS antenna. **> + enumeration EGNSSAntennaStatus { + GNSS_ANT_STATUS_NORMAL = 0 // GNSS antenna is working in normal operation. + GNSS_ANT_STATUS_OVERCURRENT = 1 // GNSS antenna is working but the antenna current is higher than expected. + GNSS_ANT_STATUS_OPEN = 2 // GNSS antenna is not working because not connected (antenna current too low). + GNSS_ANT_STATUS_SHORT_GND = 3 // GNSS antenna is not working due to short-circuit to ground. + GNSS_ANT_STATUS_SHORT_BATT = 4 // GNSS antenna is not working due to short-circuit to battery. + GNSS_ANT_STATUS_OUTOFSERVICE = 5 // GNSS antenna is temporarily not available, due to some known external condition. + } + + <** @description: TGNSSStatus::validityBits provides information about the currently valid signals of the TGNSSStatus struct. + It is a or'ed bitmask of the EGNSSStatusValidityBits values. **> + enumeration EGNSSStatusValidityBits { + GNSS_STATUS_STATUS_VALID = 1 //0x00000001 Validity bit for field TGNSSStatus::status. + GNSS_STATUS_ANT_STATUS_VALID = 2 //0x00000002 Validity bit for field TGNSSStatus::antStatus. + } + + <** @description: Container for GNSS status information **> + struct TGNSSStatus { + UInt64 timestamp // Timestamp of the GNSS status transition [ms]. + // All sensor/GNSS timestamps must be based on the same time source. + EGNSSStatus status // Status of the GNSS receiver + EGNSSAntennaStatus antStatus // Status of the GNSS antenna + UInt32 validityBits // Bit mask indicating the validity of each corresponding value. + // [bitwise or'ed EGNSSStatusValidityBits values]. + // Must be checked before usage. + } + + <** @description: The GNSS category introduces the concept that sensor information can also be derived information + computed by combining several signals. **> + enumeration EGnssCategory { + GNSS_CATEGORY_UNKNOWN // Unknown category. Should not be used. + GNSS_CATEGORY_LOGICAL // A logical GNSS service can combine the signal of a GNSS receiver with additional sources. + GNSS_CATEGORY_PHYSICAL // A physical GNSS service, i.e. a stand-alone GNSS receiver. + } + + <** @description: TGnssMetaData:typeBits provides information about the sources used for the GNSS calculation + It is a or'ed bitmask of the EGnssTypeBits values. **> + enumeration EGnssTypeBits { + GNSS_TYPE_GNSS = 1 //0x00000001 GNSS receiver. Should always be set. + GNSS_TYPE_ASSISTED = 2 //0x00000002 GNSS receiver with support for Assisted GNSS. E.g. ephemeris or clock data can be provided over network for faster TTFF + GNSS_TYPE_SBAS = 4 //0x00000004 GNSS receiver with support for SBAS (satellite based augmentation system), such as WAAS, EGNOS, ... + GNSS_TYPE_DGPS = 8 //0x00000008 GNSS receiver with support for differential GPS + GNSS_TYPE_DR = 16 //0x00000010 GNSS receiver with built in dead reckoning sensor fusion + } + + + <** @description: The software platform provides the following information about the GNSS output signals. + GNSS clients need the meta data information in order to correctly handle data provided by GNSS service and + to adapt to the variation in the signal data delivery. **> + struct TGnssMetaData { + UInt32 versionGnss // Version of the GNSS service. //NB: version is a reserved word in Franca, so wording is fixed to versionGnss + EGnssCategory category // GNSS Category (Physical/Logical). + UInt32 typeBits // GNSS Type: combination of bits defined in EGnssTypeBits. + UInt32 cycleTime // GNSS cycle time (update interval) in ms. 0 for irregular updates + UInt16 numChannels // Number of GNSS receiver channels for satellite signal reception. + } + +} + diff --git a/api/franca/sensorsservice/Acceleration.fidl b/api/franca/sensorsservice/Acceleration.fidl new file mode 100644 index 0000000..0bda018 --- /dev/null +++ b/api/franca/sensorsservice/Acceleration.fidl @@ -0,0 +1,204 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : Acceleration = This interface offers functionalities to retrieve the Acceleration of the vehicle **> +interface Acceleration { + version { + major 5 + minor 0 + } + + <** @description: + Accelerometer type + TAccelerationConfiguration::typeBits provides information about the type of the accelerometer and the interpretation of the signals. + It is a or'ed bitmask of the EAccelerationTypeBits values. + **> + enumeration EAccelerationTypeBits{ + <** @description: An acceleration measurement for the x-axis is provided. + **> + ACCELERATION_X_PROVIDED = 1 //0x00000001 + <** @description: An acceleration measurement for the y-axis is provided. + **> + ACCELERATION_Y_PROVIDED = 2 //0x00000002 + <** @description: An acceleration measurement for the z-axis is provided. + **> + ACCELERATION_Z_PROVIDED = 4 //0x00000004 + <** @description: A measurement for the temperature is provided. + **> + ACCELERATION_TEMPERATURE_PROVIDED = 8 //0x00000008 + } + + <** @description: + TAccelerationData::validityBits provides information about the currently valid signals of the acceleration data. + It is a or'ed bitmask of the EAccelerationValidityBits values. + Note: + - The general availability of the signals is provided per TAccelerationConfiguration::typeBits. + - If a signal is generally provided but temporarily not available, then the corresponding typeBit will be set but not the validityBit + **> + enumeration EAccelerationValidityBits{ + <** @description: Validity bit for field TAccelerationData::x. + **> + ACCELERATION_X_VALID = 1 //0x00000001 + <** @description: Validity bit for field TAccelerationData::y. + **> + ACCELERATION_Y_VALID = 2 //0x00000002 + <** @description: Validity bit for field TAccelerationData::z. + **> + ACCELERATION_Z_VALID = 4 //0x00000004 + <** @description: Validity bit for field TAccelerationData::temperature. + **> + ACCELERATION_TEMPERATURE_VALID = 8 //0x00000008 + <** @description: Validity bit for field TAccelerationData::measurementInterval. + **> + ACCELERATION_MEASINT_VALID = 16 //0x00000010 + } + + <** @description: + The AccelerationData delivers the sensor values of the accelerometer. + The coordinate system is the axis system of the accelerometer sensor, + i.e. the x, y, z values are raw measurements + without any conversion except probably averaging of multiple + sensor readings over the measurement interval. + + see TAccelerationConfiguration for an explanation how to convert these values to the vehicle axis system + + It is possible that not all values are populated, e.g. when only a 1-axis accelerometer is used. + You must check the valid bits before usage. + **> + struct TAccelerationData{ + <** @description: Timestamp of the acquisition of the accelerometer signal [ms]. + All sensor/GNSS timestamps must be based on the same time source. + **> + UInt64 timestamp + <** @description: The acceleration in direction of the X-axis of the accelerometer sensor [m/s^2]. + **> + Float x + <** @description: The acceleration in direction of the Y-axis of the accelerometer sensor [m/s^2]. + **> + Float y + <** @description: The acceleration in direction of the Z-axis of the accelerometer sensor [m/s^2]. + **> + Float z + <** @description: Temperature reading of the accelerometer sensor. + If available it can be used for temperature compensation. + The measurement unit is unspecified. + Degrees celsius are preferred but any value linearly dependent on the temperature is fine. + **> + Float temperature + <** @description: Measurement interval over which the accelerometer signal has been acquired. + Unit: micro-seconds [us]. + This may slightly differ from the timestamp difference, + e.g. in case of transmission jitter before timestamping. + Providing the measurement interval allows thus + - a more accurate integration of accelerometer measurements. + - correct usage of the first sample + - adding consistency checks + **> + UInt32 measurementInterval + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed EAccelerationValidityBits values]. + Must be checked before usage. + **> + UInt32 validityBits + } + + <** @description: + Initialization of the acceleration sensor service. + Must be called before using the acceleration sensor service to set up the service. + **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: + Destroy the acceleration sensor service. + Must be called after using the acceleration sensor service to shut down the service. + **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + + <** @description: getMetaData = get the meta information about acceleration service. + The meta data of a sensor service provides information about it's name, version, type, subtype, sampling frequency etc. + **> + method getMetaData { + out { + TSensorMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: getAccelerationData = get the acceleration data at a specific point in time. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + method getAccelerationData { + out { + TAccelerationData accelerationData + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + + <** @description: getAccelerationDataList = get a list of acceleration data. + may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + accelerationData pointer to an array of TAccelerationData with size numElements + **> + method getAccelerationDataList { + out { + TAccelerationData[] accelerationData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: notifyAccelerationDataChanged + The signal will be emitted when new acceleration data is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyAccelerationDataChanged selective { + out { + TAccelerationData[] accelerationData + UInt16 numElements + } + } + + <** @description: getStatus = get the acceleration sensor status at a specific point in time. **> + method getStatus { + out { + TSensorStatus status + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + + <** @description: notifyStatusChanged + The signal will be emitted when new acceleration sensor status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TSensorStatus status + } + } + +} diff --git a/api/franca/sensorsservice/AccelerationConfiguration.fidl b/api/franca/sensorsservice/AccelerationConfiguration.fidl new file mode 100644 index 0000000..c4d85b4 --- /dev/null +++ b/api/franca/sensorsservice/AccelerationConfiguration.fidl @@ -0,0 +1,150 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : AccelerationConfiguration = This interface offers functionalities to retrieve the configuration of the Acceleration interface of the vehicle **> +interface AccelerationConfiguration { + version { + major 5 + minor 0 + } + + <** @description: + TAccelerationConfiguration::validityBits provides information about the currently valid signals of the acceleration configuration data. + It is a or'ed bitmask of the EAccelerationConfigValidityBits values. + **> + enumeration EAccelerationConfigValidityBits{ + <** @description: Validity bit for field TAccelerationConfiguration::dist2RefPointX. + **> + ACCELERATION_CONFIG_DISTX_VALID = 1 //0x00000001 + <** @description: Validity bit for field TAccelerationConfiguration::dist2RefPointY. + **> + ACCELERATION_CONFIG_DISTY_VALID = 2 //0x00000002 + <** @description: Validity bit for field TAccelerationConfiguration::dist2RefPointZ. + **> + ACCELERATION_CONFIG_DISTZ_VALID = 4 //0x00000004 + <** @description: Validity bit for field TAccelerationConfiguration::angleYaw. + **> + ACCELERATION_CONFIG_ANGLEYAW_VALID = 8 //0x00000008 + <** @description: Validity bit for field TAccelerationConfiguration::anglePitch. + **> + ACCELERATION_CONFIG_ANGLEPITCH_VALID= 16 //0x00000010 + <** @description: Validity bit for field TAccelerationConfiguration::angleRoll. + **> + ACCELERATION_CONFIG_ANGLEROLL_VALID = 32 //0x00000020 + <** @description: Validity bit for field TAccelerationConfiguration::sigmaX. + **> + ACCELERATION_CONFIG_SIGMAX_VALID = 64 //0x00000040 + <** @description: Validity bit for field TAccelerationConfiguration::sigmaX. + **> + ACCELERATION_CONFIG_SIGMAY_VALID = 128 //0x00000080 + <** @description: Validity bit for field TAccelerationConfiguration::sigmaZ. + **> + ACCELERATION_CONFIG_SIGMAZ_VALID = 256 //0x00000100 + <** @description: Validity bit for field TAccelerationConfiguration::typeBits. + **> + ACCELERATION_CONFIG_TYPE_VALID = 512 //0x00000200 + } + + <** @description: + Static configuration data for the acceleration sensor service. + + BEGIN Explanation of the angleYaw, anglePitch angleRoll parameters + The orientation of the accelerometer hardware (Xa, Ya, Za) + with respect to the vehicle axis system (Xv, Yv, Zv) + can be described using the angles (angleYaw, anglePitch, angleRoll) + following the approach defined in ISO 8855:2011, section 5.2, table 1 + Apply 3 rotations on the vehicle axis system until it matches the accelerometer axis system + The rotation sequence is as follows + - first rotate by angleYaw about the Zv axis + - second rotate by anglePitch about the new (intermediate) Y axis + - third rotate by angleRoll about the new X axis + + Notes + - the angles are frequently called "Euler angles" and the rotations "Euler rotations" + - a different order of the rotations would lead to a different orientation + - as the vehicle axis system is right-handed, also the accelerometer axis system must be right-handed + + The vehicle axis system as defined in ISO 8855:2011(E). + In this system, the axes (Xv, Yv, Zv) are oriented as follows + - Xv is in the horizontal plane, pointing forwards + - Yv is in the horizontal plane, pointing to the left + - Zv is perpendicular to the horizontal plane, pointing upwards + For an illustration, see https://collab.genivi.org/wiki/display/genivi/LBSSensorServiceRequirementsBorg#LBSSensorServiceRequirementsBorg-ReferenceSystem + + When the accelerometer axes are not aligned with the vehicle axes, i.e. + if any of the angles (angleYaw, anglePitch, angleRoll) is not zero + then the raw measurement values of the accelerometer X, Y, Z axes may have to be be transformed + to the vehicle axis system by the client of this interface, depending on the type of application. + Raw measurements are provided in TAccelerationData instead of already transformed values, because + - for accelerometers with less than 3 axes, the transformation is mathematically not well-defined + - some types of calibration operations are better performed on raw data + + Implementors hint: The mathematics of this kind of transformation, + like the derivation of the rotation matrixes is described in literature on strapdown navigation + E.g. "Strapdown Inertial Navigation Technology", 2nd Edition by David Titterton and John Weston, section 3.6 + END Explanation of the angleYaw, anglePitch angleRoll parameters + **> + struct TAccelerationConfiguration{ + <** @description: Distance of acceleration sensor from vehicle reference point (x-coordinate) [m]. + **> + Float dist2RefPointX + <** @description: Distance of acceleration sensor from vehicle reference point (y-coordinate) [m]. + **> + Float dist2RefPointY + <** @description: Distance of acceleration sensor from vehicle reference point (z-coordinate) [m]. + **> + Float dist2RefPointZ + <** @description: Euler angle of first rotation, around yaw axis, to describe acceleration sensor orientation [degree]. + For details, see above. + **> + Float angleYaw + <** @description: Euler angle of second rotation, around pitch axis, to describe acceleration sensor orientation [degree]. + For details, see above. + **> + Float anglePitch + <** @description: Euler angle of third rotation, around roll axis, to describe acceleration sensor orientation [degree]. + For details, see above. + **> + Float angleRoll + <** @description: Standard error estimate of the x-acceleration [m/s^2]. + **> + Float sigmaX + <** @description: Standard error estimate of the y-acceleration [m/s^2]. + **> + Float sigmaY + <** @description: Standard error estimate of the z-acceleration [m/s^2]. + **> + Float sigmaZ + <** @description: Bit mask indicating the type of the used accelerometer. + [bitwise or'ed EAccelerationTypeBits values]. + **> + UInt32 typeBits + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed EAccelerationConfigValidityBits values]. + Must be checked before usage. + **> + UInt32 validityBits + } + + <** @description: getAccelerationConfiguration = get the static configuration information about the acceleration sensor. + **> + method getAccelerationConfiguration { + out { + TAccelerationConfiguration config + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + +} diff --git a/api/franca/sensorsservice/CMakeLists.txt b/api/franca/sensorsservice/CMakeLists.txt new file mode 100644 index 0000000..8cd3aaa --- /dev/null +++ b/api/franca/sensorsservice/CMakeLists.txt @@ -0,0 +1,81 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca sensors service generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2018, PSA Groupe +# +# 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-sensorsservice) + +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_GENERATOR + "Absolute path to CommonAPI code generator" "") +option(COMMONAPI_DBUS_TOOL_GENERATOR + "Absolute path to CommonAPI-DBus code generator" "") +option(COMMONAPI_WAMP_TOOL_GENERATOR + "Absolute path to CommonAPI-Wamp code generator" "") +option(WAMP_GENERATION + "Generate Wamp files" OFF) + +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_GENERATOR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<tool>") +endif () + +if (WITH_WAMP_GENERATION) + if (COMMONAPI_WAMP_TOOL_GENERATOR) + foreach(RAW_FILE ${FIDL_FILES}) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND java -jar ${COMMONAPI_WAMP_TOOL_GENERATOR} -f ${RAW_FILE} -d ${COMMONAPI_GEN_DIR} ) + endforeach() + else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_WAMP_TOOL_GENERATOR=<tool>") + endif () +else() + if (COMMONAPI_DBUS_TOOL_GENERATOR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<tool>") + endif () +endif() + diff --git a/api/franca/sensorsservice/Gyroscope.fidl b/api/franca/sensorsservice/Gyroscope.fidl new file mode 100644 index 0000000..9107d66 --- /dev/null +++ b/api/franca/sensorsservice/Gyroscope.fidl @@ -0,0 +1,199 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : Gyroscope = This interface offers functionalities to retrieve the gyroscope data of the vehicle **> +interface Gyroscope { + version { + major 5 + minor 0 + } + + <** @description: + TGyroscopeData::validityBits provides information which fields in + TGyroscopeData contain valid measurement data. + It is a or'ed bitmask of the EGyroscopeValidityBits values. + Note: + - The general availability of the signals is provided per + TGyroscopeConfiguration::typeBits. + - If a signal is generally provided but temporarily not available + then the corresponding typeBit will be set but not the validityBit + **> + enumeration EGyroscopeValidityBits { + <** @description: Validity bit for field TGyroscopeData::yawRate. + **> + GYROSCOPE_YAWRATE_VALID = 1 //0x00000001 + <** @description: Validity bit for field TGyroscopeData::pitchRate. + **> + GYROSCOPE_PITCHRATE_VALID = 2 //0x00000002 + <** @description: Validity bit for field TGyroscopeData::rollRate. + **> + GYROSCOPE_ROLLRATE_VALID = 4 //0x00000004 + <** @description: Validity bit for field TGyroscopeData::temperature. + **> + GYROSCOPE_TEMPERATURE_VALID = 8 //0x00000008 + <** @description: Validity bit for field TGyroscopeData::measurementInterval. + **> + GYROSCOPE_MEASINT_VALID = 16 //0x00000010 + } + + <** @description: + The GyroscopeData delivers the sensor values of the gyroscope. + The coordinate system is the axis system of the gyroscope sensor + i.e. the yawRate pitchRate rollRate values are raw measurements + without any conversion except probably averaging of multiple + sensor readings over the measurement interval. + see TGyroscopeConfiguration for an explanation how to convert these values to the vehicle axis system + It is possible that not all values are populated e.g. when only a 1-axis gyroscope is used. + You must check the valid bits before usage. + **> + struct TGyroscopeData { + <** @description: Timestamp of the acquisition of the gyroscope signal [ms]. + All sensor/GNSS timestamps must be based on the same time source. + **> + UInt64 timestamp + <** @description: Current angular rate measurement around the z/yaw-axis of the gyroscope sensor [degree/s]. + Value range -100 / +100 degree/s. Frequency of at least 5Hz. Preferrably 50Hz. + A rotation to the left is indicated by a positive sign + _if_ gyroscope axes are aligned with vehicle axes + i.e. if all euler angles are zero in TGyroscopeConfiguration. + **> + Float yawRate + <** @description: Current angular rate measurement around the y/pitch-axis of the gyroscope sensor [degree/s]. + Value range -100 / +100 degree/s. Frequency of at least 5Hz. Preferrably 50Hz. + A rotation front down is indicated by a positive sign + _if_ gyroscope axes are aligned with vehicle axes + i.e. if all euler angles are zero in TGyroscopeConfiguration. + **> + Float pitchRate + <** @description: Current angular rate measurement around the x/roll-axis of the gyroscope sensor [degree/s]. + Value range -100 / +100 degree/s. Frequency of at least 5Hz. Preferrably 50Hz. + A rotation right down is indicated by a positive sign + _if_ gyroscope axes are aligned with vehicle axes + i.e. if all euler angles are zero in TGyroscopeConfiguration. + **> + Float rollRate + <** @description: Temperature reading of the gyroscope sensor. + If available it can be used for temperature compensation. + The measurement unit is unspecified. + Degrees celsius are preferred but any value linearly dependent on the temperature is fine. + **> + Float temperature + <** @description: Measurement interval over which the gyroscope signal has been acquired. + Unit: micro-seconds [us]. + This may slightly differ from the timestamp difference + e.g. in case of transmission jitter before timestamping. + Providing the measurement interval allows thus + - a more accurate integration of gyroscope measurements. + - correct usage of the first sample + - adding consistency checks + **> + UInt32 measurementInterval + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed EGyroscopeValidityBits values]. + Must be checked before usage. + **> + UInt32 validityBits + } + + <** @description: getGyroscopeData = get the gyroscope data at a specific point in time. + Be careful when using this method to read data often enough as gyro data are rotation rates per second. + The recommended usage for the gyroscope data is the callback interface. PC: get on notification + The get method is provided for consistency reasons of the sensor service API and might be used + for determining the rotation rate in certain situations. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + method getGyroscopeData { + out { + TGyroscopeData gyroData + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: getGyroscopeDataList = get a list of gyroscope data. + may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1) the elements will be ordered with rising timestamps + gyroData pointer to an array of TGyroscopeData with size numElements + **> + method getGyroscopeDataList { + out { + TGyroscopeData[] gyroData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + <** @description: notifyGyroscopeDataChanged + The signal will be emitted when new gyroscope data is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyGyroscopeDataChanged selective { + out { + TGyroscopeData[] gyroData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: + Initialization of the gyroscope sensor service. + Must be called before using the gyroscope sensor service to set up the service. + **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: + Destroy the acceleration sensor service. + Must be called after using the gyroscope sensor service to shut down the service. + **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + + <** @description: getMetaData = get the meta information about gyroscope service. + The meta data of a sensor service provides information about it's name, version, type, subtype, sampling frequency etc. + **> + method getMetaData { + out { + TSensorMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: getStatus = get the gyroscope status at a specific point in time. **> + method getStatus { + out { + TSensorStatus status + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: notifyStatusChanged + The signal will be emitted when new gyroscope sensor status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TSensorStatus status + } + } + +} diff --git a/api/franca/sensorsservice/GyroscopeConfiguration.fidl b/api/franca/sensorsservice/GyroscopeConfiguration.fidl new file mode 100644 index 0000000..df55d90 --- /dev/null +++ b/api/franca/sensorsservice/GyroscopeConfiguration.fidl @@ -0,0 +1,151 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : GyroscopeConfiguration = This interface offers functionalities to retrieve the configuration of the Gyroscope interface of the vehicle **> +interface GyroscopeConfiguration { + version { + major 5 + minor 0 + } + + <** @description: + TGyroscopeConfiguration::validityBits provides information about the + currently valid signals of the gyroscope configuration data. + It is a or'ed bitmask of the EGyroscopeConfigValidityBits values. + **> + enumeration EGyroscopeConfigValidityBits{ + <** @description: Validity bit for field TGyroscopeConfiguration::angleYaw. + **> + GYROSCOPE_CONFIG_ANGLEYAW_VALID = 1 //0x00000001 + <** @description: Validity bit for field TGyroscopeConfiguration::anglePitch. + **> + GYROSCOPE_CONFIG_ANGLEPITCH_VALID = 2 //0x00000002 + <** @description: Validity bit for field TGyroscopeConfiguration::angleRoll. + **> + GYROSCOPE_CONFIG_ANGLEROLL_VALID = 4 //0x00000004 + <** @description: Validity bit for field TGyroscopeConfiguration::momentOfYawInertia. + **> + GYROSCOPE_CONFIG_MOMENTYAW_VALID = 8 //0x00000008 + <** @description: Validity bit for field TGyroscopeConfiguration::sigmaGyroscope. + **> + GYROSCOPE_CONFIG_SIGMAGYROSCOPE_VALID = 16 //0x00000010 + <** @description: Validity bit for field TGyroscopeConfiguration::typeBits. + **> + GYROSCOPE_CONFIG_TYPE_VALID = 32 //0x00000020 + } + + <** @description: + Gyroscope type + TGyroscopeConfiguration::typeBits provides information about the + type of the gyroscope and the interpretation of the signals. + It is a or'ed bitmask of the EGyroscopeTypeBits values. + **> + enumeration EGyroscopeTypeBits { + <** @description: Temperature bias compensation already applied to gyroscope signals. + **> + GYROSCOPE_TEMPERATURE_COMPENSATED = 1 //0x00000001 + <** @description: A measurement for the z/yaw-axis is provided. + **> + GYROSCOPE_YAWRATE_PROVIDED = 2 //0x00000002 + <** @description: A measurement for the y/pitch-axis is provided. + **> + GYROSCOPE_PITCHRATE_PROVIDED = 4 //0x00000004 + <** @description: A measurement for the x/roll-axis is provided. + **> + GYROSCOPE_ROLLRATE_PROVIDED = 8 //0x00000008 + <** @description: A measurement for the temperature is provided. + **> + GYROSCOPE_TEMPERATURE_PROVIDED = 16 //0x00000010 + } + + <** @description: + Static configuration data for the gyroscope sensor service. + BEGIN Explanation of the angleYaw anglePitch angleRoll parameters + The orientation of the gyroscope hardware (Xg Yg Zg) + with respect to the vehicle axis system (Xv Yv Zv) + can be described using the angles (angleYaw anglePitch angleRoll) + following the approach defined in ISO 8855:2011 section 5.2 table 1 + Apply 3 rotations on the vehicle axis system until it matches the gyroscope axis system + The rotation sequence is as follows + - first rotate by angleYaw about the Zv axis + - second rotate by anglePitch about the new (intermediate) Y axis + - third rotate by angleRoll about the new X axis + Notes + - the angles are frequently called "Euler angles" and the rotations "Euler rotations" + - a different order of the rotations would lead to a different orientation + - as the vehicle axis system is right-handed also the gyroscope axis system must be right-handed + The vehicle axis system as defined in ISO 8855:2011(E). + In this system the axes (Xv Yv Zv) are oriented as follows + - Xv is in the horizontal plane pointing forwards + - Yv is in the horizontal plane pointing to the left + - Zv is perpendicular to the horizontal plane pointing upwards + For an illustration see https://collab.genivi.org/wiki/display/genivi/LBSSensorServiceRequirementsBorg#LBSSensorServiceRequirementsBorg-ReferenceSystem + When the gyroscope axes are not aligned with the vehicle axes i.e. + if any of the angles (angleYaw anglePitch angleRoll) is not zero + then the raw measurement values of the gyroscope Z Y X axes may have to be be transformed + to the vehicle axis system by the client of this interface depending on the type of application. + Raw measurements are provided in TGyroscopeData instead of already transformed values because + - for gyroscopes with less than 3 axes the transformation is mathematically not well-defined + - some types of calibration operations are better performed on raw data + Implementors hint: The mathematics of this kind of transformation + like the derivation of the rotation matrixes is described in literature on strapdown navigation + E.g. "Strapdown Inertial Navigation Technology" 2nd Edition by David Titterton and John Weston section 3.6 + END Explanation of the angleYaw anglePitch angleRoll parameters + **> + struct TGyroscopeConfiguration { + <** @description: Euler angle of first rotation around yaw axis + to describe gyroscope orientation [degree]. + For details see above. + **> + Float angleYaw + <** @description: Euler angle of second rotation around pitch axis + to describe gyroscope orientation [degree]. + For details see above. + **> + Float anglePitch + <** @description: Euler angle of third rotation around roll axis + to describe gyroscope orientation [degree]. + For details see above. + **> + Float angleRoll + <** @description: Moment of yaw inertia [kg x m^2]. + The pitch and roll inertia moments are not provided + as they are not relevant for positioning. + **> + Float momentOfYawInertia + <** @description: Standard error estimate of the gyroscope for all directions [degree/s]. + **> + Float sigmaGyroscope + <** @description: Bit mask indicating the type of the used gyroscope. + [bitwise or'ed EGyroscopeTypeBits values]. + **> + UInt32 typeBits + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed EGyroscopeConfigValidityBits values]. + Must be checked before usage. + **> + UInt32 validityBits + } + + <** @description: getGyroscopeConfiguration = get the static configuration information about the gyroscope sensor. + **> + method getGyroscopeConfiguration { + out { + TGyroscopeConfiguration config + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + +} diff --git a/api/franca/sensorsservice/MetaData.fidl b/api/franca/sensorsservice/MetaData.fidl new file mode 100644 index 0000000..c1ab9de --- /dev/null +++ b/api/franca/sensorsservice/MetaData.fidl @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : MetaData = This interface offers functionalities to retrieve the MetaData of SensorsService **> +interface MetaData { + version { + major 5 + minor 0 + } + + <** @description: getMetaDataList = get the metadata of all available sensors. **> + method getMetaDataList { + out { + TSensorMetaData[] metadata + <** @description: numElements = number of elements in the array **> + UInt16 numElements + } + } + +} + diff --git a/api/franca/sensorsservice/Odometer.fidl b/api/franca/sensorsservice/Odometer.fidl new file mode 100644 index 0000000..99ffe1b --- /dev/null +++ b/api/franca/sensorsservice/Odometer.fidl @@ -0,0 +1,141 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : Odometer = This interface offers functionalities to retrieve the travelled distance of the vehicle **> +interface Odometer { + version { + major 5 + minor 0 + } + + <** @description: + TOdometerData::validityBits provides information about the currently valid signals of the odometer data. + It is a or'ed bitmask of the EOdometerValidityBits values. + **> + enumeration EOdometerValidityBits { + ODOMETER_TRAVELLEDDISTANCE_VALID = 1 //0x00000001 Validity bit for field TOdometerData::travelledDistance. + } + + <** @description: + Odometer sensor service provides the travelled distance. + **> + struct TOdometerData { + <** @description: Timestamp of the acquisition of the odometer signal [ms]. + All sensor/GNSS timestamps must be based on the same time source. **> + UInt64 timestamp + <** @description: Distance in [cm] with at least 5Hz. Implemented as a running counter + with overflow to support multiple clients and getter methods. + As the representation of this value is done using 16 Bits the value can provide + distances up 32767cm or 327.67m before overflowing. **> + UInt16 travelledDistance + <** @description: Bit mask indicating the validity of each corresponding value. + bitwise or'ed ref EOdometerValidityBits values]. + Must be checked before usage. **> + UInt32 validityBits + } + + <** @description: + Initialization of the odometer sensor service. + Must be called before using the odometer sensor service to set up the service. + **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: + Destroy the odometer sensor service. + Must be called after using the odometer sensor service to shut down the service. + **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + + <** @description: getMetaData = get the meta information about odometer service. + The meta data of a sensor service provides information about it's name, version, type, subtype, sampling frequency etc. + **> + method getMetaData { + out { + TSensorMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: getOdometerData = get the odometer data at a specific point in time. + Be careful when using this method to read data often enough to avoid missing an overflow. + With reasonable car speeds it should be enough to read the data every 3s. + The recommended usage for the odometer data is the callback interface. + The get method is provided for consistency reasons of the sensor service API and might be used + for determining the distance between a few points in time. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + method getOdometerData { + out { + TOdometerData odometerData + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + + <** @description: getOdometerDataList = get a list of odometer data. + may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + odometerData pointer to an array of TOdometerData with size numElements + **> + method getOdometerDataList { + out { + TOdometerData[] odometerData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: notifyOdometerDataChanged + The signal will be emitted when new odometer data is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyOdometerDataChanged selective { + out { + TOdometerData[] odometerData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: getStatus = get the odometer sensor status at a specific point in time. **> + method getStatus { + out { + TSensorStatus status + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: notifyStatusChanged + The signal will be emitted when new odometer sensor status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TSensorStatus status + } + } + +} diff --git a/api/franca/sensorsservice/ReverseGear.fidl b/api/franca/sensorsservice/ReverseGear.fidl new file mode 100644 index 0000000..0f204bb --- /dev/null +++ b/api/franca/sensorsservice/ReverseGear.fidl @@ -0,0 +1,135 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : ReverseGear = This interface offers functionalities to retrieve the current status of the reverse gear of the vehicle. **> +interface ReverseGear { + version { + major 5 + minor 0 + } + + <** @description: + TReverseGearData::validityBits provides information about the currently valid signals of the reverse gear data. + It is a or'ed bitmask of the EReverseGearValidityBits values. + **> + enumeration EReverseGearValidityBits { + REVERSEGEAR_REVERSEGEAR_VALID = 1 //0x00000001 Validity bit for field TReverseGearData::isReverseGear. + } + + <** @description: + Reverse gear sensor service provides the current status of the reverse gear of the vehicle. + This information is explicitly restricted to provide only the information if the reverse gear is engaged. + The direction of movement is provided by the direction of the vehicle speed. + **> + struct TReverseGearData{ + <** @description: Timestamp of the acquisition of the reverse gear signal [ms]. + All sensor/GNSS timestamps must be based on the same time source. + **> + UInt64 timestamp + <** @description:True if the reverse gear is currently used. False otherwise. **> + Boolean isReverseGear + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed EReverseGearValidityBits values]. + Must be checked before usage. + **> + UInt32 validityBits + } + + <** @description: + Initialization of the reverse gear sensor service. + Must be called before using the reverse gear sensor service to set up the service. + **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: + Destroy the reverse gear sensor service. + Must be called after using the reverse gear sensor service to shut down the service. + **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + + <** @description: getMetaData = get the meta information about reverse gear service. + The meta data of a sensor service provides information about it's name, version, type, subtype, sampling frequency etc. + **> + method getMetaData { + out { + TSensorMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: getReverseGearData = get the reverse gear data at a specific point in time. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + method getReverseGearData { + out { + TReverseGearData reverseGearData + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: getReverseGearDataList = get a list of reverse gear data. + may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + reverseGearData pointer to an array of TReverseGearData with size numElements + **> + method getReverseGearDataList { + out { + TReverseGearData[] reverseGearData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + <** @description: notifyReverseGearDataChanged + The signal will be emitted when new reverse gear data is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyReverseGearDataChanged selective { + out { + TReverseGearData[] reverseGearData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: getStatus = get the reverse gear sensor status at a specific point in time. **> + method getStatus { + out { + TSensorStatus status + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: notifyStatusChanged + The signal will be emitted when new reverse gear sensor status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TSensorStatus status + } + } + +} diff --git a/api/franca/sensorsservice/SensorsServiceTypes.fidl b/api/franca/sensorsservice/SensorsServiceTypes.fidl new file mode 100644 index 0000000..3e3e77c --- /dev/null +++ b/api/franca/sensorsservice/SensorsServiceTypes.fidl @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +typeCollection SensorsServiceTypes { + version { + major 5 + minor 0 + } + + <** @description: + The sensor category introduces the concept that sensor information can also be derived information + computed by combining several signals. + **> + enumeration ESensorCategory { + SENSOR_CATEGORY_UNKNOWN // Unknown category. Should not be used. + SENSOR_CATEGORY_LOGICAL // A logical sensor can combine signals of several sensors. + SENSOR_CATEGORY_PHYSICAL // A physical sensor provides signals from physically available sensors. + } + + <** @description: + The sensor type identifies which physical quantity is measured. + For each sensor type there is a corresponding API header with data structures callback notifications and getter functions defined + Note that for all 3 wheel sensor types there is a combined API header. + **> + enumeration ESensorType { + SENSOR_TYPE_UNKNOWN // Unknown sensor type. Should not be used. + SENSOR_TYPE_ACCELERATION // Acceleration sensor. + SENSOR_TYPE_GYROSCOPE // Gyroscope sensor. + SENSOR_TYPE_INCLINATION // Inclination sensor. + SENSOR_TYPE_ODOMETER // Odometer sensor. + SENSOR_TYPE_REVERSE_GEAR // Reverse gear sensor. + SENSOR_TYPE_SLIP_ANGLE // Slip angle sensor. + SENSOR_TYPE_STEERING_ANGLE // Steering angle sensor. + SENSOR_TYPE_VEHICLE_SPEED // Vehicle speed sensor. + SENSOR_TYPE_VEHICLE_STATE // Vehicle state sensor. + SENSOR_TYPE_WHEELTICK // Wheel tick sensor. + SENSOR_TYPE_WHEELSPEEDANGULAR // Wheel speed angular sensor. + SENSOR_TYPE_WHEELSPEED // Wheel speed sensor. + } + + <** @description: + The software platform provides the following information about the Sensor and the related output Signals. + Sensor clients need the meta data information in order to correctly handle data provided by sensor service and + to adapt to the variation in the signal data delivery. + **> + struct TSensorMetaData { + UInt32 ^version // Version of the sensor service. + ESensorCategory category // Sensor Category (Physical/Logical). + ESensorType type // Sensor Type (Odometer Gyroscope etc.). + UInt32 cycleTime // Sensor cycle time (update interval) in ms. 0 for irregular updates + } + + <** @description: + Enumeration to describe the status of the sensor + **> + enumeration ESensorStatus { + SENSOR_STATUS_NOTAVAILABLE = 0 // Sensor is not available at all based on configuration data. + SENSOR_STATUS_INITIALIZING = 1 // Initial status when the connection to the Sensor is set up for the first time. + SENSOR_STATUS_AVAILABLE = 2 // Sensor is available and running as expected. + SENSOR_STATUS_RESTARTING = 3 // Sensor is restarted i.e. due to communication loss. + SENSOR_STATUS_FAILURE = 4 // Sensor is not operating properly. Restarting did not help. + SENSOR_STATUS_OUTOFSERVICE = 5 // Sensor is temporarily not available due to some known external condition vehicle bus or external ECU providing he signal being off. + } + + <** @description: + TSensorStatus::validityBits provides information about the currently valid signals of the TSensorStatus struct. + It is a or'ed bitmask of the ESensorStatusValidityBits values. + **> + enumeration ESensorStatusValidityBits { + SENSOR_STATUS_STATUS_VALID = 1 //0x00000001 // Validity bit for field TSensorStatus::status. + } + + <** @description: + Container for sensor status information + **> + struct TSensorStatus { + UInt64 timestamp // Timestamp of the sensor status transition [ms]. + // All sensor/GNSS timestamps must be based on the same time source. + ESensorStatus status // Status of the sensor **> + UInt32 validityBits // Bit mask indicating the validity of each corresponding value. + // [bitwise or'ed ref ESensorStatusValidityBits values]. + // Must be checked before usage. **> + } + +} diff --git a/api/franca/sensorsservice/VehicleSpeed.fidl b/api/franca/sensorsservice/VehicleSpeed.fidl new file mode 100644 index 0000000..1929e98 --- /dev/null +++ b/api/franca/sensorsservice/VehicleSpeed.fidl @@ -0,0 +1,147 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : VehicleSpeed = This interface offers functionalities to retrieve current speed of the vehicle **> +interface VehicleSpeed { + version { + major 5 + minor 0 + } + + <** @description: + TVehicleSpeedData::validityBits provides information about the currently valid signals of the odometer data. + It is a or'ed bitmask of the EVehicleSpeedValidityBits values. + **> + enumeration EVehicleSpeedValidityBits { + VEHICLESPEED_VEHICLESPEED_VALID = 1 //0x00000001 Validity bit for field TVehicleSpeedData::vehicleSpeed. + VEHICLESPEED__MEASINT_VALID = 2 //0x00000002 Validity bit for field TVehicleSpeedData::measurementInterval. + } + + <** @description: + Vehicle speed sensor service provides the current speed of the vehicle. + **> + struct TVehicleSpeedData { + <** @description: Timestamp of the acquisition of the vehicle speed signal [ms]. + All sensor/GNSS timestamps must be based on the same time source. + **> + UInt64 timestamp + <** @description: Filtered vehicle speed in [m/s] with a frequency of at least 5Hz. + Direction is given by the sign of this value. + **> + Float vehicleSpeed + <** @description: Measurement interval over which the vehicle speed signal has been acquired. + Unit: micro-seconds [us]. + This may slightly differ from the timestamp difference, + e.g. in case of transmission jitter before timestamping. + Providing the measurement interval allows thus + - a more accurate integration of vehicle speed measurements. + - correct usage of the first sample + - adding consistency checks + **> + UInt32 measurementInterval + <** @description: Bit mask indicating the validity of each corresponding value. + bitwise or'ed ref EVehicleSpeedValidityBits values]. + Must be checked before usage. **> + UInt32 validityBits + } + + <** @description: + Initialization of the vehicle speed sensor service. + Must be called before using the vehicle speed sensor service to set up the service. + **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: + Destroy the vehicle speed sensor service. + Must be called after using the vehicle speed sensor service to shut down the service. + **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + + <** @description: getMetaData = get the meta information about vehicle speed sensor service. + The meta data of a sensor service provides information about it's name, version, type, subtype, sampling frequency etc. + **> + method getMetaData { + out { + TSensorMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: getVehicleSpeedData = get the vehicle speed data at a specific point in time. + **> + method getVehicleSpeedData { + out { + TVehicleSpeedData vehicleSpeedData + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + + <** @description: getVehicleSpeedDataList = get a list of vehicle speed sensor data. + may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + vehicleSpeedData pointer to an array of TVehicleSpeedData with size numElements + **> + method getVehicleSpeedDataList { + out { + TVehicleSpeedData[] vehicleSpeedData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: notifyVehicleSpeedDataChanged + The signal will be emitted when new vehicle speed sensor data is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyVehicleSpeedDataChanged selective { + out { + TVehicleSpeedData[] vehicleSpeedData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: getStatus = get the vehicle speed sensor status at a specific point in time. **> + method getStatus { + out { + TSensorStatus status + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: notifyStatusChanged + The signal will be emitted when new odometer sensor status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TSensorStatus status + } + } + +} + diff --git a/api/franca/sensorsservice/Wheel.fidl b/api/franca/sensorsservice/Wheel.fidl new file mode 100644 index 0000000..5c280fd --- /dev/null +++ b/api/franca/sensorsservice/Wheel.fidl @@ -0,0 +1,272 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : Wheel = This interface offers functionalities to retrieve the wheel rotation data of the vehicle +Wheel rotation data may be provided as wheel ticks, as wheel speed +or as angular wheel speed. +It is vehicle specific which kind of wheel rotation data is available +and for which wheels the data is provided. +The vehicle specific configuration can be queried using the +snsWheelGetConfiguration() function. +Note: The driving direction (forward/backward) shall always be coded as +sign of the wheel rotation data. +This will reduce synchronization effort with separate reverse gear info +by the client application which is in particular useful with buffered data. +How the driving direction can be derived is vehicle specific. +**> +interface Wheel { + version { + major 5 + minor 0 + } + + <** @description: + Maximum number of wheel elements per structure. + A fix value is used because a flat data structure has advantages like simple copying, indexed access. + **> + enumeration constants { + WHEEL_MAX = 8 + } + + <** @description: + Additional status information for wheel data, in particular when provided as wheel ticks. + This may help the client application to estimate the reliability of the wheel data. + TWheelData::statusBits is a or'ed bitmask of the EWheelStatusBits values. + Background information + ---------------------- + Wheel ticks are typically provided by the ABS/ESC ECU as rolling counters + on the vehicle bus. + To calculate the wheel ticks per time interval as provided by this API in the + TWheelData structure, the difference between the two _valid_ rolling + counter values at end and start of the time interval has to be calculated + (taking into account potential rollover). + If any of the rolling counter values is invalid or if there has been a reset + of the rolling counter in the time interval, then no valid difference can be + calculated. Therefore an appropriate error/exception handling has to be + implemented in the library translating the rolling counters from the vehicle bus + to the wheel ticks per time interval provided by this API. + Besides to the validity indication provided with each wheel rotation update, + the client (typically the EnhancedPositionService) using the wheel rotation API + may be interested to know whether wheel rotation information may have been lost. + In such a case it could adapt its error estimation related to + wheel ticks or even make an internal reset of its corresponding states. + The status bits in enum EWheelStatusBits are defined to provide such information. + Further Background + ------------------ + This section gives an additional overview about the possible signal path + of wheel tick data and the resulting possible exceptional situations: + There may be a gateway between the ABS/ESC ECU and the IVI system to separate + vehicle networks. This gateway may reduce the update rate of the CAN messages, + e.g. from 20ms cycle time sent by the ABS ECU to 100ms provided for the IVI system. + When the update rate is reduced, the rolling counters may have to be resampled e.g. + from 8 bit to 13 bit to avoid rollover within the update period. + The rolling counters typically start from 0 when either the ABS ECU or the gateway is + started/restarted, e.g. at an ignition cycle. + The rolling counters are often accompanied with additional status information to indicate + validity, reset conditions or to allow to detect loss of wheel tick data during transmission + on vehicle bus (such as sequence numbers). + This status information has to be evaluated to determine whether the difference calculation + between subsequent rolling counters yields a valid result or not. + The kind of status information provided alongside with the wheel ticks is very OEM specific + - sometimes even additional context information such as ignition status has to considered. + Nearly all above mentioned parameters are OEM or vehicle specific: update rate, + size of rolling counters, status indications, lifecycle of ECU, gateway, vehicle bus, ... + The status bits in enum EWheelStatusBits attempt to provide an appropriate abstraction for the + relevant vehicle specific status information. + **> + enumeration EWheelStatusBits{ + <** @description: There has been a gap in data collection, + i.e. an unknown number of wheel revolutions has been lost. + The reason for such a gap can be for example + - wheel tick data on the vehicle bus explicitly tagged as invalid + - interrupted reception of vehicle bus messages. + This flag will only be set if the detected gap may affect the application. + **> + WHEEL_STATUS_GAP = 1 //0x00000001 + <** @description: This is the first wheel data of a bus or ignition lifecycle, + i.e. the wheel tick difference calculation may be less reliable. + **> + WHEEL_STATUS_INIT = 2 //0x00000002 + } + + <** @description: + TWheelData::validityBits provides information which fields in TWheelData contain valid measurement data. + It is a or'ed bitmask of the EWheelValidityBits values. + Note: The assignment of the fields to the wheels of the vehicle is provided by the function snsWheelGetConfiguration(). + **> + enumeration EWheelValidityBits{ + <** @description: Validity bit for field TWheelData::data[0]. + **> + WHEEL0_VALID = 1 //0x00000001 + <** @description: Validity bit for field TWheelData::data[1]. + **> + WHEEL1_VALID = 2 //0x00000002 + <** @description: Validity bit for field TWheelData::data[2]. + **> + WHEEL2_VALID = 4 //0x00000004 + <** @description: Validity bit for field TWheelData::data[3]. + **> + WHEEL3_VALID = 8 //0x00000008 + <** @description: Validity bit for field TWheelData::data[4]. + **> + WHEEL4_VALID = 16 //0x00000010 + <** @description: Validity bit for field TWheelData::data[5]. + **> + WHEEL5_VALID = 32 //0x00000020 + <** @description: Validity bit for field TWheelData::data[6]. + **> + WHEEL6_VALID = 64 //0x00000040 + <** @description: Validity bit for field TWheelData::data[7]. + **> + WHEEL7_VALID = 128 //0x00000080 + <** @description: Validity bit for field TWheelData::measurementInterval. + **> + WHEEL_MEASINT_VALID = 256 //0x00000100 + } + + <** @description: + Wheel rotation data information for multiple wheels. + Container with timestamp as used by callback and get function. + Wheel rotation data is provided for up to 8 wheels. + The assignment of the fields data[0] ... data[7] + to the wheels of the vehicle, the measurement unit and additional configuration parameters + is provided as static configuration by the function snsWheelGetConfiguration(). + The index used for an individual wheel in the data[] array is the same as in the TWheelConfigurationArray. + **> + struct TWheelData{ + <** @description: Timestamp of the acquisition of this wheel tick signal [ms]. + All sensor/GNSS timestamps must be based on the same time source. + **> + UInt64 timestamp + <** @description: Wheel rotation data for the wheel identified by TWheelConfiguration::wheel[i] + in measurement unit identified by TWheelConfiguration::wheelUnit. + **> + Float[] data + <** @description: Bit mask providing additional status information. + [bitwise or'ed ref EWheelStatusBits values]. + **> + UInt32 statusBits + <** @description: Measurement interval over which the wheel data have been acquired. + Unit: micro-seconds [us]. + This may slightly differ from the timestamp difference, + e.g. in case of transmission jitter before timestamping. + Providing the measurement interval allows thus + - a more accurate integration of wheel data measurements. + - correct usage of the first sample + - adding consistency checks + **> + UInt32 measurementInterval + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed ref EWheelValidityBits values]. + Must be checked before usage. + **> + UInt32 validityBits + } + + <** @description: + Initialization of the wheel sensor service. + Must be called before using the wheel sensor service to set up the service. + return: True if initialization has been successful. + Note: In case the initialization has not been successful during system startup, a later retry may be successful. + **> + method init { + out { + <** @description: initialized = Is true if initialization has been successfull **> + Boolean initialized + } + } + + <** @description: + Destroy the wheel sensor service. + Must be called after using the wheel sensor service to shut down the service. + return: True if shutdown has been successful. + Note: In case the shutdown has not been successful, a retry does not make sense. + The return value is intended primarily for diagnostics. + **> + method destroy { + out { + <** @description: destroyed = Is true if shutdown has been successfull. **> + Boolean destroyed + } + } + + <** @description: getMetaData = get the meta information about sensor service. + The meta data of a sensor service provides information about it's name, version, type, subtype, sampling frequency etc. + **> + method getMetaData { + out { + TSensorMetaData data + <** @description: available = Is true if meta data is available **> + Boolean available + } + } + + <** @description: WheelData = get the wheel rotation data at a specific point in time. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + Note: Wheel rotation data typically changes while the vehicle is moving. + Therefore for most applications it is better to register for wheel rotation data updates. + **> + method getWheelData { + out { + TWheelData wheelData + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: getWheelDataList = get a list of wheel rotation data. + may return buffered data (numElements >1) for different reasons + for (large) portions of data buffered at startup + for data buffered during regular operation e.g. for performance optimization (reduction of callback invocation frequency) + If the array contains (numElements >1), the elements will be ordered with rising timestamps + All wheel data belonging to the same timestamp will be provided in the same structure, + wheelData pointer to an array of TWheelData with size numElements + **> + method getWheelDataList { + out { + TWheelData[] wheelData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + <** @description: notifyWheelDataChanged + The signal will be emitted when new wheel rotation data is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyWheelDataChanged selective { + out { + TWheelData[] wheelData + <** @description: numElements = allowed range: >=1. If numElements >1, buffered data are provided.**> + UInt16 numElements + } + } + + <** @description: getStatus = get the wheel sensor status at a specific point in time. **> + method getStatus { + out { + TSensorStatus status + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: notifyStatusChanged + The signal will be emitted when new wheel sensor status data is available. + **> + broadcast notifyStatusChanged selective { + out { + TSensorStatus status + } + } + +} + diff --git a/api/franca/sensorsservice/WheelConfiguration.fidl b/api/franca/sensorsservice/WheelConfiguration.fidl new file mode 100644 index 0000000..76cc10f --- /dev/null +++ b/api/franca/sensorsservice/WheelConfiguration.fidl @@ -0,0 +1,191 @@ +/* SPDX-License-Identifier: MPL-2.0 + Component Name: SensorsService + Compliance Level: Abstract Component + Copyright (C) 2018, BMW Car IT GmbH, Continental Automotive GmbH, Groupe PSA, XS Embedded GmbH + 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/. +*/ + +package org.genivi.sensorsservice + +import org.genivi.sensorsservice.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : WheelConfiguration = This interface offers functionalities to retrieve the configuration of the Wheel sensor interface of the vehicle **> +interface WheelConfiguration { + version { + major 5 + minor 0 + } + + <** @description: + Defines the measurement unit in which the wheel rotation data is provided. + The wheel rotation direction is given by the sign of the wheel rotation value: + Positive values indicate forward driving. + Negative values indicate backward driving. + **> + enumeration EWheelUnit{ + <** @description: Wheel does not provide any data. + **> + WHEEL_UNIT_NONE = 0 + <** @description: Wheel rotation data is provided as number of wheel ticks accumulated within measurement interval. + Note 1: Therefore, if the wheel ticks on the vehicle bus are represented as rolling counters, + this is the difference between two subsequent rolling counter values + taking the vehicle specific roll-over boundary into account. + Note 2: It is safe to store integer values such as for wheel ticks + without precision loss in Float variables for values up to 2^23. + **> + WHEEL_UNIT_TICKS = 1 + <** @description: Wheel rotation data is provided as speed in [m/s]. + **> + WHEEL_UNIT_SPEED = 2 + <** @description: Wheel rotation data is provided as angular speed in [1/s] rotation per seconds. + **> + WHEEL_UNIT_ANGULAR_SPEED = 3 + } + + <** @description: + Wheel configuration status bits + **> + enumeration EWheelConfigStatusBits{ + <** @description: The wheel is driven by the powertrain. + It may thus be affected by additional wheel slip. + **> + WHEEL_CONFIG_DRIVEN = 1 //0x00000001 + <** @description: The wheel may be turned by the steering. + This is typically the case only for wheels on the front axle. + But for some vehicles also wheels on other axles are permanently or temporarily steered. + **> + WHEEL_CONFIG_STEERED = 2 //0x00000002 + <** @description: The differential lock for this wheel is activated. + **> + WHEEL_CONFIG_DIFF_LOCK = 4 //0x00000004 + } + + <** @description: + TWheelConfiguration::validityBits provides information about the currently + valid signals of the wheel configuration data. + It is a or'ed bitmask of the EWheelConfigValidityBits values. + **> + enumeration EWheelConfigValidityBits{ + <** @description: Validity bit for field TWheelConfiguration::wheelticksPerRevolution. + **> + WHEEL_CONFIG_TICKS_PER_REV_VALID = 1 //0x00000001 + <** @description: Validity bit for field TWheelConfiguration::tireRollingCircumference. + **> + WHEEL_CONFIG_TIRE_CIRC_VALID = 2 //0x00000002 + <** @description: Validity bit for field TWheelConfiguration::dist2RefPointX. + **> + WHEEL_CONFIG_DISTX_VALID = 4 //0x00000004 + <** @description: Validity bit for field TWheelConfiguration::dist2RefPointY. + **> + WHEEL_CONFIG_DISTY_VALID = 8 //0x00000008 + <** @description: Validity bit for field TWheelConfiguration::dist2RefPointZ. + **> + WHEEL_CONFIG_DISTZ_VALID = 16 //0x00000010 + <** @description: Validity bit for field TWheelConfiguration::EWheelConfigStatusBits::WHEEL_CONFIG_DRIVEN. + **> + WHEEL_CONFIG_DRIVEN_VALID = 32 //0x00000020 + <** @description: Validity bit for field TWheelConfiguration::EWheelConfigStatusBits::WHEEL_CONFIG_STEERED. + **> + WHEEL_CONFIG_STEERED_VALID = 64 //0x00000040 + <** @description: Validity bit for field TWheelConfiguration::EWheelConfigStatusBits::WHEEL_CONFIG_DIFF_LOCK. + **> + WHEEL_CONFIG_DIFF_LOCK_VALID = 128 //0x00000080 + } + + <** @description: + Configuration data for an individual wheel. + Most configuration parameters are static for a given wheel. + The status bits WHEEL_CONFIG_DRIVEN, WHEEL_CONFIG_STEERED, WHEEL_CONFIG_DIFF_LOCK + are considered as dynamic configuration data. + I.e. those status bits may change dynamically during runtime. + The vehicle axis system as defined in ISO 8855:2011(E). + In this system, the axes (Xv, Yv, Zv) are oriented as follows + - Xv is in the horizontal plane, pointing forwards + - Yv is in the horizontal plane, pointing to the left + - Zv is perpendicular to the horizontal plane, pointing upwards + For an illustration, see https://collab.genivi.org/wiki/display/genivi/LBSSensorServiceRequirementsBorg#LBSSensorServiceRequirementsBorg-ReferenceSystem + **> + struct TWheelConfiguration{ + <** @description: [Static] Measurement unit in which the wheel rotation data is provided. + WHEEL_UNIT_NONE, if no wheel rotation data is provided (and thus the rest of the structure can be ignored. + **> + EWheelUnit wheelUnit + <** @description: [Static] Identification of the axle on which the wheel is mounted + Axles are numbered consecutively from front to rear. + 0: unknown/unspecified + 1: front axle + 2: 2nd axle (rear axle on a typical 2-axle vehicle) + 3: 3rd axle + ... + **> + UInt8 axleIndex + <** @description: [Static] Identification of the location of the wheel on the axle + Wheels are numbered consecutively from left to right + 0: unknown/unspecified + 1: left-most wheel (also used when there is only one wheel per axle, e.g. for a trike) + 2: right wheel #1 (right wheel on a typical passenger car with 2 wheels per axle) + 3: right wheel #2 + ... + **> + UInt8 wheelIndex + <** @description: [Static] Number of ticks for a single revolution of one wheel. + Typically only available when wheelUnit is WHEEL_UNIT_TICKS. + **> + UInt16 wheelticksPerRevolution + <** @description: [Static] Distance travelled on the ground + per a single revolution of the wheel. Unit: [m]. + **> + Float tireRollingCircumference + <** @description: [Static] Distance of the wheel center from + the vehicle reference point (x-coordinate) [m]. + **> + Float dist2RefPointX + <** @description: [Static] Distance of the wheel center from + the vehicle reference point (y-coordinate) [m]. + **> + Float dist2RefPointY + <** @description: [Static] Distance of the wheel center from + the vehicle reference point (z-coordinate) [m]. + **> + Float dist2RefPointZ + <** @description: Bit mask providing additional status information. + [bitwise or'ed ref EWheelConfigStatusBits values]. + **> + UInt32 statusBits + <** @description: Bit mask indicating the validity of each corresponding value. + [bitwise or'ed ref EWheelConfigValidityBits values]. + Must be checked before usage. + Note: wheelUnit, axleIndex and wheelIndex must always be valid. + Therefore no dedicated validityBits are required. + **> + UInt32 validityBits + } + + <** @description: + Set of configuration data for all wheels of the vehicle. + The index of configuration data for an individual wheel in the array is fixed during the runtime of the system. + Unused fields, i.e. those for which wheelUnit is WHEEL_UNIT_NONE will be at the tail of the array. + **> + array TWheelConfigurationArray of TWheelConfiguration + + <** @description: getWheelConfiguration = get the static configuration information about the wheel sensors. + Note: as some parts of the wheel configuration may change during runtime it is recommended to register for configuration updates. + **> + method getWheelConfiguration { + out { + TWheelConfigurationArray config + <** @description: available = Is true if data can be provided and false otherwise, e.g. missing initialization **> + Boolean available + } + } + <** @description: notifyWheelConfigurationChanged + The signal will be emitted when an updated wheel configuration is available. + All valid flags are updated. The data is only guaranteed to be updated when the valid flags are true. + **> + broadcast notifyWheelConfigurationChanged selective { + } + +} |