/* * File: _coder_envelope_api.c * * MATLAB Coder version : 2.8 * C/C++ source code generated on : 03-Aug-2016 03:45:50 */ /* Include Files */ #include "tmwtypes.h" #include "_coder_envelope_api.h" /* Variable Definitions */ emlrtCTX emlrtRootTLSGlobal = NULL; emlrtContext emlrtContextGlobal = { true, false, 131418U, NULL, "envelope", NULL, false, { 2045744189U, 2170104910U, 2743257031U, 4284093946U }, NULL }; /* Function Declarations */ static real_T b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const emlrtMsgIdentifier *parentId); static real_T c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const emlrtMsgIdentifier *msgId); static real_T emlrt_marshallIn(const emlrtStack *sp, const mxArray *T1dej, const char_T *identifier); static const mxArray *emlrt_marshallOut(const real_T u); /* Function Definitions */ /* * Arguments : const emlrtStack *sp * const mxArray *u * const emlrtMsgIdentifier *parentId * Return Type : real_T */ static real_T b_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const emlrtMsgIdentifier *parentId) { real_T y; y = c_emlrt_marshallIn(sp, emlrtAlias(u), parentId); emlrtDestroyArray(&u); return y; } /* * Arguments : const emlrtStack *sp * const mxArray *src * const emlrtMsgIdentifier *msgId * Return Type : real_T */ static real_T c_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const emlrtMsgIdentifier *msgId) { real_T ret; emlrtCheckBuiltInR2012b(sp, msgId, src, "double", false, 0U, 0); ret = *(real_T *)mxGetData(src); emlrtDestroyArray(&src); return ret; } /* * Arguments : const emlrtStack *sp * const mxArray *T1dej * const char_T *identifier * Return Type : real_T */ static real_T emlrt_marshallIn(const emlrtStack *sp, const mxArray *T1dej, const char_T *identifier) { real_T y; emlrtMsgIdentifier thisId; thisId.fIdentifier = identifier; thisId.fParent = NULL; y = b_emlrt_marshallIn(sp, emlrtAlias(T1dej), &thisId); emlrtDestroyArray(&T1dej); return y; } /* * Arguments : const real_T u * Return Type : const mxArray * */ static const mxArray *emlrt_marshallOut(const real_T u) { const mxArray *y; const mxArray *m0; y = NULL; m0 = emlrtCreateDoubleScalar(u); emlrtAssign(&y, m0); return y; } /* * Arguments : const mxArray * const prhs[9] * const mxArray *plhs[10] * Return Type : void */ void envelope_api(const mxArray * const prhs[9], const mxArray *plhs[10]) { real_T T1dej; real_T agC; real_T Rls; real_T mi; real_T sfth; real_T S; real_T Tb; real_T Tc; real_T Td; real_T mass; real_T Sy; real_T FNC; real_T UNC; real_T U13; real_T U12; real_T U11; real_T F13; real_T F12; real_T F11; emlrtStack st = { NULL, NULL, NULL }; st.tls = emlrtRootTLSGlobal; /* Marshall function inputs */ T1dej = emlrt_marshallIn(&st, emlrtAliasP(prhs[0]), "T1dej"); agC = emlrt_marshallIn(&st, emlrtAliasP(prhs[1]), "agC"); Rls = emlrt_marshallIn(&st, emlrtAliasP(prhs[2]), "Rls"); mi = emlrt_marshallIn(&st, emlrtAliasP(prhs[3]), "mi"); sfth = emlrt_marshallIn(&st, emlrtAliasP(prhs[4]), "sfth"); S = emlrt_marshallIn(&st, emlrtAliasP(prhs[5]), "S"); Tb = emlrt_marshallIn(&st, emlrtAliasP(prhs[6]), "Tb"); Tc = emlrt_marshallIn(&st, emlrtAliasP(prhs[7]), "Tc"); Td = emlrt_marshallIn(&st, emlrtAliasP(prhs[8]), "Td"); /* Invoke the target function */ envelope(T1dej, agC, Rls, mi, sfth, S, Tb, Tc, Td, &F11, &F12, &F13, &U11, &U12, &U13, &UNC, &FNC, &Sy, &mass); /* Marshall function outputs */ plhs[0] = emlrt_marshallOut(F11); plhs[1] = emlrt_marshallOut(F12); plhs[2] = emlrt_marshallOut(F13); plhs[3] = emlrt_marshallOut(U11); plhs[4] = emlrt_marshallOut(U12); plhs[5] = emlrt_marshallOut(U13); plhs[6] = emlrt_marshallOut(UNC); plhs[7] = emlrt_marshallOut(FNC); plhs[8] = emlrt_marshallOut(Sy); plhs[9] = emlrt_marshallOut(mass); } /* * Arguments : void * Return Type : void */ void envelope_atexit(void) { emlrtStack st = { NULL, NULL, NULL }; emlrtCreateRootTLS(&emlrtRootTLSGlobal, &emlrtContextGlobal, NULL, 1); st.tls = emlrtRootTLSGlobal; emlrtEnterRtStackR2012b(&st); emlrtLeaveRtStackR2012b(&st); emlrtDestroyRootTLS(&emlrtRootTLSGlobal); envelope_xil_terminate(); } /* * Arguments : void * Return Type : void */ void envelope_initialize(void) { emlrtStack st = { NULL, NULL, NULL }; emlrtCreateRootTLS(&emlrtRootTLSGlobal, &emlrtContextGlobal, NULL, 1); st.tls = emlrtRootTLSGlobal; emlrtClearAllocCountR2012b(&st, false, 0U, 0); emlrtEnterRtStackR2012b(&st); emlrtFirstTimeR2012b(emlrtRootTLSGlobal); } /* * Arguments : void * Return Type : void */ void envelope_terminate(void) { emlrtStack st = { NULL, NULL, NULL }; st.tls = emlrtRootTLSGlobal; emlrtLeaveRtStackR2012b(&st); emlrtDestroyRootTLS(&emlrtRootTLSGlobal); } /* * File trailer for _coder_envelope_api.c * * [EOF] */