File: _coder_Datalogger4ChConverter_ErrInsensitiveSound_api.c1 /* 2 * _coder_Datalogger4ChConverter_ErrInsensitiveSound_api.c 3 * 4 * Code generation for function '_coder_Datalogger4ChConverter_ErrInsensitiveSound_api' 5 * 6 */ 7 8 /* Include files */ 9 #include "rt_nonfinite.h" 10 #include "Datalogger4ChConverter_ErrInsensitiveSound.h" 11 #include "_coder_Datalogger4ChConverter_ErrInsensitiveSound_api.h" 12 #include "Datalogger4ChConverter_ErrInsensitiveSound_emxutil.h" 13 #include "fileManager.h" 14 #include "Datalogger4ChConverter_ErrInsensitiveSound_mexutil.h" 15 #include "Datalogger4ChConverter_ErrInsensitiveSound_data.h" 16 #include <stdio.h> 17 18 /* Variable Definitions */ 19 static emlrtRTEInfo k_emlrtRTEI = { 1, 1, 20 "_coder_Datalogger4ChConverter_ErrInsensitiveSound_api", "" }; 21 22 /* Function Declarations */ 23 static const mxArray *b_emlrt_marshallOut(const emxArray_real32_T *u); 24 static const mxArray *c_emlrt_marshallOut(const emxArray_uint8_T *u); 25 static void g_emlrt_marshallIn(const emlrtStack *sp, const mxArray *Name_tmp, 26 const char_T *identifier, emxArray_char_T *y); 27 static void h_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const 28 emlrtMsgIdentifier *parentId, emxArray_char_T *y); 29 static void l_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const 30 emlrtMsgIdentifier *msgId, emxArray_char_T *ret); 31 32 /* Function Definitions */ 33 static const mxArray *b_emlrt_marshallOut(const emxArray_real32_T *u) 34 { 35 const mxArray *y; 36 const mxArray *m4; 37 static const int32_T iv8[2] = { 0, 0 }; 38 39 y = NULL; 40 m4 = emlrtCreateNumericArray(2, iv8, mxSINGLE_CLASS, mxREAL); 41 mxSetData((mxArray *)m4, (void *)u->data); 42 emlrtSetDimensions((mxArray *)m4, u->size, 2); 43 emlrtAssign(&y, m4); 44 return y; 45 } 46 47 static const mxArray *c_emlrt_marshallOut(const emxArray_uint8_T *u) 48 { 49 const mxArray *y; 50 const mxArray *m5; 51 static const int32_T iv9[1] = { 0 }; 52 53 y = NULL; 54 m5 = emlrtCreateNumericArray(1, iv9, mxUINT8_CLASS, mxREAL); 55 mxSetData((mxArray *)m5, (void *)u->data); 56 emlrtSetDimensions((mxArray *)m5, u->size, 1); 57 emlrtAssign(&y, m5); 58 return y; 59 } 60 61 static void g_emlrt_marshallIn(const emlrtStack *sp, const mxArray *Name_tmp, 62 const char_T *identifier, emxArray_char_T *y) 63 { 64 emlrtMsgIdentifier thisId; 65 thisId.fIdentifier = identifier; 66 thisId.fParent = NULL; 67 thisId.bParentIsCell = false; 68 h_emlrt_marshallIn(sp, emlrtAlias(Name_tmp), &thisId, y); 69 emlrtDestroyArray(&Name_tmp); 70 } 71 72 static void h_emlrt_marshallIn(const emlrtStack *sp, const mxArray *u, const 73 emlrtMsgIdentifier *parentId, emxArray_char_T *y) 74 { 75 l_emlrt_marshallIn(sp, emlrtAlias(u), parentId, y); 76 emlrtDestroyArray(&u); 77 } 78 79 static void l_emlrt_marshallIn(const emlrtStack *sp, const mxArray *src, const 80 emlrtMsgIdentifier *msgId, emxArray_char_T *ret) 81 { 82 static const int32_T dims[2] = { 1, -1 }; 83 84 boolean_T bv1[2] = { false, true }; 85 86 int32_T iv11[2]; 87 int32_T i12; 88 emlrtCheckVsBuiltInR2012b(sp, msgId, src, "char", false, 2U, dims, &bv1[0], 89 iv11); 90 i12 = ret->size[0] * ret->size[1]; 91 ret->size[0] = iv11[0]; 92 ret->size[1] = iv11[1]; 93 emxEnsureCapacity(sp, (emxArray__common *)ret, i12, (int32_T)sizeof(char_T), 94 (emlrtRTEInfo *)NULL); 95 emlrtImportArrayR2015b(sp, src, ret->data, 1, false); 96 emlrtDestroyArray(&src); 97 } 98 99 void Datalogger4ChConverter_ErrInsensitiveSound_api(const mxArray * const prhs[1], 100 const mxArray *plhs[3]) 101 { 102 emxArray_char_T *Name_tmp; 103 emxArray_real32_T *B; 104 emxArray_uint8_T *Sync; 105 real_T Vcount; 106 emlrtStack st = { NULL, NULL, NULL }; 107 108 st.tls = emlrtRootTLSGlobal; 109 emlrtHeapReferenceStackEnterFcnR2012b(&st); 110 emxInit_char_T(&st, &Name_tmp, 2, &k_emlrtRTEI, true); 111 emxInit_real32_T1(&st, &B, 2, &k_emlrtRTEI, true); 112 emxInit_uint8_T(&st, &Sync, 1, &k_emlrtRTEI, true); 113 114 /* Marshall function inputs */ 115 g_emlrt_marshallIn(&st, emlrtAliasP(prhs[0]), "Name_tmp", Name_tmp); 116 117 /* Invoke the target function */ 118 Datalogger4ChConverter_ErrInsensitiveSound(&st, Name_tmp, B, Sync, &Vcount); 119 120 /* Marshall function outputs */ 121 plhs[0] = b_emlrt_marshallOut(B); 122 plhs[1] = c_emlrt_marshallOut(Sync); 123 plhs[2] = emlrt_marshallOut(Vcount); 124 Sync->canFreeData = false; 125 emxFree_uint8_T(&Sync); 126 B->canFreeData = false; 127 emxFree_real32_T(&B); 128 emxFree_char_T(&Name_tmp); 129 emlrtHeapReferenceStackLeaveFcnR2012b(&st); 130 } 131 132 /* End of code generation (_coder_Datalogger4ChConverter_ErrInsensitiveSound_api.c) */ 133 |