runtime/plc_common_main.c
changeset 57 3b53f9a509d9
parent 54 ff82e7088ec5
child 137 187a4e2412e5
equal deleted inserted replaced
56:b0555fa71812 57:3b53f9a509d9
    23  **/
    23  **/
    24  
    24  
    25 IEC_TIME __CURRENT_TIME;
    25 IEC_TIME __CURRENT_TIME;
    26 
    26 
    27 static int tick = 0;
    27 static int tick = 0;
       
    28 static int init_level=0;
    28 
    29 
    29 /*
    30 /*
    30  * Prototypes of funcions exported by plugins 
    31  * Prototypes of funcions exported by plugins 
    31  **/
    32  **/
    32 %(calls_prototypes)s
    33 %(calls_prototypes)s
    45 
    46 
    46 /*
    47 /*
    47  * Initialize variables according to PLC's defalut values,
    48  * Initialize variables according to PLC's defalut values,
    48  * and then init plugins with that values  
    49  * and then init plugins with that values  
    49  **/
    50  **/
    50 void __init()
    51 int __init(int argc,char **argv)
    51 {
    52 {
       
    53     int res;
    52     config_init__();
    54     config_init__();
    53     %(init_calls)s
    55     %(init_calls)s
       
    56     return 0;
    54 }
    57 }
    55 /*
    58 /*
    56  * Calls plugin cleanup proc.
    59  * Calls plugin cleanup proc.
    57  **/
    60  **/
    58 void __cleanup()
    61 void __cleanup()