Inheritance diagram for csp::common::Id< DATA_TYPE >:
This process forever reads a value from its input channel, then writes it on its output channel.
It can be used for various purposes, including connecting two channels together. Be aware that two channels connected by an Id process is not semantically equivalent to a single channel, because the Id process inherently introduces buffering (the writer of the first channel can complete the communication without the reader of the second channel having done anything, because of the Id process in the middle). To avoid this behaviour, look at the ExtId process.
To use this process, you will need to include <cppcsp/common/basic.h>
Public Member Functions | |
Id (const Chanin< DATA_TYPE > &_in, const Chanout< DATA_TYPE > &_out) | |
Constructs the Id process. | |
Protected Member Functions | |
void | run () |
You must implement this function to provide the code for your process. |
csp::common::Id< DATA_TYPE >::Id | ( | const Chanin< DATA_TYPE > & | _in, | |
const Chanout< DATA_TYPE > & | _out | |||
) | [inline] |
void csp::common::Id< DATA_TYPE >::run | ( | ) | [inline, protected, virtual] |
You must implement this function to provide the code for your process.
When the run method finishes, the process will terminate.
You should not let an uncaught exception cause the end of this function. If it derives from std::exception, it will be caught (although this behaviour should not be relied upon) but otherwise undefined behaviour will result.
Implements csp::ThreadCSProcess.