MCA Logo
MCA Online Reference Documentation
Main Index

Chapter 3. Building MCA parts

Table of Contents
3.1. main programs in all environment
3.2. Write own main
3.2.1. initPartDescription
3.2.2. startup
3.3. Standard command line options
3.4. Connecting parts
3.5. Compiling
3.6. Testing

Writing programs in Linux or Windows environment is very similar, but parts in RT-Linux environment differ, as there is no main function. Instead init_module and cleanup_module have to be implemented. In order to simplify conversion (especially after testing in Linux with target envirmonment RT-Linux) a common way of writing main programs that create parts is provided.

3.1. main programs in all environment

An MCA main program has of course to include header files that define used Modules (normally only one, as there is only need for one main module or group). Additionally Main.h has to be included. There all necessary functions are implemented, which create a Part, do option parsing and also delete the part after execution ends.

In all environment the design of a main program is totally equal. Only entries in Makefile.input (Linux) or project files (MSVC) differ in order to build executables in different ways.