/*
 * CANTest_capi.c
 *
 * Academic License - for use in teaching, academic research, and meeting
 * course requirements at degree granting institutions only.  Not for
 * government, commercial, or other organizational use.
 *
 * Code generation for model "CANTest".
 *
 * Model version              : 1.360
 * Simulink Coder version : 8.14 (R2018a) 06-Feb-2018
 * C source code generated on : Tue Jul 11 11:56:08 2023
 *
 * Target selection: slrt.tlc
 * Note: GRT includes extra infrastructure and instrumentation for prototyping
 * Embedded hardware selection: Generic->32-bit x86 compatible
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#include "rtw_capi.h"
#ifdef HOST_CAPI_BUILD
#include "CANTest_capi_host.h"
#define sizeof(s)                      ((size_t)(0xFFFF))
#undef rt_offsetof
#define rt_offsetof(s,el)              ((uint16_T)(0xFFFF))
#define TARGET_CONST
#define TARGET_STRING(s)               (s)
#else                                  /* HOST_CAPI_BUILD */
#include "builtin_typeid_types.h"
#include "CANTest.h"
#include "CANTest_capi.h"
#include "CANTest_private.h"
#ifdef LIGHT_WEIGHT_CAPI
#define TARGET_CONST
#define TARGET_STRING(s)               (NULL)
#else
#define TARGET_CONST                   const
#define TARGET_STRING(s)               (s)
#endif
#endif                                 /* HOST_CAPI_BUILD */

/* Block output signal information */
static const rtwCAPI_Signals rtBlockSignals[] = {
  /* addrMapIndex, sysNum, blockPath,
   * signalName, portNumber, dataTypeIndex, dimIndex, fxpIndex, sTimeIndex
   */
  { 0, 1, TARGET_STRING("DAQ_In/CAN Read1/p1"),
    TARGET_STRING(""), 0, 0, 0, 0, 0 },

  { 1, 1, TARGET_STRING("DAQ_In/CAN Read1/p2"),
    TARGET_STRING(""), 1, 1, 0, 0, 0 },

  { 2, 1, TARGET_STRING("DAQ_In/CAN Unpack2/p1"),
    TARGET_STRING("RPM"), 0, 2, 0, 0, 0 },

  { 3, 1, TARGET_STRING("DAQ_In/CAN Unpack2/p2"),
    TARGET_STRING("TQ"), 1, 2, 0, 0, 0 },

  { 4, 0, TARGET_STRING("Mon_Cont/ContM"),
    TARGET_STRING("ContMode"), 0, 2, 0, 0, 1 },

  { 5, 0, TARGET_STRING("DAQ_Out/CANBoard/Constant"),
    TARGET_STRING("Ready"), 0, 2, 0, 0, 1 },

  { 6, 0, TARGET_STRING("DAQ_Out/CANBoard/Constant1"),
    TARGET_STRING("Gear"), 0, 2, 0, 0, 1 },

  { 7, 0, TARGET_STRING("DAQ_Out/CANBoard/Constant2"),
    TARGET_STRING("BMS"), 0, 2, 0, 0, 1 },

  { 8, 0, TARGET_STRING("DAQ_Out/CANBoard/Constant3"),
    TARGET_STRING("PosTQLim"), 0, 2, 0, 0, 1 },

  { 9, 0, TARGET_STRING("DAQ_Out/CANBoard/Constant4"),
    TARGET_STRING("NegTQLim"), 0, 2, 0, 0, 1 },

  { 10, 0, TARGET_STRING("DAQ_Out/CANBoard/CAN Pack"),
    TARGET_STRING(""), 0, 1, 0, 0, 1 },

  { 11, 0, TARGET_STRING("Mon_Cont/LPFM/gain"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 12, 0, TARGET_STRING("Mon_Cont/LPFM/gain1"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 13, 0, TARGET_STRING("Mon_Cont/LPFM/gain2"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 14, 0, TARGET_STRING("Mon_Cont/LPFM/Product1"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 15, 0, TARGET_STRING("Mon_Cont/LPFM/Product11"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 16, 0, TARGET_STRING("Mon_Cont/LPFM/Product2"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 17, 0, TARGET_STRING("Mon_Cont/LPFM/Sum1"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 18, 0, TARGET_STRING("Mon_Cont/LPFM/Sum2"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 19, 0, TARGET_STRING("Mon_Cont/LPFM/Sum3"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 20, 0, TARGET_STRING("Mon_Cont/LPFM/Sum4"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 21, 0, TARGET_STRING("Mon_Cont/LPFM/d"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  { 22, 0, TARGET_STRING("Mon_Cont/LPFM/d1"),
    TARGET_STRING(""), 0, 2, 0, 0, 1 },

  {
    0, 0, (NULL), (NULL), 0, 0, 0, 0, 0
  }
};

static const rtwCAPI_BlockParameters rtBlockParameters[] = {
  /* addrMapIndex, blockPath,
   * paramName, dataTypeIndex, dimIndex, fixPtIdx
   */
  { 23, TARGET_STRING("DAQ_In/CAN Read1"),
    TARGET_STRING("P1"), 2, 0, 0 },

  { 24, TARGET_STRING("DAQ_In/CAN Read1"),
    TARGET_STRING("P2"), 2, 0, 0 },

  { 25, TARGET_STRING("DAQ_In/CAN Read1"),
    TARGET_STRING("P3"), 2, 0, 0 },

  { 26, TARGET_STRING("DAQ_In/CAN Read1"),
    TARGET_STRING("P4"), 2, 1, 0 },

  { 27, TARGET_STRING("DAQ_In/CAN Read1"),
    TARGET_STRING("P5"), 2, 0, 0 },

  { 28, TARGET_STRING("DAQ_In/CAN Read1"),
    TARGET_STRING("P6"), 2, 0, 0 },

  { 29, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P1"), 2, 0, 0 },

  { 30, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P2"), 2, 2, 0 },

  { 31, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P3"), 2, 0, 0 },

  { 32, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P4"), 2, 0, 0 },

  { 33, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P5"), 2, 0, 0 },

  { 34, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P6"), 2, 0, 0 },

  { 35, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P7"), 2, 3, 0 },

  { 36, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P8"), 2, 4, 0 },

  { 37, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P9"), 2, 2, 0 },

  { 38, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P10"), 2, 2, 0 },

  { 39, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P11"), 2, 0, 0 },

  { 40, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P12"), 2, 3, 0 },

  { 41, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P13"), 2, 4, 0 },

  { 42, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P14"), 2, 2, 0 },

  { 43, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P15"), 2, 2, 0 },

  { 44, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P16"), 2, 0, 0 },

  { 45, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P17"), 2, 0, 0 },

  { 46, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P18"), 2, 1, 0 },

  { 47, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P19"), 2, 0, 0 },

  { 48, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P20"), 2, 2, 0 },

  { 49, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P21"), 2, 2, 0 },

  { 50, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P22"), 2, 2, 0 },

  { 51, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P23"), 2, 2, 0 },

  { 52, TARGET_STRING("DAQ_In/CAN Setup"),
    TARGET_STRING("P24"), 2, 0, 0 },

  { 53, TARGET_STRING("Mon_Cont/Constant1"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 54, TARGET_STRING("Mon_Cont/ContMode"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 55, TARGET_STRING("Mon_Cont/TQCom"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 56, TARGET_STRING("Mon_Cont/ContM"),
    TARGET_STRING("Gain"), 2, 0, 0 },

  { 57, TARGET_STRING("DAQ_Out/CANBoard/Constant"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 58, TARGET_STRING("DAQ_Out/CANBoard/Constant1"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 59, TARGET_STRING("DAQ_Out/CANBoard/Constant2"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 60, TARGET_STRING("DAQ_Out/CANBoard/Constant3"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 61, TARGET_STRING("DAQ_Out/CANBoard/Constant4"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 62, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P1"), 2, 0, 0 },

  { 63, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P2"), 2, 0, 0 },

  { 64, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P3"), 2, 0, 0 },

  { 65, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P4"), 2, 0, 0 },

  { 66, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P5"), 2, 1, 0 },

  { 67, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P6"), 2, 0, 0 },

  { 68, TARGET_STRING("DAQ_Out/CANBoard/CAN Write1"),
    TARGET_STRING("P7"), 2, 0, 0 },

  { 69, TARGET_STRING("Mon_Cont/LPFM/Constant1"),
    TARGET_STRING("Value"), 2, 0, 0 },

  { 70, TARGET_STRING("Mon_Cont/LPFM/gain1"),
    TARGET_STRING("Gain"), 2, 0, 0 },

  { 71, TARGET_STRING("Mon_Cont/LPFM/gain2"),
    TARGET_STRING("Gain"), 2, 0, 0 },

  { 72, TARGET_STRING("Mon_Cont/LPFM/d"),
    TARGET_STRING("InitialCondition"), 2, 0, 0 },

  { 73, TARGET_STRING("Mon_Cont/LPFM/d1"),
    TARGET_STRING("InitialCondition"), 2, 0, 0 },

  {
    0, (NULL), (NULL), 0, 0, 0
  }
};

/* Tunable variable parameters */
static const rtwCAPI_ModelParameters rtModelParameters[] = {
  /* addrMapIndex, varName, dataTypeIndex, dimIndex, fixPtIndex */
  { 74, TARGET_STRING("Ts"), 2, 0, 0 },

  { 0, (NULL), 0, 0, 0 }
};

#ifndef HOST_CAPI_BUILD

/* Declare Data Addresses statically */
static void* rtDataAddrMap[] = {
  &CANTest_B.CANRead1_o1,              /* 0: Signal */
  &CANTest_B.CANRead1_o2,              /* 1: Signal */
  &CANTest_B.RPM,                      /* 2: Signal */
  &CANTest_B.TQ,                       /* 3: Signal */
  &CANTest_B.ContMode,                 /* 4: Signal */
  &CANTest_B.Ready,                    /* 5: Signal */
  &CANTest_B.Gear,                     /* 6: Signal */
  &CANTest_B.BMS,                      /* 7: Signal */
  &CANTest_B.PosTQLim,                 /* 8: Signal */
  &CANTest_B.NegTQLim,                 /* 9: Signal */
  &CANTest_B.CANPack,                  /* 10: Signal */
  &CANTest_B.gain,                     /* 11: Signal */
  &CANTest_B.gain1,                    /* 12: Signal */
  &CANTest_B.gain2,                    /* 13: Signal */
  &CANTest_B.Product1,                 /* 14: Signal */
  &CANTest_B.Product11,                /* 15: Signal */
  &CANTest_B.Product2,                 /* 16: Signal */
  &CANTest_B.Sum1,                     /* 17: Signal */
  &CANTest_B.Sum2,                     /* 18: Signal */
  &CANTest_B.Sum3,                     /* 19: Signal */
  &CANTest_B.Sum4,                     /* 20: Signal */
  &CANTest_B.d,                        /* 21: Signal */
  &CANTest_B.d1,                       /* 22: Signal */
  &CANTest_P.CANRead1_P1,              /* 23: Block Parameter */
  &CANTest_P.CANRead1_P2,              /* 24: Block Parameter */
  &CANTest_P.CANRead1_P3,              /* 25: Block Parameter */
  &CANTest_P.CANRead1_P4[0],           /* 26: Block Parameter */
  &CANTest_P.CANRead1_P5,              /* 27: Block Parameter */
  &CANTest_P.CANRead1_P6,              /* 28: Block Parameter */
  &CANTest_P.CANSetup_P1,              /* 29: Block Parameter */
  &CANTest_P.CANSetup_P2[0],           /* 30: Block Parameter */
  &CANTest_P.CANSetup_P3,              /* 31: Block Parameter */
  &CANTest_P.CANSetup_P4,              /* 32: Block Parameter */
  &CANTest_P.CANSetup_P5,              /* 33: Block Parameter */
  &CANTest_P.CANSetup_P6,              /* 34: Block Parameter */
  &CANTest_P.CANSetup_P7[0],           /* 35: Block Parameter */
  &CANTest_P.CANSetup_P8[0],           /* 36: Block Parameter */
  &CANTest_P.CANSetup_P9[0],           /* 37: Block Parameter */
  &CANTest_P.CANSetup_P10[0],          /* 38: Block Parameter */
  &CANTest_P.CANSetup_P11,             /* 39: Block Parameter */
  &CANTest_P.CANSetup_P12[0],          /* 40: Block Parameter */
  &CANTest_P.CANSetup_P13[0],          /* 41: Block Parameter */
  &CANTest_P.CANSetup_P14[0],          /* 42: Block Parameter */
  &CANTest_P.CANSetup_P15[0],          /* 43: Block Parameter */
  &CANTest_P.CANSetup_P16,             /* 44: Block Parameter */
  &CANTest_P.CANSetup_P17,             /* 45: Block Parameter */
  &CANTest_P.CANSetup_P18[0],          /* 46: Block Parameter */
  &CANTest_P.CANSetup_P19,             /* 47: Block Parameter */
  &CANTest_P.CANSetup_P20[0],          /* 48: Block Parameter */
  &CANTest_P.CANSetup_P21[0],          /* 49: Block Parameter */
  &CANTest_P.CANSetup_P22[0],          /* 50: Block Parameter */
  &CANTest_P.CANSetup_P23[0],          /* 51: Block Parameter */
  &CANTest_P.CANSetup_P24,             /* 52: Block Parameter */
  &CANTest_P.Constant1_Value_j,        /* 53: Block Parameter */
  &CANTest_P.ContMode_Value,           /* 54: Block Parameter */
  &CANTest_P.TQCom_Value,              /* 55: Block Parameter */
  &CANTest_P.ContM_Gain,               /* 56: Block Parameter */
  &CANTest_P.Constant_Value,           /* 57: Block Parameter */
  &CANTest_P.Constant1_Value,          /* 58: Block Parameter */
  &CANTest_P.Constant2_Value,          /* 59: Block Parameter */
  &CANTest_P.Constant3_Value,          /* 60: Block Parameter */
  &CANTest_P.Constant4_Value,          /* 61: Block Parameter */
  &CANTest_P.CANWrite1_P1,             /* 62: Block Parameter */
  &CANTest_P.CANWrite1_P2,             /* 63: Block Parameter */
  &CANTest_P.CANWrite1_P3,             /* 64: Block Parameter */
  &CANTest_P.CANWrite1_P4,             /* 65: Block Parameter */
  &CANTest_P.CANWrite1_P5[0],          /* 66: Block Parameter */
  &CANTest_P.CANWrite1_P6,             /* 67: Block Parameter */
  &CANTest_P.CANWrite1_P7,             /* 68: Block Parameter */
  &CANTest_P.Constant1_Value_a,        /* 69: Block Parameter */
  &CANTest_P.gain1_Gain,               /* 70: Block Parameter */
  &CANTest_P.gain2_Gain,               /* 71: Block Parameter */
  &CANTest_P.d_InitialCondition,       /* 72: Block Parameter */
  &CANTest_P.d1_InitialCondition,      /* 73: Block Parameter */
  &CANTest_P.Ts,                       /* 74: Model Parameter */
};

/* Declare Data Run-Time Dimension Buffer Addresses statically */
static int32_T* rtVarDimsAddrMap[] = {
  (NULL)
};

#endif

/* Data Type Map - use dataTypeMapIndex to access this structure */
static TARGET_CONST rtwCAPI_DataTypeMap rtDataTypeMap[] = {
  /* cName, mwName, numElements, elemMapIndex, dataSize, slDataId, *
   * isComplex, isPointer */
  { "unsigned char", "boolean_T", 0, 0, sizeof(boolean_T), SS_BOOLEAN, 0, 0 },

  { "numeric", "CAN_DATATYPE", 0, 0, sizeof(CAN_DATATYPE), SS_STRUCT, 0, 0 },

  { "double", "real_T", 0, 0, sizeof(real_T), SS_DOUBLE, 0, 0 }
};

#ifdef HOST_CAPI_BUILD
#undef sizeof
#endif

/* Structure Element Map - use elemMapIndex to access this structure */
static TARGET_CONST rtwCAPI_ElementMap rtElementMap[] = {
  /* elementName, elementOffset, dataTypeIndex, dimIndex, fxpIndex */
  { (NULL), 0, 0, 0, 0 },
};

/* Dimension Map - use dimensionMapIndex to access elements of ths structure*/
static const rtwCAPI_DimensionMap rtDimensionMap[] = {
  /* dataOrientation, dimArrayIndex, numDims, vardimsIndex */
  { rtwCAPI_SCALAR, 0, 2, 0 },

  { rtwCAPI_VECTOR, 2, 2, 0 },

  { rtwCAPI_VECTOR, 4, 2, 0 },

  { rtwCAPI_VECTOR, 6, 2, 0 },

  { rtwCAPI_VECTOR, 8, 2, 0 }
};

/* Dimension Array- use dimArrayIndex to access elements of this array */
static const uint_T rtDimensionArray[] = {
  1,                                   /* 0 */
  1,                                   /* 1 */
  1,                                   /* 2 */
  5,                                   /* 3 */
  1,                                   /* 4 */
  2,                                   /* 5 */
  1,                                   /* 6 */
  4,                                   /* 7 */
  1,                                   /* 8 */
  6                                    /* 9 */
};

/* C-API stores floating point values in an array. The elements of this  *
 * are unique. This ensures that values which are shared across the model*
 * are stored in the most efficient way. These values are referenced by  *
 *           - rtwCAPI_FixPtMap.fracSlopePtr,                            *
 *           - rtwCAPI_FixPtMap.biasPtr,                                 *
 *           - rtwCAPI_SampleTimeMap.samplePeriodPtr,                    *
 *           - rtwCAPI_SampleTimeMap.sampleOffsetPtr                     */
static const real_T rtcapiStoredFloats[] = {
  0.002, 0.0
};

/* Fixed Point Map */
static const rtwCAPI_FixPtMap rtFixPtMap[] = {
  /* fracSlopePtr, biasPtr, scaleType, wordLength, exponent, isSigned */
  { (NULL), (NULL), rtwCAPI_FIX_RESERVED, 0, 0, 0 },
};

/* Sample Time Map - use sTimeIndex to access elements of ths structure */
static const rtwCAPI_SampleTimeMap rtSampleTimeMap[] = {
  /* samplePeriodPtr, sampleOffsetPtr, tid, samplingMode */
  { (NULL), (NULL), -1, 0 },

  { (const void *) &rtcapiStoredFloats[0], (const void *) &rtcapiStoredFloats[1],
    0, 0 }
};

static rtwCAPI_ModelMappingStaticInfo mmiStatic = {
  /* Signals:{signals, numSignals,
   *           rootInputs, numRootInputs,
   *           rootOutputs, numRootOutputs},
   * Params: {blockParameters, numBlockParameters,
   *          modelParameters, numModelParameters},
   * States: {states, numStates},
   * Maps:   {dataTypeMap, dimensionMap, fixPtMap,
   *          elementMap, sampleTimeMap, dimensionArray},
   * TargetType: targetType
   */
  { rtBlockSignals, 23,
    (NULL), 0,
    (NULL), 0 },

  { rtBlockParameters, 51,
    rtModelParameters, 1 },

  { (NULL), 0 },

  { rtDataTypeMap, rtDimensionMap, rtFixPtMap,
    rtElementMap, rtSampleTimeMap, rtDimensionArray },
  "float",

  { 1549657953U,
    1200499624U,
    3365832572U,
    428343849U },
  (NULL), 0,
  0
};

/* Function to get C API Model Mapping Static Info */
const rtwCAPI_ModelMappingStaticInfo*
  CANTest_GetCAPIStaticMap(void)
{
  return &mmiStatic;
}

/* Cache pointers into DataMapInfo substructure of RTModel */
#ifndef HOST_CAPI_BUILD

void CANTest_InitializeDataMapInfo(void)
{
  /* Set C-API version */
  rtwCAPI_SetVersion(CANTest_M->DataMapInfo.mmi, 1);

  /* Cache static C-API data into the Real-time Model Data structure */
  rtwCAPI_SetStaticMap(CANTest_M->DataMapInfo.mmi, &mmiStatic);

  /* Cache static C-API logging data into the Real-time Model Data structure */
  rtwCAPI_SetLoggingStaticMap(CANTest_M->DataMapInfo.mmi, (NULL));

  /* Cache C-API Data Addresses into the Real-Time Model Data structure */
  rtwCAPI_SetDataAddressMap(CANTest_M->DataMapInfo.mmi, rtDataAddrMap);

  /* Cache C-API Data Run-Time Dimension Buffer Addresses into the Real-Time Model Data structure */
  rtwCAPI_SetVarDimsAddressMap(CANTest_M->DataMapInfo.mmi, rtVarDimsAddrMap);

  /* Cache C-API rtp Address and size  into the Real-Time Model Data structure */
  CANTest_M->DataMapInfo.mmi.InstanceMap.rtpAddress = rtmGetDefaultParam
    (CANTest_M);
  CANTest_M->DataMapInfo.mmi.staticMap->rtpSize = sizeof(P_CANTest_T);

  /* Cache the instance C-API logging pointer */
  rtwCAPI_SetInstanceLoggingInfo(CANTest_M->DataMapInfo.mmi, (NULL));

  /* Set reference to submodels */
  rtwCAPI_SetChildMMIArray(CANTest_M->DataMapInfo.mmi, (NULL));
  rtwCAPI_SetChildMMIArrayLen(CANTest_M->DataMapInfo.mmi, 0);
}

#else                                  /* HOST_CAPI_BUILD */
#ifdef __cplusplus

extern "C" {

#endif

  void CANTest_host_InitializeDataMapInfo(CANTest_host_DataMapInfo_T *dataMap,
    const char *path)
  {
    /* Set C-API version */
    rtwCAPI_SetVersion(dataMap->mmi, 1);

    /* Cache static C-API data into the Real-time Model Data structure */
    rtwCAPI_SetStaticMap(dataMap->mmi, &mmiStatic);

    /* host data address map is NULL */
    rtwCAPI_SetDataAddressMap(dataMap->mmi, NULL);

    /* host vardims address map is NULL */
    rtwCAPI_SetVarDimsAddressMap(dataMap->mmi, NULL);

    /* Set Instance specific path */
    rtwCAPI_SetPath(dataMap->mmi, path);
    rtwCAPI_SetFullPath(dataMap->mmi, NULL);

    /* Set reference to submodels */
    rtwCAPI_SetChildMMIArray(dataMap->mmi, (NULL));
    rtwCAPI_SetChildMMIArrayLen(dataMap->mmi, 0);
  }

#ifdef __cplusplus

}
#endif
#endif                                 /* HOST_CAPI_BUILD */

/* EOF: CANTest_capi.c */
