📄 cdma2k_sfun.c
字号:
/*
*
* Stateflow code generation for machine:
* cdma2k
*
* Target Name : sfun
* Model Version : 1.188
* Stateflow Version : 5.0.0.13.00.1.000001
* Date of code generation : 16-May-2006 20:20:50
*
*/
#include "cdma2k_sfun.h"
#include "cdma2k_sfun_c1.h"
#include "cdma2k_sfun_c2.h"
/* Global machine event */
uint8_T _sfEvent_;
#include "cdma2k_sfun_debug_macros.h"
unsigned int _cdma2kMachineNumber_=UNREASONABLE_NUMBER;
unsigned int sf_cdma2k_process_check_sum_call( int nlhs, mxArray * plhs[], int
nrhs, const mxArray * prhs[] )
{
#ifdef MATLAB_MEX_FILE
char commandName[20];
if (nrhs<1 || !mxIsChar(prhs[0]) ) return 0;
/* Possible call to get the checksum */
mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
if(strcmp(commandName,"sf_get_check_sum")) return 0;
plhs[0] = mxCreateDoubleMatrix( 1,4,mxREAL);
if(nrhs>1 && mxIsChar(prhs[1])) {
mxGetString(prhs[1], commandName,sizeof(commandName)/sizeof(char));
commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
if(!strcmp(commandName,"machine")) {
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(1965875773U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(3295404399U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2606650385U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(3086176993U);
}else if(!strcmp(commandName,"exportedFcn")) {
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(0U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(0U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(0U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(0U);
}else if(!strcmp(commandName,"makefile")) {
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(1829435614U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(2917466206U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(3255949798U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(2003380780U);
}else if(nrhs==3 && !strcmp(commandName,"chart")) {
unsigned int chartFileNumber;
chartFileNumber = (unsigned int)mxGetScalar(prhs[2]);
switch(chartFileNumber) {
case 1:
{
extern void sf_cdma2k_sfun_c1_get_check_sum(mxArray *plhs[]);
sf_cdma2k_sfun_c1_get_check_sum(plhs);
break;
}
case 2:
{
extern void sf_cdma2k_sfun_c2_get_check_sum(mxArray *plhs[]);
sf_cdma2k_sfun_c2_get_check_sum(plhs);
break;
}
default:
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(0.0);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(0.0);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(0.0);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(0.0);
}
}else if(!strcmp(commandName,"target")) {
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(3999121187U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(3958564854U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2850127047U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(464156950U);
}else {
return 0;
}
} else{
((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(2550439871U);
((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(2345714768U);
((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(3566882240U);
((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(2492761899U);
}
return 1;
#else
return 0;
#endif
}
/* Stateflow time variable */
real_T _sfTime_;
/* Machine initialize */
void cdma2k_initializer(void)
{
/* Initialize machine's broadcast event variable */
_sfEvent_ = CALL_EVENT;
_cdma2kMachineNumber_ = sf_debug_initialize_machine("cdma2k","sfun",0,2,0,0,0);
sf_debug_set_machine_event_thresholds(_cdma2kMachineNumber_,0,0);
sf_debug_set_machine_data_thresholds(_cdma2kMachineNumber_,0);
}
unsigned int cdma2k_registry(SimStruct *simstructPtr,char *chartName, int
initializeFlag)
{
if(!strcmp_ignore_ws(chartName,"cdma2k/Mobile/MS_Control/ SFunction ")) {
cdma2k_sfun_c1_registry(simstructPtr);
return 1;
}
if(!strcmp_ignore_ws(chartName,"cdma2k/Base Station/Base Station Controller/ SFunction "))
{
cdma2k_sfun_c2_registry(simstructPtr);
return 1;
}
return 0;
}
unsigned int cdma2k_sizes_registry(SimStruct *simstructPtr,char *chartName)
{
if(!strcmp_ignore_ws(chartName,"cdma2k/Mobile/MS_Control/ SFunction ")) {
cdma2k_sfun_c1_sizes_registry(simstructPtr);
return 1;
}
if(!strcmp_ignore_ws(chartName,"cdma2k/Base Station/Base Station Controller/ SFunction "))
{
cdma2k_sfun_c2_sizes_registry(simstructPtr);
return 1;
}
return 0;
}
void cdma2k_terminator(void)
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -