Wednesday, May 27, 2009

Data structure

To prevent too large .c files in our software, we wanted to split in into subfiles. To achieve this, we named all the functions to their functionality. For example, the path_executer is named as motion_path_executer.c. To include all the files, the #include "motion_path_executer.c" command is used. Now, a main file can be used to call all the necessary .c files. Doing this, all the code is still orderly. Futher, all the defines are initialized in a "master_initialize.c" file. Here, all the defines of all the functions on the masterbrick are collected, to prevent double usage of defines.