From c5bda7c7fcbd17ef5fe58c12831de681a5b33d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E8=BE=89?= Date: Sat, 13 Jul 2024 10:48:25 +0800 Subject: [PATCH] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 梁鹏辉 --- sensor/v2_0/ISensorInterface.idl | 14 +++++++------- sensor/v2_0/SensorTypes.idl | 6 ++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sensor/v2_0/ISensorInterface.idl b/sensor/v2_0/ISensorInterface.idl index c44c860a..f5f24eb1 100644 --- a/sensor/v2_0/ISensorInterface.idl +++ b/sensor/v2_0/ISensorInterface.idl @@ -75,7 +75,7 @@ interface ISensorInterface { * @since 2.2 * @version 1.0 */ - Enable([in] int sensorId); + Enable([in] int sensorType, [in] int sensorId); /** * @brief Disables an enabled sensor. @@ -86,7 +86,7 @@ interface ISensorInterface { * @since 2.2 * @version 1.0 */ - Disable([in] int sensorId); + Disable([in] int sensorType, [in] int sensorId); /** * @brief Sets the data sampling interval and data reporting interval for the specified sensor. @@ -99,7 +99,7 @@ interface ISensorInterface { * @since 2.2 * @version 1.0 */ - SetBatch([in] int sensorId,[in] long samplingInterval, [in] long reportInterval); + SetBatch([in] int sensorType, [in] int sensorId,[in] long samplingInterval, [in] long reportInterval); /** * @brief Sets the data reporting mode for the specified sensor. @@ -112,7 +112,7 @@ interface ISensorInterface { * @since 2.2 * @version 1.0 */ - SetMode([in] int sensorId, [in] int mode); + SetMode([in] int sensorType, [in] int sensorId, [in] int mode); /** * @brief Sets options for the specified sensor, including its measurement range and accuracy. @@ -124,7 +124,7 @@ interface ISensorInterface { * @since 2.2 * @version 1.0 */ - SetOption([in] int sensorId, [in] unsigned int option); + SetOption([in] int sensorType, [in] int sensorId, [in] unsigned int option); /** * @brief Registers the callback for reporting sensor data to the subscriber. @@ -171,7 +171,7 @@ interface ISensorInterface { * @since 4.0 * @version 1.1 */ - ReadData([in] int sensorId, [out] struct HdfSensorEvents[] event); + ReadData([in] int sensorType, [in] int sensorId, [out] struct HdfSensorEvents[] event); /** * @brief Obtain the sensor event data in the small system. @@ -184,7 +184,7 @@ interface ISensorInterface { * @since 4.1 * @version 2.0 */ - SetSdcSensor([in] int sensorId, [in] boolean enabled, [in] int rateLevel); + SetSdcSensor([in] int sensorType, [in] int sensorId, [in] boolean enabled, [in] int rateLevel); /** * @brief Obtain sensor information for SDC diff --git a/sensor/v2_0/SensorTypes.idl b/sensor/v2_0/SensorTypes.idl index ad2cc56c..0ac81697 100644 --- a/sensor/v2_0/SensorTypes.idl +++ b/sensor/v2_0/SensorTypes.idl @@ -52,7 +52,7 @@ struct HdfSensorInformation { String vendorName; /**< Sensor vendor */ String firmwareVersion; /**< Sensor firmware version */ String hardwareVersion; /**< Sensor hardware version */ - int sensorTypeId; /**< Sensor type ID (described in {@link SensorTypeTag}) */ + int sensorType; /**< Sensor type ID (described in {@link SensorTypeTag}) */ int sensorId; /**< Sensor ID, defined by the sensor driver developer */ float maxRange; /**< Maximum measurement range of the sensor */ float accuracy; /**< Sensor accuracy */ @@ -72,6 +72,7 @@ struct HdfSensorInformation { * @since 2.2 */ struct HdfSensorEvents { + int SensorType; /**< Each sensor has a type which defines what this sensor measures */ int sensorId; /**< Sensor ID */ int version; /**< Sensor algorithm version */ long timestamp; /**< Time when sensor data was generated */ @@ -152,7 +153,8 @@ enum HdfSensorGroupType { */ struct SdcSensorInfo { unsigned long offset; /**< Used for mmap */ - int sensorId; /**< Each sensor has a type which defines what this sensor measures */ + int SensorType; /**< Each sensor has a type which defines what this sensor measures */ + int sensorId; /**< Each sensor has a id which defines what this sensor measures */ int ddrSize; /**< Shared memory Size */ int minRateLevel; /**< Supported min rate level */ int maxRateLevel; /**< Supported max rate level */ -- Gitee