/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/sensors/system/ |
H A D | sensors.te | 55 #avc: denied { setopt } for pid=650 comm="sensors" scontext=u:r:sensors:s0 tcontext=u:r:sensors:… 56 #avc: denied { getopt } for pid=645 comm="sensors" scontext=u:r:sensors:s0 tcontext=u:r:sensors:… 57 allow sensors sensors:unix_dgram_socket { getopt setopt }; 66 allow sensors tracefs:dir { search }; 82 allow sensors faultloggerd:fd { use }; 116 allow sensors foundation:fd { use }; 146 allow sensors powermgr:fd { use }; 153 allow sensors audio_server:fd { use }; 182 allow sensors pinauth:binder { call }; 217 allow sensors sh:fd { use }; [all …]
|
H A D | hdf_devmgr.te | 14 …} for pid=245 comm="hdf_devmgr" scontext=u:r:hdf_devmgr:s0 tcontext=u:r:sensors:s0 tclass=process… 15 allow hdf_devmgr sensors:process { getattr }; 17 …} for pid=245 comm="hdf_devmgr" scontext=u:r:hdf_devmgr:s0 tcontext=u:r:sensors:s0 tclass=binder … 18 allow hdf_devmgr sensors:binder { transfer };
|
/ohos5.0/base/security/selinux_adapter/sepolicy/base/te/ |
H A D | sensors.te | 21 allow sensors const_param:file { map open read }; 25 allow sensors debug_param:file { map open read }; 27 allow sensors dev_unix_socket:dir { search }; 29 allow sensors hdf_devmgr:binder { call }; 34 allow sensors init_param:file { map open read }; 37 allow sensors net_param:file { map open read }; 40 allow sensors ohos_param:file { map open read }; 47 allow sensors sys_param:file { map open read }; 48 allow sensors system_bin_file:dir { search }; 50 allow sensors tracefs:dir { search }; [all …]
|
/ohos5.0/base/sensors/start/ |
H A D | README_zh.md | 9 …/zh-cn/readme/%E6%B3%9BSensor%E5%AD%90%E7%B3%BB%E7%BB%9F.md),该仓主要提供了泛sensor服务进程(即sensors)的启动文件。<br> 16 /base/sensors/start 18 └── init # 放置sensors进程的启动文件 22 …sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)和[sensors\_miscdevice](https://gitee… 23 …sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)和[sensors\_miscdevice](https://gitee… 27 <process>sensors</process> 48 …ensor服务和马达服务。若仅编译[sensors\_sensor](https://gitee.com/openharmony/sensors_sensor)仓代码,sensors.xml文件中… 54 [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) 56 [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice) 58 **sensors\_start**
|
H A D | README.md | 17 /base/sensors/start 23 … the sensors process to start sensor and small device services such as vibrator. Sensor and small … 24 …sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) and [sensors\_miscdevice](https://… 25 …sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) and [sensors\_miscdevice](https://… 29 <process>sensors</process> 55 [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) 57 [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice) 59 **sensors\_start**
|
/ohos5.0/base/sensors/sensor/test/unittest/interfaces/kits/ |
H A D | sensor_native_test.cpp | 62 ASSERT_NE(sensors, nullptr); in SetUpTestCase() 63 ret = OH_Sensor_GetInfos(sensors, &count); in SetUpTestCase() 142 ASSERT_NE(sensors, nullptr); 178 Sensor_Info *sensors { nullptr }; variable 191 auto sensors = new Sensor_Info *[count]; variable 193 if (sensors[i] != nullptr) { 194 sensors[i] = nullptr; 212 ASSERT_NE(sensors, nullptr); 247 ASSERT_NE(sensors, nullptr); 271 ASSERT_NE(sensors, nullptr); [all …]
|
/ohos5.0/base/sensors/sensor/frameworks/native/src/ |
H A D | native_sensor.cpp | 44 if (sensors == nullptr) { in OH_Sensor_GetInfos() 54 if (sensors[i] == nullptr) { in OH_Sensor_GetInfos() 79 auto sensors = new Sensor_Info *[count]; in OH_Sensor_CreateInfos() local 81 sensors[i] = new Sensor_Info(); in OH_Sensor_CreateInfos() 83 return sensors; in OH_Sensor_CreateInfos() 89 if (sensors[i] != nullptr) { in OH_Sensor_DestroyInfos() 90 delete sensors[i]; in OH_Sensor_DestroyInfos() 91 sensors[i] = nullptr; in OH_Sensor_DestroyInfos() 94 if (sensors != nullptr) { in OH_Sensor_DestroyInfos() 95 delete[] sensors; in OH_Sensor_DestroyInfos() [all …]
|
/ohos5.0/docs/en/application-dev/reference/apis-sensor-service-kit/ |
H A D | oh_sensor_8h.md | 6 The **oh_sensor.h** file declares the APIs for operating sensors, including obtaining sensor inform… 24 …#sensor_info) \*\*infos, uint32_t \*count) | Obtains information about all sensors on the device. | 25 …sensors, request the **ohos.permission.ACCELEROMETER** permission.<br>To subscribe to data of gyro… 26 …sensors, request the **ohos.permission.ACCELEROMETER** permission.<br>To unsubscribe from data of …
|
H A D | _sensor.md | 6 The **Sensor** module provides APIs to manipulate sensors. For example, you can call APIs to obtain… 20 | [oh_sensor.h](oh_sensor_8h.md) | Declares the APIs for operating sensors, including obtaining sen… 53 …sensors, request the **ohos.permission.ACCELEROMETER** permission.<br>To subscribe to data of gyro… 54 …sensors, request the **ohos.permission.ACCELEROMETER** permission.<br>To unsubscribe from data of … 337 int32_t OH_Sensor_DestroyInfos(Sensor_Info **sensors, uint32_t count) 349 | sensors | Double pointer to the array of [Sensor_Info](#sensor_info) instances.| 430 Obtains information about all sensors on the device. 438 | infos | Double pointers to the information about all sensors on the device. For details, see [Sen… 439 | count | Pointer to the number of sensors on the device. | 453 …sensors, request the **ohos.permission.ACCELEROMETER** permission. To subscribe to data of gyrosco… [all …]
|
/ohos5.0/base/sensors/sensor/ |
H A D | README.md | 16 - Motion: acceleration sensors, gyroscope sensors, gravity sensors, linear acceleration sensors, … 17 - Orientation: rotation vector sensors, orientation sensors, etc. 18 - Environment: magnetic field sensors, barometric pressure sensors, humidity sensors, etc. 19 - Light: ambient light sensors, proximity sensors, color temperature sensors, etc. 20 - Body: heart rate sensors, heartbeat sensors, etc. 21 - Other: Hall effect sensors, grip detection sensors, etc. 35 /base/sensors/sensor 39 │ ├── native # Native Implementation for sensors 43 … # Sensor service for reporting data about sensors, such as the acceleration and gyroscope s… 53 **Table 1** Permissions required by sensors [all …]
|
/ohos5.0/docs/en/application-dev/device/sensor/ |
H A D | sensor-overview-as.md | 6 …service-kit/js-apis-sensor-sys.md) APIs. Using these APIs, you can query sensors on your device an… 17 The following modules work cooperatively to implement sensors: Sensor API, Sensor Framework, Sensor… 23 1. Sensor API: provides APIs for performing basic operations on sensors, including querying the sen… 27 …rse, and distribute data, manages foreground and background policies and sensors of a device, and … 34 1. To obtain data of the following sensors, you must request the required permissions. 38 …ication to read data from acceleration sensors, uncalibrated acceleration sensors, and linear acce… 39 …sion allows an application to read data from gyroscope sensors and uncalibrated gyroscope sensors.|
|
H A D | sensor-guidelines-capi.md | 15 …sensors, request the **ohos.permission.ACCELEROMETER** permission.<br>To subscribe to data of gyro… 16 …sensors, request the **ohos.permission.ACCELEROMETER** permission.<br>To unsubscribe from data of … 69 #include "sensors/oh_sensor.h" 125 7. Obtain information about all sensors on the device. 131 …int32_t ret = OH_Sensor_GetInfos(nullptr, &count); // Obtain the number of all sensors on the devi… 136 if (sensors == nullptr) { 139 … ret = OH_Sensor_GetInfos(sensors, &count); // Obtain information about all sensors on the device. 146 ret = OH_SensorInfo_GetName(sensors[i], sensorName, &length); // Obtain the sensor name. 157 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); // Obtain the sensor type. 162 … ret = OH_SensorInfo_GetResolution(sensors[i], &resolution); // Obtain the sensor resolution. [all …]
|
H A D | sensor-overview.md | 6 …r hardware via the sensors. Using the [Sensor](../../reference/apis-sensor-service-kit/js-apis-sen… 35 The following modules work cooperatively to implement sensors: Sensor API, Sensor Framework, Sensor… 41 - Sensor API: provides APIs for performing basic operations on sensors, including querying the sens… 45 …rse, and distribute data, manages foreground and background policies and sensors of a device, and … 52 1. To obtain data of the following sensors, you must request the required permissions. 56 …ication to read data from acceleration sensors, uncalibrated acceleration sensors, and linear acce… 57 …sion allows an application to read data from gyroscope sensors and uncalibrated gyroscope sensors.|
|
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/msdp/devicestatus/system/ |
H A D | sensors.te | 14 …mm="IPC_1_657" path="socket:[32300]" dev="sockfs" ino=32300 scontext=u:r:sensors:s0 tcontext=u:r:m… 15 allow sensors msdp_sa:fd { use }; 17 …mm="IPC_1_657" path="socket:[31654]" dev="sockfs" ino=31654 scontext=u:r:sensors:s0 tcontext=u:r:m… 18 allow sensors msdp_sa:unix_stream_socket { read write }; 20 #avc: denied { call } for pid=629 comm="IPC_1_737" scontext=u:r:sensors:s0 tcontext=u:r:msdp_sa:… 21 allow sensors msdp_sa:binder { call };
|
/ohos5.0/docs/zh-cn/application-dev/device/sensor/ |
H A D | sensor-guidelines-capi.md | 69 #include "sensors/oh_sensor.h" 135 Sensor_Info **sensors = OH_Sensor_CreateInfos(count); // 用给定的数字创建一个实例数组。 136 if (sensors == nullptr) { 139 ret = OH_Sensor_GetInfos(sensors, &count); // 获取设备上所有传感器的信息。 146 ret = OH_SensorInfo_GetName(sensors[i], sensorName, &length); // 获取传感器名称。 152 ret = OH_SensorInfo_GetVendorName(sensors[i], vendorName, &length); // 获取传感器的厂商名称。 157 ret = OH_SensorInfo_GetType(sensors[i], &sensorType); // 获取传感器类型。 162 ret = OH_SensorInfo_GetResolution(sensors[i], &resolution); // 获取传感器分辨率。 167 … ret = OH_SensorInfo_GetMinSamplingInterval(sensors[i], &minSamplePeriod); // 获取传感器的最小数据上报间隔。 172 … ret = OH_SensorInfo_GetMaxSamplingInterval(sensors[i], &maxSamplePeriod); // 获取传感器的最大数据上报间隔时间。 [all …]
|
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/resourceschedule/resource_schedule_service/system/ |
H A D | sensors.te | 14 #sensors 15 allow sensors resource_schedule_service:fd { use }; 16 allow sensors resource_schedule_service:unix_stream_socket { read write }; 17 allow sensors resource_schedule_service:binder {call};
|
/ohos5.0/base/powermgr/thermal_manager/services/native/src/thermal_policy/ |
H A D | thermal_srv_config_parser.cpp | 364 std::vector<std::string> sensors; in ParseSensorInfo() local 368 if (sensors.empty()) { in ParseSensorInfo() 372 for (uint32_t i = 0; i < sensors.size(); i++) { in ParseSensorInfo() 373 std::string sensorType = sensors.at(i); in ParseSensorInfo() 412 if (sensors.size() != rates.size()) { in ParseSensorLevelInfo() 414 sensors.size(), rates.size()); in ParseSensorLevelInfo() 427 std::vector<std::string>& sensors, const uint32_t sensorIdx) in ParseLevelThreshold() argument 447 if (sensors.size() != thresholds.size() || sensors.size() != thresholdClrs.size()) { in ParseLevelThreshold() 710 std::vector<std::string> sensors; in ParseFanNode() local 712 StringOperation::SplitString(sensorStr, sensors, ","); in ParseFanNode() [all …]
|
/ohos5.0/base/sensors/medical_sensor/services/medical_sensor/src/ |
H A D | medical_dump.cpp | 67 const std::vector<MedicalSensor> &sensors, const std::vector<std::u16string> &args) in DumpSensorList() argument 74 dprintf(fd, "Total sensor:%d, MedicalSensor list:\n", int32_t { sensors.size() }); in DumpSensorList() 75 for (const auto &sensor : sensors) { in DumpSensorList() 113 bool MedicalSensorDump::DumpOpeningSensor(int32_t fd, const std::vector<MedicalSensor> &sensors, in DumpOpeningSensor() argument 122 for (const auto &sensor : sensors) { in DumpOpeningSensor() 196 std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo) in Dump() argument 207 bool listRet = DumpSensorList(fd, sensors, args); in Dump() 209 bool openRet = DumpOpeningSensor(fd, sensors, clientInfo, args); in Dump()
|
/ohos5.0/base/sensors/medical_sensor/ |
H A D | README_ZH.md | 5 …的佩戴情况等。Medical_Sensor使用场景复杂,并且需要配套相关算法共同使用,所以将其与传统传感器区分开来单独实现。传感器的介绍可以参考[sensors\_sensor组件](https:… 22 /base/sensors/medical_sensor 107 **sensors\_medical\_sensor** 109 [sensors\_sensor](https://gitee.com/openharmony/sensors_sensor) 111 [sensors\_miscdevice](https://gitee.com/openharmony/sensors_miscdevice)
|
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/drivers/peripheral/sensor/vendor/ |
H A D | hdf_devmgr.te | 18 allow hdf_devmgr sensors:binder { transfer }; 19 allow hdf_devmgr sensors:dir { search }; 20 allow hdf_devmgr sensors:file { open read }; 21 allow hdf_devmgr sensors:process { getattr };
|
/ohos5.0/base/sensors/start/etc/init/ |
H A D | sensors_musl.cfg | 3 "name" : "sensors", 4 "path" : ["/system/bin/sa_main", "/system/profile/sensors.json"], 7 "secon" : "u:r:sensors:s0",
|
/ohos5.0/base/sensors/sensor/services/src/ |
H A D | sensor_dump.cpp | 139 …:ParseCommand(int32_t fd, const std::vector<std::string> &args, const std::vector<Sensor> &sensors, in ParseCommand() argument 177 sensors_ = sensors; in ParseCommand() 200 bool SensorDump::DumpSensorList(int32_t fd, const std::vector<Sensor> &sensors) in DumpSensorList() argument 203 dprintf(fd, "Total sensor:%d, Sensor list:\n", int32_t { sensors.size() }); in DumpSensorList() 204 for (const auto &sensor : sensors) { in DumpSensorList() 239 bool SensorDump::DumpOpeningSensor(int32_t fd, const std::vector<Sensor> &sensors, ClientInfo &clie… in DumpOpeningSensor() argument 243 for (const auto &sensor : sensors) { in DumpOpeningSensor()
|
/ohos5.0/base/sensors/sensor/services/include/ |
H A D | sensor_dump.h | 35 … ParseCommand(int32_t fd, const std::vector<std::string> &args, const std::vector<Sensor> &sensors, 38 bool DumpSensorList(int32_t fd, const std::vector<Sensor> &sensors); 40 bool DumpOpeningSensor(int32_t fd, const std::vector<Sensor> &sensors, ClientInfo &clientInfo);
|
/ohos5.0/base/sensors/medical_sensor/services/medical_sensor/include/ |
H A D | medical_sensor_dump.h | 36 …bool DumpSensorList(int32_t fd, const std::vector<MedicalSensor> &sensors, const std::vector<std::… 38 …bool DumpOpeningSensor(int32_t fd, const std::vector<MedicalSensor> &sensors, ClientInfo &clientIn… 42 std::vector<MedicalSensor> &sensors, ClientInfo &clientInfo);
|
/ohos5.0/docs/en/application-dev/device/stationary/ |
H A D | multimodalawareness-kit-intro.md | 3 … etc.) or postures based on the data collected by sensors including gyroscopes and acceleration se… 11 … you need to apply for required permissions. The device must support the sensors required by the c…
|