Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Basic C modules



Basic C modules are the simplest way to interface the framework with C code. Note that contrary to C modules with interfacing configuration, using C modules this way is more invasive for the C library.

Declaration

These modules are declared by the top-level cModule element. For example:
      <cModule name="FlightManagementSystem">

C implementation

The cImplementation element declares the C dll which implements the module. For example:

      <cModule name="FlightManagementSystem">
         <cImplementation path="myCLib" />
      </cModule>
The path attribute refer to the name of the dll (without the ".dll" extension) which implements the module. The path of this file is by default relative to the application.xml file which declares the module.

C module implementation constraints

C modules can only process the following data types:
framework type C size Native C type
int 32-bit integer int
long 64-bit integer long long
short 16-bit integer short
byte 8-bit integer char
char 16/32-bit character wchar_t
boolean boolean value int
float 32-bit FP float
double 64-bit FP double
String C string char*

C implementation


The element referred by the path attribute is a dll, which is by default relative to the application.xml file which declares the module.

This module has no C dependencies to the framework, but some functions with specific signatures need to be declared in order for the module to work correctly.

Setting a Visual Studio project for the C module dll


See also


Categories: concepts | development

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence