diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-03 08:17:40 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-03 08:17:40 +0100 |
commit | 1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68 (patch) | |
tree | 210ffc156c83f04fb0c61a40b4f9037d7ba8a7e1 /test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles | |
parent | 222c9047d61961db9c6b19fed5ca49829223fd33 (diff) | |
parent | 12be46d59a2483a10d77fa8ee67f7e0ca1bd702f (diff) | |
download | compcert-kvx-1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68.tar.gz compcert-kvx-1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68.zip |
Merge branch 'mppa-cse2' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-work
Diffstat (limited to 'test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles')
27 files changed, 2757 insertions, 0 deletions
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow.h new file mode 100644 index 00000000..357f91ee --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow.h @@ -0,0 +1,22 @@ +/* + + This program is part of the TACLeBench benchmark suite. + Version V 1.x + + Name: powerwindow.h + + Author: CoSys-Lab, University of Antwerp + + Function: headerfile + + Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow.h + + Changes: a brief summary of major functional changes and formatting) + + License: GNU General Public License + + */ + +#ifndef NULL +#define NULL ((viod *) 0) +#endif diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV.h new file mode 100644 index 00000000..3ad4ff6e --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV.h @@ -0,0 +1,139 @@ +/* + + This program is part of the TACLeBench benchmark suite. + Version V 1.x + + Name: powerwindow_PW_Control_DRV.h + + Author: CoSys-Lab, University of Antwerp + + Function: headerfile + + Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV.h + + Changes: a brief summary of major functional changes and formatting) + + License: GNU General Public License + + */ + +#ifndef powerwindow_RTW_HEADER_powerwindow_PW_Control_DRV_h_ +#define powerwindow_RTW_HEADER_powerwindow_PW_Control_DRV_h_ +#ifndef powerwindow_PW_Control_DRV_COMMON_INCLUDES_ +# define powerwindow_PW_Control_DRV_COMMON_INCLUDES_ +#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h" +#endif /* powerwindow_PW_Control_DRV_COMMON_INCLUDES_ */ + +#include "../powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_types.h" + +/* Shared type includes */ +#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h" + +/* Child system includes */ +#include "../powerwindow_HeaderFiles/powerwindow_powerwindow_control.h" +#include "../powerwindow_HeaderFiles/powerwindow_debounce.h" + +/* Macros for accessing real-time model data structure */ +#ifndef powerwindow_PW_DRV_rtmGetErrorStatus +# define powerwindow_PW_DRV_rtmGetErrorStatus(rtm) ((rtm)->errorStatus) +#endif + +#ifndef powerwindow_PW_DRV_rtmSetErrorStatus +# define powerwindow_PW_DRV_rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) +#endif + +#ifndef powerwindow_PW_DRV_rtmGetErrorStatusPointer +# define powerwindow_PW_DRV_rtmGetErrorStatusPointer(rtm) ((const powerwindow_char_T **)(&((rtm)->errorStatus))) +#endif + +/* Block states (auto storage) for system '<Root>' */ +typedef struct { + powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_DRV_DWORK1;/* '<S2>/Debounce_Up_DRV' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_DRV_DWORK1;/* '<S2>/Debounce_Down_DRV' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_PSG_BackL_DWORK1;/* '<S2>/Debounce_Up_PSG_BackL' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_PSG_BackL_DWORK1;/* '<S2>/Debounce_Down_PSG_BackL' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_PSG_Front_DWORK1;/* '<S2>/Debounce_Up_PSG_Front' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_PSG_Front_DWORK1;/* '<S2>/Debounce_Down_PSG_Front' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_PSG_BackR_DWORK1;/* '<S2>/Debounce_Up_PSG_BackR' */ + powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_PSG_BackR_DWORK1;/* '<S2>/Debounce_Down_PSG_BackR' */ + powerwindow_rtMdlrefDWork_PowerWindow_contr PW_DRV_DWORK1;/* '<S1>/PW_DRV' */ +} powerwindow_D_Work_powerwindow_PW_Control_D; + +/* External inputs (root inport signals with auto storage) */ +typedef struct { + powerwindow_boolean_T In1; /* '<Root>/In1' */ + powerwindow_boolean_T In2; /* '<Root>/In2' */ + powerwindow_uint8_T In3; /* '<Root>/In3' */ + powerwindow_boolean_T In4; /* '<Root>/In4' */ + powerwindow_boolean_T In5; /* '<Root>/In5' */ + powerwindow_boolean_T In6; /* '<Root>/In6' */ + powerwindow_boolean_T In7; /* '<Root>/In7' */ + powerwindow_boolean_T In8; /* '<Root>/In8' */ + powerwindow_boolean_T In9; /* '<Root>/In9' */ + powerwindow_boolean_T In10; /* '<Root>/In10' */ +} powerwindow_ExternalInputs_powerwindow_PW_C; + +/* External outputs (root outports fed by signals with auto storage) */ +typedef struct { + powerwindow_boolean_T Out1; /* '<Root>/Out1' */ + powerwindow_boolean_T Out2; /* '<Root>/Out2' */ + powerwindow_boolean_T Out3; /* '<Root>/Out3' */ + powerwindow_boolean_T Out4; /* '<Root>/Out4' */ + powerwindow_boolean_T Out5; /* '<Root>/Out5' */ + powerwindow_boolean_T Out6; /* '<Root>/Out6' */ + powerwindow_boolean_T Out7; /* '<Root>/Out7' */ + powerwindow_boolean_T Out8; /* '<Root>/Out8' */ + powerwindow_boolean_T Out9; /* '<Root>/Out9' */ + powerwindow_boolean_T Out10; /* '<Root>/Out10' */ + powerwindow_boolean_T Out11; /* '<Root>/Out11' */ +} powerwindow_ExternalOutputs_powerwindow_PW_; + +struct powerwindow_tag_RTM_PW_Control_DRV { + const powerwindow_char_T * volatile errorStatus; +}; + +/* Block states (auto storage) */ +extern powerwindow_D_Work_powerwindow_PW_Control_D powerwindow_PW_Control_DR_DWork; + +/* External inputs (root inport signals with auto storage) */ +extern powerwindow_ExternalInputs_powerwindow_PW_C powerwindow_PW_Control_DRV_U; + +/* External outputs (root outports fed by signals with auto storage) */ +extern powerwindow_ExternalOutputs_powerwindow_PW_ powerwindow_PW_Control_DRV_Y; + +/* Model entry point functions */ +extern void powerwindow_PW_Control_DRV_initialize(void); +extern void powerwindow_PW_Control_DRV_main(void); +extern void powerwindow_PW_Control_DRV_terminate(void); + +/* Real-time Model object */ +extern powerwindow_RT_MODEL_PW_Control_DRV *const powerwindow_PW_Control_DRV_M; + +/*- + * The generated code includes comments that allow you to trace directly + * back to the appropriate location in the model. The basic format + * is <system>/block_name, where system is the system number (uniquely + * assigned by Simulink) and block_name is the name of the block. + * + * Note that this particular code originates from a subsystem build, + * and has its own system numbers different from the parent model. + * Refer to the system hierarchy for this subsystem below, and use the + * MATLAB hilite_system command to trace the generated code back + * to the parent model. For example, + * + * hilite_system('PowerWindow/powerwindow_PW_Control_DRV') - opens subsystem PowerWindow/powerwindow_PW_Control_DRV + * hilite_system('PowerWindow/powerwindow_PW_Control_DRV/Kp') - opens and selects block Kp + * + * Here is the system hierarchy for this model + * + * '<Root>' : 'PowerWindow' + * '<S1>' : 'PowerWindow/powerwindow_PW_Control_DRV' + * '<S2>' : 'PowerWindow/powerwindow_PW_Control_DRV/Debounce_DRV' + */ +#endif /* RTW_HEADER_powerwindow_PW_Control_DRV_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_private.h new file mode 100644 index 00000000..07dc468b --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_private.h @@ -0,0 +1,30 @@ +/* + + This program is part of the TACLeBench benchmark suite. + Version V 1.x + + Name: powerwindow_PW_Control_DRV_private.h + + Author: CoSys-Lab, University of Antwerp + + Function: headerfile + + Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_private.h + + Changes: a brief summary of major functional changes and formatting) + + License: GNU General Public License + + */ + +#ifndef powerwindow_RTW_HEADER_powerwindow_PW_Control_DRV_private_h_ +#define powerwindow_RTW_HEADER_powerwindow_PW_Control_DRV_private_h_ +#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h" +#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h" +#endif /* RTW_HEADER_powerwindow_PW_Control_DRV_private_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_types.h new file mode 100644 index 00000000..3fa897ad --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_types.h @@ -0,0 +1,32 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_DRV_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_DRV_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_DRV_types_h_
+#define powerwindow_RTW_HEADER_PW_Control_DRV_types_h_
+
+/* Forward declaration for rtModel */
+typedef struct powerwindow_tag_RTM_PW_Control_DRV powerwindow_RT_MODEL_PW_Control_DRV;
+
+#endif /* RTW_HEADER_PW_Control_DRV_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL.h new file mode 100644 index 00000000..663edec5 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL.h @@ -0,0 +1,126 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_BackL.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_BackL_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_BackL_h_
+#ifndef powerwindow_PW_Control_PSG_BackL_COMMON_INCLUDES_
+# define powerwindow_PW_Control_PSG_BackL_COMMON_INCLUDES_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_rtw_solver.h"
+#endif /* powerwindow_PW_Control_PSG_BackL_COMMON_INCLUDES_*/
+
+#include "../powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_types.h"
+
+/* Shared type includes */
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* Child system includes */
+#include "../powerwindow_HeaderFiles/powerwindow_powerwindow_control.h"
+#include "../powerwindow_HeaderFiles/powerwindow_debounce.h"
+#include "../powerwindow_HeaderFiles/powerwindow_controlexclusion.h"
+
+/* Macros for accessing real-time model data structure */
+#ifndef powerwindow_PW_PSG_BackL_BackL_rtmGetErrorStatus
+# define powerwindow_PW_PSG_BackL_rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
+#endif
+
+#ifndef powerwindow_PW_PSG_BackL_rtmSetErrorStatus
+# define powerwindow_PW_PSG_BackL_rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
+#endif
+
+#ifndef powerwindow_PW_PSG_BackL_rtmGetErrorStatusPointer
+# define powerwindow_PW_PSG_BackL_rtmGetErrorStatusPointer(rtm) ((const powerwindow_char_T **)(&((rtm)->errorStatus)))
+#endif
+
+/* Block states (auto storage) for system '<Root>' */
+typedef struct {
+ powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_DWORK1;/* '<S2>/Debounce_Up' */
+ powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_DWORK1;/* '<S2>/Debounce_Down' */
+ powerwindow_rtMdlrefDWork_PowerWindow_contr PW_PSG_BackL_DWORK1;/* '<S1>/PW_PSG_BackL' */
+} powerwindow_D_Work_PW_Control_PSG_BackL;
+
+/* External inputs (root inport signals with auto storage) */
+typedef struct {
+ powerwindow_boolean_T Up_DRV; /* '<Root>/Up_DRV' */
+ powerwindow_boolean_T Down_DRV; /* '<Root>/Down_DRV' */
+ powerwindow_boolean_T endofdetectionrange; /* '<Root>/end of detection range' */
+ powerwindow_uint8_T currentsense; /* '<Root>/current sense' */
+ powerwindow_boolean_T Up_PSG_BackL; /* '<Root>/Up_PSG_BackL' */
+ powerwindow_boolean_T Down_PSG_BackL; /* '<Root>/Down_PSG_BackL' */
+} powerwindow_ExternalInputs_PW_Control_PSG_BackL;
+
+/* External outputs (root outports fed by signals with auto storage) */
+typedef struct {
+ powerwindow_boolean_T window_up; /* '<Root>/window_up' */
+ powerwindow_boolean_T window_down; /* '<Root>/window_down' */
+ powerwindow_boolean_T overcurrent; /* '<Root>/overcurrent' */
+ powerwindow_boolean_T pinch; /* '<Root>/pinch' */
+ powerwindow_boolean_T wake; /* '<Root>/wake' */
+} powerwindow_ExternalOutputs_PW_Control_PSG_BackL;
+
+/* Real-time Model Data Structure */
+struct powerwindow_tag_RTM_PW_Control_PSG_BackL {
+ const powerwindow_char_T * volatile errorStatus;
+};
+
+/* Block states (auto storage) */
+extern powerwindow_D_Work_PW_Control_PSG_BackL powerwindow_PW_Control_PSG_BackL_DWork;
+
+/* External inputs (root inport signals with auto storage) */
+extern powerwindow_ExternalInputs_PW_Control_PSG_BackL powerwindow_PW_Control_PSG_BackL_U;
+
+/* External outputs (root outports fed by signals with auto storage) */
+extern powerwindow_ExternalOutputs_PW_Control_PSG_BackL powerwindow_PW_Control_PSG_BackL_Y;
+
+/* Model entry point functions */
+extern void powerwindow_PW_Control_PSG_BackL_initialize(void);
+extern void powerwindow_PW_Control_PSG_BackL_main(void);
+extern void powerwindow_PW_Control_PSG_BackL_terminate(void);
+
+/* Real-time Model object */
+extern powerwindow_RT_MODEL_PW_Control_PSG_BackL *const powerwindow_PW_Control_PSG_BackL_M;
+
+/*-
+ * The generated code includes comments that allow you to trace directly
+ * back to the appropriate location in the model. The basic format
+ * is <system>/block_name, where system is the system number (uniquely
+ * assigned by Simulink) and block_name is the name of the block.
+ *
+ * Note that this particular code originates from a subsystem build,
+ * and has its own system numbers different from the parent model.
+ * Refer to the system hierarchy for this subsystem below, and use the
+ * MATLAB hilite_system command to trace the generated code back
+ * to the parent model. For example,
+ *
+ * hilite_system('PowerWindow/PW_Control_PSG_BackL') - opens subsystem PowerWindow/PW_Control_PSG_BackL
+ * hilite_system('PowerWindow/PW_Control_PSG_BackL/Kp') - opens and selects block Kp
+ *
+ * Here is the system hierarchy for this model
+ *
+ * '<Root>' : 'PowerWindow'
+ * '<S1>' : 'PowerWindow/PW_Control_PSG_BackL'
+ * '<S2>' : 'PowerWindow/PW_Control_PSG_BackL/Debounce_PSG_BackL'
+ */
+#endif /* RTW_HEADER_PW_Control_PSG_BackL_h_*/
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_private.h new file mode 100644 index 00000000..7a5037d6 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_private.h @@ -0,0 +1,30 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_BackL_private.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_private.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_BackL_private_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_BackL_private_h_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+#endif /* RTW_HEADER_PW_Control_PSG_BackL_private_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_types.h new file mode 100644 index 00000000..661f6264 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_types.h @@ -0,0 +1,32 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_BackL_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackL_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_BackL_types_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_BackL_types_h_
+
+/* Forward declaration for rtModel */
+typedef struct powerwindow_tag_RTM_PW_Control_PSG_BackL powerwindow_RT_MODEL_PW_Control_PSG_BackL;
+
+#endif /* RTW_HEADER_PW_Control_PSG_BackL_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR.h new file mode 100644 index 00000000..383e2855 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR.h @@ -0,0 +1,126 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_BackR.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_BackR_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_BackR_h_
+#ifndef powerwindow_PW_Control_PSG_BackR_COMMON_INCLUDES_
+# define powerwindow_PW_Control_PSG_BackR_COMMON_INCLUDES_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_rtw_solver.h"
+#endif /* powerwindow_PW_Control_PSG_BackR_COMMON_INCLUDES_*/
+
+#include "../powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_types.h"
+
+/* Shared type includes */
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* Child system includes */
+#include "../powerwindow_HeaderFiles/powerwindow_powerwindow_control.h"
+#include "../powerwindow_HeaderFiles/powerwindow_debounce.h"
+#include "../powerwindow_HeaderFiles/powerwindow_controlexclusion.h"
+
+/* Macros for accessing real-time model data structure */
+#ifndef powerwindow_PW_PSG_BackR_rtmGetErrorStatus
+# define powerwindow_PW_PSG_BackR_rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
+#endif
+
+#ifndef powerwindow_PW_PSG_BackR_rtmSetErrorStatus
+# define powerwindow_PW_PSG_BackR_rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
+#endif
+
+#ifndef powerwindow_PW_PSG_BackR_rtmGetErrorStatusPointer
+# define powerwindow_PW_PSG_BackR_rtmGetErrorStatusPointer(rtm) ((const powerwindow_char_T **)(&((rtm)->errorStatus)))
+#endif
+
+/* Block states (auto storage) for system '<Root>' */
+typedef struct {
+ powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_DWORK1;/* '<S2>/Debounce_Up' */
+ powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_DWORK1;/* '<S2>/Debounce_Down' */
+ powerwindow_rtMdlrefDWork_PowerWindow_contr PW_PSG_BackR_DWORK1;/* '<S1>/PW_PSG_BackR' */
+} powerwindow_D_Work_PW_Control_PSG_BackR;
+
+/* External inputs (root inport signals with auto storage) */
+typedef struct {
+ powerwindow_boolean_T Up_DRV; /* '<Root>/Up_DRV' */
+ powerwindow_boolean_T Down_DRV; /* '<Root>/Down_DRV' */
+ powerwindow_boolean_T endofdetectionrange; /* '<Root>/end of detection range' */
+ powerwindow_uint8_T currentsense; /* '<Root>/current sense' */
+ powerwindow_boolean_T Up_PSG_BackR; /* '<Root>/Up_PSG_BackR' */
+ powerwindow_boolean_T Down_PSG_BackR; /* '<Root>/Down_PSG_BackR' */
+} powerwindow_ExternalInputs_PW_Control_PSG_BackR;
+
+/* External outputs (root outports fed by signals with auto storage) */
+typedef struct {
+ powerwindow_boolean_T window_up; /* '<Root>/window_up' */
+ powerwindow_boolean_T window_down; /* '<Root>/window_down' */
+ powerwindow_boolean_T overcurrent; /* '<Root>/overcurrent' */
+ powerwindow_boolean_T pinch; /* '<Root>/pinch' */
+ powerwindow_boolean_T wake; /* '<Root>/wake' */
+} powerwindow_ExternalOutputs_PW_Control_PSG_BackR;
+
+/* Real-time Model Data Structure */
+struct powerwindow_tag_RTM_PW_Control_PSG_BackR {
+ const powerwindow_char_T * volatile errorStatus;
+};
+
+/* Block states (auto storage) */
+extern powerwindow_D_Work_PW_Control_PSG_BackR powerwindow_PW_Control_PSG_BackR_DWork;
+
+/* External inputs (root inport signals with auto storage) */
+extern powerwindow_ExternalInputs_PW_Control_PSG_BackR powerwindow_PW_Control_PSG_BackR_U;
+
+/* External outputs (root outports fed by signals with auto storage) */
+extern powerwindow_ExternalOutputs_PW_Control_PSG_BackR powerwindow_PW_Control_PSG_BackR_Y;
+
+/* Model entry point functions */
+extern void powerwindow_PW_Control_PSG_BackR_initialize(void);
+extern void powerwindow_PW_Control_PSG_BackR_main(void);
+extern void powerwindow_PW_Control_PSG_BackR_terminate(void);
+
+/* Real-time Model object */
+extern powerwindow_RT_MODEL_PW_Control_PSG_BackR *const powerwindow_PW_Control_PSG_BackR_M;
+
+/*-
+ * The generated code includes comments that allow you to trace directly
+ * back to the appropriate location in the model. The basic format
+ * is <system>/block_name, where system is the system number (uniquely
+ * assigned by Simulink) and block_name is the name of the block.
+ *
+ * Note that this particular code originates from a subsystem build,
+ * and has its own system numbers different from the parent model.
+ * Refer to the system hierarchy for this subsystem below, and use the
+ * MATLAB hilite_system command to trace the generated code back
+ * to the parent model. For example,
+ *
+ * hilite_system('PowerWindow/PW_Control_PSG_BackR') - opens subsystem PowerWindow/PW_Control_PSG_BackR
+ * hilite_system('PowerWindow/PW_Control_PSG_BackR/Kp') - opens and selects block Kp
+ *
+ * Here is the system hierarchy for this model
+ *
+ * '<Root>' : 'PowerWindow'
+ * '<S1>' : 'PowerWindow/PW_Control_PSG_BackR'
+ * '<S2>' : 'PowerWindow/PW_Control_PSG_BackR/Debounce_PSG'
+ */
+#endif /* RTW_HEADER_PW_Control_PSG_h_*/
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_private.h new file mode 100644 index 00000000..3dc4a3f6 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_private.h @@ -0,0 +1,30 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_BackR_private.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_private.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_BackR_private_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_BackR_private_h_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+#endif /* RTW_HEADER_PW_Control_PSG_BackR_private_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_types.h new file mode 100644 index 00000000..fc22a6a4 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_types.h @@ -0,0 +1,31 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_BackR_tyoes.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_BackR_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_BackR_types_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_BackR_types_h_
+
+/* Forward declaration for rtModel */
+typedef struct powerwindow_tag_RTM_PW_Control_PSG_BackR powerwindow_RT_MODEL_PW_Control_PSG_BackR;
+
+#endif /* RTW_HEADER_PW_Control_PSG_BackR_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front.h new file mode 100644 index 00000000..9bcdfe8f --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front.h @@ -0,0 +1,126 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_Front.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_Front_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_Front_h_
+#ifndef powerwindow_PW_Control_PSG_Front_COMMON_INCLUDES_
+# define powerwindow_PW_Control_PSG_Front_COMMON_INCLUDES_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_rtw_solver.h"
+#endif /* powerwindow_PW_Control_PSG_Front_COMMON_INCLUDES_*/
+
+#include "../powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_types.h"
+
+/* Shared type includes */
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* Child system includes */
+#include "../powerwindow_HeaderFiles/powerwindow_powerwindow_control.h"
+#include "../powerwindow_HeaderFiles/powerwindow_debounce.h"
+#include "../powerwindow_HeaderFiles/powerwindow_controlexclusion.h"
+
+/* Macros for accessing real-time model data structure */
+#ifndef powerwindow_PW_PSG_Front_rtmGetErrorStatus
+# define powerwindow_PW_PSG_Front_rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
+#endif
+
+#ifndef powerwindow_PW_PSG_Front_rtmSetErrorStatus
+# define powerwindow_PW_PSG_Front_rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
+#endif
+
+#ifndef powerwindow_PW_PSG_Front_rtmGetErrorStatusPointer
+# define powerwindow_PW_PSG_Front_rtmGetErrorStatusPointer(rtm) ((const powerwindow_char_T **)(&((rtm)->errorStatus)))
+#endif
+
+/* Block states (auto storage) for system '<Root>' */
+typedef struct {
+ powerwindow_rtMdlrefDWork_debounce_T Debounce_Up_DWORK1;/* '<S2>/Debounce_Up' */
+ powerwindow_rtMdlrefDWork_debounce_T Debounce_Down_DWORK1;/* '<S2>/Debounce_Down' */
+ powerwindow_rtMdlrefDWork_PowerWindow_contr PW_PSG_Front_Front_DWORK1;/* '<S1>/PW_PSG_Front_Front' */
+} powerwindow_D_Work_PW_Control_PSG_Front;
+
+/* External inputs (root inport signals with auto storage) */
+typedef struct {
+ powerwindow_boolean_T Up_DRV; /* '<Root>/Up_DRV' */
+ powerwindow_boolean_T Down_DRV; /* '<Root>/Down_DRV' */
+ powerwindow_boolean_T endofdetectionrange; /* '<Root>/end of detection range' */
+ powerwindow_uint8_T currentsense; /* '<Root>/current sense' */
+ powerwindow_boolean_T Up_PSG_Front; /* '<Root>/Up_PSG_Front' */
+ powerwindow_boolean_T Down_PSG_Front; /* '<Root>/Down_PSG_Front' */
+} powerwindow_ExternalInputs_PW_Control_PSG_Front;
+
+/* External outputs (root outports fed by signals with auto storage) */
+typedef struct {
+ powerwindow_boolean_T window_up; /* '<Root>/window_up' */
+ powerwindow_boolean_T window_down; /* '<Root>/window_down' */
+ powerwindow_boolean_T overcurrent; /* '<Root>/overcurrent' */
+ powerwindow_boolean_T pinch; /* '<Root>/pinch' */
+ powerwindow_boolean_T wake; /* '<Root>/wake' */
+} powerwindow_ExternalOutputs_PW_Control_PSG_Front;
+
+/* Real-time Model Data Structure */
+struct powerwindow_tag_RTM_PW_Control_PSG_Front {
+ const powerwindow_char_T * volatile errorStatus;
+};
+
+/* Block states (auto storage) */
+extern powerwindow_D_Work_PW_Control_PSG_Front powerwindow_PW_Control_PSG_Front_DWork;
+
+/* External inputs (root inport signals with auto storage) */
+extern powerwindow_ExternalInputs_PW_Control_PSG_Front powerwindow_PW_Control_PSG_Front_U;
+
+/* External outputs (root outports fed by signals with auto storage) */
+extern powerwindow_ExternalOutputs_PW_Control_PSG_Front powerwindow_PW_Control_PSG_Front_Y;
+
+/* Model entry point functions */
+extern void powerwindow_PW_Control_PSG_Front_initialize(void);
+extern void powerwindow_PW_Control_PSG_Front_main(void);
+extern void powerwindow_PW_Control_PSG_Front_terminate(void);
+
+/* Real-time Model object */
+extern powerwindow_RT_MODEL_PW_Control_PSG_Front *const powerwindow_PW_Control_PSG_Front_M;
+
+/*-
+ * The generated code includes comments that allow you to trace directly
+ * back to the appropriate location in the model. The basic format
+ * is <system>/block_name, where system is the system number (uniquely
+ * assigned by Simulink) and block_name is the name of the block.
+ *
+ * Note that this particular code originates from a subsystem build,
+ * and has its own system numbers different from the parent model.
+ * Refer to the system hierarchy for this subsystem below, and use the
+ * MATLAB hilite_system command to trace the generated code back
+ * to the parent model. For example,
+ *
+ * hilite_system('PowerWindow/PW_Control_PSG_Front') - opens subsystem PowerWindow/PW_Control_PSG_Front
+ * hilite_system('PowerWindow/PW_Control_PSG_Front/Kp') - opens and selects block Kp
+ *
+ * Here is the system hierarchy for this model
+ *
+ * '<Root>' : 'PowerWindow'
+ * '<S1>' : 'PowerWindow/PW_Control_PSG_Front'
+ * '<S2>' : 'PowerWindow/PW_Control_PSG_Front/Debounce_PSG_Front_Front'
+ */
+#endif /* RTW_HEADER_PW_Control_PSG_Front_h_*/
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_private.h new file mode 100644 index 00000000..0a84437e --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_private.h @@ -0,0 +1,30 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_Front_private.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_Front_private_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_Front_private_h_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+#endif /* RTW_HEADER_PW_Control_PSG_Front_private_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_types.h new file mode 100644 index 00000000..38eb15ae --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_types.h @@ -0,0 +1,33 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_PW_Control_PSG_Front_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_PW_Control_PSG_Front_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+
+#ifndef powerwindow_RTW_HEADER_PW_Control_PSG_Front_types_h_
+#define powerwindow_RTW_HEADER_PW_Control_PSG_Front_types_h_
+
+/* Forward declaration for rtModel */
+typedef struct powerwindow_tag_RTM_PW_Control_PSG_Front powerwindow_RT_MODEL_PW_Control_PSG_Front;
+
+#endif /* RTW_HEADER_PW_Control_PSG_Front_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion.h new file mode 100644 index 00000000..d59b8d99 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion.h @@ -0,0 +1,72 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_controlexclusion.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_controlexclusion.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_controlexclusion_h_
+#define powerwindow_RTW_HEADER_controlexclusion_h_
+#ifndef powerwindow_controlexclusion_COMMON_INCLUDES_
+#define powerwindow_controlexclusion_COMMON_INCLUDES_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+
+#include "../powerwindow_HeaderFiles/powerwindow_rtw_solver.h"
+#endif /* powerwindow_controlexclusion_COMMON_INCLUDES_ */
+
+#include "../powerwindow_HeaderFiles/powerwindow_controlexclusion_types.h"
+
+/* Shared type includes */
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* user code (top of header file) */
+
+/* Model reference registration function */
+
+extern void powerwindow_controlexclusion_initialize(void);
+extern void powerwindow_controlexclusion_terminate(void);
+extern void powerwindow_controlexclusion_main(const powerwindow_boolean_T *rtu_Up_DRV, const powerwindow_boolean_T
+ *rtu_Down_DRV, const powerwindow_boolean_T *rtu_Up_PSG, const powerwindow_boolean_T *rtu_Down_PSG,
+ powerwindow_boolean_T *rty_Up, powerwindow_boolean_T *rty_Down);
+
+/*-
+ * The generated code includes comments that allow you to trace directly
+ * back to the appropriate location in the model. The basic format
+ * is <system>/block_name, where system is the system number (uniquely
+ * assigned by Simulink) and block_name is the name of the block.
+ *
+ * Use the MATLAB hilite_system command to trace the generated code back
+ * to the model. For example,
+ *
+ * hilite_system('<S3>') - opens system 3
+ * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
+ *
+ * Here is the system hierarchy for this model
+ *
+ * '<Root>' : 'ControlExclusion'
+ * '<S1>' : 'ControlExclusion/Control_Clock_TicToc'
+ * '<S2>' : 'ControlExclusion/Control_Clock_TicToc/ControlEx_PSG'
+ * '<S3>' : 'ControlExclusion/Control_Clock_TicToc/Tic'
+ * '<S4>' : 'powerwindow_controlexclusion_main/Control_Clock_TicToc/Toc'
+ * '<S5>' : 'ControlExclusion/Control_Clock_TicToc/Tic/Tic_T'
+ * '<S6>' : 'ControlExclusion/Control_Clock_TicToc/Toc/Toc_T'
+ */
+#endif /* RTW_HEADER_ControlExclusion_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_private.h new file mode 100644 index 00000000..403fd687 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_private.h @@ -0,0 +1,30 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_controlexclusion_private.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_private.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_controlexclusion_private_h_
+#define powerwindow_RTW_HEADER_controlexclusion_private_h_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+#endif /* RTW_HEADER_controlexclusion_private_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_types.h new file mode 100644 index 00000000..3e389bff --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_types.h @@ -0,0 +1,30 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_controlexclusion_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_controlexclusion_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_controlexclusion_types_h_
+#define powerwindow_RTW_HEADER_controlexclusion_types_h_
+
+/* Forward declaration for rtModel */
+#endif /* powerwindow_RTW_HEADER_controlexclusion_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce.h new file mode 100644 index 00000000..d17f4678 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce.h @@ -0,0 +1,96 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_debounce.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_debounce.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_debounce_h_
+#define powerwindow_RTW_HEADER_debounce_h_
+#ifndef powerwindow_debounce_COMMON_INCLUDES_
+#define powerwindow_debounce_COMMON_INCLUDES_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#endif /* debounce_COMMON_INCLUDES_ */
+
+#include "../powerwindow_HeaderFiles/powerwindow_debounce_types.h"
+
+/* Shared type includes */
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* Block signals for model 'powerwindow_debounce_main' */
+typedef struct {
+ powerwindow_boolean_T Q; /* '<Root>/Chart' */
+} powerwindow_rtB_debounce_T;
+
+/* Block states (auto storage) for model 'powerwindow_debounce_main' */
+typedef struct {
+ powerwindow_int32_T clockTickCounter; /* '<Root>/period of 10ms' */
+ powerwindow_uint8_T is_active_c3_debounce; /* '<Root>/Chart' */
+ powerwindow_uint8_T is_c3_debounce; /* '<Root>/Chart' */
+ powerwindow_uint8_T is_debounce; /* '<Root>/Chart' */
+ powerwindow_uint8_T temporalCounter_i1; /* '<Root>/Chart' */
+} powerwindow_rtDW_debounce_T;
+
+/* Zero-crossing (trigger) state for model 'powerwindow_debounce_main' */
+typedef struct {
+ ZCSigState Chart_Trig_ZCE; /* '<Root>/Chart' */
+} powerwindow_rtZCE_debounce_T;
+
+/* Real-time Model Data Structure */
+struct powerwindow_tag_RTM_debounce_T {
+ const powerwindow_char_T **errorStatus;
+};
+
+typedef struct {
+ powerwindow_rtB_debounce_T rtb;
+ powerwindow_rtDW_debounce_T rtdw;
+ powerwindow_RT_MODEL_debounce_T rtm;
+ powerwindow_rtZCE_debounce_T rtzce;
+} powerwindow_rtMdlrefDWork_debounce_T;
+
+/* Model reference registration function */
+extern void powerwindow_debounce_initialize(const powerwindow_char_T **rt_errorStatus,
+ powerwindow_RT_MODEL_debounce_T *const debounce_M, powerwindow_rtB_debounce_T *localB, powerwindow_rtDW_debounce_T
+ *localDW, powerwindow_rtZCE_debounce_T *localZCE);
+extern void powerwindow_debounce_Init(powerwindow_rtB_debounce_T *localB, powerwindow_rtDW_debounce_T *localDW);
+extern void powerwindow_debounce_Start(powerwindow_rtDW_debounce_T *localDW);
+extern void powerwindow_debounce_main(const powerwindow_boolean_T *rtu_Switch, powerwindow_boolean_T
+ *rty_debounced_Switch, powerwindow_rtB_debounce_T *localB,
+ powerwindow_rtDW_debounce_T *localDW, powerwindow_rtZCE_debounce_T *localZCE);
+
+/*-
+ * The generated code includes comments that allow you to trace directly
+ * back to the appropriate location in the model. The basic format
+ * is <system>/block_name, where system is the system number (uniquely
+ * assigned by Simulink) and block_name is the name of the block.
+ *
+ * Use the MATLAB hilite_system command to trace the generated code back
+ * to the model. For example,
+ *
+ * hilite_system('<S3>') - opens system 3
+ * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
+ *
+ * Here is the system hierarchy for this model
+ *
+ * '<Root>' : 'powerwindow_debounce_main'
+ * '<S1>' : 'powerwindow_debounce_main/Chart'
+ */
+#endif /* RTW_HEADER_debounce_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce_private.h new file mode 100644 index 00000000..069d44d9 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce_private.h @@ -0,0 +1,46 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_debounce_private.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_debounce_private.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+#ifndef powerwindow_RTW_HEADER_debounce_private_h_
+#define powerwindow_RTW_HEADER_debounce_private_h_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* Macros for accessing real-time model data structure */
+#ifndef powerwindow_rtmGetErrorStatus
+# define powerwindow_rtmGetErrorStatus(rtm) (*((rtm)->errorStatus))
+#endif
+
+#ifndef powerwindow_rtmSetErrorStatus
+# define powerwindow_rtmSetErrorStatus(rtm, val) (*((rtm)->errorStatus) = (val))
+#endif
+
+#ifndef powerwindow_rtmGetErrorStatusPointer
+# define powerwindow_rtmGetErrorStatusPointer(rtm) (rtm)->errorStatus
+#endif
+
+#ifndef powerwindow_rtmSetErrorStatusPointer
+# define powerwindow_rtmSetErrorStatusPointer(rtm, val) ((rtm)->errorStatus = (val))
+#endif
+#endif /* RTW_HEADER_debounce_private_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce_types.h new file mode 100644 index 00000000..e3d3549e --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_debounce_types.h @@ -0,0 +1,31 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_debounce_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_debounce_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+#ifndef powerwindow_RTW_HEADER_debounce_types_h_
+#define powerwindow_RTW_HEADER_debounce_types_h_
+
+/* Forward declaration for rtModel */
+typedef struct powerwindow_tag_RTM_debounce_T powerwindow_RT_MODEL_debounce_T;
+
+#endif /* RTW_HEADER_debounce_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_model_reference_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_model_reference_types.h new file mode 100644 index 00000000..c2dda9e1 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_model_reference_types.h @@ -0,0 +1,51 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_model_reference_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_model_reference_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow___MODEL_REFERENCE_TYPES_H__
+#define powerwindow___MODEL_REFERENCE_TYPES_H__
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#ifndef powerwindow___MODEL_REFERENCE_TYPES__
+#define powerwindow___MODEL_REFERENCE_TYPES__
+
+/*===========================================================================*
+ * Model reference type definitions *
+ *===========================================================================*/
+/*
+ * This structure is used by model reference to
+ * communicate timing information through the hierarchy.
+ */
+typedef struct powerwindow__rtTimingBridge_tag powerwindow_rtTimingBridge;
+struct powerwindow__rtTimingBridge_tag {
+ powerwindow_uint32_T nTasks;
+ powerwindow_uint32_T** clockTick;
+ powerwindow_uint32_T** clockTickH;
+ powerwindow_uint32_T* taskCounter;
+ powerwindow_real_T** taskTime;
+ powerwindow_boolean_T** rateTransition;
+ powerwindow_boolean_T *firstInitCond;
+};
+
+#endif /* __MODEL_REFERENCE_TYPES__ */
+#endif /* __MODEL_REFERENCE_TYPES_H__ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control.h new file mode 100644 index 00000000..1c0f950f --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control.h @@ -0,0 +1,135 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_powerwindow_control.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+#ifndef powerwindow_RTW_HEADER_PowerWindow_control_h_
+#define powerwindow_RTW_HEADER_PowerWindow_control_h_
+#ifndef powerwindow_powerWindow_control_COMMON_INCLUDES_
+# define powerwindow_powerWindow_control_COMMON_INCLUDES_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+
+#include "../powerwindow_HeaderFiles/powerwindow_rtw_solver.h"
+#endif /* PowerWindow_control_COMMON_INCLUDES_ */
+
+#include "../powerwindow_HeaderFiles/powerwindow_powerwindow_control_types.h"
+#include "../powerwindow_HeaderFiles/powerwindow_powerwindow_control_private.h"
+
+/* Shared type includes */
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* user code (top of header file) */
+
+/* Block signals for model 'PowerWindow_control' */
+typedef struct {
+ powerwindow_uint8_T RateTransition1; /* '<S2>/Rate Transition1' */
+ powerwindow_boolean_T LogicalOperator; /* '<S2>/Logical Operator' */
+ powerwindow_boolean_T map[3]; /* '<S2>/map' */
+} powerwindow_rtB_PowerWindow_control;
+
+/* Block states (auto storage) for model 'PowerWindow_control' */
+typedef struct {
+ powerwindow_int32_T clockTickCounter; /* '<S2>/period of 50ms' */
+ powerwindow_uint8_T is_active_c2_PowerWindow_contro;/* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_c2_PowerWindow_control; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_Up; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_Down; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_Logic; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_active_Logic; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_Sensing; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T is_active_Sensing; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T temporalCounter_i1; /* '<S2>/stateflow control model' */
+ powerwindow_uint8_T temporalCounter_i2; /* '<S2>/stateflow control model' */
+} powerwindow_rtDW_PowerWindow_control;
+
+/* Zero-crossing (trigger) state for model 'PowerWindow_control' */
+typedef struct {
+ ZCSigState stateflowcontrolmodel_Trig_ZCE;/* '<S2>/stateflow control model' */
+} powerwindow_rtZCE_PowerWindow_control;
+
+/* Real-time Model Data Structure */
+struct powerwindow_tag_RTM_PowerWindow_control{
+ const powerwindow_char_T **errorStatus;
+};
+
+typedef struct {
+ powerwindow_rtB_PowerWindow_control rtb;
+ powerwindow_rtDW_PowerWindow_control rtdw;
+ powerwindow_RT_MODEL_PowerWindow_control rtm;
+ powerwindow_rtZCE_PowerWindow_control rtzce;
+} powerwindow_rtMdlrefDWork_PowerWindow_contr;
+
+
+
+/* Model reference registration function */
+extern void powerwindow_powerwindow_control_initialize(
+ const powerwindow_char_T **rt_errorStatus,
+ powerwindow_RT_MODEL_PowerWindow_control * const PowerWindow_control_M,
+ powerwindow_rtB_PowerWindow_control *localB,
+ powerwindow_rtDW_PowerWindow_control *localDW,
+ powerwindow_rtZCE_PowerWindow_control *localZCE);
+extern void powerwindow_powerwindow_control_Init(
+ powerwindow_boolean_T *rty_window_up,
+ powerwindow_boolean_T *rty_window_down,
+ powerwindow_boolean_T *rty_overcurrent,
+ powerwindow_boolean_T *rty_pinch, powerwindow_boolean_T * rty_wake,
+ powerwindow_rtDW_PowerWindow_control *localDW);
+extern void powerwindow_powerwindow_control_Start(
+ powerwindow_rtDW_PowerWindow_control *localDW);
+extern void powerwindow_powerwindow_control_main(
+ const powerwindow_boolean_T *rtu_up,
+ const powerwindow_boolean_T *rtu_down,
+ const powerwindow_boolean_T *rtu_endofdetectionrange,
+ const powerwindow_uint8_T *rtu_currentsense,
+ powerwindow_boolean_T *rty_window_up,
+ powerwindow_boolean_T *rty_window_down,
+ powerwindow_boolean_T *rty_overcurrent,
+ powerwindow_boolean_T *rty_pinch, powerwindow_boolean_T *rty_wake,
+ powerwindow_rtB_PowerWindow_control *localB,
+ powerwindow_rtDW_PowerWindow_control *localDW,
+ powerwindow_rtZCE_PowerWindow_control *localZCE);
+
+/*-
+ * The generated code includes comments that allow you to trace directly
+ * back to the appropriate location in the model. The basic format
+ * is <system>/block_name, where system is the system number (uniquely
+ * assigned by Simulink) and block_name is the name of the block.
+ *
+ * Use the MATLAB hilite_system command to trace the generated code back
+ * to the model. For example,
+ *
+ * hilite_system('<S3>') - opens system 3
+ * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
+ *
+ * Here is the system hierarchy for this model
+ *
+ * '<Root>' : 'PowerWindow_control'
+ * '<S1>' : 'PowerWindow_control/PW_PSG'
+ * '<S2>' : 'PowerWindow_control/PW_PSG/PW_PSG'
+ * '<S3>' : 'PowerWindow_control/PW_PSG/Tic'
+ * '<S4>' : 'PowerWindow_control/PW_PSG/Toc'
+ * '<S5>' : 'PowerWindow_control/PW_PSG/PW_PSG/stateflow control model'
+ * '<S6>' : 'PowerWindow_control/PW_PSG/Tic/Tic_T'
+ * '<S7>' : 'PowerWindow_control/PW_PSG/Toc/Toc_T'
+ */
+#endif /* powerwindow_RTW_HEADER_PowerWindow_control_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_private.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_private.h new file mode 100644 index 00000000..47334915 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_private.h @@ -0,0 +1,52 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_powerwindow_control_private.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_private.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+#ifndef powerwindow_RTW_HEADER_PowerWindow_control_private_h_
+#define powerwindow_RTW_HEADER_PowerWindow_control_private_h_
+#include "../powerwindow_HeaderFiles/powerwindow_rtwtypes.h"
+#include "../powerwindow_HeaderFiles/powerwindow_model_reference_types.h"
+
+/* Macros for accessing real-time model data structure */
+#ifndef powerwindow_powerwindow_control_rtmGetErrorStatus
+# define powerwindow_powerwindow_control_rtmGetErrorStatus(rtm) (*((rtm)->errorStatus))
+#endif
+
+#ifndef powerwindow_powerwindow_control_rtmSetErrorStatus
+# define powerwindow_powerwindow_control_rtmSetErrorStatus(rtm, val) (*((rtm)->errorStatus) = (val))
+#endif
+
+#ifndef powerwindow_powerwindow_control_rtmGetErrorStatusPointer
+# define powerwindow_powerwindow_control_rtmGetErrorStatusPointer(rtm) (rtm)->errorStatus
+#endif
+
+#ifndef powerwindow_powerwindow_control_rtmSetErrorStatusPointer
+# define powerwindow_powerwindow_control_rtmSetErrorStatusPointer(rtm, val) ((rtm)->errorStatus = (val))
+#endif
+
+extern const powerwindow_boolean_T powerwindow_rtCP_pooled_6bUUQf1tASYw[12];
+
+#define rtCP_map_table powerwindow_rtCP_pooled_6bUUQf1tASYw /* Computed Parameter: map_table
+ * Referenced by: '<S2>/map'
+ */
+#endif /* RTW_HEADER_PowerWindow_control_private_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_types.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_types.h new file mode 100644 index 00000000..0f96b568 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_types.h @@ -0,0 +1,33 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_powerwindow_control_types.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_powerwindow_control_types.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+
+
+#ifndef powerwindow_RTW_HEADER_powerwindow_control_types_h_
+#define powerwindow_RTW_HEADER_powerwindow_control_types_h_
+
+/* Forward declaration for rtModel */
+typedef struct powerwindow_tag_RTM_PowerWindow_control powerwindow_RT_MODEL_PowerWindow_control;
+
+#endif /* RTW_HEADER_powerwindow_control_types_h_ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtw_continuous.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtw_continuous.h new file mode 100644 index 00000000..5cab83fd --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtw_continuous.h @@ -0,0 +1,136 @@ +/* + + This program is part of the TACLeBench benchmark suite. + Version V 1.x + + Name: powerwindow_rtw_continuous.h + + Author: CoSys-Lab, University of Antwerp + + Function: headerfile + + Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_rtw_continuous.h + + Changes: a brief summary of major functional changes and formatting) + + License: GNU General Public License + + */ + +#ifndef powerwindow___RTW_CONTINUOUS_H__ +#define powerwindow___RTW_CONTINUOUS_H__ + +//#include "../powerwindow_HeaderFiles/powerwindow_tmwtypes.h" + +/* For models registering MassMatrix */ +typedef enum { + SS_MATRIX_NONE, + SS_MATRIX_CONSTANT, + SS_MATRIX_TIMEDEP, + SS_MATRIX_STATEDEP +} powerwindow_ssMatrixType; + +typedef enum { + SOLVER_MODE_AUTO, /* only occurs in + mdlInitializeSizes/mdlInitializeSampleTimes */ + SOLVER_MODE_SINGLETASKING, + SOLVER_MODE_MULTITASKING +} powerwindow_SolverMode; + +typedef enum { + MINOR_TIME_STEP, + MAJOR_TIME_STEP +} powerwindow_SimTimeStep; + +/* ============================================================================= + * Model methods object + * ============================================================================= + */ +typedef void (*powerwindow_rtMdlInitializeSizesFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlInitializeSampleTimesFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlStartFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlOutputsFcn)(void *rtModel, powerwindow_int_T tid); +typedef void (*powerwindow_rtMdlUpdateFcn)(void *rtModel, powerwindow_int_T tid); +typedef void (*powerwindow_rtMdlDerivativesFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlProjectionFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlMassMatrixFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlForcingFunctionFcn)(void *rtModel); +typedef void (*powerwindow_rtMdlTerminateFcn)(void *rtModel); +#ifdef RT_MALLOC +typedef real_T (*rtMdlDiscreteEventsFcn)(void *pModel, + powerwindow_int_T rtmNumSampTimes, + void *rtmTimingData, + powerwindow_int_T *rtmSampleHitPtr, + powerwindow_int_T *rtmPerTaskSampleHits); +#endif + +typedef struct powerwindow__RTWRTModelMethodsInfo_tag { + void *rtModelPtr; + powerwindow_rtMdlInitializeSizesFcn rtmInitSizesFcn; + powerwindow_rtMdlInitializeSampleTimesFcn rtmInitSampTimesFcn; + powerwindow_rtMdlStartFcn rtmStartFcn; + powerwindow_rtMdlOutputsFcn rtmOutputsFcn; + powerwindow_rtMdlUpdateFcn rtmUpdateFcn; + powerwindow_rtMdlDerivativesFcn rtmDervisFcn; + powerwindow_rtMdlProjectionFcn rtmProjectionFcn; + powerwindow_rtMdlMassMatrixFcn rtmMassMatrixFcn; + powerwindow_rtMdlForcingFunctionFcn rtmForcingFunctionFcn; + powerwindow_rtMdlTerminateFcn rtmTerminateFcn; +#ifdef RT_MALLOC + rtMdlDiscreteEventsFcn rtmDiscreteEventsFcn; +#endif +} powerwindow_RTWRTModelMethodsInfo; + +#define rtmiSetRTModelPtr(M,rtmp) ((M).rtModelPtr = (rtmp)) +#define rtmiGetRTModelPtr(M) (M).rtModelPtr + +#define rtmiSetInitSizesFcn(M,fp) \ + ((M).rtmInitSizesFcn = ((powerwindow_rtMdlInitializeSizesFcn)(fp))) +#define rtmiSetInitSampTimesFcn(M,fp) \ + ((M).rtmInitSampTimesFcn = ((powerwindow_rtMdlInitializeSampleTimesFcn)(fp))) +#define rtmiSetStartFcn(M,fp) \ + ((M).rtmStartFcn = ((powerwindow_rtMdlStartFcn)(fp))) +#define rtmiSetOutputsFcn(M,fp) \ + ((M).rtmOutputsFcn = ((powerwindow_rtMdlOutputsFcn)(fp))) +#define rtmiSetUpdateFcn(M,fp) \ + ((M).rtmUpdateFcn = ((powerwindow_rtMdlUpdateFcn)(fp))) +#define rtmiSetDervisFcn(M,fp) \ + ((M).rtmDervisFcn = ((powerwindow_rtMdlDerivativesFcn)(fp))) +#define rtmiSetProjectionFcn(M,fp) \ + ((M).rtmProjectionFcn = ((powerwindow_rtMdlProjectionFcn)(fp))) +#define rtmiSetMassMatrixFcn(M,fp) \ + ((M).rtmMassMatrixFcn = ((powerwindow_rtMdlMassMatrixFcn)(fp))) +#define rtmiSetForcingFunctionFcn(M,fp) \ + ((M).rtmForcingFunctionFcn = ((powerwindow_rtMdlForcingFunctionFcn)(fp))) +#define rtmiSetTerminateFcn(M,fp) \ + ((M).rtmTerminateFcn = ((powerwindow_rtMdlTerminateFcn)(fp))) +#ifdef RT_MALLOC +#define rtmiSetDiscreteEventsFcn(M,fp) \ + ((M).rtmDiscreteEventsFcn = ((rtMdlDiscreteEventsFcn)(fp))) +#endif + +#define rtmiInitializeSizes(M) \ + ((*(M).rtmInitSizesFcn)((M).rtModelPtr)) +#define rtmiInitializeSampleTimes(M) \ + ((*(M).rtmInitSampTimesFcn)((M).rtModelPtr)) +#define rtmiStart(M) \ + ((*(M).rtmStartFcn)((M).rtModelPtr)) +#define rtmiOutputs(M, tid) \ + ((*(M).rtmOutputsFcn)((M).rtModelPtr,tid)) +#define rtmiUpdate(M, tid) \ + ((*(M).rtmUpdateFcn)((M).rtModelPtr,tid)) +#define rtmiDerivatives(M) \ + ((*(M).rtmDervisFcn)((M).rtModelPtr)) +#define rtmiProjection(M) \ + ((*(M).rtmProjectionFcn)((M).rtModelPtr)) +#define rtmiMassMatrix(M) \ + ((*(M).rtmMassMatrixFcn)((M).rtModelPtr)) +#define rtmiForcingFunction(M) \ + ((*(M).rtmForcingFunctionFcn)((M).rtModelPtr)) +#define rtmiTerminate(M) \ + ((*(M).rtmTerminateFcn)((M).rtModelPtr)) +#ifdef RT_MALLOC +#define rtmiDiscreteEvents(M,x1,x2,x3,x4) \ + ((*(M).rtmDiscreteEventsFcn)((M).rtModelPtr,(x1),(x2),(x3),(x4))) +#endif +#endif /* __RTW_CONTINUOUS_H__ */ diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtw_solver.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtw_solver.h new file mode 100644 index 00000000..2e0895ea --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtw_solver.h @@ -0,0 +1,243 @@ +/* + + This program is part of the TACLeBench benchmark suite. + Version V 1.x + + Name: powerwindow_rtw_solver.h + + Author: CoSys-Lab, University of Antwerp + + Function: headerfile + + Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_rtw_solver.h + + Changes: a brief summary of major functional changes and formatting) + + License: GNU General Public License + + */ + +#ifndef powerwindow___RTW_SOLVER_H__ +#define powerwindow___RTW_SOLVER_H__ + +/* ============================================================================= + * Solver object + * ============================================================================= + */ +#ifndef NO_FLOATS /* ERT integer-only */ +/* + * Enum for solver tolerance + */ +typedef enum { + SL_SOLVER_TOLERANCE_AUTO = 0, /* Set Automatically by Solver */ + SL_SOLVER_TOLERANCE_LOCAL = 1, /* Set Locally, e.g., by Blocks */ + SL_SOLVER_TOLERANCE_GLOBAL = 2, /* Set Globally, e.g., by Block Diagram */ + SL_SOLVER_TOLERANCE_UNDEFINED = 255 /* Signal uninitialized */ +} powerwindow_SL_SolverToleranceControlFlag_T; + + +/* + * Enum for jacobian method control + */ +typedef enum { + SL_JM_BD_AUTO = 0, + SL_JM_BD_SPARSE_PERTURBATION, + SL_JM_BD_FULL_PERTURBATION, + SL_JM_BD_SPARSE_ANALYTICAL, + SL_JM_BD_FULL_ANALYTICAL +} powerwindow_slJmBdControl; + + +typedef struct _ssSolverInfo_tag { + void *rtModelPtr; + + + const char *solverName; + powerwindow_boolean_T isVariableStepSolver; + powerwindow_boolean_T solverNeedsReset; + + powerwindow_time_T solverStopTime; + powerwindow_time_T *stepSizePtr; + powerwindow_time_T minStepSize; + powerwindow_time_T maxStepSize; + powerwindow_time_T fixedStepSize; + + powerwindow_int_T solverShapePreserveControl; + powerwindow_int_T solverMaxConsecutiveMinStep; + powerwindow_int_T maxNumMinSteps; + powerwindow_int_T solverMaxOrder; + powerwindow_real_T solverConsecutiveZCsStepRelTol; + powerwindow_int_T solverMaxConsecutiveZCs; + + powerwindow_int_T solverExtrapolationOrder; + powerwindow_int_T solverNumberNewtonIterations; + + powerwindow_int_T solverRefineFactor; + powerwindow_real_T solverRelTol; + powerwindow_real_T unused_real_T_1; + + powerwindow_real_T **dXPtr; + powerwindow_time_T **tPtr; + + powerwindow_int_T *numContStatesPtr; + powerwindow_real_T **contStatesPtr; + + powerwindow_real_T* zcSignalVector; + powerwindow_uint8_T* zcEventsVector; + powerwindow_uint8_T* zcSignalAttrib; + powerwindow_int_T zcSignalVectorLength; + powerwindow_uint8_T* reserved; + + powerwindow_boolean_T foundContZcEvents; + powerwindow_boolean_T isAtLeftPostOfContZcEvent; + powerwindow_boolean_T isAtRightPostOfContZcEvent; + powerwindow_boolean_T adaptiveZcDetection; + + powerwindow_int_T numZcSignals; + + powerwindow_boolean_T stateProjection; + powerwindow_boolean_T robustResetMethod; /* user's preference */ + powerwindow_boolean_T updateJacobianAtReset; /* S-Fcn request (sticky) */ + powerwindow_boolean_T consistencyChecking; + + powerwindow_int_T massMatrixNzMax; + powerwindow_int_T* massMatrixIr; + powerwindow_int_T* massMatrixJc; + powerwindow_real_T* massMatrixPr; + + const powerwindow_char_T **errStatusPtr; + + powerwindow_real_T zcThreshold; + powerwindow_int_T zeroCrossAlgorithm; + powerwindow_int_T consecutiveZCsError; + + powerwindow_boolean_T isComputingJacobian; + powerwindow_slJmBdControl solverJacobianMethodControl; + powerwindow_int_T ignoredZcDiagnostic; + powerwindow_int_T maskedZcDiagnostic; + powerwindow_boolean_T isOutputMethodComputed; +} ssSolverInfo; + +/* Support old name RTWSolverInfo */ +typedef ssSolverInfo RTWSolverInfo; + +#define rtsiSetRTModelPtr(S,rtmp) ((S)->rtModelPtr = (rtmp)) +#define rtsiGetRTModelPtr(S) (S)->rtModelPtr + +#define rtsiSetSimTimeStepPtr(S,stp) ((S)->simTimeStepPtr = (stp)) +#define rtsiGetSimTimeStepPtr(S) ((S)->simTimeStepPtr) +#define rtsiGetSimTimeStep(S) *((S)->simTimeStepPtr) +#define rtsiSetSimTimeStep(S,st) (*((S)->simTimeStepPtr) = (st)) + +#define rtsiSetSolverData(S,sd) ((S)->solverData = (sd)) +#define rtsiGetSolverData(S) (S)->solverData + +#define rtsiSetSolverName(S,sn) ((S)->solverName = (sn)) +#define rtsiGetSolverName(S) (S)->solverName + +#define rtsiSetVariableStepSolver(S,vs) ((S)->isVariableStepSolver = (vs)) +#define rtsiIsVariableStepSolver(S) (S)->isVariableStepSolver + +#define rtsiSetSolverNeedsReset(S,sn) ((S)->solverNeedsReset = (sn)) +#define rtsiGetSolverNeedsReset(S) (S)->solverNeedsReset + +#define rtsiSetBlkStateChange(S,sn) ((S)->blkStateChange = (sn)) +#define rtsiGetBlkStateChange(S) (S)->blkStateChange + +#define rtsiSetSolverMode(S,sm) ((S)->solverMode = (sm)) +#define rtsiGetSolverMode(S) (S)->solverMode + +#define rtsiSetSolverStopTime(S,st) ((S)->solverStopTime = (st)) +#define rtsiGetSolverStopTime(S) (S)->solverStopTime + +#define rtsiSetStepSizePtr(S,ssp) ((S)->stepSizePtr = (ssp)) +#define rtsiSetStepSize(S,ss) (*((S)->stepSizePtr) = (ss)) +#define rtsiGetStepSize(S) *((S)->stepSizePtr) + +#define rtsiSetMinStepSize(S,ss) (((S)->minStepSize = (ss))) +#define rtsiGetMinStepSize(S) (S)->minStepSize + +#define rtsiSetMaxStepSize(S,ss) ((S)->maxStepSize = (ss)) +#define rtsiGetMaxStepSize(S) (S)->maxStepSize + +#define rtsiSetFixedStepSize(S,ss) ((S)->fixedStepSize = (ss)) +#define rtsiGetFixedStepSize(S) (S)->fixedStepSize + +#define rtsiSetMaxNumMinSteps(S,mns) ((S)->maxNumMinSteps = (mns)) +#define rtsiGetMaxNumMinSteps(S) (S)->maxNumMinSteps + +#define rtsiSetSolverMaxOrder(S,smo) ((S)->solverMaxOrder = (smo)) +#define rtsiGetSolverMaxOrder(S) (S)->solverMaxOrder + +#define rtsiSetSolverJacobianMethodControl(S,smcm) (ssGetSolverInfo(S)->solverJacobianMethodControl = (smcm)) +#define rtsiGetSolverJacobianMethodControl(S) ssGetSolverInfo(S)->solverJacobianMethodControl + +#define rtsiSetSolverShapePreserveControl(S,smcm) (ssGetSolverInfo(S)->solverShapePreserveControl = (smcm)) +#define rtsiGetSolverShapePreserveControl(S) ssGetSolverInfo(S)->solverShapePreserveControl + +#define rtsiSetSolverConsecutiveZCsStepRelTol(S,scr) (ssGetSolverInfo(S)->solverConsecutiveZCsStepRelTol = (scr)) +#define rtsiGetSolverConsecutiveZCsStepRelTol(S) ssGetSolverInfo(S)->solverConsecutiveZCsStepRelTol + +#define rtsiSetSolverMaxConsecutiveZCs(S,smcz) (ssGetSolverInfo(S)->solverMaxConsecutiveZCs = (smcz)) +#define rtsiGetSolverMaxConsecutiveZCs(S) ssGetSolverInfo(S)->solverMaxConsecutiveZCs + +#define rtsiSetSolverMaxConsecutiveMinStep(S,smcm) (ssGetSolverInfo(S)->solverMaxConsecutiveMinStep = (smcm)) +#define rtsiGetSolverMaxConsecutiveMinStep(S) ssGetSolverInfo(S)->solverMaxConsecutiveMinStep + +#define rtsiSetSolverExtrapolationOrder(S,seo) ((S)->solverExtrapolationOrder = (seo)) +#define rtsiGetSolverExtrapolationOrder(S) (S)->solverExtrapolationOrder + +#define rtsiSetSolverNumberNewtonIterations(S,nni) ((S)->solverNumberNewtonIterations = (nni)) +#define rtsiGetSolverNumberNewtonIterations(S) (S)->solverNumberNewtonIterations + +#define rtsiSetSolverRefineFactor(S,smo) ((S)->solverRefineFactor = (smo)) +#define rtsiGetSolverRefineFactor(S) (S)->solverRefineFactor + +#define rtsiSetSolverRelTol(S,smo) ((S)->solverRelTol = (smo)) +#define rtsiGetSolverRelTol(S) (S)->solverRelTol + +#define rtsiSetSolverMassMatrixType(S,type) ((S)->massMatrixType = (type)) +#define rtsiGetSolverMassMatrixType(S) (S)->massMatrixType + +#define rtsiSetSolverMassMatrixNzMax(S,nzMax) ((S)->massMatrixNzMax = (nzMax)) +#define rtsiGetSolverMassMatrixNzMax(S) (S)->massMatrixNzMax + +#define rtsiSetSolverMassMatrixIr(S,ir) ((S)->massMatrixIr = (ir)) +#define rtsiGetSolverMassMatrixIr(S) (S)->massMatrixIr + +#define rtsiSetSolverMassMatrixJc(S,jc) ((S)->massMatrixJc = (jc)) +#define rtsiGetSolverMassMatrixJc(S) (S)->massMatrixJc + +#define rtsiSetSolverMassMatrixPr(S,pr) ((S)->massMatrixPr = (pr)) +#define rtsiGetSolverMassMatrixPr(S) (S)->massMatrixPr + +#define rtsiSetdXPtr(S,dxp) ((S)->dXPtr = (dxp)) +#define rtsiSetdX(S,dx) (*((S)->dXPtr) = (dx)) +#define rtsiGetdX(S) *((S)->dXPtr) + +#define rtsiSetTPtr(S,tp) ((S)->tPtr = (tp)) +#define rtsiSetT(S,t) ((*((S)->tPtr))[0] = (t)) +#define rtsiGetT(S) (*((S)->tPtr))[0] + +#define rtsiSetContStatesPtr(S,cp) ((S)->contStatesPtr = (cp)) +#define rtsiGetContStates(S) *((S)->contStatesPtr) + +#define rtsiSetNumContStatesPtr(S,cp) ((S)->numContStatesPtr = (cp)) +#define rtsiGetNumContStates(S) *((S)->numContStatesPtr) + +#define rtsiSetErrorStatusPtr(S,esp) ((S)->errStatusPtr = (esp)) +#define rtsiSetErrorStatus(S,es) (*((S)->errStatusPtr) = (es)) +#define rtsiGetErrorStatus(S) *((S)->errStatusPtr) + +#define rtsiSetModelMethodsPtr(S,mmp) ((S)->modelMethodsPtr = (mmp)) +#define rtsiGetModelMethodsPtr(S) (S)->modelMethodsPtr + +#define rtsiSetSolverComputingJacobian(S,val) ((S)->isComputingJacobian = (val)) +#define rtsiIsSolverComputingJacobian(S) (S)->isComputingJacobian + +#define rtsiSetSolverOutputComputed(S,val) ((S)->isOutputMethodComputed = (val)) +#define rtsiIsSolverOutputComputed(S) (S)->isOutputMethodComputed + +#endif /* !NO_FLOATS */ + +#endif /* powerwindow___RTW_SOLVER_H__ */ diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtwtypes.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtwtypes.h new file mode 100644 index 00000000..c6dfca07 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_rtwtypes.h @@ -0,0 +1,194 @@ +/*
+
+ This program is part of the TACLeBench benchmark suite.
+ Version V 1.x
+
+ Name: powerwindow_rtwtypes.h
+
+ Author: CoSys-Lab, University of Antwerp
+
+ Function: headerfile
+
+ Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_rtwtypes.h
+
+ Changes: a brief summary of major functional changes and formatting)
+
+ License: GNU General Public License
+
+ */
+#ifndef powerwindow__RTWTYPES_H__
+#define powerwindow__RTWTYPES_H__
+
+/* Logical type definitions */
+#if (!defined(__cplusplus))
+# ifndef false
+# define false (0U)
+# endif
+
+# ifndef true
+# define true (1U)
+# endif
+#endif
+
+#define powerwindow__TMWTYPES__
+
+/*=======================================================================*
+ * Target hardware information
+ *
+ * Number of bits: char: 8 short: 16 int: 16
+ * long: 32
+ * native word size: 8
+ * Byte ordering: LittleEndian
+ * Signed integer division rounds to: Zero
+ * Shift right on a signed integer as arithmetic shift: on
+ *=======================================================================*/
+
+/*=======================================================================*
+ * Fixed width word size data types: *
+ * powerwindow_int8_T, powerwindow_int16_T, powerwindow_int32_T - signed 8, 16, or 32 bit integers *
+ * powerwindow_uint8_T, powerwindow_uint16_T, powerwindow_uint32_T - unsigned 8, 16, or 32 bit integers *
+ * powerwindow_real32_T, powerwindow_real64_T - 32 and 64 bit floating point numbers *
+ *=======================================================================*/
+typedef signed char powerwindow_int8_T;
+typedef unsigned char powerwindow_uint8_T;
+typedef int powerwindow_int16_T;
+typedef unsigned int powerwindow_uint16_T;
+typedef long powerwindow_int32_T;
+typedef unsigned long powerwindow_uint32_T;
+typedef float powerwindow_real32_T;
+typedef double powerwindow_real64_T;
+
+/*===========================================================================*
+ * Generic type definitions: powerwindow_real_T, powerwindow_time_T, powerwindow_boolean_T, powerwindow_int_T, powerwindow_uint_T, *
+ * powerwindow_ulong_T, powerwindow_char_T and powerwindow_byte_T. *
+ *===========================================================================*/
+typedef double powerwindow_real_T;
+typedef double powerwindow_time_T;
+typedef unsigned char powerwindow_boolean_T;
+typedef int powerwindow_int_T;
+typedef unsigned int powerwindow_uint_T;
+typedef unsigned long powerwindow_ulong_T;
+typedef char powerwindow_char_T;
+typedef unsigned char powerwindow_uchar_T;
+typedef powerwindow_char_T powerwindow_byte_T;
+
+/*===========================================================================*
+ * Complex number type definitions *
+ *===========================================================================*/
+#define powerwindow_CREAL_T
+
+typedef struct {
+ powerwindow_real32_T re;
+ powerwindow_real32_T im;
+} powerwindow_creal32_T;
+
+typedef struct {
+ powerwindow_real64_T re;
+ powerwindow_real64_T im;
+} powerwindow_creal64_T;
+
+typedef struct {
+ powerwindow_real_T re;
+ powerwindow_real_T im;
+} powerwindow_creal_T;
+
+#define powerwindow_CINT8_T
+
+typedef struct {
+ powerwindow_int8_T re;
+ powerwindow_int8_T im;
+} powerwindow_cint8_T;
+
+#define powerwindow_CUINT8_T
+
+typedef struct {
+ powerwindow_uint8_T re;
+ powerwindow_uint8_T im;
+} powerwindow_cuint8_T;
+
+#define powerwindow_CINT16_T
+
+typedef struct {
+ powerwindow_int16_T re;
+ powerwindow_int16_T im;
+} powerwindow_cint16_T;
+
+#define powerwindow_CUINT16_T
+
+typedef struct {
+ powerwindow_uint16_T re;
+ powerwindow_uint16_T im;
+} powerwindow_cuint16_T;
+
+#define powerwindow_CINT32_T
+
+typedef struct {
+ powerwindow_int32_T re;
+ powerwindow_int32_T im;
+} powerwindow_cint32_T;
+
+#define powerwindow_CUINT32_T
+
+typedef struct {
+ powerwindow_uint32_T re;
+ powerwindow_uint32_T im;
+} powerwindow_cuint32_T;
+
+/*=======================================================================*
+ * Min and Max: *
+ * powerwindow_int8_T, powerwindow_int16_T, powerwindow_int32_T - signed 8, 16, or 32 bit integers *
+ * powerwindow_uint8_T, powerwindow_uint16_T, powerwindow_uint32_T - unsigned 8, 16, or 32 bit integers *
+ *=======================================================================*/
+#define powerwindow_MAX_int8_T ((powerwindow_int8_T)(127))
+#define powerwindow_MIN_int8_T ((powerwindow_int8_T)(-128))
+#define powerwindow_MAX_uint8_T ((powerwindow_uint8_T)(255U))
+#define powerwindow_MIN_uint8_T ((powerwindow_uint8_T)(0U))
+#define powerwindow_MAX_int16_T ((powerwindow_int16_T)(32767))
+#define powerwindow_MIN_int16_T ((powerwindow_int16_T)(-32768))
+#define powerwindow_MAX_uint16_T ((powerwindow_uint16_T)(65535U))
+#define powerwindow_MIN_uint16_T ((powerwindow_uint16_T)(0U))
+#define powerwindow_MAX_int32_T ((powerwindow_int32_T)(2147483647))
+#define powerwindow_MIN_int32_T ((powerwindow_int32_T)(-2147483647-1))
+#define powerwindow_MAX_uint32_T ((powerwindow_uint32_T)(0xFFFFFFFFU))
+#define powerwindow_MIN_uint32_T ((powerwindow_uint32_T)(0U))
+
+/* Block D-Work pointer type */
+typedef void * powerwindow_pointer_T;
+
+#define powerwindow_input_length 977
+
+/* Simulink specific types */
+#ifndef powerwindow___ZERO_CROSSING_TYPES__
+#define powerwindow___ZERO_CROSSING_TYPES__
+
+/* Trigger directions: falling, either, and rising */
+typedef enum {
+ FALLING_ZERO_CROSSING = -1,
+ ANY_ZERO_CROSSING = 0,
+ RISING_ZERO_CROSSING = 1
+} powerwindow_ZCDirection;
+
+/* Previous state of a trigger signal */
+typedef powerwindow_uint8_T ZCSigState;
+
+/* Initial value of a trigger zero crossing signal */
+#define powerwindow_UNINITIALIZED_ZCSIG 0x03U
+#define powerwindow_NEG_ZCSIG 0x02U
+#define powerwindow_POS_ZCSIG 0x01U
+#define powerwindow_ZERO_ZCSIG 0x00U
+
+/* Current state of a trigger signal */
+typedef enum {
+ FALLING_ZCEVENT = -1,
+ NO_ZCEVENT = 0,
+ RISING_ZCEVENT = 1
+} powerwindow_ZCEventType;
+
+#endif /* powerwindow___ZERO_CROSSING_TYPES__ */
+#endif /* powerwindow__RTWTYPES_H__ */
+
+/*
+ * File trailer for generated code.
+ *
+ * [EOF]
+ */
diff --git a/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_tmwtypes.h b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_tmwtypes.h new file mode 100644 index 00000000..7b1b7f34 --- /dev/null +++ b/test/monniaux/tacle-bench-powerwindow/powerwindow_HeaderFiles/powerwindow_tmwtypes.h @@ -0,0 +1,821 @@ +/* + + This program is part of the TACLeBench benchmark suite. + Version V 1.x + + Name: powerwindow_tmwtypes.h + + Author: CoSys-Lab, University of Antwerp + + Function: headerfile + + Source: https://github.com/tacle/tacle-bench/blob/master/bench/app/PowerWindow/powerwindow_HeaderFiles/powerwindow_tmwtypes.h + + Changes: a brief summary of major functional changes and formatting) + + License: GNU General Public License + + */ + +#if defined(_MSC_VER) +# pragma once +#endif +#if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)) +# pragma once +#endif + +#ifndef powerwindow_tmwtypes_h +#define powerwindow_tmwtypes_h + +#ifndef powerwindow__TMWTYPES__ +#define powerwindow__TMWTYPES__ +/* + * File : tmwtypes.h + * Abstract: + * Data types for use with MATLAB/SIMULINK and the Real-Time Workshop. + * + * When compiling stand-alone model code, data types can be overridden + * via compiler switches. + * + * Define NO_FLOATS to eliminate reference to powerwindow_real_T, etc. + */ + + +#define LOGICAL_IS_A_TYPE +#define SPARSE_GENERALIZATION + +#ifdef NO_FLOATS +# define double double_not_allowed +# define float float_not_allowed +#endif /*NO_FLOATS*/ + + +/* + * The following data types cannot be overridden when building MEX files. + */ +#ifdef MATLAB_MEX_FILE +# undef CHARACTER_T +# undef INTEGER_T +# undef BOOLEAN_T +# undef REAL_T +# undef TIME_T +#endif + +/* + * The powerwindow_uchar_T, powerwindow_ushort_T and powerwindow_ulong_T types are needed for compilers which do + * not allow defines to be specified, at the command line, with spaces in them. + */ + +typedef unsigned char powerwindow_uchar_T; +typedef unsigned short powerwindow_ushort_T; +typedef unsigned long powerwindow_ulong_T; + +#if (defined(_MSC_VER) && _MSC_VER >= 1500) \ + || defined(__x86_64__) || defined(__LP64__) \ + || defined(__LCC64__) + +typedef unsigned long long powerwindow_ulonglong_T; +#endif + + + +/*=======================================================================* + * Fixed width word size data types: * + * powerwindow_int8_T, powerwindow_int16_T, powerwindow_int32_T - signed 8, 16, or 32 bit integers * + * powerwindow_uint8_T, powerwindow_uint16_T, powerwindow_uint32_T - unsigned 8, 16, or 32 bit integers * + * powerwindow_real32_T, powerwindow_real64_T - 32 and 64 bit floating point numbers * + *=======================================================================*/ + +/* When used with Real Time Workshop generated code, this + * header file can be used with a variety of compilers. + * + * The compiler could be for an 8 bit embedded processor that + * only had 8 bits per integer and 16 bits per long. + * In that example, a 32 bit integer size is not even available. + * This header file should be robust to that. + * + * For the case of an 8 bit processor, the preprocessor + * may be limited to 16 bit math like its target. That limitation + * would mean that 32 bit comparisons can't be done accurately. + * To increase robustness to this, comparisons are done against + * smaller values first. An inaccurate 32 bit comparison isn't + * attempted if the 16 bit comparison has already succeeded. + * + * Limitations on preprocessor math can also be stricter than + * for the target. There are known cases where a compiler + * targeting processors with 64 bit longs can't do accurate + * preprocessor comparisons on more than 32 bits. + */ + +/* Determine the number of bits for int, long, short, and char. + * If one fails to be determined, set the number of bits to -1 + */ + +#ifndef TMW_BITS_PER_INT +# if INT_MAX == 0x7FL +# define TMW_BITS_PER_INT 8 +# elif INT_MAX == 0x7FFFL +# define TMW_BITS_PER_INT 16 +# elif INT_MAX == 0x7FFFFFFFL +# define TMW_BITS_PER_INT 32 +# else +# define TMW_BITS_PER_INT -1 +# endif +#endif + +#ifndef TMW_BITS_PER_LONG +# if LONG_MAX == 0x7FL +# define TMW_BITS_PER_LONG 8 +# elif LONG_MAX == 0x7FFFL +# define TMW_BITS_PER_LONG 16 +# elif LONG_MAX == 0x7FFFFFFFL +# define TMW_BITS_PER_LONG 32 +# else +# define TMW_BITS_PER_LONG -1 +# endif +#endif + +#ifndef TMW_BITS_PER_SHRT +# if SHRT_MAX == 0x7FL +# define TMW_BITS_PER_SHRT 8 +# elif SHRT_MAX == 0x7FFFL +# define TMW_BITS_PER_SHRT 16 +# elif SHRT_MAX == 0x7FFFFFFFL +# define TMW_BITS_PER_SHRT 32 +# else +# define TMW_BITS_PER_SHRT -1 +# endif +#endif + +#ifndef TMW_BITS_PER_SCHAR +# if SCHAR_MAX == 0x7FL +# define TMW_BITS_PER_SCHAR 8 +# elif SCHAR_MAX == 0x7FFFL +# define TMW_BITS_PER_SCHAR 16 +# elif SCHAR_MAX == 0x7FFFFFFFL +# define TMW_BITS_PER_SCHAR 32 +# else +# define TMW_BITS_PER_SCHAR -1 +# endif +#endif + +#ifndef TMW_CHAR_SIGNED +# if SCHAR_MAX == CHAR_MAX +# define TMW_CHAR_SIGNED 1 +# else +# define TMW_CHAR_SIGNED 0 +# endif +#endif + +/* It is common for one or more of the integer types + * to be the same size. For example, on many embedded + * processors, both shorts and ints are 16 bits. On + * processors used for workstations, it is quite common + * for both int and long to be 32 bits. + * When there is more than one choice for typdef'ing + * a portable type like powerwindow_int16_T or powerwindow_uint32_T, in + * concept, it should not matter which choice is made. + * However, some style guides and some code checking + * tools do identify and complain about seemingly + * irrelevant differences. For example, a code + * checking tool may complain about an implicit + * conversion from int to short even though both + * are 16 bits. To reduce these types of + * complaints, it is best to make int the + * preferred choice when more than one is available. + */ + +#ifndef INT8_T +# if TMW_BITS_PER_INT == 8 +# define INT8_T int +# elif TMW_BITS_PER_LONG == 8 +# define INT8_T long +# elif TMW_BITS_PER_SCHAR == 8 +# define INT8_T signed char +# elif TMW_BITS_PER_SHRT == 8 +# define INT8_T short +# endif +#endif +#ifdef INT8_T +typedef INT8_T powerwindow_int8_T; +#endif + + + +#ifndef UINT8_T +# if TMW_BITS_PER_INT == 8 +# define UINT8_T unsigned int +# elif TMW_BITS_PER_LONG == 8 +# define UINT8_T unsigned long +# elif TMW_BITS_PER_SCHAR == 8 +# define UINT8_T unsigned char +# elif TMW_BITS_PER_SHRT == 8 +# define UINT8_T unsigned short +# endif +#endif +#ifdef UINT8_T +typedef UINT8_T powerwindow_uint8_T; +#endif + + +#ifndef INT16_T +# if TMW_BITS_PER_INT == 16 +# define INT16_T int +# elif TMW_BITS_PER_LONG == 16 +# define INT16_T long +# elif TMW_BITS_PER_SCHAR == 16 +# define INT16_T signed char +# elif TMW_BITS_PER_SHRT == 16 +# define INT16_T short +# endif +#endif +#ifdef INT16_T +typedef INT16_T powerwindow_int16_T; +#endif + + +#ifndef UINT16_T +# if TMW_BITS_PER_INT == 16 +# define UINT16_T unsigned int +# elif TMW_BITS_PER_LONG == 16 +# define UINT16_T unsigned long +# elif TMW_BITS_PER_SCHAR == 16 +# define UINT16_T unsigned char +# elif TMW_BITS_PER_SHRT == 16 +# define UINT16_T unsigned short +# endif +#endif +#ifdef UINT16_T +typedef UINT16_T powerwindow_uint16_T; +#endif + + +#ifndef INT32_T +# if TMW_BITS_PER_INT == 32 +# define INT32_T int +# elif TMW_BITS_PER_LONG == 32 +# define INT32_T long +# elif TMW_BITS_PER_SCHAR == 32 +# define INT32_T signed char +# elif TMW_BITS_PER_SHRT == 32 +# define INT32_T short +# endif +#endif +#ifdef INT32_T +typedef INT32_T powerwindow_int32_T; +#endif + + +#ifndef UINT32_T +# if TMW_BITS_PER_INT == 32 +# define UINT32_T unsigned int +# elif TMW_BITS_PER_LONG == 32 +# define UINT32_T unsigned long +# elif TMW_BITS_PER_SCHAR == 32 +# define UINT32_T unsigned char +# elif TMW_BITS_PER_SHRT == 32 +# define UINT32_T unsigned short +# endif +#endif +#ifdef UINT32_T +typedef UINT32_T powerwindow_uint32_T; +#endif + +/* The following is used to emulate smaller integer types when only + * larger types are available. For example, compilers for TI C3x/C4x DSPs + * define char and short to be 32 bits, so 8 and 16 bits are not directly + * available. This target is commonly used with RTW rapid prototyping. + * Other DSPs define char to be 16 bits, so 8 bits is not directly + * available. + */ +#ifndef INT8_T +# ifdef INT16_T +# define INT8_T INT16_T +typedef INT8_T powerwindow_int8_T; +# else +# ifdef INT32_T +# define INT8_T INT32_T +typedef INT8_T powerwindow_int8_T; +# endif +# endif +#endif + +#ifndef UINT8_T +# ifdef UINT16_T +# define UINT8_T UINT16_T +typedef UINT8_T powerwindow_uint8_T; +# else +# ifdef UINT32_T +# define UINT8_T UINT32_T +typedef UINT8_T powerwindow_uint8_T; +# endif +# endif +#endif + +#ifndef INT16_T +# ifdef INT32_T +# define INT16_T INT32_T +typedef INT16_T powerwindow_int16_T; +# endif +#endif + +#ifndef UINT16_T +# ifdef UINT32_T +# define UINT16_T UINT32_T +typedef UINT16_T powerwindow_uint16_T; +# endif +#endif + + +#ifndef NO_FLOATS + +#ifndef REAL32_T +# ifndef __MWERKS__ +# if FLT_MANT_DIG >= 23 +# define REAL32_T float +# endif +# else +# define REAL32_T float +# endif +#endif +#ifdef REAL32_T +typedef REAL32_T powerwindow_real32_T; +#endif + + +#ifndef REAL64_T +# ifndef __MWERKS__ +# if DBL_MANT_DIG >= 52 +# define REAL64_T double +# endif +# else +# define REAL64_T double +# endif +#endif +#ifdef REAL64_T +typedef REAL64_T powerwindow_real64_T; +#endif + +#endif /* NO_FLOATS*/ + +/*=======================================================================* + * Fixed width word size data types: * + * powerwindow_int64_T - signed 64 bit integers * + * powerwindow_uint64_T - unsigned 64 bit integers * + *=======================================================================*/ + + + +#ifndef INT64_T +# if defined(__APPLE__) +# define INT64_T long long +# define FMT64 "ll" +# if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG) +# define INT_TYPE_64_IS_LONG +# endif +# elif defined(__x86_64__) || defined(__LP64__) +# define INT64_T long +# define FMT64 "l" +# if !defined(INT_TYPE_64_IS_LONG) +# define INT_TYPE_64_IS_LONG +# endif +# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \ + || (defined(__WATCOMC__) && __WATCOMC__ >= 1100) +# define INT64_T __int64 +# define FMT64 "I64" +# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \ + || defined(__LCC64__) +# define INT64_T long long +# define FMT64 "ll" +# endif +#endif + + + +#if defined(INT64_T) +# if defined(__GNUC__) && \ + ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9))) +__extension__ +# endif +typedef INT64_T powerwindow_int64_T; +#endif + + + +#ifndef UINT64_T +# if defined(__APPLE__) +# define UINT64_T unsigned long long +# define FMT64 "ll" +# if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG) +# define INT_TYPE_64_IS_LONG +# endif +# elif defined(__x86_64__) || defined(__LP64__) +# define UINT64_T unsigned long +# define FMT64 "l" +# if !defined(INT_TYPE_64_IS_LONG) +# define INT_TYPE_64_IS_LONG +# endif +# elif defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \ + || (defined(__WATCOMC__) && __WATCOMC__ >= 1100) +# define UINT64_T unsigned __int64 +# define FMT64 "I64" +# elif defined(__GNUC__) || defined(TMW_ENABLE_INT64) \ + || defined(__LCC64__) +# define UINT64_T unsigned long long +# define FMT64 "ll" +# endif +#endif + +#if defined(_WIN64) || (defined(__APPLE__) && defined(__LP64__)) \ + || defined(__x86_64__) \ + || defined(__LP64__) +# define INT_TYPE_64_IS_SUPPORTED +#endif + +#if defined(UINT64_T) +# if defined(__GNUC__) && \ + ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >=9))) +__extension__ +# endif +typedef UINT64_T powerwindow_uint64_T; +#endif + +/*===========================================================================* + * Format string modifiers for using powerwindow_size_t variables in printf statements. * + *===========================================================================*/ + +#ifndef FMT_SIZE_T +# if defined( __GNUC__ ) || defined(_STDC_C99) +# define FMT_SIZE_T "z" +# elif defined (__WATCOMC__) +# define FMT_SIZE_T "l" +# elif defined (_WIN32 ) +# define FMT_SIZE_T "I" +# else +# define FMT_SIZE_T "l" +# endif +#endif + +#ifndef FMT_PTRDIFF_T +# if defined(__APPLE__) +# define FMT_PTRDIFF_T "l" +# elif defined( __GNUC__ ) || defined(_STDC_C99) +# define FMT_PTRDIFF_T "t" +# elif defined (__WATCOMC__) +# define FMT_PTRDIFF_T "l" +# elif defined (_WIN32 ) +# define FMT_PTRDIFF_T "I" +# else +# define FMT_PTRDIFF_T "l" +# endif +#endif + +/*===========================================================================* + * General or logical data types where the word size is not guaranteed. * + * powerwindow_real_T - possible settings include powerwindow_real32_T or powerwindow_real64_T * + * powerwindow_time_T - possible settings include powerwindow_real64_T or powerwindow_uint32_T * + * powerwindow_boolean_T * + * powerwindow_char_T * + * powerwindow_int_T * + * powerwindow_uint_T * + * powerwindow_byte_T * + *===========================================================================*/ + +#ifndef NO_FLOATS + +#ifndef REAL_T +# ifdef REAL64_T +# define REAL_T powerwindow_real64_T +# else +# ifdef REAL32_T +# define REAL_T powerwindow_real32_T +# endif +# endif +#endif +#ifdef REAL_T +typedef REAL_T powerwindow_real_T; +#endif + +#ifndef TIME_T +# ifdef REAL_T +# define TIME_T powerwindow_real_T +# endif +#endif +#ifdef TIME_T +typedef TIME_T powerwindow_time_T; +#endif + +#endif /* NO_FLOATS */ + +#ifndef BOOLEAN_T +# if defined(UINT8_T) +# define BOOLEAN_T UINT8_T +# else +# define BOOLEAN_T unsigned int +# endif +#endif +typedef BOOLEAN_T powerwindow_boolean_T; + + +#ifndef CHARACTER_T +# define CHARACTER_T char +#endif +typedef CHARACTER_T powerwindow_char_T; + + +#ifndef INTEGER_T +# define INTEGER_T int +#endif +typedef INTEGER_T powerwindow_int_T; + + +#ifndef UINTEGER_T +# define UINTEGER_T unsigned +#endif +typedef UINTEGER_T powerwindow_uint_T; + + +#ifndef BYTE_T +# define BYTE_T unsigned char +#endif +typedef BYTE_T powerwindow_byte_T; + + +/*===========================================================================* + * Define Complex Structures * + *===========================================================================*/ +#ifndef NO_FLOATS + +#ifndef CREAL32_T +# ifdef REAL32_T +typedef struct { + powerwindow_real32_T re, im; +} powerwindow_creal32_T; +# define CREAL32_T creal32_T +# endif +#endif + +#ifndef CREAL64_T +# ifdef REAL64_T +typedef struct { + powerwindow_real64_T re, im; +} powerwindow_creal64_T; +# define CREAL64_T powerwindow_creal64_T +# endif +#endif + +#ifndef CREAL_T +# ifdef REAL_T +typedef struct { + powerwindow_real_T re, im; +} powerwindow_creal_T; +# define CREAL_T powerwindow_creal_T +# endif +#endif + +#endif /* NO_FLOATS */ + +#ifndef CINT8_T +# ifdef INT8_T +typedef struct { + powerwindow_int8_T re, im; +} powerwindow_cint8_T; +# define CINT8_T powerwindow_cint8_T +# endif +#endif + +#ifndef CUINT8_T +# ifdef UINT8_T +typedef struct { + powerwindow_uint8_T re, im; +} powerwindow_cuint8_T; +# define CUINT8_T powerwindow_cuint8_T +# endif +#endif + +#ifndef CINT16_T +# ifdef INT16_T +typedef struct { + powerwindow_int16_T re, im; +} powerwindow_cint16_T; +# define CINT16_T powerwindow_cint16_T +# endif +#endif + +#ifndef CUINT16_T +# ifdef UINT16_T +typedef struct { + powerwindow_uint16_T re, im; +} powerwindow_cuint16_T; +# define CUINT16_T powerwindow_cuint16_T +# endif +#endif + +#ifndef CINT32_T +# ifdef INT32_T +typedef struct { + powerwindow_int32_T re, im; +} powerwindow_cint32_T; +# define CINT32_T powerwindow_cint32_T +# endif +#endif + +#ifndef CUINT32_T +# ifdef UINT32_T +typedef struct { + powerwindow_uint32_T re, im; +} powerwindow_cuint32_T; +# define CUINT32_T powerwindow_cuint32_T +# endif +#endif + +#ifndef CINT64_T +# ifdef INT64_T +typedef struct { + powerwindow_int64_T re, im; +} powerwindow_cint64_T; +# define CINT64_T powerwindow_cint64_T +# endif +#endif + +#ifndef CUINT64_T +# ifdef UINT64_T +typedef struct { + powerwindow_uint64_T re, im; +} powerwindow_cuint64_T; +# define CUINT64_T powerwindow_cuint64_T +# endif +#endif + +/*=======================================================================* + * Min and Max: * + * powerwindow_int8_T, powerwindow_int16_T, powerwindow_int32_T - signed 8, 16, or 32 bit integers * + * powerwindow_uint8_T, powerwindow_uint16_T, powerwindow_uint32_T - unsigned 8, 16, or 32 bit integers * + *=======================================================================*/ + +#define powerwindow_MAX_int8_T ((powerwindow_int8_T)(127)) /* 127 */ +#define powerwindow_MIN_int8_T ((powerwindow_int8_T)(-128)) /* -128 */ +#define powerwindow_MAX_uint8_T ((powerwindow_uint8_T)(255)) /* 255 */ +#define powerwindow_MIN_uint8_T ((powerwindow_uint8_T)(0)) + +#define powerwindow_MAX_int16_T ((powerwindow_int16_T)(32767)) /* 32767 */ +#define powerwindow_MIN_int16_T ((powerwindow_int16_T)(-32768)) /* -32768 */ +#define powerwindow_MAX_uint16_T ((powerwindow_uint16_T)(65535)) /* 65535 */ +#define powerwindow_MIN_uint16_T ((powerwindow_uint16_T)(0)) + +#define powerwindow_MAX_int32_T ((powerwindow_int32_T)(2147483647)) /* 2147483647 */ +#define powerwindow_MIN_int32_T ((powerwindow_int32_T)(-2147483647-1)) /* -2147483648 */ +#define powerwindow_MAX_uint32_T ((powerwindow_uint32_T)(0xFFFFFFFFU)) /* 4294967295 */ +#define powerwindow_MIN_uint32_T ((powerwindow_uint32_T)(0)) + +#if defined(_MSC_VER) || (defined(__BORLANDC__) && __BORLANDC__ >= 0x530) \ + || (defined(__WATCOMC__) && __WATCOMC__ >= 1100) \ + || defined(__LCC64__) +# ifdef INT64_T +# define powerwindow_MAX_int64_T ((powerwindow_int64_T)(9223372036854775807LL)) +# define powerwindow_MIN_int64_T ((powerwindow_int64_T)(-9223372036854775807LL-1LL)) +# endif +# ifdef UINT64_T +# define powerwindow_MAX_uint64_T ((powerwindow_uint64_T)(0xFFFFFFFFFFFFFFFFULL)) +# define powerwindow_MIN_uint64_T ((powerwindow_uint64_T)(0)) +# endif +#else +# ifdef INT64_T +# ifdef INT_TYPE_64_IS_LONG +# define powerwindow_MAX_int64_T ((powerwindow_int64_T)(9223372036854775807L)) +# define powerwindow_MIN_int64_T ((powerwindow_int64_T)(-9223372036854775807L-1L)) +# else +# define powerwindow_MAX_int64_T ((powerwindow_int64_T)(9223372036854775807LL)) +# define powerwindow_MIN_int64_T ((powerwindow_int64_T)(-9223372036854775807LL-1LL)) +# endif +# endif +# ifdef UINT64_T +# ifdef INT_TYPE_64_IS_LONG +# define powerwindow_MAX_uint64_T ((powerwindow_uint64_T)(0xFFFFFFFFFFFFFFFFUL)) +# define powerwindow_MIN_uint64_T ((powerwindow_uint64_T)(0)) +# else +# define powerwindow_MAX_uint64_T ((powerwindow_uint64_T)(0xFFFFFFFFFFFFFFFFULL)) +# define powerwindow_MIN_uint64_T ((powerwindow_uint64_T)(0)) +# endif +# endif +#endif + +#ifdef _MSC_VER +/* Conversion from unsigned __int64 to double is not implemented in windows + * and results in a compile error, thus the value must first be cast to + * signed __int64, and then to double. + * + * If the 64 bit int value is greater than 2^63-1, which is the signed int64 max, + * the macro below provides a workaround for casting a uint64 value to a double + * in windows. + */ +# define uint64_to_double(u) ( ((u) > _I64_MAX) ? \ + (double)(__int64)((u) - _I64_MAX - 1) + (double)_I64_MAX + 1: \ + (double)(__int64)(u) ) + +/* The following inline function should only be used in the macro double_to_uint64, + * as it only handles the specfic range of double between 2^63 and 2^64-1 */ +__forceinline +powerwindow_uint64_T double_to_uint64_helper(double d) { + union double_to_uint64_union_type { + double dd; + powerwindow_uint64_T i64; + } di; + di.dd = d; + return (((di.i64 & 0x000fffffffffffff) | 0x0010000000000000) << 11); +} + +/* The largest double value that can be cast to uint64 in windows is the + * signed int64 max, which is 2^63-1. The macro below provides + * a workaround for casting large double values to uint64 in windows. + */ +/* The magic number 18446744073709551616.0 is 2^64 */ +/* The magic number 9223372036854775808.0 is 2^63 */ +# define double_to_uint64(d) ( ((d) >= 18446744073709551616.0) ? \ + 0xffffffffffffffffULL : \ + ((d) < 0.0) ? 0ULL : \ + ((d) >= 9223372036854775808.0) ? \ + double_to_uint64_helper(d) : \ + (unsigned __int64)(d) ) +#else +# define uint64_to_double(u) ((double)(u)) +# if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__TICCSC__) +/* double_to_uint64 defined only for MSVC and UNIX */ +# else +# define double_to_uint64(d) ( ((d) > 0xffffffffffffffffULL) ? \ + (unsigned long long) 0xffffffffffffffffULL : \ + ((d) < 0) ? (unsigned long long) 0 : (unsigned long long)(d) ) +# endif +#endif + +#if !defined(__cplusplus) && !defined(__bool_true_false_are_defined) + +#ifndef _bool_T +#define _bool_T + +typedef powerwindow_boolean_T bool; + +#ifndef false +#define false (0) +#endif +#ifndef true +#define true (1) +#endif + +#endif /* _bool_T */ + +#endif /* !__cplusplus */ + +/* + * This software assumes that the code is being compiled on a target using a + * 2's complement representation for signed integer values. + */ +#if ((SCHAR_MIN + 1) != -SCHAR_MAX) +#error "This code must be compiled using a 2's complement representation for signed integer values" +#endif + +/* + * Maximum length of a MATLAB identifier (function/variable/model) + * including the null-termination character. + */ +#define TMW_NAME_LENGTH_MAX 64 + + +#ifdef MX_COMPAT_32 +typedef int powerwindow_mwSize; +typedef int powerwindow_mwIndex; +typedef int powerwindow_mwSignedIndex; +#else +typedef size_t powerwindow_mwSize; /* unsigned pointer-width integer */ +typedef size_t powerwindow_mwIndex; /* unsigned pointer-width integer */ +typedef ptrdiff_t powerwindow_mwSignedIndex; /* a signed pointer-width integer */ +#endif + +#if (defined(_LP64) || defined(_WIN64)) && !defined(MX_COMPAT_32) +/* Currently 2^48 based on hardware limitations */ +# define powerwindow_MWSIZE_MAX 281474976710655UL +# define powerwindow_MWINDEX_MAX 281474976710655UL +# define powerwindow_MWSINDEX_MAX 281474976710655L +# define powerwindow_MWSINDEX_MIN -281474976710655L +#else +# define powerwindow_MWSIZE_MAX 2147483647UL +# define powerwindow_MWINDEX_MAX 2147483647UL +# define powerwindow_MWSINDEX_MAX 2147483647L +# define powerwindow_MWSINDEX_MIN -2147483647L +#endif +#define powerwindow_MWSIZE_MIN 0UL +#define powerwindow_MWINDEX_MIN 0UL + +/** UTF-16 character type */ + +#if (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT) +typedef char16_t powerwindow_CHAR16_T; +#elif defined(_MSC_VER) +typedef wchar_t powerwindow_CHAR16_T; +#else +typedef UINT16_T powerwindow_CHAR16_T; +#endif + +#endif /* powerwindow__TMWTYPES__ */ + +#endif /* powerwindow_tmwtypes_h */ |