Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

7.4.  Terminal Module Class Implementation

7.4.1. SystemC Processes
7.4.2. Signal and event handling

The implementation is a standard SystemC module communicating via the Rx buffer and Tx port. It has a SystemC method sensitive to writes to the Rx buffer and a SystemC thread listening to the xterm.

The setup of the pseudo-TTYs and the xterm in a separate process uses standard operating system functions, not described further here. The key factor is that the file descriptor for the pseudo-TTY to the xterm is set up to be asynchronous, with Linux signal SIGIO raised when input is available and handled by the ioHandler() function.

The terminal module class, TermSC implementation may be found in sys-models/simple-soc/TermSC.cpp in the distribution.

Embecosm divider strip