diff options
author | Helmut Schmidt <Helmut.3.Schmidt@continental-corporation.com> | 2015-12-02 20:47:11 +0100 |
---|---|---|
committer | Helmut Schmidt <Helmut.3.Schmidt@continental-corporation.com> | 2015-12-03 08:54:13 +0100 |
commit | 15027eeab1e188ec88d6e8c2cd6e59c623a7fb35 (patch) | |
tree | a16e9fd9f597cc0141c3b9cd4d0b19713d79e134 /sensors-service/api | |
parent | bd38dc23faffe8cf99bbd0bc726c2466e7f15a9d (diff) | |
download | positioning-15027eeab1e188ec88d6e8c2cd6e59c623a7fb35.tar.gz |
Changes as decided in Wetzlar F2F review session:
GT-3151 "Extend GNSS API to allow to set the satellite system"
GT-3152 "Extend EnhancedPositioning Configuration API to select a set of
Satellite systems instead of only a single satellite system"
GT-3039 "SNS API: In wheel.h, for wheel ticks: Provide wheel ticks since
the last update are provided instead of the rolling counter"
GT-3206 "GNSS/SNS API: Extend API to provide sensor status information"
GT-3219 "Extend GNSS API time structure to provide information about leap
seconds and time scale"
Update Logformat description (95% complete, vehicle-data.h part still
missing)
Diffstat (limited to 'sensors-service/api')
-rw-r--r-- | sensors-service/api/acceleration.h | 11 | ||||
-rw-r--r-- | sensors-service/api/gyroscope.h | 11 | ||||
-rw-r--r-- | sensors-service/api/inclination.h | 26 | ||||
-rw-r--r-- | sensors-service/api/odometer.h | 26 | ||||
-rw-r--r-- | sensors-service/api/reverse-gear.h | 26 | ||||
-rw-r--r-- | sensors-service/api/slip-angle.h | 26 | ||||
-rw-r--r-- | sensors-service/api/sns-init.h | 4 | ||||
-rw-r--r-- | sensors-service/api/sns-status.h | 19 | ||||
-rw-r--r-- | sensors-service/api/steering-angle.h | 26 | ||||
-rw-r--r-- | sensors-service/api/vehicle-speed.h | 12 | ||||
-rw-r--r-- | sensors-service/api/vehicle-state.h | 26 | ||||
-rw-r--r-- | sensors-service/api/wheel.h | 36 |
12 files changed, 195 insertions, 54 deletions
diff --git a/sensors-service/api/acceleration.h b/sensors-service/api/acceleration.h index f68e506..a9fd876 100644 --- a/sensors-service/api/acceleration.h +++ b/sensors-service/api/acceleration.h @@ -165,13 +165,6 @@ typedef struct { typedef void (*AccelerationCallback)(const TAccelerationData accelerationData[], uint16_t numElements); /** - * Callback type for acceleration sensor status. - * Use this type of callback if you want to register for acceleration sensor status updates data. - * @param status the acceleration sensor status - */ -typedef void (*AccelerationStatusCallback)(const TSensorStatus *status); - -/** * Initialization of the acceleration sensor service. * Must be called before using the acceleration sensor service to set up the service. * @return True if initialization has been successfull. @@ -240,7 +233,7 @@ bool snsAccelerationGetStatus(TSensorStatus* status); * @param callback The callback which should be registered. * @return True if callback has been registered successfully. */ -bool snsAccelerationRegisterStatusCallback(AccelerationStatusCallback callback); +bool snsAccelerationRegisterStatusCallback(SensorStatusCallback callback); /** * Deregister acceleration sensor status callback. @@ -248,7 +241,7 @@ bool snsAccelerationRegisterStatusCallback(AccelerationStatusCallback callback); * @param callback The callback which should be deregistered. * @return True if callback has been deregistered successfully. */ -bool snsAccelerationDeregisterStatusCallback(AccelerationStatusCallback callback); +bool snsAccelerationDeregisterStatusCallback(SensorStatusCallback callback); #ifdef __cplusplus } diff --git a/sensors-service/api/gyroscope.h b/sensors-service/api/gyroscope.h index 18669b0..0df43fd 100644 --- a/sensors-service/api/gyroscope.h +++ b/sensors-service/api/gyroscope.h @@ -164,13 +164,6 @@ typedef struct { typedef void (*GyroscopeCallback)(const TGyroscopeData gyroData[], uint16_t numElements); /** - * Callback type for gyroscope status. - * Use this type of callback if you want to register for gyroscope status updates data. - * @param status the gyroscope status - */ -typedef void (*GyroscopeStatusCallback)(const TSensorStatus *status); - -/** * Initialization of the gyroscope sensor service. * Must be called before using the gyroscope sensor service to set up the service. * @return True if initialization has been successfull. @@ -242,7 +235,7 @@ bool snsGyroscopeGetStatus(TSensorStatus* status); * @param callback The callback which should be registered. * @return True if callback has been registered successfully. */ -bool snsGyroscopeRegisterStatusCallback(GyroscopeStatusCallback callback); +bool snsGyroscopeRegisterStatusCallback(SensorStatusCallback callback); /** * Deregister gyroscope status callback. @@ -250,7 +243,7 @@ bool snsGyroscopeRegisterStatusCallback(GyroscopeStatusCallback callback); * @param callback The callback which should be deregistered. * @return True if callback has been deregistered successfully. */ -bool snsGyroscopeDeregisterStatusCallback(GyroscopeStatusCallback callback); +bool snsGyroscopeDeregisterStatusCallback(SensorStatusCallback callback); #ifdef __cplusplus } diff --git a/sensors-service/api/inclination.h b/sensors-service/api/inclination.h index d89cbe2..483ea19 100644 --- a/sensors-service/api/inclination.h +++ b/sensors-service/api/inclination.h @@ -19,6 +19,7 @@ #define INCLUDED_GENIVI_INCLINATION #include "sns-meta-data.h" +#include "sns-status.h" #include <stdbool.h> #ifdef __cplusplus @@ -120,6 +121,31 @@ bool snsInclinationRegisterCallback(InclinationCallback callback); */ bool snsInclinationDeregisterCallback(InclinationCallback callback); +/** + * Method to get the inclination sensor status at a specific point in time. + * @param status After calling the method the current inclination sensor status is written into status + * @return Is true if data can be provided and false otherwise, e.g. missing initialization + */ +bool snsInclinationGetStatus(TSensorStatus* status); + +/** + * Register inclination sensor status callback. + * This is the recommended method for continuously monitoring the inclination sensor status. + * The callback will be invoked when new inclination sensor status data is available. + * @param callback The callback which should be registered. + * @return True if callback has been registered successfully. + */ +bool snsInclinationRegisterStatusCallback(SensorStatusCallback callback); + +/** + * Deregister inclination sensor status callback. + * After calling this method no new inclination sensor status updates will be delivered to the client. + * @param callback The callback which should be deregistered. + * @return True if callback has been deregistered successfully. + */ +bool snsInclinationDeregisterStatusCallback(SensorStatusCallback callback); + + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/odometer.h b/sensors-service/api/odometer.h index b504af8..cc9bbf8 100644 --- a/sensors-service/api/odometer.h +++ b/sensors-service/api/odometer.h @@ -19,6 +19,7 @@ #define INCLUDE_GENIVI_ODOMETER #include "sns-meta-data.h" +#include "sns-status.h" #include <stdbool.h> #ifdef __cplusplus @@ -114,6 +115,31 @@ bool snsOdometerRegisterCallback(OdometerCallback callback); */ bool snsOdometerDeregisterCallback(OdometerCallback callback); +/** + * Method to get the odometer sensor status at a specific point in time. + * @param status After calling the method the current odometer sensor status is written into status + * @return Is true if data can be provided and false otherwise, e.g. missing initialization + */ +bool snsOdometerGetStatus(TSensorStatus* status); + +/** + * Register odometer sensor status callback. + * This is the recommended method for continuously monitoring the odometer sensor status. + * The callback will be invoked when new odometer sensor status data is available. + * @param callback The callback which should be registered. + * @return True if callback has been registered successfully. + */ +bool snsOdometerRegisterStatusCallback(SensorStatusCallback callback); + +/** + * Deregister odometer sensor status callback. + * After calling this method no new odometer sensor status updates will be delivered to the client. + * @param callback The callback which should be deregistered. + * @return True if callback has been deregistered successfully. + */ +bool snsOdometerDeregisterStatusCallback(SensorStatusCallback callback); + + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/reverse-gear.h b/sensors-service/api/reverse-gear.h index 63f3c16..a973044 100644 --- a/sensors-service/api/reverse-gear.h +++ b/sensors-service/api/reverse-gear.h @@ -19,6 +19,7 @@ #define INCLUDED_GENIVI_REVERSEGEAR #include "sns-meta-data.h" +#include "sns-status.h" #include <stdbool.h> #ifdef __cplusplus @@ -106,6 +107,31 @@ bool snsReverseGearRegisterCallback(ReverseGearCallback callback); */ bool snsReverseGearDeregisterCallback(ReverseGearCallback callback); +/** + * Method to get the reverse gear sensor status at a specific point in time. + * @param status After calling the method the current reverse gear sensor status is written into status + * @return Is true if data can be provided and false otherwise, e.g. missing initialization + */ +bool snsReverseGearGetStatus(TSensorStatus* status); + +/** + * Register reverse gear sensor status callback. + * This is the recommended method for continuously monitoring the reverse gear sensor status. + * The callback will be invoked when new reverse gear sensor status data is available. + * @param callback The callback which should be registered. + * @return True if callback has been registered successfully. + */ +bool snsReverseGearRegisterStatusCallback(SensorStatusCallback callback); + +/** + * Deregister reverse gear sensor status callback. + * After calling this method no new reverse gear sensor status updates will be delivered to the client. + * @param callback The callback which should be deregistered. + * @return True if callback has been deregistered successfully. + */ +bool snsReverseGearDeregisterStatusCallback(SensorStatusCallback callback); + + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/slip-angle.h b/sensors-service/api/slip-angle.h index fb3cdff..f618572 100644 --- a/sensors-service/api/slip-angle.h +++ b/sensors-service/api/slip-angle.h @@ -19,6 +19,7 @@ #define INCLUDE_GENIVI_SLIP_ANGLE #include "sns-meta-data.h" +#include "sns-status.h" #include <stdbool.h> #ifdef __cplusplus @@ -111,6 +112,31 @@ bool snsSlipAngleRegisterCallback(SlipAngleCallback callback); */ bool snsSlipAngleDeregisterCallback(SlipAngleCallback callback); +/** + * Method to get the slip angle sensor status at a specific point in time. + * @param status After calling the method the current slip angle sensor status is written into status + * @return Is true if data can be provided and false otherwise, e.g. missing initialization + */ +bool snsSlipAngleGetStatus(TSensorStatus* status); + +/** + * Register slip angle sensor status callback. + * This is the recommended method for continuously monitoring the slip angle sensor status. + * The callback will be invoked when new slip angle sensor status data is available. + * @param callback The callback which should be registered. + * @return True if callback has been registered successfully. + */ +bool snsSlipAngleRegisterStatusCallback(SensorStatusCallback callback); + +/** + * Deregister slip angle sensor status callback. + * After calling this method no new slip angle sensor status updates will be delivered to the client. + * @param callback The callback which should be deregistered. + * @return True if callback has been deregistered successfully. + */ +bool snsSlipAngleDeregisterStatusCallback(SensorStatusCallback callback); + + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/sns-init.h b/sensors-service/api/sns-init.h index 6c6a753..d16afda 100644 --- a/sensors-service/api/sns-init.h +++ b/sensors-service/api/sns-init.h @@ -12,9 +12,9 @@ #define INCLUDE_GENIVI_SNS // API Version -#define GENIVI_SNS_API_MAJOR 3 +#define GENIVI_SNS_API_MAJOR 4 #define GENIVI_SNS_API_MINOR 0 -#define GENIVI_SNS_API_MICRO 1 +#define GENIVI_SNS_API_MICRO 0 #include <stdint.h> #include <stdbool.h> diff --git a/sensors-service/api/sns-status.h b/sensors-service/api/sns-status.h index ec0972c..90d25b4 100644 --- a/sensors-service/api/sns-status.h +++ b/sensors-service/api/sns-status.h @@ -23,7 +23,7 @@ extern "C" { #endif /** - * Enumeration to describe the status of the GNSS receiver + * Enumeration to describe the status of the sensor */ typedef enum { SENSOR_STATUS_NOTAVAILABLE = 0, /**< Sensor is not available at all, based on configuration data. */ @@ -35,25 +35,32 @@ typedef enum { } ESensorStatus; /** - * TGNSSStatus::validityBits provides information about the currently valid signals of the TSensorStatus struct. - * It is a or'ed bitmask of the EGNSSStatusValidityBits values. + * TSensorStatus::validityBits provides information about the currently valid signals of the TSensorStatus struct. + * It is a or'ed bitmask of the ESensorStatusValidityBits values. */ typedef enum { SENSOR_STATUS_STATUS_VALID = 0x00000001 /**< Validity bit for field TSensorStatus::status. */ } ESensorStatusValidityBits; /** - * Container for GNSS status information + * Container for sensor status information */ typedef struct { - uint64_t timestamp; /**< Timestamp of the GNSS status transition [ms]. + uint64_t 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 receiver */ + ESensorStatus status; /**< Status of the sensor */ uint32_t validityBits; /**< Bit mask indicating the validity of each corresponding value. [bitwise or'ed @ref ESensorStatusValidityBits values]. Must be checked before usage. */ } TSensorStatus; +/** + * Callback type for sensor status. + * Use this type of callback if you want to register for sensor status updates data. + * @param status the sensor status + */ +typedef void (*SensorStatusCallback)(const TSensorStatus *status); + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/steering-angle.h b/sensors-service/api/steering-angle.h index eef9734..3025035 100644 --- a/sensors-service/api/steering-angle.h +++ b/sensors-service/api/steering-angle.h @@ -19,6 +19,7 @@ #define INCLUDE_GENIVI_STEERINGANGLE #include "sns-meta-data.h" +#include "sns-status.h" #include <stdbool.h> #ifdef __cplusplus @@ -134,6 +135,31 @@ bool snsSteeringAngleRegisterCallback(SteeringAngleCallback callback); */ bool snsSteeringAngleDeregisterCallback(SteeringAngleCallback callback); +/** + * Method to get the steering angle sensor status at a specific point in time. + * @param status After calling the method the current steering angle sensor status is written into status + * @return Is true if data can be provided and false otherwise, e.g. missing initialization + */ +bool snsSteeringAngleGetStatus(TSensorStatus* status); + +/** + * Register steering angle sensor status callback. + * This is the recommended method for continuously monitoring the steering angle sensor status. + * The callback will be invoked when new steering angle sensor status data is available. + * @param callback The callback which should be registered. + * @return True if callback has been registered successfully. + */ +bool snsSteeringAngleRegisterStatusCallback(SensorStatusCallback callback); + +/** + * Deregister steering angle sensor status callback. + * After calling this method no new steering angle sensor status updates will be delivered to the client. + * @param callback The callback which should be deregistered. + * @return True if callback has been deregistered successfully. + */ +bool snsSteeringAngleDeregisterStatusCallback(SensorStatusCallback callback); + + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/vehicle-speed.h b/sensors-service/api/vehicle-speed.h index c5897e5..333fae8 100644 --- a/sensors-service/api/vehicle-speed.h +++ b/sensors-service/api/vehicle-speed.h @@ -58,14 +58,6 @@ typedef struct { */ typedef void (*VehicleSpeedCallback)(const TVehicleSpeedData vehicleSpeedData[], uint16_t numElements); - -/** - * Callback type for vehicle speed sensor status. - * Use this type of callback if you want to register for vehicle speed sensor status updates data. - * @param status the vehicle speed sensor status - */ -typedef void (*VehicleSpeedStatusCallback)(const TSensorStatus *status); - /** * Initialization of the vehicle speed sensor service. * Must be called before using the vehicle speed sensor service to set up the service. @@ -125,7 +117,7 @@ bool snsVehicleSpeedGetStatus(TSensorStatus* status); * @param callback The callback which should be registered. * @return True if callback has been registered successfully. */ -bool snsVehicleSpeedRegisterStatusCallback(VehicleSpeedStatusCallback callback); +bool snsVehicleSpeedRegisterStatusCallback(SensorStatusCallback callback); /** * Deregister vehicle speed sensor status callback. @@ -133,7 +125,7 @@ bool snsVehicleSpeedRegisterStatusCallback(VehicleSpeedStatusCallback callback); * @param callback The callback which should be deregistered. * @return True if callback has been deregistered successfully. */ -bool snsVehicleSpeedDeregisterStatusCallback(VehicleSpeedStatusCallback callback); +bool snsVehicleSpeedDeregisterStatusCallback(SensorStatusCallback callback); #ifdef __cplusplus } diff --git a/sensors-service/api/vehicle-state.h b/sensors-service/api/vehicle-state.h index 3b9f984..ddb5dd6 100644 --- a/sensors-service/api/vehicle-state.h +++ b/sensors-service/api/vehicle-state.h @@ -19,6 +19,7 @@ #define INCLUDED_GENIVI_VEHICLESTATE #include "sns-meta-data.h" +#include "sns-status.h" #include <stdbool.h> #ifdef __cplusplus @@ -112,6 +113,31 @@ bool snsVehicleStateRegisterCallback(VehicleStateCallback callback); */ bool snsVehicleStateDeregisterCallback(VehicleStateCallback callback); +/** + * Method to get the vehicle state sensor status at a specific point in time. + * @param status After calling the method the current vehicle state sensor status is written into status + * @return Is true if data can be provided and false otherwise, e.g. missing initialization + */ +bool snsVehicleStateGetStatus(TSensorStatus* status); + +/** + * Register vehicle state sensor status callback. + * This is the recommended method for continuously monitoring the vehicle state sensor status. + * The callback will be invoked when new vehicle state sensor status data is available. + * @param callback The callback which should be registered. + * @return True if callback has been registered successfully. + */ +bool snsVehicleStateRegisterStatusCallback(SensorStatusCallback callback); + +/** + * Deregister vehicle state sensor status callback. + * After calling this method no new vehicle state sensor status updates will be delivered to the client. + * @param callback The callback which should be deregistered. + * @return True if callback has been deregistered successfully. + */ +bool snsVehicleStateDeregisterStatusCallback(SensorStatusCallback callback); + + #ifdef __cplusplus } #endif diff --git a/sensors-service/api/wheel.h b/sensors-service/api/wheel.h index 3a42d84..78f59de 100644 --- a/sensors-service/api/wheel.h +++ b/sensors-service/api/wheel.h @@ -141,14 +141,14 @@ typedef enum { */ typedef enum { - WHEEL_UNIT_TICKS = 0x00000001, /**< 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_SPEED = 0x00000002, /**< Wheel rotation data is provided as speed in [m/s]. */ - WHEEL_UNIT_ANGULAR_SPEED = 0x00000003, /**< Wheel rotation data is provided as angular speed in [1/s] rotation per seconds. */ + WHEEL_UNIT_TICKS = 1, /**< 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_SPEED = 2, /**< Wheel rotation data is provided as speed in [m/s]. */ + WHEEL_UNIT_ANGULAR_SPEED = 3, /**< Wheel rotation data is provided as angular speed in [1/s] rotation per seconds. */ } EWheelUnit; @@ -167,10 +167,10 @@ typedef enum { */ typedef struct { EWheelUnit wheelUnit; /**< Measurement unit in which the wheel rotation data is provided. Valid for all wheels. */ - EWheelId wheel1; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel1 */ - EWheelId wheel2; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel2 */ - EWheelId wheel3; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel3 */ - EWheelId wheel4; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel4 */ + EWheelId wheel1Id; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel1 */ + EWheelId wheel2Id; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel2 */ + EWheelId wheel3Id; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel3 */ + EWheelId wheel4Id; /**< Identifies the wheel of the vehicle assigned to @ref TWheelData::wheel4 */ uint16_t wheelticksPerRevolution; /**< Number of ticks for a single revolution of one wheel */ float tireRollingCircumference; /**< Distance travelled on the ground per a single revolution of one wheel. Unit: [m]. */ uint32_t validityBits; /**< Bit mask indicating the validity of each corresponding value. @@ -194,10 +194,10 @@ typedef struct { uint64_t timestamp; /**< Timestamp of the acquisition of this wheel tick signal [ms]. All sensor/GNSS timestamps must be based on the same time source. */ - float wheel1; /**< TWheelConfiguration:: */ - float wheel2; /**< Number of wheel ticks accumulated within measurement interval for wheel2 */ - float wheel3; /**< Number of wheel ticks accumulated within measurement interval for wheel1 */ - float wheel4; /**< Number of wheel ticks accumulated within measurement interval for wheel1 */ + float wheel1; /**< Wheel rotation data for the wheel identified by TWheelConfiguration::wheel1 in measurement unit identified by TWheelConfiguration::wheelUnit. */ + float wheel2; /**< Wheel rotation data for the wheel identified by TWheelConfiguration::wheel2 in measurement unit identified by TWheelConfiguration::wheelUnit. */ + float wheel3; /**< Wheel rotation data for the wheel identified by TWheelConfiguration::wheel3 in measurement unit identified by TWheelConfiguration::wheelUnit. */ + float wheel4; /**< Wheel rotation data for the wheel identified by TWheelConfiguration::wheel4 in measurement unit identified by TWheelConfiguration::wheelUnit. */ uint32_t statusBits; /**< Bit mask providing additional status information. [bitwise or'ed @ref EWheelStatusBits values]. */ @@ -295,7 +295,7 @@ bool snsWheelGetStatus(TSensorStatus* status); * @param callback The callback which should be registered. * @return True if callback has been registered successfully. */ -bool snsWheelRegisterStatusCallback(WheelStatusCallback callback); +bool snsWheelRegisterStatusCallback(SensorStatusCallback callback); /** * Deregister wheel sensor status callback. @@ -303,7 +303,7 @@ bool snsWheelRegisterStatusCallback(WheelStatusCallback callback); * @param callback The callback which should be deregistered. * @return True if callback has been deregistered successfully. */ -bool snsWheelDeregisterStatusCallback(WheelStatusCallback callback); +bool snsWheelDeregisterStatusCallback(SensorStatusCallback callback); #ifdef __cplusplus } |