1/*
2 * RaspberryForceTest.h
3 *
4 * Classroom License -- for classroom instructional use only. Not for
5 * government, commercial, academic research, or other organizational use.
6 *
7 * Code generation for model "RaspberryForceTest".
8 *
9 * Model version : 1.4
10 * Simulink Coder version : 8.11 (R2016b) 25-Aug-2016
11 * C source code generated on : Tue Dec 20 10:51:32 2016
12 *
13 * Target selection: ert.tlc
14 * Note: GRT includes extra infrastructure and instrumentation for prototyping
15 * Embedded hardware selection: ARM Compatible->ARM Cortex
16 * Code generation objectives: Unspecified
17 * Validation result: Not run
18 */
19
20#ifndef RTW_HEADER_RaspberryForceTest_h_
21#define RTW_HEADER_RaspberryForceTest_h_
22#include <math.h>
23#include <string.h>
24#include <float.h>
25#include <stddef.h>
26#ifndef RaspberryForceTest_COMMON_INCLUDES_
27# define RaspberryForceTest_COMMON_INCLUDES_
28#include "rtwtypes.h"
29#include "rtw_extmode.h"
30#include "sysran_types.h"
31#include "rtw_continuous.h"
32#include "rtw_solver.h"
33#include "dt_info.h"
34#include "ext_work.h"
35#endif /* RaspberryForceTest_COMMON_INCLUDES_ */
36
37#include "RaspberryForceTest_types.h"
38
39/* Shared type includes */
40#include "multiword_types.h"
41#include "rt_nonfinite.h"
42#include "rtGetInf.h"
43
44/* Macros for accessing real-time model data structure */
45#ifndef rtmGetFinalTime
46# define rtmGetFinalTime(rtm) ((rtm)->Timing.tFinal)
47#endif
48
49#ifndef rtmGetRTWExtModeInfo
50# define rtmGetRTWExtModeInfo(rtm) ((rtm)->extModeInfo)
51#endif
52
53#ifndef rtmGetErrorStatus
54# define rtmGetErrorStatus(rtm) ((rtm)->errorStatus)
55#endif
56
57#ifndef rtmSetErrorStatus
58# define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val))
59#endif
60
61#ifndef rtmGetStopRequested
62# define rtmGetStopRequested(rtm) ((rtm)->Timing.stopRequestedFlag)
63#endif
64
65#ifndef rtmSetStopRequested
66# define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
67#endif
68
69#ifndef rtmGetStopRequestedPtr
70# define rtmGetStopRequestedPtr(rtm) (&((rtm)->Timing.stopRequestedFlag))
71#endif
72
73#ifndef rtmGetT
74# define rtmGetT(rtm) ((rtm)->Timing.taskTime0)
75#endif
76
77#ifndef rtmGetTFinal
78# define rtmGetTFinal(rtm) ((rtm)->Timing.tFinal)
79#endif
80
81/* Block signals (auto storage) */
82typedef struct {
83 real_T Constant[2]; /* '<Root>/Constant' */
84 real_T MagManFoilwitherror_o1; /* '<S1>/MagMan Foil with error' */
85 real_T MagManFoilwitherror_o2; /* '<S1>/MagMan Foil with error' */
86 real_T MagManFoilwitherror_o3; /* '<S1>/MagMan Foil with error' */
87 real_T MagManlinearization_o1[16]; /* '<S6>/MagMan linearization' */
88 real_T MagManlinearization_o2; /* '<S6>/MagMan linearization' */
89 real_T Gain[2]; /* '<Root>/Gain' */
90 real_T pw[16]; /* '<Root>/pwm' */
91 real_T Ao[32]; /* '<S6>/Embedded MATLAB Function' */
92 real_T u[16];
93 real_T y[16]; /* '<Root>/MATLAB Function' */
94 real_T TmpSignalConversionAtsfunxyInpo[2];
95 real_T TmpSignalConversionAtsfunxyIn_n[2];
96 real_T X; /* '<S1>/Position transformation' */
97 real_T Y; /* '<S1>/Position transformation' */
98 real_T d;
99 int32_T MagManFoilwitherror_o4; /* '<S1>/MagMan Foil with error' */
100} B_RaspberryForceTest_T;
101
102/* Block states (auto storage) for system '<Root>' */
103typedef struct {
104 real_T MagManFoilwitherror_DSTATE; /* '<S1>/MagMan Foil with error' */
105 real_T MagManCoils_DSTATE; /* '<Root>/MagMan Coils' */
106 struct {
107 void *LoggedData[2];
108 } ForceX_PWORK; /* '<Root>/Force X' */
109
110 struct {
111 void *LoggedData[2];
112 } ForceY_PWORK; /* '<Root>/Force Y' */
113
114 struct {
115 void *LoggedData[2];
116 } Position_PWORK; /* '<Root>/Position' */
117
118 struct {
119 void *LoggedData[2];
120 } Nomalizedposition_PWORK; /* '<S1>/Nomalized position' */
121
122 struct {
123 void *LoggedData[3];
124 } Scope1_PWORK; /* '<S1>/Scope1' */
125} DW_RaspberryForceTest_T;
126
127/* Parameters (auto storage) */
128struct P_RaspberryForceTest_T_ {
129 real_T km4pi[9]; /* Variable: km4pi
130 * Referenced by: '<S1>/Sentinel Calibration matrix'
131 */
132 real_T Constant_Value[2]; /* Expression: [0.05, -0.05]
133 * Referenced by: '<Root>/Constant'
134 */
135 real_T Gain_Gain; /* Expression: 1/68
136 * Referenced by: '<Root>/Gain'
137 */
138};
139
140/* Real-time Model Data Structure */
141struct tag_RTM_RaspberryForceTest_T {
142 const char_T *errorStatus;
143 RTWExtModeInfo *extModeInfo;
144
145 /*
146 * Sizes:
147 * The following substructure contains sizes information
148 * for many of the model attributes such as inputs, outputs,
149 * dwork, sample times, etc.
150 */
151 struct {
152 uint32_T checksums[4];
153 } Sizes;
154
155 /*
156 * SpecialInfo:
157 * The following substructure contains special information
158 * related to other components that are dependent on RTW.
159 */
160 struct {
161 const void *mappingInfo;
162 } SpecialInfo;
163
164 /*
165 * Timing:
166 * The following substructure contains information regarding
167 * the timing information for the model.
168 */
169 struct {
170 time_T taskTime0;
171 uint32_T clockTick0;
172 uint32_T clockTickH0;
173 time_T stepSize0;
174 time_T tFinal;
175 boolean_T stopRequestedFlag;
176 } Timing;
177};
178
179/* Block parameters (auto storage) */
180extern P_RaspberryForceTest_T RaspberryForceTest_P;
181
182/* Block signals (auto storage) */
183extern B_RaspberryForceTest_T RaspberryForceTest_B;
184
185/* Block states (auto storage) */
186extern DW_RaspberryForceTest_T RaspberryForceTest_DW;
187
188/* Model entry point functions */
189extern void RaspberryForceTest_initialize(void);
190extern void RaspberryForceTest_step(void);
191extern void RaspberryForceTest_terminate(void);
192
193/* Real-time Model object */
194extern RT_MODEL_RaspberryForceTest_T *const RaspberryForceTest_M;
195
196/*-
197 * The generated code includes comments that allow you to trace directly
198 * back to the appropriate location in the model. The basic format
199 * is <system>/block_name, where system is the system number (uniquely
200 * assigned by Simulink) and block_name is the name of the block.
201 *
202 * Use the MATLAB hilite_system command to trace the generated code back
203 * to the model. For example,
204 *
205 * hilite_system('<S3>') - opens system 3
206 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
207 *
208 * Here is the system hierarchy for this model
209 *
210 * '<Root>' : 'RaspberryForceTest'
211 * '<S1>' : 'RaspberryForceTest/Foil position '
212 * '<S2>' : 'RaspberryForceTest/MATLAB Function'
213 * '<S3>' : 'RaspberryForceTest/Nonlinearity of magnetic force'
214 * '<S4>' : 'RaspberryForceTest/XY Graph'
215 * '<S5>' : 'RaspberryForceTest/XY Graph1'
216 * '<S6>' : 'RaspberryForceTest/linearization'
217 * '<S7>' : 'RaspberryForceTest/pwm'
218 * '<S8>' : 'RaspberryForceTest/Foil position /Position transformation'
219 * '<S9>' : 'RaspberryForceTest/linearization/Embedded MATLAB Function'
220 */
221#endif /* RTW_HEADER_RaspberryForceTest_h_ */
222