Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1295 Update related icediscovery_in_c example acc…
Browse files Browse the repository at this point in the history
…ordingly

Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
  • Loading branch information
mossmaurice committed Mar 29, 2022
1 parent 20083c4 commit dca8c4d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions iceoryx_examples/icediscovery_in_c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ We can now call three different find service functions. Let's start with
<!--[geoffrey][iceoryx_examples/icediscovery_in_c/iox_c_find_service.c][find service and apply callable]-->
```c
iox_service_discovery_find_service_apply_callable(
serviceDiscovery, "Radar", "FrontLeft", "Image", printSearchResult, MessagingPattern_PUB_SUB);
serviceDiscovery, "Radar", "FrontLeft", "Objects", printSearchResult, MessagingPattern_PUB_SUB);
```
which searches for all `{Radar, FrontLeft, Image}` services offered by
which searches for all `{Radar, FrontLeft, Objects}` services offered by
publishers and applies the provided function `printSearchResult` on each of
them. The function must have the signature
`void(const iox_service_description_t)`. Here we pass a function that prints the
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_examples/icediscovery_in_c/iox_c_find_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ int main()

printf("\n=========================================\n");

printf("\nSearched for {'Radar', 'FrontLeft', 'Image'}. Found the following services:\n");
printf("\nSearched for {'Radar', 'FrontLeft', 'Objects'}. Found the following services:\n");
//! [find service and apply callable]
iox_service_discovery_find_service_apply_callable(
serviceDiscovery, "Radar", "FrontLeft", "Image", printSearchResult, MessagingPattern_PUB_SUB);
serviceDiscovery, "Radar", "FrontLeft", "Objects", printSearchResult, MessagingPattern_PUB_SUB);
//! [find service and apply callable]

printf("\nSearched for {'Radar', *, *}. Found the following services:\n");
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_examples/icediscovery_in_c/iox_c_offer_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ int main()
iox_pub_storage_t publisherStorage;
iox_pub_options_t options;
iox_pub_options_init(&options);
iox_pub_t radarLeft = iox_pub_init(&publisherStorage, "Radar", "FrontLeft", "Image", &options);
iox_pub_t radarRight = iox_pub_init(&publisherStorage, "Radar", "FrontRight", "Image", &options);
iox_pub_t radarLeft = iox_pub_init(&publisherStorage, "Radar", "FrontLeft", "Objects", &options);
iox_pub_t radarRight = iox_pub_init(&publisherStorage, "Radar", "FrontRight", "Objects", &options);
iox_pub_t lidarLeft = iox_pub_init(&publisherStorage, "Lidar", "FrontLeft", "Counter", &options);

iox_pub_storage_t cameraPublisherStorage[NUMBER_OF_CAMERA_PUBLISHERS];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_roudi_ready(self, proc_output):

def test_find_service(self, proc_output):
proc_output.assertWaitFor(
'Searched for {\'Radar\', \'FrontLeft\', \'Image\'}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Image',
'Searched for {\'Radar\', \'FrontLeft\', \'Objects\'}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Objects',
timeout=45, stream='stdout')
proc_output.assertWaitFor(
'Searched for {\'Radar\', *, *}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Image\n- Service: Radar, Instance: FrontRight, Event: Image',
Expand All @@ -87,7 +87,7 @@ def test_find_service(self, proc_output):
'Searched for {*, \'FrontLeft\', *}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Image\n- Service: Lidar, Instance: FrontLeft, Event: Counter\n- Service: Camera, Instance: FrontLeft, Event: Image\n- Service: Camera, Instance: FrontLeft, Event: Counter',
timeout=45, stream='stdout')
proc_output.assertWaitFor(
'Searched for {*, \'FrontRight\', \'Image\'}. Found the following services:\n- Service: Radar, Instance: FrontRight, Event: Image\n- Service: Camera, Instance: FrontRight, Event: Image',
'Searched for {*, \'FrontRight\', \'Image\'}. Found the following services:\n- Service: Camera, Instance: FrontRight, Event: Image',
timeout=45, stream='stdout')
proc_output.assertWaitFor(
'Searched for {\'Camera\', *, *}. Found the following services:\n- Service: Camera, Instance: FrontLeft, Event: Image\n- Service: Camera, Instance: FrontRight, Event: Counter\n- Service: Camera, Instance: FrontRight, Event: Image\n- Service: Camera, Instance: BackLeft, Event: Image\n- Service: Camera, Instance: FrontLeft, Event: Counter',
Expand All @@ -97,13 +97,13 @@ def test_find_service(self, proc_output):
timeout=45, stream='stdout')

proc_output.assertWaitFor(
'Searched for {\'Radar\', \'FrontLeft\', \'Image\'}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Image',
'Searched for {\'Radar\', \'FrontLeft\', \'Objects\'}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Objects',
timeout=45, stream='stdout')
proc_output.assertWaitFor(
'Searched for {\'Radar\', *, *}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Image\n- Service: Radar, Instance: FrontRight, Event: Image',
timeout=45, stream='stdout')
proc_output.assertWaitFor(
'Searched for {*, \'FrontLeft\', *}. Found the following services:\n- Service: Radar, Instance: FrontLeft, Event: Image\n- Service: Lidar, Instance: FrontLeft, Event: Counter',
'Searched for {*, \'FrontLeft\', *}. Found the following services:\n- Service: Lidar, Instance: FrontLeft, Event: Counter',
timeout=45, stream='stdout')
proc_output.assertWaitFor(
'Searched for {*, \'FrontRight\', \'Image\'}. Found the following services:\n- Service: Radar, Instance: FrontRight, Event: Image',
Expand Down

0 comments on commit dca8c4d

Please sign in to comment.