@@ -24,18 +24,18 @@ namespace leader_election_converter
24
24
{
25
25
26
26
LogConverter::LogConverter (rclcpp::Node * node)
27
- : node_(node), is_election_comunication_running_ (true ), is_election_status_running_(true )
27
+ : node_(node), is_election_communication_running_ (true ), is_election_status_running_(true )
28
28
{
29
29
}
30
30
31
31
LogConverter::~LogConverter ()
32
32
{
33
- is_election_comunication_running_ = false ;
34
- udp_election_comunication_receiver_ ->~UdpReceiver ();
33
+ is_election_communication_running_ = false ;
34
+ udp_election_communication_receiver_ ->~UdpReceiver ();
35
35
is_election_status_running_ = false ;
36
36
udp_election_status_receiver_->~UdpReceiver ();
37
- if (udp_election_comunication_thread_ .joinable ()) {
38
- udp_election_comunication_thread_ .join ();
37
+ if (udp_election_communication_thread_ .joinable ()) {
38
+ udp_election_communication_thread_ .join ();
39
39
}
40
40
if (udp_election_status_thread_.joinable ()) {
41
41
udp_election_status_thread_.join ();
@@ -45,19 +45,19 @@ LogConverter::~LogConverter()
45
45
void LogConverter::setUdpElectionCommunicatioinReceiver (
46
46
const std::string & src_ip, const std::string & src_port)
47
47
{
48
- udp_election_comunication_thread_ =
48
+ udp_election_communication_thread_ =
49
49
std::thread (&LogConverter::startUdpElectionCommunicationReceiver, this , src_ip, src_port);
50
50
}
51
51
52
52
void LogConverter::startUdpElectionCommunicationReceiver (
53
53
const std::string & src_ip, const std::string & src_port)
54
54
{
55
55
try {
56
- udp_election_comunication_receiver_ = std::make_unique<UdpReceiver<ElectionCommunication>>(
56
+ udp_election_communication_receiver_ = std::make_unique<UdpReceiver<ElectionCommunication>>(
57
57
src_ip, src_port,
58
58
std::bind (&LogConverter::convertElectionCommunicationToTopic, this , std::placeholders::_1));
59
- while (is_election_comunication_running_ ) {
60
- udp_election_comunication_receiver_ ->receive ();
59
+ while (is_election_communication_running_ ) {
60
+ udp_election_communication_receiver_ ->receive ();
61
61
}
62
62
} catch (const std::exception & e) {
63
63
RCLCPP_ERROR (node_->get_logger (), " Error in UDP receiver thread: %s" , e.what ());
@@ -88,7 +88,7 @@ void LogConverter::startUdpElectionStatusReceiver(
88
88
89
89
void LogConverter::setPublisher ()
90
90
{
91
- pub_election_comunication_ =
91
+ pub_election_communication_ =
92
92
node_->create_publisher <tier4_system_msgs::msg::ElectionCommunication>(
93
93
" ~/output/election_communication" , rclcpp::QoS{1 });
94
94
pub_election_status_ = node_->create_publisher <tier4_system_msgs::msg::ElectionStatus>(
@@ -107,7 +107,7 @@ void LogConverter::convertElectionCommunicationToTopic(const ElectionCommunicati
107
107
msg.link = (node_msg.msg >> 24 ) & 0xFF ;
108
108
msg.heartbeat = (node_msg.msg >> 56 ) & 0x0F ;
109
109
msg.checksum = (node_msg.msg >> 60 ) & 0x0F ;
110
- pub_election_comunication_ ->publish (msg);
110
+ pub_election_communication_ ->publish (msg);
111
111
}
112
112
113
113
void LogConverter::convertElectionStatusToTopic (const ElectionStatus & status)
0 commit comments