diff options
Diffstat (limited to 'sensors')
-rw-r--r-- | sensors/1.0/default/Android.bp | 2 | ||||
-rw-r--r-- | sensors/1.0/default/Android.mk | 1 | ||||
-rw-r--r-- | sensors/1.0/vts/Sensors.vts | 172 | ||||
-rw-r--r-- | sensors/1.0/vts/functional/Android.bp | 7 | ||||
-rw-r--r-- | sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp (renamed from sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp) | 6 | ||||
-rw-r--r-- | sensors/1.0/vts/types.vts | 901 |
6 files changed, 6 insertions, 1083 deletions
diff --git a/sensors/1.0/default/Android.bp b/sensors/1.0/default/Android.bp index 3930504c9f..1d8d6a479d 100644 --- a/sensors/1.0/default/Android.bp +++ b/sensors/1.0/default/Android.bp @@ -7,7 +7,6 @@ cc_library_shared { "liblog", "libcutils", "libhardware", - "libhwbinder", "libbase", "libutils", "libhidlbase", @@ -29,7 +28,6 @@ cc_library_static { "liblog", "libcutils", "libhardware", - "libhwbinder", "libbase", "libutils", "libhidlbase", diff --git a/sensors/1.0/default/Android.mk b/sensors/1.0/default/Android.mk index 6a1aab4249..bc1cfbdeb0 100644 --- a/sensors/1.0/default/Android.mk +++ b/sensors/1.0/default/Android.mk @@ -18,7 +18,6 @@ LOCAL_SHARED_LIBRARIES := \ libhardware \ LOCAL_SHARED_LIBRARIES += \ - libhwbinder \ libhidlbase \ libhidltransport \ android.hardware.sensors@1.0 \ diff --git a/sensors/1.0/vts/Sensors.vts b/sensors/1.0/vts/Sensors.vts deleted file mode 100644 index 558c36dfec..0000000000 --- a/sensors/1.0/vts/Sensors.vts +++ /dev/null @@ -1,172 +0,0 @@ -component_class: HAL_HIDL -component_type_version: 1.0 -component_name: "ISensors" - -package: "android.hardware.sensors" - -import: "android.hardware.sensors@1.0::types" -import: "android.hidl.base@1.0::types" - -interface: { - api: { - name: "getSensorsList" - return_type_hidl: { - type: TYPE_VECTOR - vector_value: { - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::SensorInfo" - } - } - } - - api: { - name: "setOperationMode" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - arg: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::OperationMode" - } - } - - api: { - name: "activate" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - arg: { - type: TYPE_SCALAR - scalar_type: "bool_t" - } - } - - api: { - name: "poll" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - return_type_hidl: { - type: TYPE_VECTOR - vector_value: { - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::Event" - } - } - return_type_hidl: { - type: TYPE_VECTOR - vector_value: { - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::SensorInfo" - } - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - } - - api: { - name: "batch" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int64_t" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int64_t" - } - } - - api: { - name: "flush" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - } - - api: { - name: "injectSensorData" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - arg: { - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::Event" - } - } - - api: { - name: "registerDirectChannel" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - return_type_hidl: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - arg: { - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::SharedMemInfo" - } - } - - api: { - name: "unregisterDirectChannel" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - } - - api: { - name: "configDirectReport" - return_type_hidl: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::Result" - } - return_type_hidl: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - arg: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - arg: { - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::RateLevel" - } - } - -} diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp index 9ca6230349..4be4f644ba 100644 --- a/sensors/1.0/vts/functional/Android.bp +++ b/sensors/1.0/vts/functional/Android.bp @@ -15,9 +15,8 @@ // cc_test { - name: "sensors_hidl_hal_test", - gtest: true, - srcs: ["sensors_hidl_hal_test.cpp"], + name: "VtsHalSensorsV1_0TargetTest", + srcs: ["VtsHalSensorsV1_0TargetTest.cpp"], shared_libs: [ "android.hardware.sensors@1.0", "libcutils", @@ -25,7 +24,7 @@ cc_test { "liblog", "libutils", ], - static_libs: ["libgtest"], + static_libs: ["VtsHalHidlTargetBaseTest"], cflags: [ "-O0", "-g", diff --git a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp index 9a71745dd7..b1483e3c66 100644 --- a/sensors/1.0/vts/functional/sensors_hidl_hal_test.cpp +++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp @@ -20,7 +20,7 @@ #include <android/hardware/sensors/1.0/types.h> #include <android/log.h> #include <cutils/ashmem.h> -#include <gtest/gtest.h> +#include <VtsHalHidlTargetBaseTest.h> #include <hardware/sensors.h> // for sensor type strings #include <algorithm> @@ -80,7 +80,7 @@ class SensorsHidlEnvironment : public ::testing::Environment { }; void SensorsHidlEnvironment::SetUp() { - sensors = ISensors::getService(); + sensors = ::testing::VtsHalHidlTargetBaseTest::getService<ISensors>(); ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get()); ASSERT_NE(sensors, nullptr); @@ -309,7 +309,7 @@ SensorsTestSharedMemory* SensorsTestSharedMemory::create(SharedMemType type, siz } // The main test class for SENSORS HIDL HAL. -class SensorsHidlTest : public ::testing::Test { +class SensorsHidlTest : public ::testing::VtsHalHidlTargetBaseTest { public: virtual void SetUp() override { } diff --git a/sensors/1.0/vts/types.vts b/sensors/1.0/vts/types.vts deleted file mode 100644 index bc8782359a..0000000000 --- a/sensors/1.0/vts/types.vts +++ /dev/null @@ -1,901 +0,0 @@ -component_class: HAL_HIDL -component_type_version: 1.0 -component_name: "types" - -package: "android.hardware.sensors" - - -attribute: { - name: "::android::hardware::sensors::V1_0::Result" - type: TYPE_ENUM - enum_value: { - scalar_type: "int32_t" - - enumerator: "OK" - scalar_value: { - int32_t: 0 - } - enumerator: "PERMISSION_DENIED" - scalar_value: { - int32_t: -1 - } - enumerator: "NO_MEMORY" - scalar_value: { - int32_t: -12 - } - enumerator: "BAD_VALUE" - scalar_value: { - int32_t: -22 - } - enumerator: "INVALID_OPERATION" - scalar_value: { - int32_t: -38 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::OperationMode" - type: TYPE_ENUM - enum_value: { - scalar_type: "int32_t" - - enumerator: "NORMAL" - scalar_value: { - int32_t: 0 - } - enumerator: "DATA_INJECTION" - scalar_value: { - int32_t: 1 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SensorType" - type: TYPE_ENUM - enum_value: { - scalar_type: "int32_t" - - enumerator: "META_DATA" - scalar_value: { - int32_t: 0 - } - enumerator: "ACCELEROMETER" - scalar_value: { - int32_t: 1 - } - enumerator: "MAGNETIC_FIELD" - scalar_value: { - int32_t: 2 - } - enumerator: "ORIENTATION" - scalar_value: { - int32_t: 3 - } - enumerator: "GYROSCOPE" - scalar_value: { - int32_t: 4 - } - enumerator: "LIGHT" - scalar_value: { - int32_t: 5 - } - enumerator: "PRESSURE" - scalar_value: { - int32_t: 6 - } - enumerator: "TEMPERATURE" - scalar_value: { - int32_t: 7 - } - enumerator: "PROXIMITY" - scalar_value: { - int32_t: 8 - } - enumerator: "GRAVITY" - scalar_value: { - int32_t: 9 - } - enumerator: "LINEAR_ACCELERATION" - scalar_value: { - int32_t: 10 - } - enumerator: "ROTATION_VECTOR" - scalar_value: { - int32_t: 11 - } - enumerator: "RELATIVE_HUMIDITY" - scalar_value: { - int32_t: 12 - } - enumerator: "AMBIENT_TEMPERATURE" - scalar_value: { - int32_t: 13 - } - enumerator: "MAGNETIC_FIELD_UNCALIBRATED" - scalar_value: { - int32_t: 14 - } - enumerator: "GAME_ROTATION_VECTOR" - scalar_value: { - int32_t: 15 - } - enumerator: "GYROSCOPE_UNCALIBRATED" - scalar_value: { - int32_t: 16 - } - enumerator: "SIGNIFICANT_MOTION" - scalar_value: { - int32_t: 17 - } - enumerator: "STEP_DETECTOR" - scalar_value: { - int32_t: 18 - } - enumerator: "STEP_COUNTER" - scalar_value: { - int32_t: 19 - } - enumerator: "GEOMAGNETIC_ROTATION_VECTOR" - scalar_value: { - int32_t: 20 - } - enumerator: "HEART_RATE" - scalar_value: { - int32_t: 21 - } - enumerator: "TILT_DETECTOR" - scalar_value: { - int32_t: 22 - } - enumerator: "WAKE_GESTURE" - scalar_value: { - int32_t: 23 - } - enumerator: "GLANCE_GESTURE" - scalar_value: { - int32_t: 24 - } - enumerator: "PICK_UP_GESTURE" - scalar_value: { - int32_t: 25 - } - enumerator: "WRIST_TILT_GESTURE" - scalar_value: { - int32_t: 26 - } - enumerator: "DEVICE_ORIENTATION" - scalar_value: { - int32_t: 27 - } - enumerator: "POSE_6DOF" - scalar_value: { - int32_t: 28 - } - enumerator: "STATIONARY_DETECT" - scalar_value: { - int32_t: 29 - } - enumerator: "MOTION_DETECT" - scalar_value: { - int32_t: 30 - } - enumerator: "HEART_BEAT" - scalar_value: { - int32_t: 31 - } - enumerator: "DYNAMIC_SENSOR_META" - scalar_value: { - int32_t: 32 - } - enumerator: "ADDITIONAL_INFO" - scalar_value: { - int32_t: 33 - } - enumerator: "LOW_LATENCY_OFFBODY_DETECT" - scalar_value: { - int32_t: 34 - } - enumerator: "ACCELEROMETER_UNCALIBRATED" - scalar_value: { - int32_t: 35 - } - enumerator: "DEVICE_PRIVATE_BASE" - scalar_value: { - int32_t: 65536 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SensorFlagBits" - type: TYPE_ENUM - enum_value: { - scalar_type: "uint32_t" - - enumerator: "WAKE_UP" - scalar_value: { - uint32_t: 1 - } - enumerator: "CONTINUOUS_MODE" - scalar_value: { - uint32_t: 0 - } - enumerator: "ON_CHANGE_MODE" - scalar_value: { - uint32_t: 2 - } - enumerator: "ONE_SHOT_MODE" - scalar_value: { - uint32_t: 4 - } - enumerator: "SPECIAL_REPORTING_MODE" - scalar_value: { - uint32_t: 6 - } - enumerator: "DATA_INJECTION" - scalar_value: { - uint32_t: 16 - } - enumerator: "DYNAMIC_SENSOR" - scalar_value: { - uint32_t: 32 - } - enumerator: "ADDITIONAL_INFO" - scalar_value: { - uint32_t: 64 - } - enumerator: "DIRECT_CHANNEL_ASHMEM" - scalar_value: { - uint32_t: 1024 - } - enumerator: "DIRECT_CHANNEL_GRALLOC" - scalar_value: { - uint32_t: 2048 - } - enumerator: "MASK_REPORTING_MODE" - scalar_value: { - uint32_t: 14 - } - enumerator: "MASK_DIRECT_REPORT" - scalar_value: { - uint32_t: 896 - } - enumerator: "MASK_DIRECT_CHANNEL" - scalar_value: { - uint32_t: 3072 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SensorFlagShift" - type: TYPE_ENUM - enum_value: { - scalar_type: "uint8_t" - - enumerator: "REPORTING_MODE" - scalar_value: { - uint8_t: 1 - } - enumerator: "DATA_INJECTION" - scalar_value: { - uint8_t: 4 - } - enumerator: "DYNAMIC_SENSOR" - scalar_value: { - uint8_t: 5 - } - enumerator: "ADDITIONAL_INFO" - scalar_value: { - uint8_t: 6 - } - enumerator: "DIRECT_REPORT" - scalar_value: { - uint8_t: 7 - } - enumerator: "DIRECT_CHANNEL" - scalar_value: { - uint8_t: 10 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SensorInfo" - type: TYPE_STRUCT - struct_value: { - name: "sensorHandle" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "name" - type: TYPE_STRING - } - struct_value: { - name: "vendor" - type: TYPE_STRING - } - struct_value: { - name: "version" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "type" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::SensorType" - } - struct_value: { - name: "typeAsString" - type: TYPE_STRING - } - struct_value: { - name: "maxRange" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "resolution" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "power" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "minDelay" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "fifoReservedEventCount" - type: TYPE_SCALAR - scalar_type: "uint32_t" - } - struct_value: { - name: "fifoMaxEventCount" - type: TYPE_SCALAR - scalar_type: "uint32_t" - } - struct_value: { - name: "requiredPermission" - type: TYPE_STRING - } - struct_value: { - name: "maxDelay" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "flags" - type: TYPE_MASK - scalar_type: "uint32_t" - predefined_type: "::android::hardware::sensors::V1_0::SensorFlagBits" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SensorStatus" - type: TYPE_ENUM - enum_value: { - scalar_type: "int8_t" - - enumerator: "NO_CONTACT" - scalar_value: { - int8_t: -1 - } - enumerator: "UNRELIABLE" - scalar_value: { - int8_t: 0 - } - enumerator: "ACCURACY_LOW" - scalar_value: { - int8_t: 1 - } - enumerator: "ACCURACY_MEDIUM" - scalar_value: { - int8_t: 2 - } - enumerator: "ACCURACY_HIGH" - scalar_value: { - int8_t: 3 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::Vec3" - type: TYPE_STRUCT - struct_value: { - name: "x" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "y" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "z" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "status" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::SensorStatus" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::Vec4" - type: TYPE_STRUCT - struct_value: { - name: "x" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "y" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "z" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "w" - type: TYPE_SCALAR - scalar_type: "float_t" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::Uncal" - type: TYPE_STRUCT - struct_value: { - name: "x" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "y" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "z" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "x_bias" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "y_bias" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "z_bias" - type: TYPE_SCALAR - scalar_type: "float_t" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::HeartRate" - type: TYPE_STRUCT - struct_value: { - name: "bpm" - type: TYPE_SCALAR - scalar_type: "float_t" - } - struct_value: { - name: "status" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::SensorStatus" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::MetaDataEventType" - type: TYPE_ENUM - enum_value: { - scalar_type: "uint32_t" - - enumerator: "META_DATA_FLUSH_COMPLETE" - scalar_value: { - uint32_t: 1 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::MetaData" - type: TYPE_STRUCT - struct_value: { - name: "what" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::MetaDataEventType" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::DynamicSensorInfo" - type: TYPE_STRUCT - struct_value: { - name: "connected" - type: TYPE_SCALAR - scalar_type: "bool_t" - } - struct_value: { - name: "sensorHandle" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "uuid" - type: TYPE_ARRAY - vector_size: 16 - vector_value: { - type: TYPE_SCALAR - scalar_type: "uint8_t" - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::AdditionalInfoType" - type: TYPE_ENUM - enum_value: { - scalar_type: "uint32_t" - - enumerator: "AINFO_BEGIN" - scalar_value: { - uint32_t: 0 - } - enumerator: "AINFO_END" - scalar_value: { - uint32_t: 1 - } - enumerator: "AINFO_UNTRACKED_DELAY" - scalar_value: { - uint32_t: 65536 - } - enumerator: "AINFO_INTERNAL_TEMPERATURE" - scalar_value: { - uint32_t: 65537 - } - enumerator: "AINFO_VEC3_CALIBRATION" - scalar_value: { - uint32_t: 65538 - } - enumerator: "AINFO_SENSOR_PLACEMENT" - scalar_value: { - uint32_t: 65539 - } - enumerator: "AINFO_SAMPLING" - scalar_value: { - uint32_t: 65540 - } - enumerator: "AINFO_CHANNEL_NOISE" - scalar_value: { - uint32_t: 131072 - } - enumerator: "AINFO_CHANNEL_SAMPLER" - scalar_value: { - uint32_t: 131073 - } - enumerator: "AINFO_CHANNEL_FILTER" - scalar_value: { - uint32_t: 131074 - } - enumerator: "AINFO_CHANNEL_LINEAR_TRANSFORM" - scalar_value: { - uint32_t: 131075 - } - enumerator: "AINFO_CHANNEL_NONLINEAR_MAP" - scalar_value: { - uint32_t: 131076 - } - enumerator: "AINFO_CHANNEL_RESAMPLER" - scalar_value: { - uint32_t: 131077 - } - enumerator: "AINFO_LOCAL_GEOMAGNETIC_FIELD" - scalar_value: { - uint32_t: 196608 - } - enumerator: "AINFO_LOCAL_GRAVITY" - scalar_value: { - uint32_t: 196609 - } - enumerator: "AINFO_DOCK_STATE" - scalar_value: { - uint32_t: 196610 - } - enumerator: "AINFO_HIGH_PERFORMANCE_MODE" - scalar_value: { - uint32_t: 196611 - } - enumerator: "AINFO_MAGNETIC_FIELD_CALIBRATION" - scalar_value: { - uint32_t: 196612 - } - enumerator: "AINFO_CUSTOM_START" - scalar_value: { - uint32_t: 268435456 - } - enumerator: "AINFO_DEBUGGING_START" - scalar_value: { - uint32_t: 1073741824 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::AdditionalInfo" - type: TYPE_STRUCT - sub_struct: { - name: "::android::hardware::sensors::V1_0::AdditionalInfo::Payload" - type: TYPE_UNION - union_value: { - name: "data_int32" - type: TYPE_ARRAY - vector_size: 14 - vector_value: { - type: TYPE_SCALAR - scalar_type: "int32_t" - } - } - union_value: { - name: "data_float" - type: TYPE_ARRAY - vector_size: 14 - vector_value: { - type: TYPE_SCALAR - scalar_type: "float_t" - } - } - } - struct_value: { - name: "type" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfoType" - } - struct_value: { - name: "serial" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "u" - type: TYPE_UNION - predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfo::Payload" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::EventPayload" - type: TYPE_UNION - union_value: { - name: "vec3" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::Vec3" - } - union_value: { - name: "vec4" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::Vec4" - } - union_value: { - name: "uncal" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::Uncal" - } - union_value: { - name: "meta" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::MetaData" - } - union_value: { - name: "scalar" - type: TYPE_SCALAR - scalar_type: "float_t" - } - union_value: { - name: "stepCount" - type: TYPE_SCALAR - scalar_type: "uint64_t" - } - union_value: { - name: "heartRate" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::HeartRate" - } - union_value: { - name: "pose6DOF" - type: TYPE_ARRAY - vector_size: 15 - vector_value: { - type: TYPE_SCALAR - scalar_type: "float_t" - } - } - union_value: { - name: "dynamic" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::DynamicSensorInfo" - } - union_value: { - name: "additional" - type: TYPE_STRUCT - predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfo" - } - union_value: { - name: "data" - type: TYPE_ARRAY - vector_size: 16 - vector_value: { - type: TYPE_SCALAR - scalar_type: "float_t" - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::Event" - type: TYPE_STRUCT - struct_value: { - name: "timestamp" - type: TYPE_SCALAR - scalar_type: "int64_t" - } - struct_value: { - name: "sensorHandle" - type: TYPE_SCALAR - scalar_type: "int32_t" - } - struct_value: { - name: "sensorType" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::SensorType" - } - struct_value: { - name: "u" - type: TYPE_UNION - predefined_type: "::android::hardware::sensors::V1_0::EventPayload" - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::RateLevel" - type: TYPE_ENUM - enum_value: { - scalar_type: "int32_t" - - enumerator: "STOP" - scalar_value: { - int32_t: 0 - } - enumerator: "NORMAL" - scalar_value: { - int32_t: 1 - } - enumerator: "FAST" - scalar_value: { - int32_t: 2 - } - enumerator: "VERY_FAST" - scalar_value: { - int32_t: 3 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SharedMemType" - type: TYPE_ENUM - enum_value: { - scalar_type: "int32_t" - - enumerator: "ASHMEM" - scalar_value: { - int32_t: 1 - } - enumerator: "GRALLOC" - scalar_value: { - int32_t: 2 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SharedMemFormat" - type: TYPE_ENUM - enum_value: { - scalar_type: "int32_t" - - enumerator: "SENSORS_EVENT" - scalar_value: { - int32_t: 1 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SensorsEventFormatOffset" - type: TYPE_ENUM - enum_value: { - scalar_type: "uint16_t" - - enumerator: "SIZE_FIELD" - scalar_value: { - uint16_t: 0 - } - enumerator: "REPORT_TOKEN" - scalar_value: { - uint16_t: 4 - } - enumerator: "SENSOR_TYPE" - scalar_value: { - uint16_t: 8 - } - enumerator: "ATOMIC_COUNTER" - scalar_value: { - uint16_t: 12 - } - enumerator: "TIMESTAMP" - scalar_value: { - uint16_t: 16 - } - enumerator: "DATA" - scalar_value: { - uint16_t: 24 - } - enumerator: "RESERVED" - scalar_value: { - uint16_t: 88 - } - enumerator: "TOTAL_LENGTH" - scalar_value: { - uint16_t: 104 - } - } -} - -attribute: { - name: "::android::hardware::sensors::V1_0::SharedMemInfo" - type: TYPE_STRUCT - struct_value: { - name: "type" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::SharedMemType" - } - struct_value: { - name: "format" - type: TYPE_ENUM - predefined_type: "::android::hardware::sensors::V1_0::SharedMemFormat" - } - struct_value: { - name: "size" - type: TYPE_SCALAR - scalar_type: "uint32_t" - } - struct_value: { - name: "memoryHandle" - type: TYPE_HANDLE - } -} - |