MBSD_assignment / Controller_Slave
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Controller_Slave.h Source File

Controller_Slave.h

00001 /*
00002  * Academic License - for use in teaching, academic research, and meeting
00003  * course requirements at degree granting institutions only.  Not for
00004  * government, commercial, or other organizational use.
00005  *
00006  * File: Controller_Slave.h
00007  *
00008  * Code generated for Simulink model 'Controller_Slave'.
00009  *
00010  * Model version                  : 1.7
00011  * Simulink Coder version         : 8.10 (R2016a) 10-Feb-2016
00012  * C/C++ source code generated on : Sun Jul 10 15:19:51 2016
00013  *
00014  * Target selection: ert.tlc
00015  * Embedded hardware selection: ARM Compatible->ARM Cortex
00016  * Code generation objectives: Unspecified
00017  * Validation result: Not run
00018  */
00019 
00020 #ifndef RTW_HEADER_Controller_Slave_h_
00021 #define RTW_HEADER_Controller_Slave_h_
00022 #include "rtwtypes.h"
00023 #include <math.h>
00024 #include <string.h>
00025 #include <stddef.h>
00026 #ifndef Controller_Slave_COMMON_INCLUDES_
00027 # define Controller_Slave_COMMON_INCLUDES_
00028 #include "rtwtypes.h"
00029 #endif                                 /* Controller_Slave_COMMON_INCLUDES_ */
00030 
00031 /* Macros for accessing real-time model data structure */
00032 #ifndef rtmGetBlockIO
00033 # define rtmGetBlockIO(rtm)            ((rtm)->ModelData.blockIO)
00034 #endif
00035 
00036 #ifndef rtmSetBlockIO
00037 # define rtmSetBlockIO(rtm, val)       ((rtm)->ModelData.blockIO = (val))
00038 #endif
00039 
00040 #ifndef rtmGetDefaultParam
00041 # define rtmGetDefaultParam(rtm)       ((rtm)->ModelData.defaultParam)
00042 #endif
00043 
00044 #ifndef rtmSetDefaultParam
00045 # define rtmSetDefaultParam(rtm, val)  ((rtm)->ModelData.defaultParam = (val))
00046 #endif
00047 
00048 #ifndef rtmGetRootDWork
00049 # define rtmGetRootDWork(rtm)          ((rtm)->ModelData.dwork)
00050 #endif
00051 
00052 #ifndef rtmSetRootDWork
00053 # define rtmSetRootDWork(rtm, val)     ((rtm)->ModelData.dwork = (val))
00054 #endif
00055 
00056 #ifndef rtmGetErrorStatus
00057 # define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
00058 #endif
00059 
00060 #ifndef rtmSetErrorStatus
00061 # define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
00062 #endif
00063 
00064 /* Forward declaration for rtModel */
00065 typedef struct tag_RTM_Controller_Slave_T RT_MODEL_Controller_Slave_T;
00066 
00067 /* Block signals (auto storage) */
00068 typedef struct {
00069   real_T Led_Blue;                     /* '<S1>/AEB_QA' */
00070 } B_Controller_Slave_T;
00071 
00072 /* Block states (auto storage) for system '<Root>' */
00073 typedef struct {
00074   uint32_T temporalCounter_i1;         /* '<S1>/select_command' */
00075   uint8_T Memory_PreviousInput;        /* '<S1>/Memory' */
00076   uint8_T is_active_c6_Controller_Slave;/* '<S1>/select_command' */
00077   uint8_T is_c6_Controller_Slave;      /* '<S1>/select_command' */
00078   uint8_T is_BLINK;                    /* '<S1>/select_command' */
00079   uint8_T is_active_c5_Controller_Slave;/* '<S1>/AEB_QA' */
00080   uint8_T is_ERRORS_CHECK_THREAD;      /* '<S1>/AEB_QA' */
00081   uint8_T is_APPLICATION_THREAD;       /* '<S1>/AEB_QA' */
00082   uint8_T is_AEB_ACTIVE;               /* '<S1>/AEB_QA' */
00083   uint8_T is_QA_ACTIVE;                /* '<S1>/AEB_QA' */
00084   boolean_T En;                        /* '<S1>/AEB_QA' */
00085 } DW_Controller_Slave_T;
00086 
00087 /* Parameters (auto storage) */
00088 struct P_Controller_Slave_T_ {
00089   uint8_T Memory_X0;                   /* Computed Parameter: Memory_X0
00090                                         * Referenced by: '<S1>/Memory'
00091                                         */
00092 };
00093 
00094 /* Parameters (auto storage) */
00095 typedef struct P_Controller_Slave_T_ P_Controller_Slave_T;
00096 
00097 /* Real-time Model Data Structure */
00098 struct tag_RTM_Controller_Slave_T {
00099   const char_T *errorStatus;
00100 
00101   /*
00102    * ModelData:
00103    * The following substructure contains information regarding
00104    * the data used in the model.
00105    */
00106   struct {
00107     B_Controller_Slave_T *blockIO;
00108     P_Controller_Slave_T *defaultParam;
00109     DW_Controller_Slave_T *dwork;
00110   } ModelData;
00111 };
00112 
00113 /* Model entry point functions */
00114 extern void Controller_Slave_initialize(RT_MODEL_Controller_Slave_T *const
00115   Controller_Slave_M, real_T *Controller_Slave_U_V, real_T
00116   *Controller_Slave_U_D_S, uint8_T *Controller_Slave_U_Master, boolean_T
00117   *Controller_Slave_U_QA_EN, uint8_T *Controller_Slave_Y_BRAKE, uint8_T
00118   *Controller_Slave_Y_ACC, uint8_T *Controller_Slave_Y_LED_RED, uint8_T
00119   *Controller_Slave_Y_LED_GREEN, uint8_T *Controller_Slave_Y_LED_BLUE, uint8_T
00120   *Controller_Slave_Y_SLAVE);
00121 extern void Controller_Slave_step(RT_MODEL_Controller_Slave_T *const
00122   Controller_Slave_M, real_T Controller_Slave_U_V, real_T Controller_Slave_U_D_S,
00123   uint8_T Controller_Slave_U_Master, boolean_T Controller_Slave_U_QA_EN, uint8_T
00124   *Controller_Slave_Y_BRAKE, uint8_T *Controller_Slave_Y_ACC, uint8_T
00125   *Controller_Slave_Y_LED_RED, uint8_T *Controller_Slave_Y_LED_GREEN, uint8_T
00126   *Controller_Slave_Y_LED_BLUE, uint8_T *Controller_Slave_Y_SLAVE);
00127 extern void Controller_Slave_terminate(RT_MODEL_Controller_Slave_T *const
00128   Controller_Slave_M);
00129 
00130 /*-
00131  * The generated code includes comments that allow you to trace directly
00132  * back to the appropriate location in the model.  The basic format
00133  * is <system>/block_name, where system is the system number (uniquely
00134  * assigned by Simulink) and block_name is the name of the block.
00135  *
00136  * Note that this particular code originates from a subsystem build,
00137  * and has its own system numbers different from the parent model.
00138  * Refer to the system hierarchy for this subsystem below, and use the
00139  * MATLAB hilite_system command to trace the generated code back
00140  * to the parent model.  For example,
00141  *
00142  * hilite_system('Controller_Model_07_10_v01/Controller/Controller_Slave')    - opens subsystem Controller_Model_07_10_v01/Controller/Controller_Slave
00143  * hilite_system('Controller_Model_07_10_v01/Controller/Controller_Slave/Kp') - opens and selects block Kp
00144  *
00145  * Here is the system hierarchy for this model
00146  *
00147  * '<Root>' : 'Controller_Model_07_10_v01/Controller'
00148  * '<S1>'   : 'Controller_Model_07_10_v01/Controller/Controller_Slave'
00149  * '<S2>'   : 'Controller_Model_07_10_v01/Controller/Controller_Slave/AEB_QA'
00150  * '<S3>'   : 'Controller_Model_07_10_v01/Controller/Controller_Slave/select_command'
00151  */
00152 #endif                                 /* RTW_HEADER_Controller_Slave_h_ */
00153 
00154 /*
00155  * File trailer for generated code.
00156  *
00157  * [EOF]
00158  */
00159