/* This file was generated by lv6 version master.737 (2727a7744111c84f7984634d2bd3ad6f7c6c7ff9). */ /* lv6 -en -2cgc heater_control.lus -n heater_control */ /* on vanoise the 15/05/2019 at 13:20:10 */ #include #include #include #include "../dm_random.c" #include "../clock.h" #include "heater_control_heater_control.h" /* MACROS DEFINITIONS ****************/ #ifndef TT #define TT "1" #endif #ifndef FF #define FF "0" #endif #ifndef BB #define BB "bottom" #endif #ifdef CKCHECK /* set this macro for testing output clocks */ #endif /* Standard Input procedures **************/ _real _get_real(char* n){ return (dm_random_uint32()%70000U) * 1E-3 -20.0; } /* Standard Output procedures **************/ void _put_bool(char* n, _boolean b){ printf("%s: %d\n", n, b); } /* Main procedure *************************/ int main(){ _real T; _real T1; _real T2; _real T3; _boolean Heat_on; heater_control_heater_control_ctx_type ctx_struct; heater_control_heater_control_ctx_type* ctx = &ctx_struct; clock_prepare(); clock_start(); heater_control_heater_control_ctx_init(ctx); /* Main loop */ for(int step=0; step<1000; step++){ T = _get_real("T"); T1 = _get_real("T1"); T2 = _get_real("T2"); T3 = _get_real("T3"); heater_control_heater_control_step(T,T1,T2,T3,&Heat_on,ctx); // _put_bool("Heat_on", Heat_on); } clock_stop(); print_total_clock(); return 1; }