summaryrefslogtreecommitdiffstats
path: root/sensor.hpp
blob: e22af0b0683db1b87c4ac50e87a664e4cc1761f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "sensorset.hpp"
#include "mainloop.hpp"

namespace sensor
{

/**
 * @brief Add status interface and functional property for sensor
 * @details When a sensor has an associated fault file, the OperationalStatus
 * interface is added along with setting the Functional property to the
 * corresponding value found in the fault file.
 *
 * @param[in] sensor - Sensor identification data
 * @param[in] ioAccess - I/O access to sysfs
 * @param[in] devPath - Device path
 * @param[in] info - Sensor object information
 *
 * @return - Shared pointer to the status object
 */
std::shared_ptr<StatusObject> addStatus(
        const SensorSet::key_type& sensor,
        const hwmonio::HwmonIO& ioAccess,
        const std::string& devPath,
        ObjectInfo& info);

} // namespace sensor
OpenPOWER on IntegriCloud