| /openbmc/phosphor-fan-presence/monitor/ |
| H A D | fan.cpp | 86 for (auto& sensor : _sensors) in Fan() local 87 sensor->setFunctional(true); in Fan() 180 std::for_each(_sensors.begin(), _sensors.end(), [this](auto& sensor) { in startMonitor() argument 188 sensor->updateTachAndTarget(); in startMonitor() 189 tachChanged(*sensor); in startMonitor() 198 sensor->name())); in startMonitor() 200 sensor->setFunctional(false, true); in startMonitor() 230 void Fan::tachChanged(TachSensor& sensor) in tachChanged() argument 239 if (!_trustManager->checkTrust(sensor)) in tachChanged() 248 if (!sensor.countTimerRunning()) in tachChanged() [all …]
|
| H A D | trust_group.hpp | 19 std::shared_ptr<monitor::TachSensor> sensor; member 67 void registerSensor(std::shared_ptr<monitor::TachSensor>& sensor) in registerSensor() argument 70 _names.begin(), _names.end(), [&sensor](const auto& name) { in registerSensor() 72 sensor->name(); in registerSensor() 77 _sensors.push_back({sensor, std::get<inTrust>(*found)}); in registerSensor() 89 bool inGroup(const monitor::TachSensor& sensor) in inGroup() argument 92 [&sensor](const auto& s) { in inGroup() 93 return sensor.name() == s.sensor->name(); in inGroup() 107 [](const auto& s) { s.sensor->resetMethod(); }); in cancelMonitoring() 119 [](const auto& s) { s.sensor->processState(); }); in startMonitoring() [all …]
|
| H A D | system.cpp | 141 for (const auto& sensor : fan->sensors()) in subscribeSensorsToServices() local 143 unique_interfaces.insert(sensor->getInterface()); in subscribeSensorsToServices() 160 for (const auto& sensor : fan->sensors()) in subscribeSensorsToServices() local 162 const auto itServ = serviceObjects.find(sensor->name()); in subscribeSensorsToServices() 168 sensor->name()), in subscribeSensorsToServices() 176 sensorMap[serviceName].insert(sensor); in subscribeSensorsToServices() 314 for (auto& sensor : sensorItr->second) in tachSignalOffline() local 316 sensor->setOwner(hasOwner); in tachSignalOffline() 317 sensor->getFan().process(*sensor); in tachSignalOffline() 325 for (const auto& sensor : fan.sensors()) in updateFanHealth() local [all …]
|
| H A D | trust_manager.hpp | 84 bool checkTrust(const monitor::TachSensor& sensor) in checkTrust() argument 90 if (group->inGroup(sensor)) in checkTrust() 93 std::tie(trust, changed) = group->checkTrust(sensor); in checkTrust() 122 void registerSensor(std::shared_ptr<monitor::TachSensor>& sensor) in registerSensor() argument 124 std::for_each(groups.begin(), groups.end(), [&sensor](auto& group) { in registerSensor() 125 group->registerSensor(sensor); in registerSensor()
|
| /openbmc/webui-vue/src/store/modules/HardwareStatus/ |
| H A D | SensorsStore.js | 62 const promises = sensors.map((sensor) => { 63 return api.get(sensor['@odata.id']).catch((error) => { 92 response.data.Members.map((sensor) => { 94 name: sensor.Name, 95 status: sensor.Status?.Health, 96 currentValue: sensor.Reading, 97 lowerCaution: sensor.Thresholds?.LowerCaution?.Reading, 98 upperCaution: sensor.Thresholds?.UpperCaution?.Reading, 99 lowerCritical: sensor.Thresholds?.LowerCritical?.Reading, 100 upperCritical: sensor.Thresholds?.UpperCritical?.Reading, [all …]
|
| /openbmc/telemetry/src/utils/ |
| H A D | threshold_operations.hpp | 12 for ([[maybe_unused]] auto& [sensor, detail] : in initialize() 15 sensor->registerForUpdates(thresholdPtr->weak_from_this()); in initialize() 22 ThresholdType* thresholdPtr, const interfaces::Sensor& sensor) in getDetails() 27 [&sensor](const auto& x) { return &sensor == x.first.get(); }); in getDetails() 38 for (const auto& sensor : newSensors) in updateSensors() local 42 [&sensor](const auto& sd) { return sensor == sd.first; }); in updateSensors() 51 sensor, thresholdPtr->makeDetails(sensor->getName())); in updateSensors() 54 sensor->registerForUpdates(thresholdPtr->weak_from_this()); in updateSensors() 60 for ([[maybe_unused]] auto& [sensor, detail] : oldSensorDetails) in updateSensors() 62 sensor->unregisterFromUpdates(thresholdPtr->weak_from_this()); in updateSensors()
|
| /openbmc/pldm/platform-mc/test/ |
| H A D | numeric_sensor_test.cpp | 95 pldm::platform_mc::NumericSensor sensor(0x01, true, numericSensorPdr, in TEST() local 99 convertedValue = sensor.conversionFormula(reading); in TEST() 100 convertedValue = sensor.unitModifier(convertedValue); in TEST() 189 pldm::platform_mc::NumericSensor sensor(0x01, true, numericSensorPdr, in TEST() local 202 highAlarm = sensor.checkThreshold(highAlarm, true, reading, highThreshold, in TEST() 205 lowAlarm = sensor.checkThreshold(lowAlarm, false, reading, lowThreshold, in TEST() 210 highAlarm = sensor.checkThreshold(highAlarm, true, reading, highThreshold, in TEST() 213 lowAlarm = sensor.checkThreshold(lowAlarm, false, reading, lowThreshold, in TEST() 218 highAlarm = sensor.checkThreshold(highAlarm, true, reading, highThreshold, in TEST() 221 lowAlarm = sensor.checkThreshold(lowAlarm, false, reading, lowThreshold, in TEST() [all …]
|
| /openbmc/phosphor-host-ipmid/scripts/ |
| H A D | writesensor.cpp.mako | 10 sensor = sensorDict[key] 11 serviceInterface = sensor["serviceInterface"] 33 namespace sensor { 40 sensor = sensorDict[key] 41 interfaces = sensor["interfaces"] 42 path = sensor["path"] 43 serviceInterface = sensor["serviceInterface"] 44 sensorType = sensor["sensorType"] 45 entityID = sensor.get("entityID", 0) 46 instance = sensor.get("entityInstance", 0) [all …]
|
| /openbmc/entity-manager/test/ |
| H A D | test_gpio_presence.cpp | 32 gpio_presence::GPIOPresenceManager sensor(ctx); in TEST() local 43 ctx, gpioNames, gpioValues, name, sensor.gpioState, in TEST() 46 sensor.addConfig(name, std::move(c)); in TEST() 48 sensor.updatePresence(gpioName, false); in TEST() 50 EXPECT_EQ(sensor.getPresence(name), true); in TEST() 52 sensor.updatePresence(gpioName, true); in TEST() 54 EXPECT_EQ(sensor.getPresence(name), false); in TEST() 63 gpio_presence::GPIOPresenceManager sensor(ctx); in testDevicePresentDbus() local 65 std::string busName = sensor.setupBusName(); in testDevicePresentDbus() 79 ctx, gpioNames, gpioValues, name, sensor.gpioState, in testDevicePresentDbus() [all …]
|
| /openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/fans/ |
| H A D | phosphor-pid-control_%.bbappend | 5 SRC_URI += "file://monitor-pldm-sensor \ 6 file://monitor-pldm-sensor.service \ 7 file://monitor-fan-sensor \ 8 file://monitor-fan-sensor.service \ 12 monitor-pldm-sensor.service \ 13 monitor-fan-sensor.service \ 27 echo "After=monitor-pldm-sensor.service" >> ${override_file} 29 install -m 0644 ${UNPACKDIR}/monitor-pldm-sensor.service ${D}${systemd_system_unitdir} 30 install -m 0644 ${UNPACKDIR}/monitor-fan-sensor.service ${D}${systemd_system_unitdir} 32 install -m 0755 ${UNPACKDIR}/monitor-pldm-sensor ${D}${libexecdir}/${PN}/ [all …]
|
| /openbmc/telemetry/src/ |
| H A D | on_change_threshold.cpp | 15 for (auto& sensor : sensors) in initialize() local 17 sensor->registerForUpdates(weak_from_this()); in initialize() 26 for (const auto& sensor : newSensors) in updateSensors() local 30 [&sensor](const auto& s) { return sensor == s; }); in updateSensors() 39 sensor->registerForUpdates(weak_from_this()); in updateSensors() 45 for (auto& sensor : oldSensors) in updateSensors() local 47 sensor->unregisterFromUpdates(weak_from_this()); in updateSensors() 54 void OnChangeThreshold::sensorUpdated(interfaces::Sensor& sensor, in sensorUpdated() argument 63 commit(sensor.getName(), value); in sensorUpdated()
|
| H A D | metric.cpp | 42 for (const auto& sensor : sensors) in initialize() local 44 sensor->registerForUpdates(weak_from_this()); in initialize() 50 for (const auto& sensor : sensors) in deinitialize() local 52 sensor->unregisterFromUpdates(weak_from_this()); in deinitialize() 112 [¬ifier](const auto& sensor) { return sensor.get() == ¬ifier; }); in findAssociatedData() argument 119 auto sensorPath = utils::transform(sensors, [](const auto& sensor) { in dumpConfiguration() argument 120 return LabeledSensorInfo(sensor->id().service, sensor->id().path, in dumpConfiguration() 121 sensor->metadata()); in dumpConfiguration()
|
| /openbmc/qemu/hw/sensor/ |
| H A D | emc141x.c | 38 } sensor[SENSORS_COUNT_MAX]; member 71 value = s->sensor[tempid].raw_temp_current * 1000; in OBJECT_DECLARE_TYPE() 98 s->sensor[tempid].raw_temp_current = temp / 1000; in emc141x_set_temperature() 115 s->data = s->sensor[0].raw_temp_current; in emc141x_read() 118 s->data = s->sensor[1].raw_temp_current; in emc141x_read() 121 s->data = s->sensor[2].raw_temp_current; in emc141x_read() 124 s->data = s->sensor[3].raw_temp_current; in emc141x_read() 127 s->data = s->sensor[0].raw_temp_max; in emc141x_read() 130 s->data = s->sensor[1].raw_temp_max; in emc141x_read() 133 s->data = s->sensor[2].raw_temp_max; in emc141x_read() [all …]
|
| /openbmc/dbus-sensors/ |
| H A D | meson.options | 5 description: 'Enable ADC sensor.', 11 description: 'Enable CPU sensor.', 17 description: 'Enable exit air sensor.', 23 description: 'Enable fan sensor.', 29 description: 'Enable HWMON temperature sensor.', 35 description: 'Enable intrusion sensor.', 41 description: 'Enable IPMB sensor.', 53 description: 'Enable MCU sensor.', 59 description: 'Enable NVMe sensor.', 65 description: 'Enable PSU sensor.', [all …]
|
| /openbmc/phosphor-power/phosphor-regulators/src/ |
| H A D | dbus_sensors.cpp | 40 auto& [sensorName, sensor] = *it; in endCycle() 44 if (sensor->getLastUpdateTime() < cycleStartTime) in endCycle() 56 for (auto& [sensorName, sensor] : sensors) in endRail() 58 if (sensor->getRail() == rail) in endRail() 60 sensor->setToErrorState(); in endRail() 74 for (auto& [sensorName, sensor] : sensors) in disable() 76 sensor->disable(); in disable() 95 auto sensor = std::make_unique<DBusSensor>( in setValue() local 98 sensors.emplace(sensorName, std::move(sensor)); in setValue()
|
| /openbmc/ipmitool/lib/ |
| H A D | ipmi_sensor.c | 56 struct sdr_record_full_sensor * sensor, in ipmi_sensor_get_sensor_reading_factors() argument 65 if (intf == NULL || sensor == NULL) in ipmi_sensor_get_sensor_reading_factors() 69 memcpy(id, sensor->id_string, 16); in ipmi_sensor_get_sensor_reading_factors() 71 req_data[0] = sensor->cmn.keys.sensor_num; in ipmi_sensor_get_sensor_reading_factors() 76 req.msg.lun = sensor->cmn.keys.lun; in ipmi_sensor_get_sensor_reading_factors() 85 id, sensor->cmn.keys.sensor_num); in ipmi_sensor_get_sensor_reading_factors() 97 memcpy(&sensor->mtol, &rsp->data[1], sizeof(sensor->mtol)); in ipmi_sensor_get_sensor_reading_factors() 98 memcpy(&sensor->bacc, &rsp->data[3], sizeof(sensor->bacc)); in ipmi_sensor_get_sensor_reading_factors() 107 uint8_t sensor, in ipmi_sensor_set_sensor_thresholds() argument 119 set_thresh_rq.sensor_num = sensor; in ipmi_sensor_set_sensor_thresholds() [all …]
|
| H A D | ipmi_sdr.c | 185 sdr_convert_sensor_reading(struct sdr_record_full_sensor *sensor, uint8_t val) in sdr_convert_sensor_reading() argument 190 m = __TO_M(sensor->mtol); in sdr_convert_sensor_reading() 191 b = __TO_B(sensor->bacc); in sdr_convert_sensor_reading() 192 k1 = __TO_B_EXP(sensor->bacc); in sdr_convert_sensor_reading() 193 k2 = __TO_R_EXP(sensor->bacc); in sdr_convert_sensor_reading() 195 switch (sensor->cmn.unit.analog) { in sdr_convert_sensor_reading() 213 switch (sensor->linearization & 0x7f) { in sdr_convert_sensor_reading() 267 sdr_convert_sensor_hysterisis(struct sdr_record_full_sensor *sensor, uint8_t val) in sdr_convert_sensor_hysterisis() argument 272 m = __TO_M(sensor->mtol); in sdr_convert_sensor_hysterisis() 274 k2 = __TO_R_EXP(sensor->bacc); in sdr_convert_sensor_hysterisis() [all …]
|
| /openbmc/docs/designs/ |
| H A D | phosphor-hwmon-refactoring.md | 17 test that the sensor can be constructed correctly, but there is no testing of 18 correct behavior on various sensor reading or failure conditions. 23 implementing different sensor::readValue() method for different sensor types. 45 - DI: make the sensor struct take SensorConfig as dependency 47 - Add unit tests for sensor creation with various SensorConfigs 49 - Refine the sensor object interface and make it abstract 50 - Define sensor types that inherit from the common interface 51 - Add unit tests for sensor interface 52 - DI: make the sensor map take sensor interface as dependency 53 - Add a fake sensor that can exhibit controllable behavior [all …]
|
| H A D | virtual-sensors.md | 9 There are some sensors in the system whose values are derived from actual sensor 12 Virtual sensor examples are: 28 This should implement a new virtual sensor for every given sensor and update 31 - a daemon to create and monitor each sensor defined in config file and update 32 them based on value change in each given sensor. 33 - Every virtual sensor will be waiting for event for change in dbus value of 34 each sensor parameter and will update this sensor. 35 - Sensor parameter can be any sensor dbus path and it also supports chaining of 40 algorithm in calculating value for new virtual sensor 45 each sensor: "/xyz/openbmc_project/sensor/temperature/sensor_name" [all …]
|
| /openbmc/dbus-sensors/src/nvme/ |
| H A D | NVMeContext.hpp | 35 void addSensor(const std::shared_ptr<NVMeSensor>& sensor) in addSensor() argument 37 sensors.emplace_back(sensor); in addSensor() 43 for (auto& sensor : sensors) in getSensorAtPath() local 45 if (sensor->configurationPath == path) in getSensorAtPath() 47 return sensor; in getSensorAtPath() 56 void removeSensor(const std::shared_ptr<NVMeSensor>& sensor) in removeSensor() argument 59 auto found = std::find(sensors.begin(), sensors.end(), sensor); in removeSensor() 103 virtual void processResponse(std::shared_ptr<NVMeSensor>& sensor, void* msg,
|
| /openbmc/phosphor-pid-control/sensors/ |
| H A D | host.cpp | 38 auto sensor = std::make_unique<HostSensor>(name, timeout, bus, objPath, in createTemp() local 40 sensor->value(0); in createTemp() 47 sensor->unit(ValueInterface::Unit::DegreesC); in createTemp() 48 scaleHelper(sensor, -3); in createTemp() 49 sensor->emit_object_added(); in createTemp() 58 return sensor; in createTemp() 62 int64_t getScale(T* sensor) in getScale() argument 66 return sensor->scale(); in getScale()
|
| /openbmc/phosphor-hwmon/ |
| H A D | env.hpp | 58 inline std::string getEnv(const char* prefix, const SensorSet::key_type& sensor, in getEnv() argument 65 key.append(sensor.first); in getEnv() 66 key.append(sensor.second); in getEnv() 83 SensorSet::key_type sensor{type, id}; in getEnv() local 84 return getEnv(prefix, sensor, env); in getEnv() 98 const SensorSet::key_type& sensor) in getIndirectID() argument 102 path.append(sensor.first); in getIndirectID() 103 path.append(sensor.second); in getIndirectID()
|
| /openbmc/phosphor-virtual-sensor/ |
| H A D | README.md | 1 # phosphor-virtual-sensor 3 phosphor-virtual-sensor reads the configuration file 7 2. `/var/lib/phosphor-virtual-sensor` 8 3. `/usr/share/phosphor-virtual-sensor` 14 ## virtual sensor configuration information 19 ## information to get a virtual sensor configuration from D-Bus 34 The virtual sensor configuration information needs to be added into the relevant 36 sensor allows a recipe that builds for different hardware configurations to have 39 The virtual sensor configuration in entity manager follows a different format to
|
| /openbmc/openbmc/meta-openpower/recipes-phosphor/configuration/ |
| H A D | openpower-yaml-config.bb | 11 file://ipmi-hostboot-volatile-sensor-mrw.yaml \ 12 file://ipmi-occ-active-sensor-mrw.yaml \ 23 install -m 0644 -D ipmi-hostboot-volatile-sensor-mrw.yaml \ 24 ${D}${datadir}/${BPN}/ipmi-hostboot-volatile-sensor-mrw.yaml 25 install -m 0644 -D ipmi-occ-active-sensor-mrw.yaml \ 26 ${D}${datadir}/${BPN}/ipmi-occ-active-sensor-mrw.yaml 32 ${datadir}/${BPN}/ipmi-hostboot-volatile-sensor-mrw.yaml \ 33 ${datadir}/${BPN}/ipmi-occ-active-sensor-mrw.yaml \
|
| /openbmc/openbmc-test-automation/ipmi/ |
| H A D | test_ipmi_cold_reset.robot | 6 ... interrupt enables, event message generation,sensor scanning, 16 ... impact on sensor threshold value change with cold reset. 18 ... The script changes sensor threshold value for Fan sensor, 20 ... compares sensor threshold values of initial and reading after cold reset. 69 [Documentation] Modify sensor threshold, perform cold reset, 70 ... and verify if sensor threshold reverts back to initial value. 73 # Get sensor list. 76 # Get initial sensor threshold readings. 87 # Set/Get sensor threshold for given sensor and compare with initial reading. 100 # Get sensor data for the sensor identified. [all …]
|