Skip to content

Commit

Permalink
iceoryx2
Browse files Browse the repository at this point in the history
  • Loading branch information
youngday committed Dec 9, 2024
1 parent fd57b36 commit d79e93a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/discovery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
7 changes: 3 additions & 4 deletions examples/discovery/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
use iceoryx2::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let services = zero_copy::Service::list()?;

for service in services {
ipc::Service::list(Config::global_config(), |service| {
println!("\n{:#?}", &service);
}
CallbackProgression::Continue
})?;

Ok(())
}

0 comments on commit d79e93a

Please sign in to comment.