|
The RTX application programming interface (API) is based on the Win32 API. This allows developers to draw upon their Win32 experience, code base, and development tools, and thus expedites hard real-time application development. Both Win32 and RTSS processes support the full RTX API, however, with different response times and performance characteristics — allowing developers to effortlessly share or move code between environments.
This topic discusses:
RTX supports a subset of Win32 API functions, plus it provides a special set of real-time functions, known as RTAPI (Real-Time API). RTAPI functions are identified by an "Rt" prefix in their names. Some RTAPI functions are semantically identical to their Win32 counterparts, while others are unique to RTX (that is, there are no similar Win32 calls). For example, RTAPI IPC functions differ from Win32 IPC functions only in the IPC name space in which they operate and in the determinism possible with real-time IPC objects. On the other hand, the Win32 API does not include any functions related to interrupt management; therefore, unique interrupt management functions are defined in RTAPI.
The RTX API was carefully selected to promote efficient development of real-time application components. RTX intentionally does not include Win32 functions, such as the GUI-related calls, that are normally used by the less time-critical components of an application. In fact, Win32 functions that are not essential to real-time programming, and impractical to implement with deterministic behavior, are not included in the RTX API. It is expected that most applications will consist of at least two processes working together — one Win32-based process (to take advantage of GUI and other Win32-only functions) and an RTSS-based process to perform time-critical processing.
RTX provides three types of executable images: RTSS processes, RTSS DLLs, and RTDLLs. RTSS processes are the real-time equivalents of Win32 processes. RTSS DLLs are RTSS processes that have been linked to provide an export library that other RTSS processes can use to call functions within an RTSS DLL. RTSS DLLs are full RTSS processes and must be launched manually prior to their use by RTSS processes. RTDLLs are passive code containers loaded by RTSS processes, similar in functionality to Windows DLLs. For details about how to choose, design, and build appropriate combinations of these types of images, see the RTX Application Development Guide.
RTX also supports various runtime libraries, and provides 'C' runtime libraries based on Microsoft's C. Runtime libraries, for all supported version of Visual Studio. RTSS processes can be statically linked to include these libraries, provided they do not attempt to link to unsupported Win32 functions. RTSS processes can also be linked against specialized versions of dynamic link libraries (DLLs), which can be used to modularize real-time application code or provide run-time customization of real-time software environments.
RTX supports Unicode applications. An RTSS process can use the wmain() function and accept wide character input arguments. Support for the WCS family of functions is included as part of the RTX-supported C Run-time libraries.