# dbus-sensors
dbus-sensors is a collection of sensor applications that provide the
xyz.openbmc_project.Sensor collection of interfaces. They read sensor values
from hwmon, d-bus, or direct driver access to provide readings. Some advance
non-sensor features such as fan presence, pwm control, and automatic cpu
detection (x86) are also supported.
## key features
- runtime re-configurable from d-bus (entity-manager or the like)
- isolated: each sensor type is isolated into its own daemon, so a bug in one
sensor is unlikely to affect another, and single sensor modifications are
possible
- async single-threaded: uses sdbusplus/asio bindings
- multiple data inputs: hwmon, d-bus, direct driver access
## dbus interfaces
A typical dbus-sensors object support the following dbus interfaces:
```
Path /xyz/openbmc_project/sensors/<type>/<sensor_name>
Interfaces xyz.openbmc_project.Sensor.Value
xyz.openbmc_project.Sensor.Threshold.Critical
xyz.openbmc_project.Sensor.Threshold.Warning
xyz.openbmc_project.State.Decorator.Availability
xyz.openbmc_project.State.Decorator.OperationalStatus
xyz.openbmc_project.Association.Definitions
```
Sensor interfaces collection are described [here](https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/yaml/xyz/openbmc_project/Sensor).
Consumer examples of these interfaces are [Redfish](https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/sensors.hpp), [Phosphor-Pid-Control](https://github.com/openbmc/phosphor-pid-control), [IPMI SDR](https://github.com/openbmc/phosphor-host-ipmid/blob/master/dbus-sdr/sensorcommands.cpp).
## Reactor
dbus-sensor daemons are [reactors](https://github.com/openbmc/entity-manager)
that dynamically create and update sensors configuration when
system configuration gets updated.
Using asio timers and async calls, dbus-sensor daemons read sensor values and check thresholds periodically.
PropertiesChanged signals will be broadcasted for other services to consume when
value or threshold status change.
OperationStatus is set to false if the sensor is determined to be faulty.
A simple sensor example can be found [here](https://github.com/openbmc/entity-manager/blob/master/docs/my_first_sensors.md).
## configuration
Sensor devices are described using Exposes records in configuration file.
Name and Type fields are required. Different sensor types have different fields.
Refer to entity manager [schema](https://github.com/openbmc/entity-manager/blob/master/schemas/legacy.json) for complete list.
## sensor documentation
- [ExternalSensor](https://github.com/openbmc/docs/blob/master/designs/external-sensor.md)
virtual sensor
没有合适的资源?快使用搜索试试~ 我知道了~
D-Bus 可配置传感器扫描应用_C++_代码_相关文件_下载
共85个文件
cpp:29个
hpp:21个
service:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
3星 · 超过75%的资源 2 下载量 160 浏览量
2022-07-14
01:04:42
上传
评论
收藏 150KB ZIP 举报
温馨提示
dbus-sensors 是一组传感器应用程序,提供 xyz.openbmc_project.Sensor 接口集合。它们从 hwmon、d-bus 或直接驱动程序访问中读取传感器值以提供读数。还支持一些高级非传感器功能,例如风扇存在、pwm 控制和自动 cpu 检测 (x86)。 主要特征 运行时可从 d-bus(实体管理器等)重新配置 隔离:每种传感器类型都被隔离到自己的守护进程中,因此一个传感器中的错误不太可能影响另一个传感器,并且可以修改单个传感器 异步单线程:使用 sdbusplus/asio 绑定 多个数据输入:hwmon、d-bus、直接驱动程序访问 dbus 接口 典型的 dbus-sensors 对象支持以下 dbus 接口: 更多详情、使用方法,请下载后细读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
dbus-sensors-master.zip (85个子文件)
dbus-sensors-master
MAINTAINERS 2KB
Jenkinsfile 608B
service_files
xyz.openbmc_project.ipmbsensor.service 261B
xyz.openbmc_project.cpusensor.service 277B
xyz.openbmc_project.intrusionsensor.service 270B
xyz.openbmc_project.adcsensor.service 303B
xyz.openbmc_project.mcutempsensor.service 268B
xyz.openbmc_project.nvmesensor.service 260B
xyz.openbmc_project.hwmontempsensor.service 271B
meson.build 944B
xyz.openbmc_project.externalsensor.service 268B
xyz.openbmc_project.exitairsensor.service 366B
xyz.openbmc_project.psusensor.service 258B
xyz.openbmc_project.fansensor.service 258B
tests
meson.build 2KB
test_Utils.cpp 5KB
test_HwmonTempSensor.cpp 2KB
test_TachSensor.cpp 936B
subprojects
nlohmann-json.wrap 115B
libgpiod.wrap 514B
sdbusplus.wrap 111B
.clang-tidy 13B
.clang-format 24B
googletest.wrap 70B
phosphor-logging.wrap 132B
include
Utils.hpp 11KB
HwmonTempSensor.hpp 1KB
sensor.hpp 19KB
VariantVisitors.hpp 2KB
ExternalSensor.hpp 2KB
PSUEvent.hpp 4KB
FileHandle.hpp 669B
PwmSensor.hpp 983B
ADCSensor.hpp 3KB
meson.build 376B
MCUTempSensor.hpp 998B
NVMeContext.hpp 3KB
IpmbSensor.hpp 3KB
TachSensor.hpp 4KB
SensorPaths.hpp 1KB
linux
peci-ioctl.h 20KB
NVMeBasicContext.hpp 917B
CPUSensor.hpp 3KB
ChassisIntrusionSensor.hpp 2KB
ExitAirTempSensor.hpp 3KB
PSUSensor.hpp 2KB
Thresholds.hpp 4KB
NVMeSensor.hpp 886B
dbus-sensor_config.h.in 236B
meson.build 2KB
LICENSE 11KB
OWNERS 128B
src
PwmSensor.cpp 7KB
NVMeSensorMain.cpp 9KB
NVMeBasicContext.cpp 11KB
PSUEvent.cpp 12KB
IntrusionSensorMain.cpp 16KB
Thresholds.cpp 17KB
FileHandle.cpp 897B
CPUSensor.cpp 10KB
ExternalSensor.cpp 6KB
MCUTempSensor.cpp 10KB
ExternalSensorMain.cpp 14KB
meson.build 4KB
ChassisIntrusionSensor.cpp 10KB
ADCSensor.cpp 8KB
FanMain.cpp 21KB
HwmonTempSensor.cpp 6KB
ADCSensorMain.cpp 15KB
Utils.cpp 22KB
SensorPaths.cpp 1KB
ExitAirTempSensor.cpp 31KB
PSUSensorMain.cpp 42KB
PSUSensor.cpp 7KB
TachSensor.cpp 10KB
HwmonTempMain.cpp 23KB
CPUSensorMain.cpp 25KB
IpmbSensor.cpp 21KB
NVMeSensor.cpp 3KB
.clang-tidy 10KB
.clang-format 3KB
meson_options.txt 1KB
.gitignore 110B
README.md 3KB
.clang-ignore 195B
共 85 条
- 1
资源评论
- lamb80592023-12-19就git上源碼
- zhangjiazhang2023-01-23这个资源对我启发很大,受益匪浅,学到了很多,谢谢分享~
快撑死的鱼
- 粉丝: 1w+
- 资源: 9149
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功