From d79e93a3147bc0026d1942e58e9eb1c1ef0852c8 Mon Sep 17 00:00:00 2001 From: youngday Date: Mon, 9 Dec 2024 23:29:43 +0800 Subject: [PATCH] iceoryx2 --- examples/discovery/README.md | 8 ++++---- examples/discovery/discovery.rs | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/examples/discovery/README.md b/examples/discovery/README.md index d80d5d4..a693638 100644 --- a/examples/discovery/README.md +++ b/examples/discovery/README.md @@ -2,7 +2,7 @@ ## Running The Example -This example demonstrates how to list all active services within your Iceoryx2 +This example demonstrates how to list all active services within your iceoryx2 application. To get the most out of this example, you can combine it with other examples, such as the [event example](../event/) or the [publish-subscribe example](../publish_subscribe/), to see active services in @@ -11,13 +11,13 @@ action. To begin, let's start some interesting services. Open two terminals and execute the following commands: -**Terminal 1** +### Terminal 1 ```sh cargo run --example event_listener ``` -**Terminal 2** +### Terminal 2 ```sh cargo run --example publish_subscribe_subscriber @@ -31,4 +31,4 @@ cargo run --example discovery This will display the static service details of both the event and the publish-subscribe service, giving you a comprehensive view of the active -services in your Iceoryx2 application. +services in your iceoryx2 application. diff --git a/examples/discovery/discovery.rs b/examples/discovery/discovery.rs index 95cfc00..1da072a 100644 --- a/examples/discovery/discovery.rs +++ b/examples/discovery/discovery.rs @@ -13,11 +13,10 @@ use iceoryx2::prelude::*; fn main() -> Result<(), Box> { - let services = zero_copy::Service::list()?; - - for service in services { + ipc::Service::list(Config::global_config(), |service| { println!("\n{:#?}", &service); - } + CallbackProgression::Continue + })?; Ok(()) }