6. Plugin initialisation and activation

Now it's time to initialise the loaded plugin and activate it (for example several plugins could be loaded in the memory, one can be active).
We need to detect in runtime our current machine type by looking through the Cookie Jar) and send JAM_INIT command with the correct value from the following list (example machine detection is provided in article source code):

Jam Initialisation schemes list
//initScheme enum{ JAM_ST=0, JAM_STE=1, JAM_TT=2, JAM_MEGASTE=3, JAM_F030=4 } eJamInitScheme;


long val; //val is detected machine type from the above list void *ret=sendJamCmd((void *)0L,(void *)0L,JAM_INIT,val);


Now we have to activate the plugin.

Jam plugin activation
void *ret=sendJamCmd((void *)0L,(void *)0L,JAM_ACTIVATE,0);



page:5/8