Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port zenoh_c to zenoh_cpp #311

Closed
wants to merge 24 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make linters happy
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
ahcorde committed Nov 25, 2024
commit 92af26fb614d564402bb4d8f493d527318dd2dd8
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/detail/rmw_client_data.cpp
Original file line number Diff line number Diff line change
@@ -249,7 +249,7 @@ rmw_ret_t ClientData::take_response(

auto & reply = latest_reply->get_sample();

if(!reply.is_ok()) {
if (!reply.is_ok()) {
RMW_SET_ERROR_MSG("invalid reply sample");
return RMW_RET_ERROR;
}
5 changes: 3 additions & 2 deletions rmw_zenoh_cpp/src/detail/rmw_service_data.cpp
Original file line number Diff line number Diff line change
@@ -144,7 +144,7 @@ std::shared_ptr<ServiceData> ServiceData::make(
std::weak_ptr<rmw_zenoh_cpp::ServiceData> data_wp = service_data;
service_data->qable_ = session->declare_queryable(
service_ke,
[data_wp](const zenoh::Query & query){
[data_wp](const zenoh::Query & query) {
auto sub_data = data_wp.lock();
if (sub_data == nullptr) {
RMW_ZENOH_LOG_ERROR_NAMED(
@@ -417,7 +417,8 @@ rmw_ret_t ServiceData::send_response(

const zenoh::Query & loaned_query = query->get_query();
zenoh::Query::ReplyOptions options = zenoh::Query::ReplyOptions::create_default();
options.attachment = create_map_and_set_sequence_num(request_id->sequence_number,
options.attachment = create_map_and_set_sequence_num(
request_id->sequence_number,
request_id->writer_guid);

std::vector<uint8_t> raw_bytes(
9 changes: 4 additions & 5 deletions rmw_zenoh_cpp/src/detail/rmw_subscription_data.cpp
Original file line number Diff line number Diff line change
@@ -268,11 +268,10 @@ bool SubscriptionData::init()
opts.accept_replies = ZC_REPLY_KEYEXPR_ANY;

zenoh::ZResult err;
std::get<zenoh::ext::QueryingSubscriber<void>>(
sub_data->sub_.value()).get(
zenoh::KeyExpr(selector),
std::move(opts),
&err);
std::get<zenoh::ext::QueryingSubscriber<void>>(sub_data->sub_.value()).get(
zenoh::KeyExpr(selector),
std::move(opts),
&err);

if (err != Z_OK) {
RMW_SET_ERROR_MSG("unable to get querying subscriber.");
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/zenohd/main.cpp
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ int main(int argc, char ** argv)
std::move(config.value()),
zenoh::Session::SessionOptions::create_default(),
&result);
if(result != Z_OK) {
if (result != Z_OK) {
std::cout << "Error opening Session!" << "\\n";
return 1;
}