diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2018-01-24 11:38:14 +0100 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2018-01-24 11:38:14 +0100 |
commit | 0715921b61d6cd0ab9da27edd9959c90bef4ff24 (patch) | |
tree | 0adf517ec9cf011ceee0418ecd6ecdd4eed6f732 | |
parent | 4d8b3af3548204b58f6c35cc4c33d4bc089162b4 (diff) | |
download | positioning-0715921b61d6cd0ab9da27edd9959c90bef4ff24.tar.gz |
Franca definition of the Acceleration and Gyroscope APIs (first proposal)
-rw-r--r-- | sensors-service/api/franca/Acceleration.fidl | 319 | ||||
-rw-r--r-- | sensors-service/api/franca/Gyroscope.fidl | 316 | ||||
-rw-r--r-- | sensors-service/api/franca/MetaData.fidl | 28 | ||||
-rw-r--r-- | sensors-service/api/franca/SensorsServiceTypes.fidl | 94 |
4 files changed, 757 insertions, 0 deletions
diff --git a/sensors-service/api/franca/Acceleration.fidl b/sensors-service/api/franca/Acceleration.fidl new file mode 100644 index 0000000..f71ff83 --- /dev/null +++ b/sensors-service/api/franca/Acceleration.fidl @@ -0,0 +1,319 @@ +/* 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.SensorsService + +import org.genivi.SensorsService.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : Acceleration = This interface offers functionalities to retrieve the Acceleration of the vehicle **> +interface Acceleration { + + <** @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 = 0x00000001 + <** @description: Validity bit for field TAccelerationConfiguration::dist2RefPointY. + **> + ACCELERATION_CONFIG_DISTY_VALID = 0x00000002 + <** @description: Validity bit for field TAccelerationConfiguration::dist2RefPointZ. + **> + ACCELERATION_CONFIG_DISTZ_VALID = 0x00000004 + <** @description: Validity bit for field TAccelerationConfiguration::angleYaw. + **> + ACCELERATION_CONFIG_ANGLEYAW_VALID = 0x00000008 + <** @description: Validity bit for field TAccelerationConfiguration::anglePitch. + **> + ACCELERATION_CONFIG_ANGLEPITCH_VALID= 0x00000010 + <** @description: Validity bit for field TAccelerationConfiguration::angleRoll. + **> + ACCELERATION_CONFIG_ANGLEROLL_VALID = 0x00000020 + <** @description: Validity bit for field TAccelerationConfiguration::sigmaX. + **> + ACCELERATION_CONFIG_SIGMAX_VALID = 0x00000040 + <** @description: Validity bit for field TAccelerationConfiguration::sigmaX. + **> + ACCELERATION_CONFIG_SIGMAY_VALID = 0x00000080 + <** @description: Validity bit for field TAccelerationConfiguration::sigmaZ. + **> + ACCELERATION_CONFIG_SIGMAZ_VALID = 0x00000100 + <** @description: Validity bit for field TAccelerationConfiguration::typeBits. + **> + ACCELERATION_CONFIG_TYPE_VALID = 0x00000200 + } + + <** @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 = 0x00000001 + <** @description: An acceleration measurement for the y-axis is provided. + **> + ACCELERATION_Y_PROVIDED = 0x00000002 + <** @description: An acceleration measurement for the z-axis is provided. + **> + ACCELERATION_Z_PROVIDED = 0x00000004 + <** @description: A measurement for the temperature is provided. + **> + ACCELERATION_TEMPERATURE_PROVIDED = 0x00000008 + } + + + <** @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: + 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 = 0x00000001 + <** @description: Validity bit for field TAccelerationData::y. + **> + ACCELERATION_Y_VALID = 0x00000002 + <** @description: Validity bit for field TAccelerationData::z. + **> + ACCELERATION_Z_VALID = 0x00000004 + <** @description: Validity bit for field TAccelerationData::temperature. + **> + ACCELERATION_TEMPERATURE_VALID = 0x00000008 + <** @description: Validity bit for field TAccelerationData::measurementInterval. + **> + ACCELERATION_MEASINT_VALID = 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 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: 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 + } + } + + <** @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 { + } + + <** @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 { + } + +} diff --git a/sensors-service/api/franca/Gyroscope.fidl b/sensors-service/api/franca/Gyroscope.fidl new file mode 100644 index 0000000..ccd40e0 --- /dev/null +++ b/sensors-service/api/franca/Gyroscope.fidl @@ -0,0 +1,316 @@ +/* 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.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 { + + <** @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 = 0x00000001 + <** @description: Validity bit for field TGyroscopeConfiguration::anglePitch. + **> + GYROSCOPE_CONFIG_ANGLEPITCH_VALID = 0x00000002 + <** @description: Validity bit for field TGyroscopeConfiguration::angleRoll. + **> + GYROSCOPE_CONFIG_ANGLEROLL_VALID = 0x00000004 + <** @description: Validity bit for field TGyroscopeConfiguration::momentOfYawInertia. + **> + GYROSCOPE_CONFIG_MOMENTYAW_VALID = 0x00000008 + <** @description: Validity bit for field TGyroscopeConfiguration::sigmaGyroscope. + **> + GYROSCOPE_CONFIG_SIGMAGYROSCOPE_VALID = 0x00000010 + <** @description: Validity bit for field TGyroscopeConfiguration::typeBits. + **> + GYROSCOPE_CONFIG_TYPE_VALID = 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 = 0x00000001 + <** @description: A measurement for the z/yaw-axis is provided. + **> + GYROSCOPE_YAWRATE_PROVIDED = 0x00000002 + <** @description: A measurement for the y/pitch-axis is provided. + **> + GYROSCOPE_PITCHRATE_PROVIDED = 0x00000004 + <** @description: A measurement for the x/roll-axis is provided. + **> + GYROSCOPE_ROLLRATE_PROVIDED = 0x00000008 + <** @description: A measurement for the temperature is provided. + **> + GYROSCOPE_TEMPERATURE_PROVIDED = 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: + 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 = 0x00000001 + <** @description: Validity bit for field TGyroscopeData::pitchRate. + **> + GYROSCOPE_PITCHRATE_VALID = 0x00000002 + <** @description: Validity bit for field TGyroscopeData::rollRate. + **> + GYROSCOPE_ROLLRATE_VALID = 0x00000004 + <** @description: Validity bit for field TGyroscopeData::temperature. + **> + GYROSCOPE_TEMPERATURE_VALID = 0x00000008 + <** @description: Validity bit for field TGyroscopeData::measurementInterval. + **> + GYROSCOPE_MEASINT_VALID = 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 { + } + + <** @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 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: 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 + } + } + + <** @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 { + } + +} diff --git a/sensors-service/api/franca/MetaData.fidl b/sensors-service/api/franca/MetaData.fidl new file mode 100644 index 0000000..2576442 --- /dev/null +++ b/sensors-service/api/franca/MetaData.fidl @@ -0,0 +1,28 @@ +/* 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.SensorsService + +import org.genivi.SensorsService.SensorsServiceTypes.* from "SensorsServiceTypes.fidl" + +<** @description : MetaData = This interface offers functionalities to retrieve the MetaData of SensorsService **> +interface MetaData { + + <** @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/sensors-service/api/franca/SensorsServiceTypes.fidl b/sensors-service/api/franca/SensorsServiceTypes.fidl new file mode 100644 index 0000000..07ab29d --- /dev/null +++ b/sensors-service/api/franca/SensorsServiceTypes.fidl @@ -0,0 +1,94 @@ +/* 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.SensorsService + +typeCollection SensorsServiceTypes { + +//Data types and enums defined into 'sns-meta-data.h' + <** @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 + } + + //Data types and enums defined into 'sns-status.h' + + <** @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 = 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. **> + } + +}
\ No newline at end of file |