Skip to content

Commit a470412

Browse files
reduce qos size to 1 byte; use getters to extract individual qos settings
1 parent 4f72432 commit a470412

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

include/zenohcxx/api.hxx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,16 @@ typedef ::z_priority_t Priority;
145145

146146
/**
147147
* QoS settings of zenoh message.
148-
*
149-
* Members:
150-
* Priority priority: Priority of the message.
151-
* CongestionControl congestion_control: Congestion control of the message.
152-
* bool express: If true, the message is not batched during transmission, in order to reduce latency.
153148
*/
154-
typedef ::z_qos_t QoS;
149+
struct QoS : public Copyable<::z_qos_t> {
150+
using Copyable::Copyable;
151+
/// Returns message priority.
152+
Priority get_priority() const { return ::z_qos_get_priority(*this); }
153+
/// Returns message congestion control.
154+
CongestionControl get_congestion_control() const { return ::z_qos_get_congestion_control(*this); }
155+
/// Returns message express flag. If set to true, the message is not batched to reduce the latency.
156+
bool get_express() const { return ::z_qos_get_express(*this); }
157+
};
155158

156159
/// Query target values.
157160
///

0 commit comments

Comments
 (0)