How to use a macro defined in .h or .c file for SCADE imported node?
By default, the Simulator uses macro-instructions for SCADE imported node, which are provided by the Code Generator in the “macro_default.h” file. These macros are protected against redefinition by #ifndef and #endif directives. However, the user can provide his own macro definitions. Example: An imported node SQUARE has been created. The following code is generated in “macro_default.h”: #ifndef m_SQUARE extern void SQUARE(_int i1, _int * o1); #define m_SQUARE(i1,o1) ( SQUARE ( i1,&o1 ) ) #endif User definitions for theses macro-instructions can be also provided via user macro files. The Simulator build process generates a macro.h file which inludes first all macro user files of the model and its libraries and the macro_default.h file. So first of all the macro should be defined in an header file named for example “macro_user.h”. This file contains the user redefinition of the macro-instructions. Example: The user redefines the macro-instruction to provide his own definition: #define m