1 /* |
1 /** |
2 * Prototypes for function provided by arch-specific code (main) |
2 * Code common to all C targets |
3 * concatained after this template |
3 **/ |
4 ** / |
|
5 |
4 |
|
5 #include "iec_types.h" |
6 |
6 |
7 /* |
7 /* |
8 * Functions and variables provied by generated C softPLC |
8 * Prototypes of functions provied by generated C softPLC |
9 **/ |
|
10 extern int common_ticktime__; |
|
11 |
|
12 /* |
|
13 * Functions and variables provied by plc.c |
|
14 **/ |
|
15 void run(long int tv_sec, long int tv_nsec); |
|
16 |
|
17 #define maxval(a,b) ((a>b)?a:b) |
|
18 |
|
19 #include "iec_types.h" |
|
20 /*#include "stdio.h" /* For debug */ |
|
21 |
|
22 /* |
|
23 * Functions and variables provied by generated C softPLC |
|
24 **/ |
9 **/ |
25 void config_run__(int tick); |
10 void config_run__(int tick); |
26 void config_init__(void); |
11 void config_init__(void); |
|
12 |
|
13 /* |
|
14 * Prototypes of functions provied by generated target C code |
|
15 * */ |
27 void __init_debug(void); |
16 void __init_debug(void); |
28 void __cleanup_debug(void); |
17 void __cleanup_debug(void); |
|
18 /*void __retrieve_debug(void);*/ |
|
19 void __publish_debug(void); |
29 |
20 |
|
21 void __init_python(void); |
|
22 void __cleanup_python(void); |
|
23 void __retrieve_python(void); |
|
24 void __publish_python(void); |
30 |
25 |
31 /* |
26 /* |
32 * Functions and variables to export to generated C softPLC and plugins |
27 * Variables used by generated C softPLC and plugins |
33 **/ |
28 **/ |
34 |
|
35 IEC_TIME __CURRENT_TIME; |
29 IEC_TIME __CURRENT_TIME; |
36 IEC_BOOL __DEBUG; |
|
37 int __tick = -1; |
30 int __tick = -1; |
38 |
31 |
|
32 /* Help to quit cleanly when init fail at a certain level */ |
39 static int init_level = 0; |
33 static int init_level = 0; |
40 |
34 |
41 /* |
35 /* |
42 * Prototypes of functions exported by plugins |
36 * Prototypes of functions exported by plugins |
43 **/ |
37 **/ |