commit | author | age
|
eb7d7e
|
1 |
#include "plugins.h" |
SP |
2 |
#include <stdlib.h> |
|
3 |
#include "general.h" |
|
4 |
char plugin_name[] = "First plugin"; |
|
5 |
char plugin_description[]= "Plugin that shows how plugin should be made"; |
|
6 |
char plugin_author[] = "SAMO PENIC"; |
|
7 |
|
|
8 |
ts_plugin_details *init (){ |
51b4f0
|
9 |
// ts_fprintf(stdout,"Hello. Plugin %s is initiating. This will load the details section of the plugin\n", plugin_name); |
eb7d7e
|
10 |
|
SP |
11 |
ts_plugin_details *details=(ts_plugin_details *)calloc(1,sizeof(ts_plugin_details)); |
|
12 |
details->name = plugin_name; |
|
13 |
return details; |
|
14 |
} |
|
15 |
|
51b4f0
|
16 |
|
SP |
17 |
void at_start(int argc, char **argv){ |
|
18 |
ts_fprintf(stdout, "This will be run at the start of the program\n"); |
|
19 |
ts_fprintf(stdout, "This plugin doesn't do anything useful :/. at_start function will be modified in the future!\n"); |
|
20 |
} |
|
21 |
|
|
22 |
|
|
23 |
void *after_vesicle_init(ts_vesicle *vesicle){ |
|
24 |
ts_fprintf(stdout, "This function can modify vesicle before the start of the simulation. It has to return pointer to vesicle!!!\n"); |
|
25 |
return vesicle; |
|
26 |
} |
|
27 |
|
|
28 |
ts_bool vm_hard_constraint(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *ovtx){ |
|
29 |
return TS_SUCCESS; |
|
30 |
} |
|
31 |
|
eb7d7e
|
32 |
void cleanup(){ |
SP |
33 |
ts_fprintf(stdout,"Goodbye from plugin %s. This functions clears what would be created in init...\n",plugin_name); |
|
34 |
} |