-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
3 additions
and
240 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
pub mod ack; | ||
pub mod del; | ||
pub mod err; | ||
pub mod pull; | ||
|
@@ -122,7 +121,6 @@ where | |
match x { | ||
ResponseBody::Reply(b) => self.write(&mut *writer, b), | ||
ResponseBody::Err(b) => self.write(&mut *writer, b), | ||
ResponseBody::Ack(b) => self.write(&mut *writer, b), | ||
ResponseBody::Put(b) => self.write(&mut *writer, b), | ||
} | ||
} | ||
|
@@ -141,7 +139,6 @@ where | |
let body = match imsg::mid(codec.header) { | ||
id::REPLY => ResponseBody::Reply(codec.read(&mut *reader)?), | ||
id::ERR => ResponseBody::Err(codec.read(&mut *reader)?), | ||
id::ACK => ResponseBody::Ack(codec.read(&mut *reader)?), | ||
id::PUT => ResponseBody::Put(codec.read(&mut *reader)?), | ||
_ => return Err(DidntRead), | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
pub mod ack; | ||
pub mod del; | ||
pub mod err; | ||
pub mod pull; | ||
|
@@ -20,7 +19,6 @@ pub mod query; | |
pub mod reply; | ||
|
||
use crate::core::Encoding; | ||
pub use ack::Ack; | ||
pub use del::Del; | ||
pub use err::Err; | ||
pub use pull::Pull; | ||
|
@@ -35,8 +33,7 @@ pub mod id { | |
pub const QUERY: u8 = 0x03; | ||
pub const REPLY: u8 = 0x04; | ||
pub const ERR: u8 = 0x05; | ||
pub const ACK: u8 = 0x06; | ||
pub const PULL: u8 = 0x07; | ||
pub const PULL: u8 = 0x06; | ||
} | ||
|
||
// DataInfo | ||
|
@@ -127,7 +124,6 @@ impl From<Del> for RequestBody { | |
pub enum ResponseBody { | ||
Reply(Reply), | ||
Err(Err), | ||
Ack(Ack), | ||
Put(Put), | ||
} | ||
|
||
|
@@ -138,11 +134,10 @@ impl ResponseBody { | |
|
||
let mut rng = rand::thread_rng(); | ||
|
||
match rng.gen_range(0..4) { | ||
match rng.gen_range(0..3) { | ||
0 => ResponseBody::Reply(Reply::rand()), | ||
1 => ResponseBody::Err(Err::rand()), | ||
2 => ResponseBody::Ack(Ack::rand()), | ||
3 => ResponseBody::Put(Put::rand()), | ||
2 => ResponseBody::Put(Put::rand()), | ||
_ => unreachable!(), | ||
} | ||
} | ||
|
@@ -160,12 +155,6 @@ impl From<Err> for ResponseBody { | |
} | ||
} | ||
|
||
impl From<Ack> for ResponseBody { | ||
fn from(r: Ack) -> ResponseBody { | ||
ResponseBody::Ack(r) | ||
} | ||
} | ||
|
||
pub mod ext { | ||
use zenoh_buffers::ZBuf; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters