Common
common packages for kyubic
 
Loading...
Searching...
No Matches
leak.hpp
Go to the documentation of this file.
1
10#ifndef _LEAK_HPP
11#define _LEAK_HPP
12
13#include <driver_msgs/msg/bool_stamped.h>
14
15#include <memory>
16#include <proto_files/conversion_driver_msgs__BoolStamped.hpp>
17#include <protolink/client.hpp>
18#include <rclcpp/rclcpp.hpp>
19#include <timer/timeout.hpp>
20
26{
27
31class Leak : public rclcpp::Node
32{
33public:
38 explicit Leak(const rclcpp::NodeOptions & options);
39
40private:
41 uint16_t sub_port; // of the computer executing this code
42 uint64_t timeout_ms;
43
44 protolink::IoContext io_context_;
45 std::shared_ptr<protolink::udp_protocol::soket> sock_;
46 std::shared_ptr<timer::Timeout> timeout_;
47 std::mutex mutex_;
48
49 using ProtoBoolStamped = protolink__driver_msgs__BoolStamped::driver_msgs__BoolStamped;
50 std::shared_ptr<protolink::udp_protocol::Subscriber<ProtoBoolStamped>> protolink_subscriber_;
51
52 rclcpp::Publisher<driver_msgs::msg::BoolStamped>::SharedPtr pub_;
53 rclcpp::TimerBase::SharedPtr timer_;
54
55 void protolink_callback(const ProtoBoolStamped & _msg);
56};
57
58} // namespace driver::sensors_esp32_driver
59
60#endif // !_LEAK_HPP
Leak class.
Definition: leak.hpp:32
driver for sensors_esp32
timeout library