Training
×

C Runtime Functions

A real time thread executes in a different environment from ordinary Windows threads, so it cannot use the WIN32 API. Instead, there is a real time API (we will see most of its functions in this and following chapters) and the standard C runtime library can be used:
  • printf, scanf and the like; these are useful for debugging but are not recommended for implementing a user interface: the functions require a switch to Windows and only a text interface can be built.
  • open, read, write, close, etc.; these provide non-deterministic access to the Windows file system or to the local file system (for a D-RTOS INtime node). File name conventions are as in Windows; the local file system on a D-RTOS node is accessed when the file name does not start with <drive-letter>: or \\nodename
  • accept, connect, listen, recv, etc.; on a D-RTOS node with a network adapter or a local INtime node where INtime controls its own network adapter, these calls allow the exchange of TCP/IP messages with other nodes (including but not limited to INtime nodes). In general, such network communication is not deterministic.
  • Event logging
  • In Windows, look for INtime in the “Application and Serviced Logs” using the Event Viewer.
  • In INtime, select “Syslog” in the web administration interface or use ftp and open file “/config/<NodeName>/syslog.log”