/* * File: ADM_Integrated_Logic.h * * Code generated for Simulink model 'ADM_Integrated_Logic'. * * Model version : 7.13 * Simulink Coder version : 9.5 (R2021a) 14-Nov-2020 * C/C++ source code generated on : Wed Jul 16 16:53:18 2025 * * Target selection: ert.tlc * Embedded hardware selection: NXP->Cortex-M4 * Code generation objectives: * 1. Execution efficiency * 2. RAM efficiency * 3. Debugging * Validation result: Not run */ #ifndef RTW_HEADER_ADM_Integrated_Logic_h_ #define RTW_HEADER_ADM_Integrated_Logic_h_ #include #ifndef ADM_Integrated_Logic_COMMON_INCLUDES_ #define ADM_Integrated_Logic_COMMON_INCLUDES_ #include "rtwtypes.h" #endif /* ADM_Integrated_Logic_COMMON_INCLUDES_ */ /* Model Code Variants */ /* Macros for accessing real-time model data structure */ #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_ADM_Integrated_Logic_T RT_MODEL_ADM_Integrated_Logic_T; /* Block signals and states (default storage) for system '' */ typedef struct { real_T Delay_DSTATE[2]; /* '/Delay' */ real_T Delay3_DSTATE[2]; /* '/Delay3' */ real_T Delay_DSTATE_p[2]; /* '/Delay' */ real_T Delay3_DSTATE_h[2]; /* '/Delay3' */ real_T Memory_DSTATE; /* '/Memory' */ real_T DelayInput2_DSTATE; /* '/Delay Input2' */ real_T DelayInput2_DSTATE_m; /* '/Delay Input2' */ real_T Integrator_2_DSTATE; /* '/Integrator_2' */ real_T DiscreteTransferFcn_states; /* '/Discrete Transfer Fcn' */ real_T d1_DSTATE; /* '/d1' */ real_T d_DSTATE; /* '/d' */ real_T d1_DSTATE_i; /* '/d1' */ real_T d_DSTATE_p; /* '/d' */ real_T d1_DSTATE_o; /* '/d1' */ real_T d_DSTATE_n; /* '/d' */ real_T Integrator_1_DSTATE; /* '/Integrator_1' */ real_T d1_DSTATE_a; /* '/d1' */ real_T d_DSTATE_d; /* '/d' */ real_T d1_DSTATE_c; /* '/d1' */ real_T d_DSTATE_l; /* '/d' */ real_T d_DSTATE_i; /* '/d' */ real_T d1_DSTATE_p; /* '/d1' */ real_T d_DSTATE_c; /* '/d' */ real_T d1_DSTATE_h; /* '/d1' */ real_T d_DSTATE_db; /* '/d' */ real_T d1_DSTATE_l; /* '/d1' */ real_T Delay1_DSTATE; /* '/Delay1' */ real_T Delay2_DSTATE; /* '/Delay2' */ real_T d1_DSTATE_e; /* '/d1' */ real_T d_DSTATE_ij; /* '/d' */ real_T d_DSTATE_ir; /* '/d' */ real_T d1_DSTATE_of; /* '/d1' */ real_T d_DSTATE_m; /* '/d' */ real_T d1_DSTATE_hm; /* '/d1' */ real_T d_DSTATE_mw; /* '/d' */ real_T d1_DSTATE_g; /* '/d1' */ real_T d1_DSTATE_ej; /* '/d1' */ real_T d_DSTATE_j; /* '/d' */ real_T Delay1_DSTATE_c; /* '/Delay1' */ real_T Delay2_DSTATE_n; /* '/Delay2' */ real_T DelayInput2_DSTATE_c; /* '/Delay Input2' */ real_T DelayInput2_DSTATE_i; /* '/Delay Input2' */ real_T PrevY; /* '/Input_Vx_RateLimiter' */ real_T PrevY_o; /* '/Brake_Out_RateLimiter' */ real_T PrevY_a; /* '/TargetSpd_RateLimiter' */ real_T Memory_PreviousInput; /* '/Memory' */ real_T HAC_ON_FLAG; /* '/HAC_OFF_OK_Func' */ real_T Smoothed_Torque; /* '/HAC_OFF_OK_Func' */ real_T HAC_Desired_Torque; /* '/HAC_OFF_OK_Func' */ real_T HAC_ON_Timer; /* '/HAC_OFF_OK_Func' */ uint8_T is_active_c6_ADM_Integrated_Log;/* '/Chart' */ uint8_T is_c6_ADM_Integrated_Logic; /* '/Chart' */ } DW_ADM_Integrated_Logic_T; /* Invariant block signals (default storage) */ typedef struct { const real_T W_value; /* '/Multiply' */ const real_T W_Value_for_Brake; /* '/Multiply4' */ } ConstB_ADM_Integrated_Logic_T; /* External inputs (root inport signals with default storage) */ typedef struct { real_T GV_MCU_RPM; /* '/GV_MCU_RPM' */ real_T GV_BrakeTorqueCommand; /* '/GV_BrakeTorqueCommand' */ real_T GV_IMU_AX_Val; /* '/GV_IMU_AX_Val' */ real_T GV_IMU_AY_Val; /* '/GV_IMU_AY_Val' */ real_T GV_IMU_AZ_Val; /* '/GV_IMU_AZ_Val' */ real_T GV_IMU_PitchRtVal; /* '/GV_IMU_PitchRtVal' */ real_T GV_Vx_Command; /* '/GV_Vx_Command' */ real_T GV_VCU_GearSelStat; /* '/GV_VCU_GearSelStat' */ real_T GV_MCU_EstTrq; /* '/GV_MCU_EstTrq' */ real_T GV_Vx_Limit; /* '/GV_Vx_Limit' */ real_T GV_Vx_Fbk; /* '/GV_Vx_Fbk' */ real_T GV_RWA_RackAngleCommand; /* '/GV_RWA_RackAngleCommand' */ real_T GV_RWS_RackAngleCommand; /* '/GV_RWS_RackAngleCommand' */ real_T GV_Operation_Mode; /* '/GV_Operation_Mode' */ real_T GV_ACU_Fault_Flag; /* '/GV_ACU_Fault_Flag' */ real_T GV_MCU_Actuator_Fault_Flag; /* '/GV_MCU_Actuator_Fault_Flag' */ real_T GV_IDB_ECU_Fault_Flag; /* '/GV_IDB_ECU_Fault_Flag' */ real_T GV_RCU_ECU_Fault_Flag; /* '/GV_RCU_ECU_Fault_Flag' */ real_T GV_RWA1_ECU_Fault_Flag; /* '/GV_RWA1_ECU_Fault_Flag' */ real_T GV_RWA2_ECU_Fault_Flag; /* '/GV_RWA2_ECU_Fault_Flag' */ real_T GV_RWA_Actuator_Fault; /* '/GV_RWA_Actuator_Fault' */ } ExtU_ADM_Integrated_Logic_T; /* External outputs (root outports fed by signals with default storage) */ typedef struct { real_T GV_Brake_Command; /* '/GV_Brake_Command' */ real_T GV_Master_Rack_Angle_Cmd; /* '/GV_Master_Rack_Angle_Cmd' */ real_T GV_Hill_Torque_Assist; /* '/GV_Hill_Torque_Assist' */ real_T GV_Motor_Torque_Cmd; /* '/GV_Motor_Torque_Cmd' */ real_T Debug_HAC_FLAG; /* '/Debug_HAC_FLAG' */ real_T Debug_HAC_RPM_Decision; /* '/Debug_HAC_RPM_Decision' */ real_T Debug_HAC_Pitch_angle; /* '/Debug_HAC_Pitch_angle' */ real_T Debug_HAC_Brake_Output; /* '/Debug_HAC_Brake_Output' */ real_T Debug_CC_Brake_Output; /* '/Debug_CC_Brake_Output' */ real_T GV_RWS_RackAngleCmd1; /* '/GV_RWS_RackAngleCmd1' */ real_T GV_Speed_Limit; /* '/GV_Speed_Limit' */ real_T GV_Gear_Postion_Out; /* '/GV_Gear_Postion_Out' */ real_T Act_Fault_Exist; /* '/Act_Fault_Exist' */ real_T Target_RWA_Out; /* '/Target_RWA_Out' */ real_T Target_IDB_Out; /* '/Target_IDB_Out' */ real_T Target_MCU_Out; /* '/Target_MCU_Out' */ } ExtY_ADM_Integrated_Logic_T; /* Real-time Model Data Structure */ struct tag_RTM_ADM_Integrated_Logic_T { const char_T * volatile errorStatus; }; /* Block signals and states (default storage) */ extern DW_ADM_Integrated_Logic_T ADM_Integrated_Logic_DW; /* External inputs (root inport signals with default storage) */ extern ExtU_ADM_Integrated_Logic_T ADM_Integrated_Logic_U; /* External outputs (root outports fed by signals with default storage) */ extern ExtY_ADM_Integrated_Logic_T ADM_Integrated_Logic_Y; extern const ConstB_ADM_Integrated_Logic_T ADM_Integrated_Logic_ConstB;/* constant block i/o */ /* Model entry point functions */ extern void ADM_Integrated_Logic_initialize(void); extern void ADM_Integrated_Logic_step(void); /* Real-time Model object */ extern RT_MODEL_ADM_Integrated_Logic_T *const ADM_Integrated_Logic_M; /*- * These blocks were eliminated from the model due to optimizations: * * Block '/BW_PI' : Unused code path elimination * Block '/Constant1' : Unused code path elimination * Block '/Constant16' : Unused code path elimination * Block '/Constant17' : Unused code path elimination * Block '/Constant2' : Unused code path elimination * Block '/Brake_Saturation' : Unused code path elimination * Block '/Multiply5' : Unused code path elimination * Block '/Radius1' : Unused code path elimination * Block '/FixPt Data Type Duplicate' : Unused code path elimination * Block '/Data Type Duplicate' : Unused code path elimination * Block '/Data Type Propagation' : Unused code path elimination * Block '/FixPt Data Type Duplicate' : Unused code path elimination * Block '/Data Type Duplicate' : Unused code path elimination * Block '/Data Type Propagation' : Unused code path elimination * Block '/Scope2' : Unused code path elimination * Block '/FixPt Data Type Duplicate' : Unused code path elimination * Block '/Data Type Duplicate' : Unused code path elimination * Block '/Data Type Propagation' : Unused code path elimination * Block '/FixPt Data Type Duplicate' : Unused code path elimination * Block '/Data Type Duplicate' : Unused code path elimination * Block '/Data Type Propagation' : Unused code path elimination * Block '/ControlFlag' : Eliminated nontunable gain of 1 * Block '/FBGain' : Eliminated nontunable gain of 1 * Block '/FFGain' : Eliminated nontunable gain of 1 * Block '/Data Type Conversion1' : Eliminate redundant data type conversion * Block '/Data Type Conversion3' : Eliminate redundant data type conversion * Block '/HAC_Gain' : Eliminated nontunable gain of 1 */ /*- * The generated code includes comments that allow you to trace directly * back to the appropriate location in the model. The basic format * is /block_name, where system is the system number (uniquely * assigned by Simulink) and block_name is the name of the block. * * Use the MATLAB hilite_system command to trace the generated code back * to the model. For example, * * hilite_system('') - opens system 3 * hilite_system('/Kp') - opens and selects block Kp which resides in S3 * * Here is the system hierarchy for this model * * '' : 'ADM_Integrated_Logic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Actuator_Fault_Decision' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Compare To Constant' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Emergency_Brake_Func' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Emergency_Motor_Func' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/IDB_Fault_Injection' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function2' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function5' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MATLAB Function6' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/MCU_Fault_Injection' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/RWA_Actuator_Fault_Injection' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB_Gain' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/GearCondition_Brake' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/Gear_pos_out' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/LPFM' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/Target_RPM' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot3' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot4' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Dot5' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/LPFM' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/DOB/Second order LPF' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FB' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FB/P' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot2' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Dot3' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/LPFM' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Cruise_Control1/FF_PID_Controller/FF/Second order LPF' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position/Compare To Constant' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Gear_Position/Gear_FUNCTION1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Chart' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/HAC_OFF_OK_Func' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM2' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/LPFM3' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Pitch_calculate' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_R' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_c' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Hill_Required_Torque2/Calculate_F_c1' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic/Saturation Dynamic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/HAC_Logic1/Rate Limiter Dynamic1/Saturation Dynamic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic/Saturation Dynamic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Rate Limiter Dynamic1/Saturation Dynamic' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic/Compare To Constant' * '' : 'ADM_Integrated_Logic/Delivery_Mobility/Vx_Logic/Vx_OutPut_Function' */ /*- * Requirements for '': ADM_Integrated_Logic */ #endif /* RTW_HEADER_ADM_Integrated_Logic_h_ */ /* * File trailer for generated code. * * [EOF] */