THE NATIVE MANAGED INTERFACE
The previous chapters focused on application determinism from the execution time perspective. Managed code development may seem inappropriate in the context of a deterministic system because the .Net Compact Framework implements intrusive asynchronous mechanisms at the runtime level such as garbage collection or boxing/unboxing. Managed code developers can use techniques to gain some control on the Compact Framework behavior, but this may reduce productivity, which is one of the main motivations for using managed code. A mix of managed and native code is a good approach to optimize time constraints and development cost, as well as performances. In such a heterogeneous architecture, you need to organize the communication between the two worlds and, as always in software, many options are available.
Typical Native Code Modules
Production of time deterministic code requires a specific knowledge, and the correct approach is native code because, as said in Chapter 36, “Introduction to Real-Time Applications,” it requires full control from hardware to application layers. Good-bye to managed code? No, because if you use a full-featured operating system such as Windows Embedded Compact 7 in your device, some parts of your software such as network exchange, database query, file system transactions or even user interface, may not be time deterministic. If you consider the example of a connected robot control system with a graphical user interface, the proportion ...
Get Professional Windows® Embedded Compact 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.