From 09717ddeb5e99686c919894148153911a938f716 Mon Sep 17 00:00:00 2001 From: Keun Soo Yim Date: Thu, 2 Feb 2017 22:34:22 -0800 Subject: context hub: update vts files and add driver/profiler genrules Test: mma Bug: 34466754 Change-Id: Ia13d899bfee03745c8091dd79139229bb17fb46e --- contexthub/1.0/vts/Contexthub.vts | 489 +++++++++++++++++++++++++++++- contexthub/1.0/vts/ContexthubCallback.vts | 486 +++++++++++++++++++++++++++++ contexthub/1.0/vts/types.vts | 2 + 3 files changed, 975 insertions(+), 2 deletions(-) (limited to 'contexthub/1.0/vts') diff --git a/contexthub/1.0/vts/Contexthub.vts b/contexthub/1.0/vts/Contexthub.vts index b4e42f5fcf..b06efe6dc4 100644 --- a/contexthub/1.0/vts/Contexthub.vts +++ b/contexthub/1.0/vts/Contexthub.vts @@ -6,8 +6,494 @@ package: "android.hardware.contexthub" import: "android.hardware.contexthub@1.0::IContexthubCallback" import: "android.hardware.contexthub@1.0::types" +import: "android.hidl.base@1.0::types" interface: { + attribute: { + name: "::android::hardware::contexthub::V1_0::Result" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "OK" + scalar_value: { + uint32_t: 0 + } + enumerator: "UNKNOWN_FAILURE" + scalar_value: { + uint32_t: 1 + } + enumerator: "BAD_PARAMS" + scalar_value: { + uint32_t: 2 + } + enumerator: "NOT_INIT" + scalar_value: { + uint32_t: 3 + } + enumerator: "TRANSACTION_FAILED" + scalar_value: { + uint32_t: 4 + } + enumerator: "TRANSACTION_PENDING" + scalar_value: { + uint32_t: 5 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::NanoAppFlags" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "SIGNED" + scalar_value: { + uint32_t: 1 + } + enumerator: "ENCRYPTED" + scalar_value: { + uint32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::NanoAppBinary" + type: TYPE_STRUCT + struct_value: { + name: "appId" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "appVersion" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "flags" + type: TYPE_MASK + scalar_type: "uint32_t" + predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags" + } + struct_value: { + name: "targetChreApiMajorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "targetChreApiMinorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "customBinary" + type: TYPE_VECTOR + vector_value: { + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::SensorType" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "RESERVED" + scalar_value: { + uint32_t: 0 + } + enumerator: "ACCELEROMETER" + scalar_value: { + uint32_t: 1 + } + enumerator: "GYROSCOPE" + scalar_value: { + uint32_t: 2 + } + enumerator: "MAGNETOMETER" + scalar_value: { + uint32_t: 3 + } + enumerator: "BAROMETER" + scalar_value: { + uint32_t: 4 + } + enumerator: "PROXIMITY_SENSOR" + scalar_value: { + uint32_t: 5 + } + enumerator: "AMBIENT_LIGHT_SENSOR" + scalar_value: { + uint32_t: 6 + } + enumerator: "STATIONARY_DETECT" + scalar_value: { + uint32_t: 7 + } + enumerator: "INSTANT_MOTION_DETECT" + scalar_value: { + uint32_t: 8 + } + enumerator: "GPS" + scalar_value: { + uint32_t: 256 + } + enumerator: "WIFI" + scalar_value: { + uint32_t: 512 + } + enumerator: "AUDIO" + scalar_value: { + uint32_t: 768 + } + enumerator: "CAMERA" + scalar_value: { + uint32_t: 1024 + } + enumerator: "BLE" + scalar_value: { + uint32_t: 1280 + } + enumerator: "WWAN" + scalar_value: { + uint32_t: 1536 + } + enumerator: "PRIVATE_SENSOR_BASE" + scalar_value: { + uint32_t: 65536 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::PhysicalSensor" + type: TYPE_STRUCT + struct_value: { + name: "sensorType" + type: TYPE_ENUM + predefined_type: "::android::hardware::contexthub::V1_0::SensorType" + } + struct_value: { + name: "type" + type: TYPE_STRING + } + struct_value: { + name: "name" + type: TYPE_STRING + } + struct_value: { + name: "vendor" + type: TYPE_STRING + } + struct_value: { + name: "version" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "fifoReservedCount" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "fifoMaxCount" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "minDelayMs" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "maxDelayMs" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "peakPowerMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::ContextHub" + type: TYPE_STRUCT + struct_value: { + name: "name" + type: TYPE_STRING + } + struct_value: { + name: "vendor" + type: TYPE_STRING + } + struct_value: { + name: "toolchain" + type: TYPE_STRING + } + struct_value: { + name: "platformVersion" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "toolchainVersion" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "hubId" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "peakMips" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "stoppedPowerDrawMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "sleepPowerDrawMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "peakPowerDrawMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "connectedSensors" + type: TYPE_VECTOR + vector_value: { + type: TYPE_STRUCT + predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor" + } + } + struct_value: { + name: "maxSupportedMsgLen" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "chrePlatformId" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "chreApiMajorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "chreApiMinorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "chrePatchVersion" + type: TYPE_SCALAR + scalar_type: "uint16_t" + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HostEndPoint" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint16_t" + + enumerator: "BROADCAST" + scalar_value: { + uint16_t: 65535 + } + enumerator: "UNSPECIFIED" + scalar_value: { + uint16_t: 65534 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::ContextHubMsg" + type: TYPE_STRUCT + struct_value: { + name: "appName" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "hostEndPoint" + type: TYPE_SCALAR + scalar_type: "uint16_t" + } + struct_value: { + name: "msgType" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "msg" + type: TYPE_VECTOR + vector_value: { + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HubMemoryType" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "MAIN" + scalar_value: { + uint32_t: 0 + } + enumerator: "SECONDARY" + scalar_value: { + uint32_t: 1 + } + enumerator: "TCM" + scalar_value: { + uint32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HubMemoryFlag" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "READ" + scalar_value: { + uint32_t: 1 + } + enumerator: "WRITE" + scalar_value: { + uint32_t: 2 + } + enumerator: "EXEC" + scalar_value: { + uint32_t: 4 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::MemRange" + type: TYPE_STRUCT + struct_value: { + name: "totalBytes" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "freeBytes" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "type" + type: TYPE_ENUM + predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType" + } + struct_value: { + name: "flags" + type: TYPE_MASK + scalar_type: "uint32_t" + predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag" + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::AsyncEventType" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "RESTARTED" + scalar_value: { + uint32_t: 1 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::TransactionResult" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "SUCCESS" + scalar_value: { + int32_t: 0 + } + enumerator: "FAILURE" + scalar_value: { + int32_t: 1 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HubAppInfo" + type: TYPE_STRUCT + struct_value: { + name: "appId" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "version" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "memUsage" + type: TYPE_VECTOR + vector_value: { + type: TYPE_STRUCT + predefined_type: "::android::hardware::contexthub::V1_0::MemRange" + } + } + struct_value: { + name: "enabled" + type: TYPE_SCALAR + scalar_type: "bool_t" + } + } + + attribute: { + name: "::android::hidl::base::V1_0::DebugInfo" + type: TYPE_STRUCT + struct_value: { + name: "pid" + type: TYPE_SCALAR + scalar_type: "int32_t" + } + struct_value: { + name: "ptr" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + } + api: { name: "getHubs" return_type_hidl: { @@ -31,8 +517,7 @@ interface: { } arg: { type: TYPE_HIDL_CALLBACK - predefined_type: "IContexthubCallback" - is_callback: true + predefined_type: "::android::hardware::contexthub::V1_0::IContexthubCallback" } } diff --git a/contexthub/1.0/vts/ContexthubCallback.vts b/contexthub/1.0/vts/ContexthubCallback.vts index c3784e8314..7897a83991 100644 --- a/contexthub/1.0/vts/ContexthubCallback.vts +++ b/contexthub/1.0/vts/ContexthubCallback.vts @@ -5,8 +5,494 @@ component_name: "IContexthubCallback" package: "android.hardware.contexthub" import: "android.hardware.contexthub@1.0::types" +import: "android.hidl.base@1.0::types" interface: { + attribute: { + name: "::android::hardware::contexthub::V1_0::Result" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "OK" + scalar_value: { + uint32_t: 0 + } + enumerator: "UNKNOWN_FAILURE" + scalar_value: { + uint32_t: 1 + } + enumerator: "BAD_PARAMS" + scalar_value: { + uint32_t: 2 + } + enumerator: "NOT_INIT" + scalar_value: { + uint32_t: 3 + } + enumerator: "TRANSACTION_FAILED" + scalar_value: { + uint32_t: 4 + } + enumerator: "TRANSACTION_PENDING" + scalar_value: { + uint32_t: 5 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::NanoAppFlags" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "SIGNED" + scalar_value: { + uint32_t: 1 + } + enumerator: "ENCRYPTED" + scalar_value: { + uint32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::NanoAppBinary" + type: TYPE_STRUCT + struct_value: { + name: "appId" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "appVersion" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "flags" + type: TYPE_MASK + scalar_type: "uint32_t" + predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags" + } + struct_value: { + name: "targetChreApiMajorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "targetChreApiMinorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "customBinary" + type: TYPE_VECTOR + vector_value: { + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::SensorType" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "RESERVED" + scalar_value: { + uint32_t: 0 + } + enumerator: "ACCELEROMETER" + scalar_value: { + uint32_t: 1 + } + enumerator: "GYROSCOPE" + scalar_value: { + uint32_t: 2 + } + enumerator: "MAGNETOMETER" + scalar_value: { + uint32_t: 3 + } + enumerator: "BAROMETER" + scalar_value: { + uint32_t: 4 + } + enumerator: "PROXIMITY_SENSOR" + scalar_value: { + uint32_t: 5 + } + enumerator: "AMBIENT_LIGHT_SENSOR" + scalar_value: { + uint32_t: 6 + } + enumerator: "STATIONARY_DETECT" + scalar_value: { + uint32_t: 7 + } + enumerator: "INSTANT_MOTION_DETECT" + scalar_value: { + uint32_t: 8 + } + enumerator: "GPS" + scalar_value: { + uint32_t: 256 + } + enumerator: "WIFI" + scalar_value: { + uint32_t: 512 + } + enumerator: "AUDIO" + scalar_value: { + uint32_t: 768 + } + enumerator: "CAMERA" + scalar_value: { + uint32_t: 1024 + } + enumerator: "BLE" + scalar_value: { + uint32_t: 1280 + } + enumerator: "WWAN" + scalar_value: { + uint32_t: 1536 + } + enumerator: "PRIVATE_SENSOR_BASE" + scalar_value: { + uint32_t: 65536 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::PhysicalSensor" + type: TYPE_STRUCT + struct_value: { + name: "sensorType" + type: TYPE_ENUM + predefined_type: "::android::hardware::contexthub::V1_0::SensorType" + } + struct_value: { + name: "type" + type: TYPE_STRING + } + struct_value: { + name: "name" + type: TYPE_STRING + } + struct_value: { + name: "vendor" + type: TYPE_STRING + } + struct_value: { + name: "version" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "fifoReservedCount" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "fifoMaxCount" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "minDelayMs" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "maxDelayMs" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "peakPowerMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::ContextHub" + type: TYPE_STRUCT + struct_value: { + name: "name" + type: TYPE_STRING + } + struct_value: { + name: "vendor" + type: TYPE_STRING + } + struct_value: { + name: "toolchain" + type: TYPE_STRING + } + struct_value: { + name: "platformVersion" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "toolchainVersion" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "hubId" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "peakMips" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "stoppedPowerDrawMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "sleepPowerDrawMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "peakPowerDrawMw" + type: TYPE_SCALAR + scalar_type: "float_t" + } + struct_value: { + name: "connectedSensors" + type: TYPE_VECTOR + vector_value: { + type: TYPE_STRUCT + predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor" + } + } + struct_value: { + name: "maxSupportedMsgLen" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "chrePlatformId" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "chreApiMajorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "chreApiMinorVersion" + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + struct_value: { + name: "chrePatchVersion" + type: TYPE_SCALAR + scalar_type: "uint16_t" + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HostEndPoint" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint16_t" + + enumerator: "BROADCAST" + scalar_value: { + uint16_t: 65535 + } + enumerator: "UNSPECIFIED" + scalar_value: { + uint16_t: 65534 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::ContextHubMsg" + type: TYPE_STRUCT + struct_value: { + name: "appName" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "hostEndPoint" + type: TYPE_SCALAR + scalar_type: "uint16_t" + } + struct_value: { + name: "msgType" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "msg" + type: TYPE_VECTOR + vector_value: { + type: TYPE_SCALAR + scalar_type: "uint8_t" + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HubMemoryType" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "MAIN" + scalar_value: { + uint32_t: 0 + } + enumerator: "SECONDARY" + scalar_value: { + uint32_t: 1 + } + enumerator: "TCM" + scalar_value: { + uint32_t: 2 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HubMemoryFlag" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "READ" + scalar_value: { + uint32_t: 1 + } + enumerator: "WRITE" + scalar_value: { + uint32_t: 2 + } + enumerator: "EXEC" + scalar_value: { + uint32_t: 4 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::MemRange" + type: TYPE_STRUCT + struct_value: { + name: "totalBytes" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "freeBytes" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "type" + type: TYPE_ENUM + predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType" + } + struct_value: { + name: "flags" + type: TYPE_MASK + scalar_type: "uint32_t" + predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag" + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::AsyncEventType" + type: TYPE_ENUM + enum_value: { + scalar_type: "uint32_t" + + enumerator: "RESTARTED" + scalar_value: { + uint32_t: 1 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::TransactionResult" + type: TYPE_ENUM + enum_value: { + scalar_type: "int32_t" + + enumerator: "SUCCESS" + scalar_value: { + int32_t: 0 + } + enumerator: "FAILURE" + scalar_value: { + int32_t: 1 + } + } + } + + attribute: { + name: "::android::hardware::contexthub::V1_0::HubAppInfo" + type: TYPE_STRUCT + struct_value: { + name: "appId" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + struct_value: { + name: "version" + type: TYPE_SCALAR + scalar_type: "uint32_t" + } + struct_value: { + name: "memUsage" + type: TYPE_VECTOR + vector_value: { + type: TYPE_STRUCT + predefined_type: "::android::hardware::contexthub::V1_0::MemRange" + } + } + struct_value: { + name: "enabled" + type: TYPE_SCALAR + scalar_type: "bool_t" + } + } + + attribute: { + name: "::android::hidl::base::V1_0::DebugInfo" + type: TYPE_STRUCT + struct_value: { + name: "pid" + type: TYPE_SCALAR + scalar_type: "int32_t" + } + struct_value: { + name: "ptr" + type: TYPE_SCALAR + scalar_type: "uint64_t" + } + } + api: { name: "handleClientMsg" arg: { diff --git a/contexthub/1.0/vts/types.vts b/contexthub/1.0/vts/types.vts index 12576b18ed..4f5dfcf3fb 100644 --- a/contexthub/1.0/vts/types.vts +++ b/contexthub/1.0/vts/types.vts @@ -71,6 +71,7 @@ attribute: { struct_value: { name: "flags" type: TYPE_MASK + scalar_type: "uint32_t" predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags" } struct_value: { @@ -411,6 +412,7 @@ attribute: { struct_value: { name: "flags" type: TYPE_MASK + scalar_type: "uint32_t" predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag" } } -- cgit v1.2.3