/* Include files */
#include <stddef.h>
#include "blas.h"
#include "alldpll_sfun.h"
#include "c2_alldpll.h"
#define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber)
#define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instanceNumber)
#include "alldpll_sfun_debug_macros.h"
#define _SF_MEX_LISTEN_FOR_CTRL_C(S) sf_mex_listen_for_ctrl_c(sfGlobalDebugInstanceStruct,S);
/* Type Definitions */
/* Named Constants */
#define c2_event_ref (0)
#define c2_event_var (1)
#define CALL_EVENT (-1)
#define c2_IN_NO_ACTIVE_CHILD ((uint8_T)0U)
#define c2_IN_Ahead ((uint8_T)1U)
#define c2_IN_Behind ((uint8_T)2U)
#define c2_IN_InPhase ((uint8_T)3U)
/* Variable Declarations */
/* Variable Definitions */
static real_T _sfTime_;
/* Function Declarations */
static void initialize_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void initialize_params_c2_alldpll(SFc2_alldpllInstanceStruct
*chartInstance);
static void enable_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void disable_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void c2_update_debugger_state_c2_alldpll(SFc2_alldpllInstanceStruct
*chartInstance);
static const mxArray *get_sim_state_c2_alldpll(SFc2_alldpllInstanceStruct
*chartInstance);
static void set_sim_state_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_st);
static void c2_set_sim_state_side_effects_c2_alldpll(SFc2_alldpllInstanceStruct *
chartInstance);
static void finalize_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void sf_gateway_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void c2_chartstep_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void initSimStructsc2_alldpll(SFc2_alldpllInstanceStruct *chartInstance);
static void init_script_number_translation(uint32_T c2_machineNumber, uint32_T
c2_chartNumber, uint32_T c2_instanceNumber);
static const mxArray *c2_sf_marshallOut(void *chartInstanceVoid, void *c2_inData);
static int8_T c2_emlrt_marshallIn(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
static void c2_sf_marshallIn(void *chartInstanceVoid, const mxArray
*c2_mxArrayInData, const char_T *c2_varName, void *c2_outData);
static const mxArray *c2_b_sf_marshallOut(void *chartInstanceVoid, void
*c2_inData);
static int32_T c2_b_emlrt_marshallIn(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
static void c2_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
*c2_mxArrayInData, const char_T *c2_varName, void *c2_outData);
static const mxArray *c2_c_sf_marshallOut(void *chartInstanceVoid, void
*c2_inData);
static uint8_T c2_c_emlrt_marshallIn(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_b_tp_Ahead, const char_T *c2_identifier);
static uint8_T c2_d_emlrt_marshallIn(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
static void c2_c_sf_marshallIn(void *chartInstanceVoid, const mxArray
*c2_mxArrayInData, const char_T *c2_varName, void *c2_outData);
static const mxArray *c2_d_sf_marshallOut(void *chartInstanceVoid, void
*c2_inData);
static real_T c2_e_emlrt_marshallIn(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_s, const char_T *c2_identifier);
static real_T c2_f_emlrt_marshallIn(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
static void c2_d_sf_marshallIn(void *chartInstanceVoid, const mxArray
*c2_mxArrayInData, const char_T *c2_varName, void *c2_outData);
static const mxArray *c2_g_emlrt_marshallIn(SFc2_alldpllInstanceStruct
*chartInstance, const mxArray *c2_b_setSimStateSideEffectsInfo, const char_T
*c2_identifier);
static const mxArray *c2_h_emlrt_marshallIn(SFc2_alldpllInstanceStruct
*chartInstance, const mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
static void init_dsm_address_info(SFc2_alldpllInstanceStruct *chartInstance);
/* Function Definitions */
static void initialize_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance)
{
real_T *c2_s;
c2_s = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
_sfTime_ = sf_get_time(chartInstance->S);
chartInstance->c2_doSetSimStateSideEffects = 0U;
chartInstance->c2_setSimStateSideEffectsInfo = NULL;
chartInstance->c2_tp_Ahead = 0U;
chartInstance->c2_tp_Behind = 0U;
chartInstance->c2_tp_InPhase = 0U;
chartInstance->c2_is_active_c2_alldpll = 0U;
chartInstance->c2_is_c2_alldpll = c2_IN_NO_ACTIVE_CHILD;
if (!(sf_get_output_port_reusable(chartInstance->S, 1) != 0)) {
*c2_s = 0.0;
}
}
static void initialize_params_c2_alldpll(SFc2_alldpllInstanceStruct
*chartInstance)
{
(void)chartInstance;
}
static void enable_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance)
{
_sfTime_ = sf_get_time(chartInstance->S);
}
static void disable_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance)
{
_sfTime_ = sf_get_time(chartInstance->S);
}
static void c2_update_debugger_state_c2_alldpll(SFc2_alldpllInstanceStruct
*chartInstance)
{
uint32_T c2_prevAniVal;
c2_prevAniVal = _SFD_GET_ANIMATION();
_SFD_SET_ANIMATION(0U);
_SFD_SET_HONOR_BREAKPOINTS(0U);
if (chartInstance->c2_is_active_c2_alldpll == 1U) {
_SFD_CC_CALL(CHART_ACTIVE_TAG, 0U, chartInstance->c2_sfEvent);
}
if (chartInstance->c2_is_c2_alldpll == c2_IN_Ahead) {
_SFD_CS_CALL(STATE_ACTIVE_TAG, 0U, chartInstance->c2_sfEvent);
} else {
_SFD_CS_CALL(STATE_INACTIVE_TAG, 0U, chartInstance->c2_sfEvent);
}
if (chartInstance->c2_is_c2_alldpll == c2_IN_InPhase) {
_SFD_CS_CALL(STATE_ACTIVE_TAG, 2U, chartInstance->c2_sfEvent);
} else {
_SFD_CS_CALL(STATE_INACTIVE_TAG, 2U, chartInstance->c2_sfEvent);
}
if (chartInstance->c2_is_c2_alldpll == c2_IN_Behind) {
_SFD_CS_CALL(STATE_ACTIVE_TAG, 1U, chartInstance->c2_sfEvent);
} else {
_SFD_CS_CALL(STATE_INACTIVE_TAG, 1U, chartInstance->c2_sfEvent);
}
_SFD_SET_ANIMATION(c2_prevAniVal);
_SFD_SET_HONOR_BREAKPOINTS(1U);
_SFD_ANIMATE();
}
static const mxArray *get_sim_state_c2_alldpll(SFc2_alldpllInstanceStruct
*chartInstance)
{
const mxArray *c2_st;
const mxArray *c2_y = NULL;
real_T c2_hoistedGlobal;
real_T c2_u;
const mxArray *c2_b_y = NULL;
uint8_T c2_b_hoistedGlobal;
uint8_T c2_b_u;
const mxArray *c2_c_y = NULL;
uint8_T c2_c_hoistedGlobal;
uint8_T c2_c_u;
const mxArray *c2_d_y = NULL;
real_T *c2_s;
c2_s = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
c2_st = NULL;
c2_st = NULL;
c2_y = NULL;
sf_mex_assign(&c2_y, sf_mex_createcellmatrix(3, 1), false);
c2_hoistedGlobal = *c2_s;
c2_u = c2_hoistedGlobal;
c2_b_y = NULL;
sf_mex_assign(&c2_b_y, sf_mex_create("y", &c2_u, 0, 0U, 0U, 0U, 0), false);
sf_mex_setcell(c2_y, 0, c2_b_y);
c2_b_hoistedGlobal = chartInstance->c2_is_active_c2_alldpll;
c2_b_u = c2_b_hoistedGlobal;
c2_c_y = NULL;
sf_mex_assign(&c2_c_y, sf_mex_create("y", &c2_b_u, 3, 0U, 0U, 0U, 0), false);
sf_mex_setcell(c2_y, 1, c2_c_y);
c2_c_hoistedGlobal = chartInstance->c2_is_c2_alldpll;
c2_c_u = c2_c_hoistedGlobal;
c2_d_y = NULL;
sf_mex_assign(&c2_d_y, sf_mex_create("y", &c2_c_u, 3, 0U, 0U, 0U, 0), false);
sf_mex_setcell(c2_y, 2, c2_d_y);
sf_mex_assign(&c2_st, c2_y, false);
return c2_st;
}
static void set_sim_state_c2_alldpll(SFc2_alldpllInstanceStruct *chartInstance,
const mxArray *c2_st)
{
const mxArray *c2_u;
real_T *c2_s;
c2_s = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
c2_u = sf_mex_dup(c2_st);
*c2_s = c2_e_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c2_u, 0)),
"s");
Matlab领域
- 粉丝: 3w+
- 资源: 3766
最新资源
- 燃料电池汽车Cruise整车仿真模型:基于联合仿真与多点恒功率控制策略的全工作模式实现,燃料电池汽车Cruise整车仿真模型(燃料电池电电混动整车仿真模型) 1.基于Cruise与MATLAB Si
- (1989-2021)澳大利亚致命道路事故数据集(52K+记录,23特征)CSV
- (1979-2015)英国道路事故发生率数据集(250K+记录,70特征)CSV
- "COMSOL离散裂隙中两相流模型的应用与研究",comsol 离散裂隙 两相流模型 ,关键词:COMSOL;离散裂隙;两相流模型;数值模拟;流体动力学;渗透性;地下水流动 ,"Comsol模拟:离散
- qianli-android-sg.apk
- (2000-2018 )英国道路事故数据集(180W+记录,33特征)CSV
- (2017-2020)亚的斯亚贝巴市道路交通事故数据集(12K+记录,32 个特征)CSV
- (2017-2022)印度道路交通事故数据集(12K+记录,32特征)CSV
- 2020年道路事故的综合数据集(61K+记录,20特征)CSV
- 2024 汽车综合数据集(1K+记录,10特征)CSV
- 心脏病数据集(10K+记录,21特征)CSV
- 道路事故伤亡数据集(66W+记录,14特征)CSV
- FLAC3D后处理云图可视化升级:案例文件解析与代码应用指南,FLAC3D后处理,将云图转为三维,可视化更强 图一为flac原图,图二图三为处理后的图 内容包括:案例文件,fish代码和matla
- vue2生命周期函数(笔记_自用).html
- "国产车BCM程序源代码详解:涵盖内外灯光控制、雨刮洗涤、遥控门锁与通讯网络管理",汽车BCM程序源代码 国产车BCM程序源代码 外部灯光:前照灯、小灯、转向灯、前后雾灯、日间行车灯、倒车灯
- 微信小程序静默登录,获取手机号,前后端示例完整代码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈