INtime SDK Help
Console I/O

INitme provides some basic console services to allow for simple text I/O to and from a real-time application.

Console modes

The console may be configured programatically for raw or buffered input, and to echo all input keystrokes or not. The default condition is to buffer all input and to echo it. These attributes may be read or set using the calls GetRtConsoleAttributes and SetRtConsoleAttributes

INtime for Windows creates a console window for each process when an I/O request is made of the console. The title bar is annotated with text to identify the node and process handle of the process which created the window. When the process exits or the console is explicitly closed by a call to CloseRtConsole, by default the title bar text has the message "Finished" appended to it, but the console windows remains open. A global option allows for console windows to be closed on process exit.

INtime Distributed RTOS allows an application to write to the system console. In this case there is a single console device shared between all of the nodes on the host. The console may be configured to service only one node, or can agregate all of the output from all nodes to the same console. This may be configured by accessing the console menu (press ALT-TAB to bring this menu up) or programatically using the console API described below.

The C library and console I/O

The C library uses the console API by default to support standard I/O. By default an INtime application is configured so that the stdin stream reads from the console and stdout and stderr write to the console.

In addition, the conio.h calls getch, getche, kbhit and ungetch have been added to the C library.

Console system calls

To . . . Use this system call . . .
Open a console for the current process OpenRtConsole
Close the process console connection CloseRtConsole
Write characters to the console WriteRtConsole
Read characters from the console ReadRtConsole
Get the console current attributes GetRtConsoleAttributes
Set the console attributes SetRtConsoleAttributes
Set the console owner (INtime Distributed RTOS only) SetRtConsoleOwner