Skip to content

Commit

Permalink
aligning
Browse files Browse the repository at this point in the history
  • Loading branch information
MelamudMichael committed Mar 5, 2024
1 parent 3b66c2a commit 2d94d6f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class HelloWorldRecipe(ConanFile):
# self.options["spdlog"].shared = self.options.shared

def requirements(self):
self.requires("up-client-zenoh-cpp/0.1.0-dev")
self.requires("up-client-zenoh-cpp/0.1.1-dev")
self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else ""))


Expand Down
4 changes: 3 additions & 1 deletion pubsub/src/main_pub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
#include <spdlog/spdlog.h>
#include <up-client-zenoh-cpp/transport/zenohUTransport.h>
#include <up-cpp/uuid/factory/Uuidv8Factory.h>
#include <up-cpp/transport/builder/UAttributesBuilder.h>
#include <up-cpp/uri/serializer/LongUriSerializer.h>
#include <up-core-api/ustatus.pb.h>
#include <up-core-api/uri.pb.h>
#include <up-core-api/uattributes.pb.h>

using namespace uprotocol::utransport;
using namespace uprotocol::uri;
Expand Down Expand Up @@ -88,7 +90,7 @@ UCode sendMessage(ZenohUTransport *transport,

auto uuid = Uuidv8Factory::create();

UAttributesBuilder builder(uuid, UMessageType::PUBLISH, UPriority::STANDARD);
UAttributesBuilder builder(uuid, UMessageType::UMESSAGE_TYPE_PUBLISH, UPriority::UPRIORITY_CS1);
UAttributes attributes = builder.build();

UPayload payload(buffer, size, UPayloadType::VALUE);
Expand Down
4 changes: 3 additions & 1 deletion rpc/src/main_rpc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <up-client-zenoh-cpp/rpc/zenohRpcClient.h>
#include <up-cpp/uuid/factory/Uuidv8Factory.h>
#include <up-cpp/uri/serializer/LongUriSerializer.h>
#include <up-cpp/transport/builder/UAttributesBuilder.h>
#include <up-core-api/uattributes.pb.h>

using namespace uprotocol::utransport;
using namespace uprotocol::uuid;
Expand All @@ -47,7 +49,7 @@ UPayload sendRPC(UUri& uri) {

auto uuid = Uuidv8Factory::create();

UAttributesBuilder builder(uuid, UMessageType::REQUEST, UPriority::STANDARD);
UAttributesBuilder builder(uuid, UMessageType::UMESSAGE_TYPE_REQUEST, UPriority::UPRIORITY_CS1);
UAttributes attributes = builder.build();

constexpr uint8_t BUFFER_SIZE = 1;
Expand Down
3 changes: 2 additions & 1 deletion rpc/src/main_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <csignal>
#include <unistd.h>
#include <up-client-zenoh-cpp/transport/zenohUTransport.h>
#include <up-cpp/transport/builder/UAttributesBuilder.h>
#include <up-cpp/uuid/factory/Uuidv8Factory.h>
#include <up-cpp/uri/serializer/LongUriSerializer.h>
#include <spdlog/spdlog.h>
Expand Down Expand Up @@ -59,7 +60,7 @@ class RpcListener : public UListener {

/* Build response attributes - the same UUID should be used to send the response
* it is also possible to send the response outside of the callback context */
UAttributesBuilder builder(attributes.id(), UMessageType::RESPONSE, UPriority::STANDARD);
UAttributesBuilder builder(attributes.id(), UMessageType::UMESSAGE_TYPE_RESPONSE, UPriority::UPRIORITY_CS1);
UAttributes responseAttributes = builder.build();

/* Send the response */
Expand Down

0 comments on commit 2d94d6f

Please sign in to comment.