Skip to content

Commit fca0340

Browse files
Fix cpplint warnings (#76)
Signed-off-by: Simon Hoinkis <[email protected]>
1 parent 007d264 commit fca0340

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

rmw_iceoryx_cpp/src/internal/iceoryx_topic_names_and_types.cpp

+10-5
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,14 @@ std::map<std::string, std::string> get_topic_names_and_types()
145145
std::map<std::string, std::string> get_service_names_and_types()
146146
{
147147
std::map<std::string, std::string> names_n_types;
148-
std::map<std::string, std::vector<std::string>> clients_topics; // Currently, no possibility to query for clients..
149-
std::map<std::string, std::vector<std::string>> servers_topics; // Can be discovered via 'ServiceDiscovery'
150-
std::map<std::string, std::vector<std::string>> topic_clients; // Currently, no possibility to query for clients..
151-
std::map<std::string, std::vector<std::string>> topic_servers; // Can be discovered, but missing associated node
148+
// Currently, no possibility to query for clients..
149+
std::map<std::string, std::vector<std::string>> clients_topics;
150+
// Can be discovered via 'ServiceDiscovery'
151+
std::map<std::string, std::vector<std::string>> servers_topics;
152+
// Currently, no possibility to query for clients..
153+
std::map<std::string, std::vector<std::string>> topic_clients;
154+
// Can be discovered, but missing associated node
155+
std::map<std::string, std::vector<std::string>> topic_servers;
152156

153157
std::vector<iox::capro::ServiceDescription> available_servers;
154158

@@ -167,7 +171,8 @@ std::map<std::string, std::string> get_service_names_and_types()
167171
std::string(server.getEventIDString().c_str()));
168172

169173
names_n_types[std::get<0>(name_and_type)] = std::get<1>(name_and_type);
170-
/// @todo There is no API to find out which 'ServiceDescription' is offered by which node, for now we use 'NodeFoo'..
174+
/// @todo There is no API to find out which 'ServiceDescription' is offered by which node,
175+
/// for now we use 'NodeFoo'..
171176
servers_topics[std::string("NodeFoo")].push_back(
172177
std::get<0>(
173178
name_and_type));

rmw_iceoryx_cpp/src/rmw_request.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ rmw_take_request(
170170
&iceoryx_server_abstraction->type_supports_,
171171
ros_request);
172172
}
173-
request_header->source_timestamp = 0; // Unsupported until needed
173+
request_header->source_timestamp = 0; // Unsupported until needed
174174
ret = rcutils_system_time_now(&request_header->received_timestamp);
175175
request_header->request_id.sequence_number = iceoryx_request_header->getSequenceId();
176-
request_header->request_id.writer_guid[0] = 42; /// @todo
176+
request_header->request_id.writer_guid[0] = 42; /// @todo
177177

178178
// Hold the loaned request till we send the response in 'rmw_send_response'
179179
iceoryx_server_abstraction->request_payload_ = user_payload;

rmw_iceoryx_cpp/src/rmw_response.cpp

+10-6
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ rmw_take_response(
6868
iceoryx_response_payload);
6969
/// @todo check writer guid?
7070
request_header->request_id.sequence_number = iceoryx_response_header->getSequenceId();
71-
request_header->source_timestamp = 0; // Unsupported until needed
71+
request_header->source_timestamp = 0; // Unsupported until needed
7272
ret = rcutils_system_time_now(&request_header->received_timestamp);
7373

74-
if (iceoryx_response_header->getSequenceId() == iceoryx_client_abstraction->sequence_id_ - 1) {
74+
if (iceoryx_response_header->getSequenceId() ==
75+
iceoryx_client_abstraction->sequence_id_ - 1)
76+
{
7577
user_payload = iceoryx_response_payload;
7678
chunk_header = iox::mepoo::ChunkHeader::fromUserPayload(user_payload);
7779
ret = RMW_RET_OK;
@@ -139,9 +141,10 @@ rmw_send_response(
139141

140142
auto * iceoryx_request_header = iox::popo::RequestHeader::fromPayload(
141143
iceoryx_server_abstraction->request_payload_);
142-
/// @todo Why is it not possible to set the sequence id? Is this automatically done? If so, we need to compare
143-
/// the user-provided sequence id with the one from the 'iceoryx_request_header'
144-
//iceoryx_request_header->setSequenceId(request_header->sequence_number);
144+
/// @todo Why is it not possible to set the sequence id? Is this automatically done? If so,
145+
/// we need to compare the user-provided sequence id with the one from the
146+
/// 'iceoryx_request_header'
147+
// iceoryx_request_header->setSequenceId(request_header->sequence_number);
145148

146149
iceoryx_server->loan(
147150
iceoryx_request_header, iceoryx_server_abstraction->response_size_,
@@ -158,7 +161,8 @@ rmw_send_response(
158161
&iceoryx_server_abstraction->type_supports_, payload_vector);
159162
memcpy(responsePayload, payload_vector.data(), payload_vector.size());
160163
}
161-
/// @todo Why are the sleep before and after 'send()' needed? rmw_cyclonedds and rmw_fastrtps seem to do something similar in 'rmw_send_response'..
164+
/// @todo Why are the sleeps before and after 'send()' needed?
165+
/// rmw_cyclonedds and rmw_fastrtps seem to do something similar in 'rmw_send_response'..
162166
std::this_thread::sleep_for(std::chrono::milliseconds(100));
163167
iceoryx_server->send(responsePayload).and_then(
164168
[&] {

rmw_iceoryx_cpp/src/rmw_service_server_is_available.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#include "./types/iceoryx_client.hpp"
2222

23-
//#include "iceoryx_posh/runtime/service_discovery.hpp"
23+
// #include "iceoryx_posh/runtime/service_discovery.hpp"
2424

2525
extern "C"
2626
{

0 commit comments

Comments
 (0)