-
Notifications
You must be signed in to change notification settings - Fork 173
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
5 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
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 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 |
---|---|---|
|
@@ -12,25 +12,30 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
pub mod hello; | ||
// ignore_tagging | ||
pub mod scout; | ||
|
||
pub use hello::Hello; | ||
pub use scout::Scout; | ||
|
||
pub mod id { | ||
// Scouting Messages | ||
// tags{} | ||
pub const SCOUT: u8 = 0x01; | ||
// tags{} | ||
pub const HELLO: u8 = 0x02; | ||
} | ||
|
||
// Zenoh messages at scouting level | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
// tags{} | ||
pub enum ScoutingBody { | ||
Scout(Scout), | ||
Hello(Hello), | ||
} | ||
|
||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
// tags{} | ||
pub struct ScoutingMessage { | ||
pub body: ScoutingBody, | ||
#[cfg(feature = "stats")] | ||
|
@@ -39,6 +44,7 @@ pub struct ScoutingMessage { | |
|
||
impl ScoutingMessage { | ||
#[cfg(feature = "test")] | ||
// tags{} | ||
pub fn rand() -> Self { | ||
use rand::Rng; | ||
|
||
|
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 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 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