1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# Content Filtered Topic Example
This example extends the HelloWorld example to show how to use Content Filtered Topics.
It does so by including two different Filter Factories: on the one hand, the default SQL filter; on the other hand, a custom filter defined in the example.
## Execution instructions (Linux platform)
To launch this example, open three different terminals:
In the first one, launch the Subscriber using the default SQL filter:
```
./DDSContentFilteredTopicExample --subscriber
```
In the second one, launch the Subscriber using the custom filter:
```
./DDSContentFilteredTopicExample --subscriber -f custom
```
Finally, in the third terminal launch the Publisher:
```
./DDSContentFilteredTopicExample --publisher
```
The Subscriber with the default filter should received only the samples between indexes 5 and 9, while the Subscriber with the custom filter should received samples which index is lower than 3 or greater than 5.
In order to know further possible arguments please run:
```
./DDSContentFilteredTopicExample --help
```
|