/* Function Definitions */ void closeDataConnection(const emlrtStack *sp, int32_T driverApiH) { const mxArray *y; static const int32_T iv120[2] = { 1, 6 }; const mxArray *m18; char_T cv137[6]; int32_T i; static const char_T cv138[6] = { 's', 'i', 'l', 'e', 'n', 't' }; char_T errStr_data[1024]; UsrpErrorCapiEnumT errStat_i; const mxArray *b_y; emlrtStack st; emlrtStack b_st; st.prev = sp; st.tls = sp->tls; b_st.prev = &st; b_st.tls = st.tls; /* Copyright 2011-2012 The MathWorks, Inc. */ st.site = &um_emlrtRSI; /* */ /* This function unifies handling of interp vs. codegen call as well as */ /* errStat / errStr assignment. */ /* */ /* Copyright 2011-2013 The MathWorks, Inc. */ if (!isSetupsdruCalled) { y = NULL; m18 = mxCreateCharArray(2, iv120); for (i = 0; i < 6; i++) { cv137[i] = cv138[i]; } emlrtInitCharArrayR2013a(&st, 6, m18, cv137); emlrtAssign(&y, m18); b_st.site = &ybb_emlrtRSI; setupsdru(&b_st, sdruroot(&b_st, &o_emlrtMCI), y, &p_emlrtMCI); isSetupsdruCalled = TRUE; } /* These sizes must match those in C code. */ /* Arbitrary max imposed on ML/SL side */ /* function is being called in interpreted mode */ /* not being found: */ /* eml_allow_enum_inputs; */ /* errStat_i = int32(0); */ for (i = 0; i < 1024; i++) { errStr_data[i] = '\x00'; } closeDataConnection_c(driverApiH, &errStat_i, &errStr_data[0]); /* errStat = UsrpErrorCapiEnumT(errStat_i); */ i = strlen(&errStr_data[0]); if (i <= 1024) { } else { b_y = NULL; m18 = mxCreateString("Assertion failed."); emlrtAssign(&b_y, m18); b_st.site = &mbb_emlrtRSI; c_error(&b_st, b_y, &n_emlrtMCI); } if (1 > i) { } else { emlrtDynamicBoundsCheckFastR2012b(i, 1, 1024, &p_emlrtBCI, &st); } }
/* Function Definitions */ void b_mapiPrivate(const emlrtStack *sp, int32_T varargin_1, UsrpErrorCapiEnumT * varargout_1, char_T varargout_2_data[], int32_T varargout_2_size[2]) { int32_T i14; static const char_T cv14[6] = { 's', 'i', 'l', 'e', 'n', 't' }; char_T u[6]; const mxArray *y; static const int32_T iv10[2] = { 1, 6 }; const mxArray *m3; UsrpErrorCapiEnumT errStat_i; int32_T errStrSize; emlrtStack st; st.prev = sp; st.tls = sp->tls; /* */ /* This function unifies handling of interp vs. codegen call as well as */ /* errStat / errStr assignment. */ /* */ /* Copyright 2011-2015 The MathWorks, Inc. */ if (!isSetupsdruCalled) { for (i14 = 0; i14 < 6; i14++) { u[i14] = cv14[i14]; } y = NULL; m3 = emlrtCreateCharArray(2, iv10); emlrtInitCharArrayR2013a(sp, 6, m3, &u[0]); emlrtAssign(&y, m3); st.site = &eb_emlrtRSI; setupsdru(&st, sdruroot(&st, &c_emlrtMCI), y, &d_emlrtMCI); isSetupsdruCalled = true; } /* These sizes must match those in C code. */ /* Arbitrary max imposed on ML/SL side */ /* function is being called in interpreted mode */ /* not being found: */ /* eml_allow_enum_inputs; */ /* errStat_i = int32(0); */ varargout_2_size[0] = 1; memset(&varargout_2_data[0], 0, sizeof(char_T) << 10); closeDataConnection_c(varargin_1, &errStat_i, &varargout_2_data[0]); /* errStat = UsrpErrorCapiEnumT(errStat_i); */ errStrSize = strlen(&varargout_2_data[0]); if (errStrSize <= 1024) { } else { emlrtErrorWithMessageIdR2012b(sp, &d_emlrtRTEI, "Coder:builtins:AssertionFailed", 0); } if (1 > errStrSize) { varargout_2_size[1] = 0; } else { varargout_2_size[1] = errStrSize; } *varargout_1 = errStat_i; }