Common
common packages for kyubic
 
Loading...
Searching...
No Matches
buzzer_switch.hpp
Go to the documentation of this file.
1
10#ifndef _BUZZER_SWITCH_HPP
11#define _BUZZER_SWITCH_HPP
12
13#include <driver_msgs/msg/buzzer_switch.hpp>
14#include <proto_files/conversion_driver_msgs__BuzzerSwitch.hpp>
15#include <protolink/client.hpp>
16#include <rclcpp/rclcpp.hpp>
17
19{
20
21class BuzzerSwitch : public rclcpp::Node
22{
23public:
24 explicit BuzzerSwitch(const rclcpp::NodeOptions & options);
25
26private:
27 std::string mcu_ip_addr;
28 uint16_t mcu_port;
29 uint16_t this_port;
30
31 protolink::IoContext io_context_;
32 std::shared_ptr<protolink::udp_protocol::soket> sock_;
33
34 using ProtoBuzzerSwitch = protolink__driver_msgs__BuzzerSwitch::driver_msgs__BuzzerSwitch;
35 std::shared_ptr<protolink::udp_protocol::Publisher<ProtoBuzzerSwitch>> protolink_publisher_;
36
37 rclcpp::Subscription<driver_msgs::msg::BuzzerSwitch>::SharedPtr sub_;
38};
39
40} // namespace driver::sensors_esp32_driver
41
42#endif
Definition: buzzer_switch.hpp:22
driver for sensors_esp32