-
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.
Merge branch 'protocol_changes' into protocol_shmmut
- Loading branch information
Showing
112 changed files
with
1,565 additions
and
1,425 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use zenoh::prelude::r#async::*; | ||
use zenoh::shm::protocol_implementations::posix::posix_shared_memory_provider_backend::PosixSharedMemoryProviderBackend; | ||
use zenoh::shm::protocol_implementations::posix::protocol_id::POSIX_PROTOCOL_ID; | ||
use zenoh::shm::provider::shared_memory_provider::{ | ||
BlockOn, GarbageCollect, SharedMemoryProviderBuilder, | ||
}; | ||
use zenoh::shm::provider::shared_memory_provider::{Deallocate, Defragment}; | ||
use zenoh::shm::provider::types::{AllocAlignment, MemoryLayout}; | ||
use zenoh::Result; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
|
@@ -28,7 +20,7 @@ async fn main() { | |
run().await.unwrap() | ||
} | ||
|
||
async fn run() -> Result<()> { | ||
async fn run() -> ZResult<()> { | ||
// Construct an SHM backend | ||
let backend = { | ||
// NOTE: code in this block is a specific PosixSharedMemoryProviderBackend API. | ||
|
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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,7 +12,7 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
use zenoh::prelude::keyexpr; | ||
use zenoh::prelude as zenoh; | ||
|
||
zenoh::kedefine!( | ||
pub file_format: "user_id/${user_id:*}/file/${file:*/**}", | ||
|
@@ -26,8 +26,8 @@ fn main() { | |
let ke = zenoh::keformat!(formatter, user_id = 42, file).unwrap(); | ||
println!("{formatter:?} => {ke}"); | ||
// Parsing | ||
let settings_ke = keyexpr::new("user_id/30/settings/dark_mode").unwrap(); | ||
let settings_ke = zenoh::keyexpr::new("user_id/30/settings/dark_mode").unwrap(); | ||
let parsed = settings_format::parse(settings_ke).unwrap(); | ||
assert_eq!(parsed.user_id(), keyexpr::new("30").unwrap()); | ||
assert_eq!(parsed.setting(), keyexpr::new("dark_mode").ok()); | ||
assert_eq!(parsed.user_id(), zenoh::keyexpr::new("30").unwrap()); | ||
assert_eq!(parsed.setting(), zenoh::keyexpr::new("dark_mode").ok()); | ||
} |
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
use zenoh_ext::SubscriberForward; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,7 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::sync::*; | ||
use zenoh::publication::CongestionControl; | ||
use zenoh_examples::CommonArgs; | ||
|
||
fn main() { | ||
|
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,22 +12,13 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh::shm::protocol_implementations::posix::{ | ||
posix_shared_memory_provider_backend::PosixSharedMemoryProviderBackend, | ||
protocol_id::POSIX_PROTOCOL_ID, | ||
}; | ||
use zenoh::shm::provider::shared_memory_provider::SharedMemoryProviderBuilder; | ||
use zenoh::shm::provider::shared_memory_provider::{BlockOn, GarbageCollect}; | ||
use zenoh::shm::provider::types::AllocAlignment; | ||
use zenoh::shm::provider::types::MemoryLayout; | ||
use zenoh_examples::CommonArgs; | ||
|
||
const N: usize = 10; | ||
|
||
#[tokio::main] | ||
async fn main() -> Result<(), zenoh::Error> { | ||
async fn main() -> Result<(), ZError> { | ||
// Initiate logging | ||
zenoh_util::try_init_log_from_env(); | ||
|
||
|
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,17 +12,7 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::buffers::ZSlice; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh::publication::CongestionControl; | ||
use zenoh::shm::protocol_implementations::posix::{ | ||
posix_shared_memory_provider_backend::PosixSharedMemoryProviderBackend, | ||
protocol_id::POSIX_PROTOCOL_ID, | ||
}; | ||
use zenoh::shm::provider::shared_memory_provider::SharedMemoryProviderBuilder; | ||
use zenoh::shm::provider::types::AllocAlignment; | ||
use zenoh::shm::provider::types::MemoryLayout; | ||
use zenoh_examples::CommonArgs; | ||
|
||
#[tokio::main] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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,17 +11,15 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh::scouting::WhatAmI; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
// initiate logging | ||
zenoh_util::try_init_log_from_env(); | ||
|
||
println!("Scouting..."); | ||
let receiver = zenoh::scout(WhatAmI::Peer | WhatAmI::Router, Config::default()) | ||
let receiver = scout(WhatAmI::Peer | WhatAmI::Router, Config::default()) | ||
.res() | ||
.await | ||
.unwrap(); | ||
|
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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,7 +12,6 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
use clap::Parser; | ||
use zenoh::config::Config; | ||
use zenoh::prelude::r#async::*; | ||
use zenoh_examples::CommonArgs; | ||
|
||
|
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
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
Oops, something went wrong.