Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iox-#743 Fix spelling mistakes in docu, adjust waitset examples #849

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/website/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The `CMakeLists.txt` from `iceoryx_meta` can be used to easily develop iceoryx w
```

!!! tip
To build all iceoryx components add `-DBUILD_ALL` to the CMake command. For Windows it is currently recommended to use the `cmake -Bbuild -Hiceoryx_meta -DBUILD_TEST=ON -DINTROSPECTION=OFF -DBINDING_C=ON -DEXAMPLES=ON` instead
To build all iceoryx components add `-DBUILD_ALL=ON` to the CMake command. For Windows it is currently recommended to use the `cmake -Bbuild -Hiceoryx_meta -DBUILD_TEST=ON -DINTROSPECTION=OFF -DBINDING_C=ON -DEXAMPLES=ON` instead

3. Compile the source code

Expand Down
10 changes: 5 additions & 5 deletions iceoryx_examples/waitset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ target_link_libraries(iox-cpp-waitset-individual
)
target_compile_options(iox-cpp-waitset-individual PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})

add_executable(iox-cpp-waitset-sync ./ice_waitset_sync.cpp)
target_link_libraries(iox-cpp-waitset-sync
add_executable(iox-cpp-waitset-timer-driven-execution ./ice_waitset_timer_driven_execution.cpp)
target_link_libraries(iox-cpp-waitset-timer-driven-execution
iceoryx_posh::iceoryx_posh
)
target_compile_options(iox-cpp-waitset-sync PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})
target_compile_options(iox-cpp-waitset-timer-driven-execution PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})

add_executable(iox-cpp-waitset-trigger ./ice_waitset_trigger.cpp)
target_link_libraries(iox-cpp-waitset-trigger
Expand All @@ -69,7 +69,7 @@ target_compile_options(iox-cpp-waitset-basic PRIVATE ${ICEORYX_WARNINGS} ${ICEOR
set_target_properties(
iox-cpp-waitset-basic
iox-cpp-waitset-trigger
iox-cpp-waitset-sync
iox-cpp-waitset-timer-driven-execution
iox-cpp-waitset-individual
iox-cpp-waitset-grouping
iox-cpp-waitset-gateway
Expand All @@ -81,6 +81,6 @@ set_target_properties(
)

install(
TARGETS iox-cpp-waitset-publisher iox-cpp-waitset-gateway iox-cpp-waitset-grouping iox-cpp-waitset-individual iox-cpp-waitset-sync iox-cpp-waitset-trigger
TARGETS iox-cpp-waitset-publisher iox-cpp-waitset-gateway iox-cpp-waitset-grouping iox-cpp-waitset-individual iox-cpp-waitset-timer-driven-execution iox-cpp-waitset-trigger
RUNTIME DESTINATION bin
)
12 changes: 6 additions & 6 deletions iceoryx_examples/waitset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ samples present in the subscriber.

## Expected Output

[![asciicast](https://asciinema.org/a/407372.svg)](https://asciinema.org/a/407372)
[![asciicast](https://asciinema.org/a/RmfrWRQIULiFGt7dC8PamKGeK.svg)](https://asciinema.org/a/RmfrWRQIULiFGt7dC8PamKGeK)

## Glossary

Expand Down Expand Up @@ -101,7 +101,7 @@ about the occurrence of an **Event**. When returning from `WaitSet::wait()` the
associated with **Events** which had occurred and **States** which persists. The **NotificationOrigin**, **NotificationId** and **NotificationCallback**
are stored inside of the **NotificationInfo** and can be acquired by the user.

!!! attention
!!! warning
Please be aware of the thread-safety restrictions of the _WaitSet_ and
read the [Thread Safety](#thread-safety) chapter carefully.

Expand Down Expand Up @@ -136,7 +136,7 @@ This example consists of 6 use cases.
4. `ice_waitset_individual`: A list of subscribers where every subscriber is
handled differently.

5. `ice_waitset_sync`: We use the WaitSet to trigger a cyclic call which should
5. `ice_waitset_timer_driven_execution`: We use the WaitSet to trigger a cyclic call which should
execute an algorithm every 100ms.

6. `ice_waitset_trigger`: We create our own class which can be attached to a
Expand Down Expand Up @@ -231,8 +231,8 @@ as long as there are samples in the subscriber since we attached an event that n
us only once. But it is impossible to miss samples since the notification is reset
right after `wait` or `timedWait` is returned - this means if a sample arrives after
those calls we will be notified again.
Additionally, we would like to count the sum of all processed samples therefor we
add a second argument called `sumOfAllSamples`, the user defined context data.
Additionally, since we would like to count the sum of all processed samples, we
add a second argument called `sumOfAllSamples` to the user defined context data.

```cpp
void subscriberCallback(iox::popo::UntypedSubscriber* const subscriber, uint64_t* const sumOfAllSamples)
Expand Down Expand Up @@ -507,7 +507,7 @@ corresponding subscriber. If so, we act.
}
```

### Sync
### Timer Driven Execution

Let's say we have `SomeClass` and would like to execute a cyclic static method `cyclicRun`
every second. We could execute any arbitrary algorithm in there
Expand Down
12 changes: 6 additions & 6 deletions iceoryx_examples/waitset_in_c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ target_link_libraries(iox-c-waitset-individual
)
target_compile_options(iox-c-waitset-individual PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})

add_executable(iox-c-waitset-sync ./ice_c_waitset_sync.c)
target_link_libraries(iox-c-waitset-sync
add_executable(iox-c-waitset-timer-driven-execution ./ice_c_waitset_timer_driven_execution.c)
target_link_libraries(iox-c-waitset-timer-driven-execution
iceoryx_binding_c::iceoryx_binding_c
)
target_compile_options(iox-c-waitset-sync PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})
target_compile_options(iox-c-waitset-timer-driven-execution PRIVATE ${ICEORYX_WARNINGS} ${ICEORYX_SANITIZER_FLAGS})

set_source_files_properties(
./ice_c_waitset_sync.c
./ice_c_waitset_timer_driven_execution.c
./ice_c_waitset_individual.c
./ice_c_waitset_grouping.c
./ice_c_waitset_gateway.c
Expand All @@ -71,7 +71,7 @@ set_source_files_properties(
)

set_target_properties(
iox-c-waitset-sync
iox-c-waitset-timer-driven-execution
iox-c-waitset-individual
iox-c-waitset-grouping
iox-c-waitset-gateway
Expand All @@ -81,6 +81,6 @@ set_target_properties(
)

install(
TARGETS iox-c-waitset-publisher iox-c-waitset-gateway iox-c-waitset-grouping iox-c-waitset-individual iox-c-waitset-sync
TARGETS iox-c-waitset-publisher iox-c-waitset-gateway iox-c-waitset-grouping iox-c-waitset-individual iox-c-waitset-timer-driven-execution
RUNTIME DESTINATION bin
)
8 changes: 4 additions & 4 deletions iceoryx_examples/waitset_in_c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ The examples are structured in the same way as the C++ ones.

## Expected Output

[![asciicast](https://asciinema.org/a/407431.svg)](https://asciinema.org/a/407431)
[![asciicast](https://asciinema.org/a/VX5S5jP6DAzAi4YID1GuJqfjW.svg)](https://asciinema.org/a/VX5S5jP6DAzAi4YID1GuJqfjW)

## Code Walkthrough

!!! attention
!!! warning
Please be aware of the thread-safety restrictions of the _WaitSet_ and
read the [Thread Safety](#thread-safety) chapter carefully.

Expand Down Expand Up @@ -400,7 +400,7 @@ iox_ws_deinit(waitSet);
iox_user_trigger_deinit(shutdownTrigger);
```

### Sync
### Timer Driven Execution
In this example, we demonstrate how you can use the WaitSet to trigger a cyclic
call every second. We use a user trigger which will be triggered in a separate
thread every second to signal the WaitSet that it's time for the next run.
Expand All @@ -410,7 +410,7 @@ so that the event can directly call the cyclic call.
We begin by creating the waitset and attach the `shutdownTrigger`.

```c
iox_runtime_init("iox-c-waitset-sync");
iox_runtime_init("iox-c-waitset-timer-driven-execution");

iox_ws_storage_t waitSetStorage;
iox_ws_t waitSet = iox_ws_init(&waitSetStorage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def generate_test_description():
colcon_prefix_path = os.environ.get('COLCON_PREFIX_PATH', '')
executable_list = ['iox-cpp-waitset-publisher', 'iox-cpp-waitset-gateway',
'iox-cpp-waitset-grouping', 'iox-cpp-waitset-individual',
'iox-cpp-waitset-sync', 'iox-cpp-waitset-trigger']
'iox-cpp-waitset-timer-driven-execution', 'iox-cpp-waitset-trigger']
process_list = []

for exec in executable_list:
Expand Down Expand Up @@ -71,7 +71,7 @@ def generate_test_description():
launch_testing.actions.ReadyToTest()
]), {'iox-cpp-waitset-publisher': process_list[0], 'iox-cpp-waitset-gateway': process_list[1],
'iox-cpp-waitset-grouping': process_list[2], 'iox-cpp-waitset-individual': process_list[3],
'iox-cpp-waitset-sync': process_list[4], 'roudi_process': roudi_process}
'iox-cpp-waitset-timer-driven-execution': process_list[4], 'roudi_process': roudi_process}


class TestWaitSetExample(unittest.TestCase):
Expand All @@ -95,7 +95,7 @@ def test_waitset_individual(self, proc_output):
proc_output.assertWaitFor(
'subscriber 1 received: 10', timeout=45, stream='stdout')

def test_waitset_sync(self, proc_output):
def test_waitset_timer_driven_execution(self, proc_output):
proc_output.assertWaitFor(
'activation callback', timeout=45, stream='stdout')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def generate_test_description():
colcon_prefix_path = os.environ.get('COLCON_PREFIX_PATH', '')
executable_list = ['iox-c-waitset-publisher', 'iox-c-waitset-gateway',
'iox-c-waitset-grouping', 'iox-c-waitset-individual',
'iox-c-waitset-sync']
'iox-c-waitset-timer-driven-execution']
process_list = []

for exec in executable_list:
Expand Down Expand Up @@ -69,7 +69,7 @@ def generate_test_description():
process_list[4],
roudi_process,
launch_testing.actions.ReadyToTest()
]), {'iox-c-waitset-sync': process_list[4], 'iox-c-waitset-gateway': process_list[1],
]), {'iox-c-waitset-timer-driven-execution': process_list[4], 'iox-c-waitset-gateway': process_list[1],
'iox-c-waitset-grouping': process_list[2], 'iox-c-waitset-individual': process_list[3],
'iox-c-waitset-publisher': process_list[0], 'roudi_process': roudi_process}

Expand All @@ -95,7 +95,7 @@ def test_waitset_in_c_individual(self, proc_output):
proc_output.assertWaitFor(
'subscriber 1 received: 10', timeout=45, stream='stdout')

def test_waitset__in_c_sync(self, proc_output):
def test_waitset__in_c_timer_driven_execution(self, proc_output):
proc_output.assertWaitFor(
'activation callback', timeout=45, stream='stdout')

Expand Down