How to create a new Module
The step of creating a new module is quite simple and fast. Just do the following steps (you need an installed HART-toolbox!):
- start scilab
- start the HART-Toolbox
- run the module_creator function of the HART-Toolbox
hart_module_creator('your module name')
- Normally you need src, macros and help.
- select demos, if you want to generate demos for your module
- select test, if you want to generate test files for your module
- Press OK
Configure the new Module
- Now you can put your computational functions to ../src/c
- If you want to use the codegeneration for RTAI, then you can put files to ../src/c_RTAI
- Generate interface functions for your scicos blocks and put them to ../macros
- Generate help files and put them to ../help/en_US (scilab5) or ../help/en_US_scilab4 (scilab4)
- Configure the configure.sce file.
- Rebuild the HART-Toolbox!
The configure.sce script
- In the build process of the HART-Toolbox, the configure.sce script of each module will started.
- This script is importend for the correct building and embedding of the c/c++ - code from each module
- You can decide if the module should be build or not by setting the variable buildable to 'no' or to 'yes'.
- Add all names of each computational function to names variable:
- Add all C/C++ files that should be compiled. (Replace the ending by .o)
- If any external library is needed for compilation add this to ldflags
- If spezial flags or include directories are needed, add them to cflags
buildable='yes'; //change to no, if the module should not be build
ldflags = " -lspezial_lib";
cflags = " -I/special/include -DFLAG_HALLO=1";