summaryrefslogtreecommitdiff
path: root/api/franca/sensorsservice/SensorsServiceTypes.fidl
blob: 3e3e77c365c9d6c65619ee74a9398b0836ead42a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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. **>
	}

}