equal
deleted
inserted
replaced
141 s4o.print(s4o.indent_spaces); |
141 s4o.print(s4o.indent_spaces); |
142 s4o.print(SET_VAR); |
142 s4o.print(SET_VAR); |
143 s4o.print("("); |
143 s4o.print("("); |
144 print_step_argument(step_name, "X", true); |
144 print_step_argument(step_name, "X", true); |
145 s4o.print(",,1);\n" + s4o.indent_spaces); |
145 s4o.print(",,1);\n" + s4o.indent_spaces); |
146 print_step_argument(step_name, "elapsed_time"); |
146 print_step_argument(step_name, "T.value"); |
147 s4o.print(" = __time_to_timespec(1, 0, 0, 0, 0, 0);\n"); |
147 s4o.print(" = __time_to_timespec(1, 0, 0, 0, 0, 0);\n"); |
148 } |
148 } |
149 |
149 |
150 /*********************************************/ |
150 /*********************************************/ |
151 /* B.1.6 Sequential function chart elements */ |
151 /* B.1.6 Sequential function chart elements */ |
541 else if (strcmp(qualifier, "P1") == 0) { |
541 else if (strcmp(qualifier, "P1") == 0) { |
542 s4o.print("desactivated"); |
542 s4o.print("desactivated"); |
543 } |
543 } |
544 else if (strcmp(qualifier, "D") == 0 || strcmp(qualifier, "L") == 0) { |
544 else if (strcmp(qualifier, "D") == 0 || strcmp(qualifier, "L") == 0) { |
545 s4o.print("active && __time_cmp("); |
545 s4o.print("active && __time_cmp("); |
546 print_step_argument(current_step, "elapsed_time"); |
546 print_step_argument(current_step, "T.value"); |
547 s4o.print(", "); |
547 s4o.print(", "); |
548 symbol->action_time->accept(*this); |
548 symbol->action_time->accept(*this); |
549 if (strcmp(qualifier, "D") == 0) { |
549 if (strcmp(qualifier, "D") == 0) { |
550 s4o.print(") >= 0"); |
550 s4o.print(") >= 0"); |
551 } |
551 } |
751 s4o.indent_right(); |
751 s4o.indent_right(); |
752 s4o.print(s4o.indent_spaces); |
752 s4o.print(s4o.indent_spaces); |
753 print_variable_prefix(); |
753 print_variable_prefix(); |
754 // s4o.print("__step_list[i].elapsed_time = __time_add(__BOOL_LITERAL(TRUE), NULL, "); |
754 // s4o.print("__step_list[i].elapsed_time = __time_add(__BOOL_LITERAL(TRUE), NULL, "); |
755 // s4o.print("__step_list[i].elapsed_time = ADD_TIME(__BOOL_LITERAL(TRUE), NULL, "); |
755 // s4o.print("__step_list[i].elapsed_time = ADD_TIME(__BOOL_LITERAL(TRUE), NULL, "); |
756 s4o.print("__step_list[i].elapsed_time = __time_add("); |
756 s4o.print("__step_list[i].T.value = __time_add("); |
757 print_variable_prefix(); |
757 print_variable_prefix(); |
758 s4o.print("__step_list[i].elapsed_time, elapsed_time);\n"); |
758 s4o.print("__step_list[i].T.value, elapsed_time);\n"); |
759 s4o.indent_left(); |
759 s4o.indent_left(); |
760 s4o.print(s4o.indent_spaces + "}\n"); |
760 s4o.print(s4o.indent_spaces + "}\n"); |
761 s4o.indent_left(); |
761 s4o.indent_left(); |
762 s4o.print(s4o.indent_spaces + "}\n"); |
762 s4o.print(s4o.indent_spaces + "}\n"); |
763 |
763 |