As more features get moved into modules, inter-module connections imho becomes more important as for example ettr using dual_iso's calls with "extern WEAK_FUNC(ret_0) ...". But what if I want to do these things w/o touching the other module:
1. detect if a module is loaded at all?
2. get or set other module's config vars?
Are there existing code samples anywhere? If not, it'd be great if there would be a core framework for these, for example module_check_enabled("ettr") and module_set/get_config("ettr", "auto_ettr", "0").
nothing implemented like that yet.
feel free to implement it ;)
Hm good idea.
Sent from my Nexus 7
Quote from: g3gg0 on September 26, 2013, 11:58:11 PM
feel free to implement it ;)
No way - I tried to pull in "extern module_entry_t module_list" and search through it, but my C coding simply isn't up to the task so one of the devs will have to do it ...
... imho with more modules even now in the pull queue, this is necessary, and btw alex mentioned he's working on something like this when I asked about how to detect and disable ettr from my module.
should be really easy:
int is_module_enabled(char* name)
{
for(int i = 0; i < MODULE_COUNT_MAX; i++)
{
if(streq(name, module_list[i]->name))
return module_list[i]->enabled;
}
return 0;
}