sensor.hpp (dcc4e1936173a93251a02066432bc2bcbc386240) sensor.hpp (7e098e93ef0974739459d296f99ddfab54722c23)
1#pragma once
2
3#include "interfaces/sensor.hpp"
4#include "interfaces/sensor_listener.hpp"
5#include "types/milliseconds.hpp"
6#include "utils/unique_call.hpp"
7
8#include <boost/asio/high_resolution_timer.hpp>

--- 14 unchanged lines hidden (view full) ---

23 Sensor(const Sensor&) = delete;
24 Sensor& operator=(const Sensor&) = delete;
25
26 static Id makeId(std::string_view service, std::string_view path);
27
28 Id id() const override;
29 void registerForUpdates(
30 const std::weak_ptr<interfaces::SensorListener>& weakListener) override;
1#pragma once
2
3#include "interfaces/sensor.hpp"
4#include "interfaces/sensor_listener.hpp"
5#include "types/milliseconds.hpp"
6#include "utils/unique_call.hpp"
7
8#include <boost/asio/high_resolution_timer.hpp>

--- 14 unchanged lines hidden (view full) ---

23 Sensor(const Sensor&) = delete;
24 Sensor& operator=(const Sensor&) = delete;
25
26 static Id makeId(std::string_view service, std::string_view path);
27
28 Id id() const override;
29 void registerForUpdates(
30 const std::weak_ptr<interfaces::SensorListener>& weakListener) override;
31 void unregisterFromUpdates(
32 const std::weak_ptr<interfaces::SensorListener>& weakListener) override;
31
32 private:
33 static std::optional<double> readValue(const ValueVariant& v);
34 static void signalProc(const std::weak_ptr<Sensor>& weakSelf,
35 sdbusplus::message::message&);
36
37 void async_read();
38 void async_read(std::shared_ptr<utils::UniqueCall::Lock>);

--- 15 unchanged lines hidden ---
33
34 private:
35 static std::optional<double> readValue(const ValueVariant& v);
36 static void signalProc(const std::weak_ptr<Sensor>& weakSelf,
37 sdbusplus::message::message&);
38
39 void async_read();
40 void async_read(std::shared_ptr<utils::UniqueCall::Lock>);

--- 15 unchanged lines hidden ---