Library for the master controller

Dependents:   Test_Controller_Master AEB

Controller_Master.h

Committer:
AndreaAndreoli
Date:
2016-07-10
Revision:
3:66d07e7a134a
Parent:
2:d114feef8f3b

File content as of revision 3:66d07e7a134a:

/*
 * Academic License - for use in teaching, academic research, and meeting
 * course requirements at degree granting institutions only.  Not for
 * government, commercial, or other organizational use.
 *
 * File: Controller_Master.h
 *
 * Code generated for Simulink model 'Controller_Master'.
 *
 * Model version                  : 1.7
 * Simulink Coder version         : 8.10 (R2016a) 10-Feb-2016
 * C/C++ source code generated on : Sun Jul 10 14:56:51 2016
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Controller_Master_h_
#define RTW_HEADER_Controller_Master_h_
#include "rtwtypes.h"
#include <math.h>
#include <string.h>
#include <stddef.h>
#ifndef Controller_Master_COMMON_INCLUDES_
# define Controller_Master_COMMON_INCLUDES_
#include "rtwtypes.h"
#endif                                 /* Controller_Master_COMMON_INCLUDES_ */

/* Macros for accessing real-time model data structure */
#ifndef rtmGetBlockIO
# define rtmGetBlockIO(rtm)            ((rtm)->ModelData.blockIO)
#endif

#ifndef rtmSetBlockIO
# define rtmSetBlockIO(rtm, val)       ((rtm)->ModelData.blockIO = (val))
#endif

#ifndef rtmGetDefaultParam
# define rtmGetDefaultParam(rtm)       ((rtm)->ModelData.defaultParam)
#endif

#ifndef rtmSetDefaultParam
# define rtmSetDefaultParam(rtm, val)  ((rtm)->ModelData.defaultParam = (val))
#endif

#ifndef rtmGetRootDWork
# define rtmGetRootDWork(rtm)          ((rtm)->ModelData.dwork)
#endif

#ifndef rtmSetRootDWork
# define rtmSetRootDWork(rtm, val)     ((rtm)->ModelData.dwork = (val))
#endif

#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Forward declaration for rtModel */
typedef struct tag_RTM_Controller_Master_T RT_MODEL_Controller_Master_T;

/* Block signals (auto storage) */
typedef struct {
  real_T Led_Blue;                     /* '<S1>/AEB_QA' */
} B_Controller_Master_T;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  uint32_T temporalCounter_i1;         /* '<S1>/select_command' */
  uint8_T is_active_c2_Controller_Master;/* '<S1>/select_command' */
  uint8_T is_c2_Controller_Master;     /* '<S1>/select_command' */
  uint8_T is_BLINK;                    /* '<S1>/select_command' */
  uint8_T is_active_c3_Controller_Master;/* '<S1>/AEB_QA' */
  uint8_T is_ERRORS_CHECK_THREAD;      /* '<S1>/AEB_QA' */
  uint8_T is_APPLICATION_THREAD;       /* '<S1>/AEB_QA' */
  uint8_T is_AEB_ACTIVE;               /* '<S1>/AEB_QA' */
  uint8_T is_QA_ACTIVE;                /* '<S1>/AEB_QA' */
  boolean_T En;                        /* '<S1>/AEB_QA' */
} DW_Controller_Master_T;

/* Parameters (auto storage) */
struct P_Controller_Master_T_ {
  uint8_T Memory_X0;                   /* Computed Parameter: Memory_X0
                                        * Referenced by: '<S1>/Memory'
                                        */
};

/* Parameters (auto storage) */
typedef struct P_Controller_Master_T_ P_Controller_Master_T;

/* Real-time Model Data Structure */
struct tag_RTM_Controller_Master_T {
  const char_T *errorStatus;

  /*
   * ModelData:
   * The following substructure contains information regarding
   * the data used in the model.
   */
  struct {
    B_Controller_Master_T *blockIO;
    P_Controller_Master_T *defaultParam;
    DW_Controller_Master_T *dwork;
  } ModelData;
};

/* Model entry point functions */
extern void Controller_Master_initialize(RT_MODEL_Controller_Master_T *const
  Controller_Master_M, real_T *Controller_Master_U_V, real_T
  *Controller_Master_U_D_M, uint8_T *Controller_Master_U_Slave, boolean_T
  *Controller_Master_U_QA_EN, uint8_T *Controller_Master_Y_BRAKE, uint8_T
  *Controller_Master_Y_ACC, uint8_T *Controller_Master_Y_LED_RED, uint8_T
  *Controller_Master_Y_LED_GREEN, uint8_T *Controller_Master_Y_LED_BLUE, uint8_T
  *Controller_Master_Y_MASTER);
extern void Controller_Master_step(RT_MODEL_Controller_Master_T *const
  Controller_Master_M, real_T Controller_Master_U_V, real_T
  Controller_Master_U_D_M, boolean_T Controller_Master_U_QA_EN, uint8_T
  *Controller_Master_Y_BRAKE, uint8_T *Controller_Master_Y_ACC, uint8_T
  *Controller_Master_Y_LED_RED, uint8_T *Controller_Master_Y_LED_GREEN, uint8_T *
  Controller_Master_Y_LED_BLUE, uint8_T *Controller_Master_Y_MASTER);
extern void Controller_Master_terminate(RT_MODEL_Controller_Master_T *const
  Controller_Master_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('Controller_Model_07_10_v01/Controller/Controller_Master')    - opens subsystem Controller_Model_07_10_v01/Controller/Controller_Master
 * hilite_system('Controller_Model_07_10_v01/Controller/Controller_Master/Kp') - opens and selects block Kp
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Controller_Model_07_10_v01/Controller'
 * '<S1>'   : 'Controller_Model_07_10_v01/Controller/Controller_Master'
 * '<S2>'   : 'Controller_Model_07_10_v01/Controller/Controller_Master/AEB_QA'
 * '<S3>'   : 'Controller_Model_07_10_v01/Controller/Controller_Master/select_command'
 */
#endif                                 /* RTW_HEADER_Controller_Master_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */