1/*
2 * File: GlobalPosition_demo_ec.h
3 *
4 * Code generated for Simulink model 'GlobalPosition_demo_ec'.
5 *
6 * Model version : 1.25
7 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
8 * C/C++ source code generated on : Tue Oct 29 09:31:22 2019
9 *
10 * Target selection: ert.tlc
11 * Embedded hardware selection: Intel->x86-64 (Windows64)
12 * Code generation objectives:
13 * 1. Execution efficiency
14 * 2. RAM efficiency
15 * Validation result: Not run
16 */
17
18#ifndef RTW_HEADER_GlobalPosition_demo_ec_h_
19#define RTW_HEADER_GlobalPosition_demo_ec_h_
20#include "rtwtypes.h"
21#include <math.h>
22#ifndef GlobalPosition_demo_ec_COMMON_INCLUDES_
23# define GlobalPosition_demo_ec_COMMON_INCLUDES_
24#include "rtwtypes.h"
25#endif /* GlobalPosition_demo_ec_COMMON_INCLUDES_ */
26
27/* Forward declaration for rtModel */
28typedef struct tag_RTM_GlobalPosition_demo_e_T RT_MODEL_GlobalPosition_demo__T;
29
30#ifndef DEFINED_TYPEDEF_FOR_sensorBus_
31#define DEFINED_TYPEDEF_FOR_sensorBus_
32
33typedef struct {
34 int8_T remoteCtrlCmd;
35 int32_T steeringEncoder;
36 int32_T driveEncoder;
37 real_T gyroAngleRad;
38 uint8_T usSensorFront;
39 uint8_T usSensorRight;
40 uint8_T usSensorLeft;
41} sensorBus;
42
43#endif
44
45/* Block signals and states (default storage) for model 'GlobalPosition_demo_ec' */
46typedef struct {
47 real_T UnitDelay_DSTATE; /* '<S1>/Unit Delay' */
48 real_T UnitDelay1_DSTATE; /* '<S1>/Unit Delay1' */
49} DW_GlobalPosition_demo_ec_f_T;
50
51/* Parameters (default storage) */
52struct P_GlobalPosition_demo_ec_T_ {
53 real_T UnitDelay_InitialCondition; /* Expression: 0
54 * Referenced by: '<S1>/Unit Delay'
55 */
56 real_T UnitDelay1_InitialCondition; /* Expression: 0
57 * Referenced by: '<S1>/Unit Delay1'
58 */
59};
60
61/* Parameters (default storage) */
62typedef struct P_GlobalPosition_demo_ec_T_ P_GlobalPosition_demo_ec_T;
63
64/* Real-time Model Data Structure */
65struct tag_RTM_GlobalPosition_demo_e_T {
66 const char_T **errorStatus;
67};
68
69typedef struct {
70 DW_GlobalPosition_demo_ec_f_T rtdw;
71 RT_MODEL_GlobalPosition_demo__T rtm;
72} MdlrefDW_GlobalPosition_demo__T;
73
74/* Model block global parameters (default storage) */
75extern real_T rtP_MOTOR_DRIVE_TRANSMISSION_RATIO;/* Variable: MOTOR_DRIVE_TRANSMISSION_RATIO
76 * Referenced by: '<S1>/WHEEL_SIZE_DEG1'
77 */
78extern real_T rtP_WHEEL_SIZE_DEG; /* Variable: WHEEL_SIZE_DEG
79 * Referenced by: '<S1>/WHEEL_SIZE_DEG'
80 */
81extern P_GlobalPosition_demo_ec_T GlobalPosition_demo_ec_P;
82
83/* Model reference registration function */
84extern void GlobalPosition_demo__initialize(const char_T **rt_errorStatus,
85 RT_MODEL_GlobalPosition_demo__T *const GlobalPosition_demo_ec_M);
86extern void GlobalPosition_demo_ec_Init(DW_GlobalPosition_demo_ec_f_T *localDW);
87extern void GlobalPosition_demo_ec(const int32_T *rtu_sensorBus_driveEncoder,
88 const real_T *rtu_sensorBus_gyroAngleRad, real_T rty_posGlobal[2],
89 DW_GlobalPosition_demo_ec_f_T *localDW);
90
91/*-
92 * The generated code includes comments that allow you to trace directly
93 * back to the appropriate location in the model. The basic format
94 * is <system>/block_name, where system is the system number (uniquely
95 * assigned by Simulink) and block_name is the name of the block.
96 *
97 * Use the MATLAB hilite_system command to trace the generated code back
98 * to the model. For example,
99 *
100 * hilite_system('<S3>') - opens system 3
101 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
102 *
103 * Here is the system hierarchy for this model
104 *
105 * '<Root>' : 'GlobalPosition_demo_ec'
106 * '<S1>' : 'GlobalPosition_demo_ec/GlobalPosition'
107 * '<S2>' : 'GlobalPosition_demo_ec/Model_Info'
108 * '<S3>' : 'GlobalPosition_demo_ec/GlobalPosition/Model_Info'
109 */
110#endif /* RTW_HEADER_GlobalPosition_demo_ec_h_ */
111
112/*
113 * File trailer for generated code.
114 *
115 * [EOF]
116 */
117