stage4/generate_cc/generate_cc_sfc.cc
changeset 21 ae19aa4ff2d9
parent 19 cee3c4e5afe2
child 22 08bcc40be1fa
equal deleted inserted replaced
20:81a06a308b7e 21:ae19aa4ff2d9
   100     }
   100     }
   101 
   101 
   102     void print_reset_step(symbol_c *step_name) {
   102     void print_reset_step(symbol_c *step_name) {
   103       s4o.print(s4o.indent_spaces);
   103       s4o.print(s4o.indent_spaces);
   104       print_step_argument(step_name, "state");
   104       print_step_argument(step_name, "state");
   105       s4o.print(" = 0;\n" + s4o.indent_spaces);
   105       s4o.print(" = 0;\n");
   106       print_step_argument(step_name, "elapsed_time");
       
   107       s4o.print(" = __time_to_timespec(1, 0, 0, 0, 0, 0);\n");
       
   108     }
   106     }
   109 
   107 
   110 /*********************************************/
   108 /*********************************************/
   111 /* B.1.6  Sequential function chart elements */
   109 /* B.1.6  Sequential function chart elements */
   112 /*********************************************/
   110 /*********************************************/
   188     }
   186     }
   189 
   187 
   190     void print_set_step(symbol_c *step_name) {
   188     void print_set_step(symbol_c *step_name) {
   191       s4o.print(s4o.indent_spaces);
   189       s4o.print(s4o.indent_spaces);
   192       print_step_argument(step_name, "state");
   190       print_step_argument(step_name, "state");
   193       s4o.print(" = 1;\n");
   191       s4o.print(" = 1;\n" + s4o.indent_spaces);
       
   192       print_step_argument(step_name, "elapsed_time");
       
   193       s4o.print(" = __time_to_timespec(1, 0, 0, 0, 0, 0);\n");
   194     }
   194     }
   195 
   195 
   196 /*********************************************/
   196 /*********************************************/
   197 /* B.1.6  Sequential function chart elements */
   197 /* B.1.6  Sequential function chart elements */
   198 /*********************************************/
   198 /*********************************************/
   286     }
   286     }
   287 
   287 
   288     void print_reset_step(symbol_c *step_name) {
   288     void print_reset_step(symbol_c *step_name) {
   289       s4o.print(s4o.indent_spaces);
   289       s4o.print(s4o.indent_spaces);
   290       print_step_argument(step_name, "state");
   290       print_step_argument(step_name, "state");
   291       s4o.print(" = 0;\n" + s4o.indent_spaces);
   291       s4o.print(" = 0;\n");
   292       print_step_argument(step_name, "elapsed_time");
       
   293       s4o.print(" = __time_to_timespec(1, 0, 0, 0, 0, 0);\n");
       
   294     }
   292     }
   295 
   293 
   296 /*********************************************/
   294 /*********************************************/
   297 /* B.1.6  Sequential function chart elements */
   295 /* B.1.6  Sequential function chart elements */
   298 /*********************************************/
   296 /*********************************************/