Suppose you need two modules, mod1 and mod2. You would then create two paramdef files, say paramdef.mod1 and paramdef.mod2. The Makefile can easily be set up to generate two code modules.
The following files would be generated:
mod1_tdrp.h mod1_tdrp.c mod2_tdrp.h mod2_tdrp.cEach module has its own user interface. Instead of using _tdrp_load_from_args(), you would declare the following variables:
mod1_tdrp_struct params1; mod2_tdrp_struct params2;Using _tdrp_load_from_args(), you would use the functions:
mod1_tdrp_load() mod2_tdrp_load()to load up the parameters for each module.
Since the load() functions operate at a lower level than _load_from_args(), you will need to write code to parse the command line and respond to any TDRP arguments.