/* compile-definput NYI (definput light sensor_2) */ /* compile-definput NYI (definput bump sensor_1) */ /* compile-defoutput NYI (defoutput right out_a) */ /* compile-defoutput NYI (defoutput left out_a) */ /* compile-defconst NYI (defconst proportional_constant 6) */ /* compile-defconst NYI (defconst integral_constant 4) */ inst wire1 0 ; # define bar_module(in2_input) wire1 # define foo_module(out2_output) wire1 inst wire2 0 ; # define bar_module(in1_input) wire2 # define foo_module(out1_output) wire2 int bar_state ; task bar() { int biz_bar = 0 ; while (true) { /* Code for tracking suppresson intervals goes here. */ ; /* Code for implementing the state transition-function. */ if ( bar_state == 0 ) { if ( bar_module(in1_input) > bar_module(in2_input) ) bar_state = 1 ; else bar_state = 2 ; } else if ( bar_state == 1 ) { } else if ( bar_state == 2 ) { } else ; } } int foo_state ; task foo() { while (true) { /* Code for tracking suppresson intervals goes here. */ ; /* Code for implementing the state transition-function. */ if ( foo_state == 0 ) { if ( foo_module(in1_input) > foo_module(in2_input) ) foo_state = 1 ; else foo_state = 2 ; } else if ( foo_state == 1 ) { } else if ( foo_state == 2 ) { } else ; } } task main() { start bar ; start foo ; }