1 | /* |
2 | * File: spring1.h |
3 | * |
4 | * Code generated for Simulink model 'spring1'. |
5 | * |
6 | * Model version : 1.23 |
7 | * Simulink Coder version : 8.10 (R2016a) 10-Feb-2016 |
8 | * C/C++ source code generated on : Sun Jun 05 15:43:23 2016 |
9 | * |
10 | * Target selection: ert.tlc |
11 | * Embedded hardware selection: ARM Compatible->ARM Cortex |
12 | * Emulation hardware selection: |
13 | * Differs from embedded hardware (MATLAB Host) |
14 | * Code generation objectives: |
15 | * 1. Execution efficiency |
16 | * 2. RAM efficiency |
17 | * Validation result: Not run |
18 | */ |
19 | |
20 | #ifndef RTW_HEADER_spring1_h_ |
21 | #define RTW_HEADER_spring1_h_ |
22 | #include <math.h> |
23 | #include <string.h> |
24 | #ifndef spring1_COMMON_INCLUDES_ |
25 | # define spring1_COMMON_INCLUDES_ |
26 | #include "rtwtypes.h" |
27 | #include "rtw_continuous.h" |
28 | #include "rtw_solver.h" |
29 | #endif /* spring1_COMMON_INCLUDES_ */ |
30 | |
31 | /* Macros for accessing real-time model data structure */ |
32 | #ifndef rtmGetErrorStatus |
33 | # define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) |
34 | #endif |
35 | |
36 | #ifndef rtmSetErrorStatus |
37 | # define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) |
38 | #endif |
39 | |
40 | #ifndef rtmGetStopRequested |
41 | # define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag) |
42 | #endif |
43 | |
44 | #ifndef rtmSetStopRequested |
45 | # define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val)) |
46 | #endif |
47 | |
48 | #ifndef rtmGetStopRequestedPtr |
49 | # define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag)) |
50 | #endif |
51 | |
52 | #ifndef rtmGetT |
53 | # define rtmGetT(rtm) (rtmGetTPtr((rtm))[0]) |
54 | #endif |
55 | |
56 | /* Forward declaration for rtModel */ |
57 | typedef struct tag_RTM RT_MODEL; |
58 | |
59 | /* Block signals and states (auto storage) for system '<Root>' */ |
60 | typedef struct { |
61 | real_T Integratey; /* '<Root>/Integrate y''' */ |
62 | real_T Sum; /* '<Root>/Sum' */ |
63 | } DW; |
64 | |
65 | /* Continuous states (auto storage) */ |
66 | typedef struct { |
67 | real_T Integratey_CSTATE; /* '<Root>/Integrate y'' */ |
68 | real_T Integratey_CSTATE_a; /* '<Root>/Integrate y''' */ |
69 | } X; |
70 | |
71 | /* State derivatives (auto storage) */ |
72 | typedef struct { |
73 | real_T Integratey_CSTATE; /* '<Root>/Integrate y'' */ |
74 | real_T Integratey_CSTATE_a; /* '<Root>/Integrate y''' */ |
75 | } XDot; |
76 | |
77 | /* State disabled */ |
78 | typedef struct { |
79 | boolean_T Integratey_CSTATE; /* '<Root>/Integrate y'' */ |
80 | boolean_T Integratey_CSTATE_a; /* '<Root>/Integrate y''' */ |
81 | } XDis; |
82 | |
83 | #ifndef ODE3_INTG |
84 | #define ODE3_INTG |
85 | |
86 | /* ODE3 Integration Data */ |
87 | typedef struct { |
88 | real_T *y; /* output */ |
89 | real_T *f[3]; /* derivatives */ |
90 | } ODE3_IntgData; |
91 | |
92 | #endif |
93 | |
94 | /* Real-time Model Data Structure */ |
95 | struct tag_RTM { |
96 | const char_T *errorStatus; |
97 | RTWSolverInfo solverInfo; |
98 | |
99 | /* |
100 | * ModelData: |
101 | * The following substructure contains information regarding |
102 | * the data used in the model. |
103 | */ |
104 | struct { |
105 | X *contStates; |
106 | int_T *periodicContStateIndices; |
107 | real_T *periodicContStateRanges; |
108 | real_T *derivs; |
109 | boolean_T *contStateDisabled; |
110 | boolean_T zCCacheNeedsReset; |
111 | boolean_T derivCacheNeedsReset; |
112 | boolean_T blkStateChange; |
113 | real_T odeY[2]; |
114 | real_T odeF[3][2]; |
115 | ODE3_IntgData intgData; |
116 | } ModelData; |
117 | |
118 | /* |
119 | * Sizes: |
120 | * The following substructure contains sizes information |
121 | * for many of the model attributes such as inputs, outputs, |
122 | * dwork, sample times, etc. |
123 | */ |
124 | struct { |
125 | int_T numContStates; |
126 | int_T numPeriodicContStates; |
127 | int_T numSampTimes; |
128 | } Sizes; |
129 | |
130 | /* |
131 | * Timing: |
132 | * The following substructure contains information regarding |
133 | * the timing information for the model. |
134 | */ |
135 | struct { |
136 | uint32_T clockTick0; |
137 | time_T stepSize0; |
138 | uint32_T clockTick1; |
139 | SimTimeStep simTimeStep; |
140 | boolean_T stopRequestedFlag; |
141 | time_T *t; |
142 | time_T tArray[2]; |
143 | } Timing; |
144 | }; |
145 | |
146 | /* Continuous states (auto storage) */ |
147 | extern X rtX; |
148 | |
149 | /* Block signals and states (auto storage) */ |
150 | extern DW rtDW; |
151 | |
152 | /* Model entry point functions */ |
153 | extern void spring1_initialize(void); |
154 | extern void spring1_step(void); |
155 | |
156 | /* Real-time Model object */ |
157 | extern RT_MODEL *const rtM; |
158 | |
159 | /*- |
160 | * These blocks were eliminated from the model due to optimizations: |
161 | * |
162 | * Block '<Root>/Scope' : Unused code path elimination |
163 | * Block '<Root>/Gain y'' : Eliminated nontunable gain of 1 |
164 | */ |
165 | |
166 | /*- |
167 | * The generated code includes comments that allow you to trace directly |
168 | * back to the appropriate location in the model. The basic format |
169 | * is <system>/block_name, where system is the system number (uniquely |
170 | * assigned by Simulink) and block_name is the name of the block. |
171 | * |
172 | * Use the MATLAB hilite_system command to trace the generated code back |
173 | * to the model. For example, |
174 | * |
175 | * hilite_system('<S3>') - opens system 3 |
176 | * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3 |
177 | * |
178 | * Here is the system hierarchy for this model |
179 | * |
180 | * '<Root>' : 'spring1' |
181 | */ |
182 | #endif /* RTW_HEADER_spring1_h_ */ |
183 | |
184 | /* |
185 | * File trailer for generated code. |
186 | * |
187 | * [EOF] |
188 | */ |
189 |