|
The C++ demonstration is based on the program 'tcdemo', written by Maurizio
Martignano at ESTEC to simulate a simple remote computer controlled by tele-commands
and returning telemetry data.
The data flow diagram, which is loosely based on MASCOT terminology, is shown
in Figure 1. This diagram shows instance of classes with active instances drawn
as circles, and passive instances drawn as a large letter "I".
 |
|
Figure 1:
Data-flow Diagram
|
The object 'buffer' is not active. It is a traditional cyclic buffer, and
ensures any producing and consuming threads get exclusive access to the buffer's
variables by means of a mutex. For the C++ version both the POSIX Threads mutex
type and the cond type are expressed as C++ classes. The bodies of the operation
are written in line so there is no code size or execution time overhead
associated with this extra layer of abstraction.
The output from the telemetry thread is shown in Figure 2.
 |
|
Figure 2: Output from the Telemetry Thread |
|