aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c')
-rw-r--r--test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c
new file mode 100644
index 00000000..d1a01268
--- /dev/null
+++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c
@@ -0,0 +1,63 @@
+/* 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 <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#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;
+}