1.2.2. Technology: ANSI-C and C++ΒΆ

All components are implemented in ANSI-C, because a C-Compiler is available for nearly all controllers, processors and operating-systems. So ANSI-C typically is the language to write own components. But you can write your own component in C++ with a C Interface.

But the architecture of CODESYS Control V3 has one additional big benefit: All components can alternatively be used with C++-Interfaces in object oriented environments! This is realized as a C++ wrapper around all components.

So it is on your choice to use the runtime system with C or with C++ interfaces. If you would like to write your own component in C++, the only thing you have to do is to compile the runtime system with the specific define CPLUSPLUS. After this you see around your component only C++ interfaces!

How this was realized in the component interface, this is explained in detail in Component Interface Architecture.