Skip to content

Commit

Permalink
Clean-up of protocol types (#729)
Browse files Browse the repository at this point in the history
* Update Reply protocol definition and codec

* Make consolidation a flag in Query/Reply

* Fix wrong Consolidation cast in codec

* Apply Reply changes to routing

* Fix shared-memory feature

* Fix stats

* Bump Zenoh Protocol Version

* Add query/reply ok(put|del)/err() tests

* Clean-up of code

* Default CongestionControl for Push is Drop

* Fix Priority::DEFAULT typo

* Define DEFAULT consts

* ConsolidationMode moved into the API

* Remove unused Ack message

* Fix Ack leftovers

* CongestionControl::DEFAULT

* QoSType::DEFAULT

* Mapping::DEFAULT

* Encoding::DEFAULT

* QueryTarget::DEFAULT

* NodeType::DEFAULT

* QueryableInfo::DEFAULT

* Remove ConsolidationMode from zenoh-protocol

* ConsolidationType::DEFAULT

* Remove dead code

* Remove dead code

* Move SampleKind to sample.rs

* Cleanup SubMode

* Cleanup QueryTarget

* Remove emptyline
  • Loading branch information
Mallets authored Feb 15, 2024
1 parent efe1135 commit d6ffebf
Show file tree
Hide file tree
Showing 79 changed files with 510 additions and 1,125 deletions.
48 changes: 24 additions & 24 deletions commons/zenoh-codec/benches/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ fn criterion_benchmark(c: &mut Criterion) {
let codec = Zenoh080::new();

let frame = FrameHeader {
reliability: Reliability::default(),
reliability: Reliability::DEFAULT,
sn: TransportSn::MIN,
ext_qos: zenoh_protocol::transport::frame::ext::QoSType::default(),
ext_qos: zenoh_protocol::transport::frame::ext::QoSType::DEFAULT,
};

let data = Push {
wire_expr: WireExpr::empty(),
ext_qos: ext::QoSType::default(),
ext_qos: ext::QoSType::DEFAULT,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
ext_nodeid: ext::NodeIdType::DEFAULT,
payload: PushBody::Put(Put {
timestamp: None,
encoding: Encoding::default(),
encoding: Encoding::DEFAULT,
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
ext_shm: None,
Expand Down Expand Up @@ -121,19 +121,19 @@ fn criterion_benchmark(c: &mut Criterion) {
let codec = Zenoh080::new();

let frame = FrameHeader {
reliability: Reliability::default(),
reliability: Reliability::DEFAULT,
sn: TransportSn::MIN,
ext_qos: zenoh_protocol::transport::frame::ext::QoSType::default(),
ext_qos: zenoh_protocol::transport::frame::ext::QoSType::DEFAULT,
};

let data = Push {
wire_expr: WireExpr::empty(),
ext_qos: ext::QoSType::default(),
ext_qos: ext::QoSType::DEFAULT,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
ext_nodeid: ext::NodeIdType::DEFAULT,
payload: PushBody::Put(Put {
timestamp: None,
encoding: Encoding::default(),
encoding: Encoding::DEFAULT,
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
ext_shm: None,
Expand Down Expand Up @@ -162,19 +162,19 @@ fn criterion_benchmark(c: &mut Criterion) {
let codec = Zenoh080::new();

let frame = FrameHeader {
reliability: Reliability::default(),
reliability: Reliability::DEFAULT,
sn: TransportSn::MIN,
ext_qos: zenoh_protocol::transport::frame::ext::QoSType::default(),
ext_qos: zenoh_protocol::transport::frame::ext::QoSType::DEFAULT,
};

let data = Push {
wire_expr: WireExpr::empty(),
ext_qos: ext::QoSType::default(),
ext_qos: ext::QoSType::DEFAULT,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
ext_nodeid: ext::NodeIdType::DEFAULT,
payload: PushBody::Put(Put {
timestamp: None,
encoding: Encoding::default(),
encoding: Encoding::DEFAULT,
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
ext_shm: None,
Expand Down Expand Up @@ -210,12 +210,12 @@ fn criterion_benchmark(c: &mut Criterion) {

let data = Push {
wire_expr: WireExpr::empty(),
ext_qos: ext::QoSType::default(),
ext_qos: ext::QoSType::DEFAULT,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
ext_nodeid: ext::NodeIdType::DEFAULT,
payload: PushBody::Put(Put {
timestamp: None,
encoding: Encoding::default(),
encoding: Encoding::DEFAULT,
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
ext_shm: None,
Expand All @@ -238,12 +238,12 @@ fn criterion_benchmark(c: &mut Criterion) {

let data = Push {
wire_expr: WireExpr::empty(),
ext_qos: ext::QoSType::default(),
ext_qos: ext::QoSType::DEFAULT,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
ext_nodeid: ext::NodeIdType::DEFAULT,
payload: PushBody::Put(Put {
timestamp: None,
encoding: Encoding::default(),
encoding: Encoding::DEFAULT,
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
ext_shm: None,
Expand Down Expand Up @@ -277,12 +277,12 @@ fn criterion_benchmark(c: &mut Criterion) {

let data = Push {
wire_expr: WireExpr::empty(),
ext_qos: ext::QoSType::default(),
ext_qos: ext::QoSType::DEFAULT,
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
ext_nodeid: ext::NodeIdType::DEFAULT,
payload: PushBody::Put(Put {
timestamp: None,
encoding: Encoding::default(),
encoding: Encoding::DEFAULT,
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
ext_shm: None,
Expand Down
1 change: 0 additions & 1 deletion commons/zenoh-codec/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@
// ZettaScale Zenoh Team, <[email protected]>
//
pub mod extension;
mod priority;
66 changes: 0 additions & 66 deletions commons/zenoh-codec/src/common/priority.rs

This file was deleted.

1 change: 0 additions & 1 deletion commons/zenoh-codec/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
//
mod encoding;
mod locator;
mod property;
#[cfg(feature = "shared-memory")]
mod shm;
mod timestamp;
Expand Down
84 changes: 0 additions & 84 deletions commons/zenoh-codec/src/core/property.rs

This file was deleted.

2 changes: 1 addition & 1 deletion commons/zenoh-codec/src/core/wire_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ where
Ok(WireExpr {
scope,
suffix: suffix.into(),
mapping: Mapping::default(),
mapping: Mapping::DEFAULT,
})
}
}
Loading

0 comments on commit d6ffebf

Please sign in to comment.