Transitions Between Different Timedomains
In the EEROS library you will find a directory with examples. For this example see TransitionBlockTest.cpp.
Open a shell in the build directory of your EEROS library and run
$ sudo ./examples/block/transitionBlockTest
You have to run a program using real time threads with root privileges.
The example demonstrates the use of two different transition blocks. The systems runs two timedomains, one with 5s, the second with 50ms. The first transition block works as interpolator with a ratio of 100. The second transition transfer the same signal from the fast timedomain back to the slow timedomain and has a ratio of 0.01.
As can be seen in the timing diagram below, the first transition block continuously interpolates between two consecutive input sampling points while the second transition block simple holds its signal (filtering). The second block uses another signal - here simply the output of the constant block. The timestamp of this signal indicates which sampling point must be sampled and hold during the next period.
You could change the behavior of the first block to not interpolating by setting its parameter
true. Similarly, you could omit the selection of the timestamp for the second transition block by setting its parameter
steady to ''true'. For further explanation see Transition.