/*
 * enkodery_new2.h
 *
 * Code generation for model "enkodery_new2".
 *
 * Model version              : 1.287
 * Simulink Coder version : 8.9 (R2015b) 13-Aug-2015
 * C source code generated on : Sat May 19 12:44:38 2018
 *
 * Target selection: sldrt.tlc
 * Note: GRT includes extra infrastructure and instrumentation for prototyping
 * Embedded hardware selection: Intel->x86-64
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_enkodery_new2_h_
#define RTW_HEADER_enkodery_new2_h_
#include <math.h>
#include <string.h>
#ifndef enkodery_new2_COMMON_INCLUDES_
# define enkodery_new2_COMMON_INCLUDES_
#include "rtwtypes.h"
#include "zero_crossing_types.h"
#include "simstruc.h"
#include "fixedpoint.h"
#include "dt_info.h"
#include "ext_work.h"
#include "sldrtdef.h"
#endif                                 /* enkodery_new2_COMMON_INCLUDES_ */

#include "enkodery_new2_types.h"

/* Shared type includes */
#include "multiword_types.h"
#include "rtGetInf.h"
#include "rt_defines.h"
#include "rt_nonfinite.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetBlkStateChangeFlag
# define rtmGetBlkStateChangeFlag(rtm) ((rtm)->ModelData.blkStateChange)
#endif

#ifndef rtmSetBlkStateChangeFlag
# define rtmSetBlkStateChangeFlag(rtm, val) ((rtm)->ModelData.blkStateChange = (val))
#endif

#ifndef rtmGetBlockIO
# define rtmGetBlockIO(rtm)            ((rtm)->ModelData.blockIO)
#endif

#ifndef rtmSetBlockIO
# define rtmSetBlockIO(rtm, val)       ((rtm)->ModelData.blockIO = (val))
#endif

#ifndef rtmGetChecksums
# define rtmGetChecksums(rtm)          ((rtm)->Sizes.checksums)
#endif

#ifndef rtmSetChecksums
# define rtmSetChecksums(rtm, val)     ((rtm)->Sizes.checksums = (val))
#endif

#ifndef rtmGetConstBlockIO
# define rtmGetConstBlockIO(rtm)       ((rtm)->ModelData.constBlockIO)
#endif

#ifndef rtmSetConstBlockIO
# define rtmSetConstBlockIO(rtm, val)  ((rtm)->ModelData.constBlockIO = (val))
#endif

#ifndef rtmGetContStateDisabled
# define rtmGetContStateDisabled(rtm)  ((rtm)->ModelData.contStateDisabled)
#endif

#ifndef rtmSetContStateDisabled
# define rtmSetContStateDisabled(rtm, val) ((rtm)->ModelData.contStateDisabled = (val))
#endif

#ifndef rtmGetContStates
# define rtmGetContStates(rtm)         ((rtm)->ModelData.contStates)
#endif

#ifndef rtmSetContStates
# define rtmSetContStates(rtm, val)    ((rtm)->ModelData.contStates = (val))
#endif

#ifndef rtmGetDataMapInfo
# define rtmGetDataMapInfo(rtm)        ()
#endif

#ifndef rtmSetDataMapInfo
# define rtmSetDataMapInfo(rtm, val)   ()
#endif

#ifndef rtmGetDefaultParam
# define rtmGetDefaultParam(rtm)       ((rtm)->ModelData.defaultParam)
#endif

#ifndef rtmSetDefaultParam
# define rtmSetDefaultParam(rtm, val)  ((rtm)->ModelData.defaultParam = (val))
#endif

#ifndef rtmGetDerivCacheNeedsReset
# define rtmGetDerivCacheNeedsReset(rtm) ((rtm)->ModelData.derivCacheNeedsReset)
#endif

#ifndef rtmSetDerivCacheNeedsReset
# define rtmSetDerivCacheNeedsReset(rtm, val) ((rtm)->ModelData.derivCacheNeedsReset = (val))
#endif

#ifndef rtmGetDirectFeedThrough
# define rtmGetDirectFeedThrough(rtm)  ((rtm)->Sizes.sysDirFeedThru)
#endif

#ifndef rtmSetDirectFeedThrough
# define rtmSetDirectFeedThrough(rtm, val) ((rtm)->Sizes.sysDirFeedThru = (val))
#endif

#ifndef rtmGetErrorStatusFlag
# define rtmGetErrorStatusFlag(rtm)    ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatusFlag
# define rtmSetErrorStatusFlag(rtm, val) ((rtm)->errorStatus = (val))
#endif

#ifndef rtmGetFinalTime
# define rtmGetFinalTime(rtm)          ((rtm)->Timing.tFinal)
#endif

#ifndef rtmSetFinalTime
# define rtmSetFinalTime(rtm, val)     ((rtm)->Timing.tFinal = (val))
#endif

#ifndef rtmGetFirstInitCondFlag
# define rtmGetFirstInitCondFlag(rtm)  ()
#endif

#ifndef rtmSetFirstInitCondFlag
# define rtmSetFirstInitCondFlag(rtm, val) ()
#endif

#ifndef rtmGetIntgData
# define rtmGetIntgData(rtm)           ((rtm)->ModelData.intgData)
#endif

#ifndef rtmSetIntgData
# define rtmSetIntgData(rtm, val)      ((rtm)->ModelData.intgData = (val))
#endif

#ifndef rtmGetMdlRefGlobalTID
# define rtmGetMdlRefGlobalTID(rtm)    ()
#endif

#ifndef rtmSetMdlRefGlobalTID
# define rtmSetMdlRefGlobalTID(rtm, val) ()
#endif

#ifndef rtmGetMdlRefTriggerTID
# define rtmGetMdlRefTriggerTID(rtm)   ()
#endif

#ifndef rtmSetMdlRefTriggerTID
# define rtmSetMdlRefTriggerTID(rtm, val) ()
#endif

#ifndef rtmGetModelMappingInfo
# define rtmGetModelMappingInfo(rtm)   ((rtm)->SpecialInfo.mappingInfo)
#endif

#ifndef rtmSetModelMappingInfo
# define rtmSetModelMappingInfo(rtm, val) ((rtm)->SpecialInfo.mappingInfo = (val))
#endif

#ifndef rtmGetModelName
# define rtmGetModelName(rtm)          ((rtm)->modelName)
#endif

#ifndef rtmSetModelName
# define rtmSetModelName(rtm, val)     ((rtm)->modelName = (val))
#endif

#ifndef rtmGetNonInlinedSFcns
# define rtmGetNonInlinedSFcns(rtm)    ()
#endif

#ifndef rtmSetNonInlinedSFcns
# define rtmSetNonInlinedSFcns(rtm, val) ()
#endif

#ifndef rtmGetNumBlockIO
# define rtmGetNumBlockIO(rtm)         ((rtm)->Sizes.numBlockIO)
#endif

#ifndef rtmSetNumBlockIO
# define rtmSetNumBlockIO(rtm, val)    ((rtm)->Sizes.numBlockIO = (val))
#endif

#ifndef rtmGetNumBlockParams
# define rtmGetNumBlockParams(rtm)     ((rtm)->Sizes.numBlockPrms)
#endif

#ifndef rtmSetNumBlockParams
# define rtmSetNumBlockParams(rtm, val) ((rtm)->Sizes.numBlockPrms = (val))
#endif

#ifndef rtmGetNumBlocks
# define rtmGetNumBlocks(rtm)          ((rtm)->Sizes.numBlocks)
#endif

#ifndef rtmSetNumBlocks
# define rtmSetNumBlocks(rtm, val)     ((rtm)->Sizes.numBlocks = (val))
#endif

#ifndef rtmGetNumContStates
# define rtmGetNumContStates(rtm)      ((rtm)->Sizes.numContStates)
#endif

#ifndef rtmSetNumContStates
# define rtmSetNumContStates(rtm, val) ((rtm)->Sizes.numContStates = (val))
#endif

#ifndef rtmGetNumDWork
# define rtmGetNumDWork(rtm)           ((rtm)->Sizes.numDwork)
#endif

#ifndef rtmSetNumDWork
# define rtmSetNumDWork(rtm, val)      ((rtm)->Sizes.numDwork = (val))
#endif

#ifndef rtmGetNumInputPorts
# define rtmGetNumInputPorts(rtm)      ((rtm)->Sizes.numIports)
#endif

#ifndef rtmSetNumInputPorts
# define rtmSetNumInputPorts(rtm, val) ((rtm)->Sizes.numIports = (val))
#endif

#ifndef rtmGetNumNonSampledZCs
# define rtmGetNumNonSampledZCs(rtm)   ((rtm)->Sizes.numNonSampZCs)
#endif

#ifndef rtmSetNumNonSampledZCs
# define rtmSetNumNonSampledZCs(rtm, val) ((rtm)->Sizes.numNonSampZCs = (val))
#endif

#ifndef rtmGetNumOutputPorts
# define rtmGetNumOutputPorts(rtm)     ((rtm)->Sizes.numOports)
#endif

#ifndef rtmSetNumOutputPorts
# define rtmSetNumOutputPorts(rtm, val) ((rtm)->Sizes.numOports = (val))
#endif

#ifndef rtmGetNumPeriodicContStates
# define rtmGetNumPeriodicContStates(rtm) ((rtm)->Sizes.numPeriodicContStates)
#endif

#ifndef rtmSetNumPeriodicContStates
# define rtmSetNumPeriodicContStates(rtm, val) ((rtm)->Sizes.numPeriodicContStates = (val))
#endif

#ifndef rtmGetNumSFcnParams
# define rtmGetNumSFcnParams(rtm)      ((rtm)->Sizes.numSFcnPrms)
#endif

#ifndef rtmSetNumSFcnParams
# define rtmSetNumSFcnParams(rtm, val) ((rtm)->Sizes.numSFcnPrms = (val))
#endif

#ifndef rtmGetNumSFunctions
# define rtmGetNumSFunctions(rtm)      ((rtm)->Sizes.numSFcns)
#endif

#ifndef rtmSetNumSFunctions
# define rtmSetNumSFunctions(rtm, val) ((rtm)->Sizes.numSFcns = (val))
#endif

#ifndef rtmGetNumSampleTimes
# define rtmGetNumSampleTimes(rtm)     ((rtm)->Sizes.numSampTimes)
#endif

#ifndef rtmSetNumSampleTimes
# define rtmSetNumSampleTimes(rtm, val) ((rtm)->Sizes.numSampTimes = (val))
#endif

#ifndef rtmGetNumU
# define rtmGetNumU(rtm)               ((rtm)->Sizes.numU)
#endif

#ifndef rtmSetNumU
# define rtmSetNumU(rtm, val)          ((rtm)->Sizes.numU = (val))
#endif

#ifndef rtmGetNumY
# define rtmGetNumY(rtm)               ((rtm)->Sizes.numY)
#endif

#ifndef rtmSetNumY
# define rtmSetNumY(rtm, val)          ((rtm)->Sizes.numY = (val))
#endif

#ifndef rtmGetOdeF
# define rtmGetOdeF(rtm)               ((rtm)->ModelData.odeF)
#endif

#ifndef rtmSetOdeF
# define rtmSetOdeF(rtm, val)          ((rtm)->ModelData.odeF = (val))
#endif

#ifndef rtmGetOdeY
# define rtmGetOdeY(rtm)               ((rtm)->ModelData.odeY)
#endif

#ifndef rtmSetOdeY
# define rtmSetOdeY(rtm, val)          ((rtm)->ModelData.odeY = (val))
#endif

#ifndef rtmGetOffsetTimeArray
# define rtmGetOffsetTimeArray(rtm)    ((rtm)->Timing.offsetTimesArray)
#endif

#ifndef rtmSetOffsetTimeArray
# define rtmSetOffsetTimeArray(rtm, val) ((rtm)->Timing.offsetTimesArray = (val))
#endif

#ifndef rtmGetOffsetTimePtr
# define rtmGetOffsetTimePtr(rtm)      ((rtm)->Timing.offsetTimes)
#endif

#ifndef rtmSetOffsetTimePtr
# define rtmSetOffsetTimePtr(rtm, val) ((rtm)->Timing.offsetTimes = (val))
#endif

#ifndef rtmGetOptions
# define rtmGetOptions(rtm)            ((rtm)->Sizes.options)
#endif

#ifndef rtmSetOptions
# define rtmSetOptions(rtm, val)       ((rtm)->Sizes.options = (val))
#endif

#ifndef rtmGetParamIsMalloced
# define rtmGetParamIsMalloced(rtm)    ()
#endif

#ifndef rtmSetParamIsMalloced
# define rtmSetParamIsMalloced(rtm, val) ()
#endif

#ifndef rtmGetPath
# define rtmGetPath(rtm)               ((rtm)->path)
#endif

#ifndef rtmSetPath
# define rtmSetPath(rtm, val)          ((rtm)->path = (val))
#endif

#ifndef rtmGetPerTaskSampleHits
# define rtmGetPerTaskSampleHits(rtm)  ()
#endif

#ifndef rtmSetPerTaskSampleHits
# define rtmSetPerTaskSampleHits(rtm, val) ()
#endif

#ifndef rtmGetPerTaskSampleHitsArray
# define rtmGetPerTaskSampleHitsArray(rtm) ((rtm)->Timing.perTaskSampleHitsArray)
#endif

#ifndef rtmSetPerTaskSampleHitsArray
# define rtmSetPerTaskSampleHitsArray(rtm, val) ((rtm)->Timing.perTaskSampleHitsArray = (val))
#endif

#ifndef rtmGetPerTaskSampleHitsPtr
# define rtmGetPerTaskSampleHitsPtr(rtm) ((rtm)->Timing.perTaskSampleHits)
#endif

#ifndef rtmSetPerTaskSampleHitsPtr
# define rtmSetPerTaskSampleHitsPtr(rtm, val) ((rtm)->Timing.perTaskSampleHits = (val))
#endif

#ifndef rtmGetPeriodicContStateIndices
# define rtmGetPeriodicContStateIndices(rtm) ((rtm)->ModelData.periodicContStateIndices)
#endif

#ifndef rtmSetPeriodicContStateIndices
# define rtmSetPeriodicContStateIndices(rtm, val) ((rtm)->ModelData.periodicContStateIndices = (val))
#endif

#ifndef rtmGetPeriodicContStateRanges
# define rtmGetPeriodicContStateRanges(rtm) ((rtm)->ModelData.periodicContStateRanges)
#endif

#ifndef rtmSetPeriodicContStateRanges
# define rtmSetPeriodicContStateRanges(rtm, val) ((rtm)->ModelData.periodicContStateRanges = (val))
#endif

#ifndef rtmGetPrevZCSigState
# define rtmGetPrevZCSigState(rtm)     ((rtm)->ModelData.prevZCSigState)
#endif

#ifndef rtmSetPrevZCSigState
# define rtmSetPrevZCSigState(rtm, val) ((rtm)->ModelData.prevZCSigState = (val))
#endif

#ifndef rtmGetRTWExtModeInfo
# define rtmGetRTWExtModeInfo(rtm)     ((rtm)->extModeInfo)
#endif

#ifndef rtmSetRTWExtModeInfo
# define rtmSetRTWExtModeInfo(rtm, val) ((rtm)->extModeInfo = (val))
#endif

#ifndef rtmGetRTWGeneratedSFcn
# define rtmGetRTWGeneratedSFcn(rtm)   ((rtm)->Sizes.rtwGenSfcn)
#endif

#ifndef rtmSetRTWGeneratedSFcn
# define rtmSetRTWGeneratedSFcn(rtm, val) ((rtm)->Sizes.rtwGenSfcn = (val))
#endif

#ifndef rtmGetRTWLogInfo
# define rtmGetRTWLogInfo(rtm)         ()
#endif

#ifndef rtmSetRTWLogInfo
# define rtmSetRTWLogInfo(rtm, val)    ()
#endif

#ifndef rtmGetRTWRTModelMethodsInfo
# define rtmGetRTWRTModelMethodsInfo(rtm) ()
#endif

#ifndef rtmSetRTWRTModelMethodsInfo
# define rtmSetRTWRTModelMethodsInfo(rtm, val) ()
#endif

#ifndef rtmGetRTWSfcnInfo
# define rtmGetRTWSfcnInfo(rtm)        ((rtm)->sfcnInfo)
#endif

#ifndef rtmSetRTWSfcnInfo
# define rtmSetRTWSfcnInfo(rtm, val)   ((rtm)->sfcnInfo = (val))
#endif

#ifndef rtmGetRTWSolverInfo
# define rtmGetRTWSolverInfo(rtm)      ((rtm)->solverInfo)
#endif

#ifndef rtmSetRTWSolverInfo
# define rtmSetRTWSolverInfo(rtm, val) ((rtm)->solverInfo = (val))
#endif

#ifndef rtmGetRTWSolverInfoPtr
# define rtmGetRTWSolverInfoPtr(rtm)   ((rtm)->solverInfoPtr)
#endif

#ifndef rtmSetRTWSolverInfoPtr
# define rtmSetRTWSolverInfoPtr(rtm, val) ((rtm)->solverInfoPtr = (val))
#endif

#ifndef rtmGetReservedForXPC
# define rtmGetReservedForXPC(rtm)     ((rtm)->SpecialInfo.xpcData)
#endif

#ifndef rtmSetReservedForXPC
# define rtmSetReservedForXPC(rtm, val) ((rtm)->SpecialInfo.xpcData = (val))
#endif

#ifndef rtmGetRootDWork
# define rtmGetRootDWork(rtm)          ((rtm)->ModelData.dwork)
#endif

#ifndef rtmSetRootDWork
# define rtmSetRootDWork(rtm, val)     ((rtm)->ModelData.dwork = (val))
#endif

#ifndef rtmGetSFunctions
# define rtmGetSFunctions(rtm)         ((rtm)->childSfunctions)
#endif

#ifndef rtmSetSFunctions
# define rtmSetSFunctions(rtm, val)    ((rtm)->childSfunctions = (val))
#endif

#ifndef rtmGetSampleHitArray
# define rtmGetSampleHitArray(rtm)     ((rtm)->Timing.sampleHitArray)
#endif

#ifndef rtmSetSampleHitArray
# define rtmSetSampleHitArray(rtm, val) ((rtm)->Timing.sampleHitArray = (val))
#endif

#ifndef rtmGetSampleHitPtr
# define rtmGetSampleHitPtr(rtm)       ((rtm)->Timing.sampleHits)
#endif

#ifndef rtmSetSampleHitPtr
# define rtmSetSampleHitPtr(rtm, val)  ((rtm)->Timing.sampleHits = (val))
#endif

#ifndef rtmGetSampleTimeArray
# define rtmGetSampleTimeArray(rtm)    ((rtm)->Timing.sampleTimesArray)
#endif

#ifndef rtmSetSampleTimeArray
# define rtmSetSampleTimeArray(rtm, val) ((rtm)->Timing.sampleTimesArray = (val))
#endif

#ifndef rtmGetSampleTimePtr
# define rtmGetSampleTimePtr(rtm)      ((rtm)->Timing.sampleTimes)
#endif

#ifndef rtmSetSampleTimePtr
# define rtmSetSampleTimePtr(rtm, val) ((rtm)->Timing.sampleTimes = (val))
#endif

#ifndef rtmGetSampleTimeTaskIDArray
# define rtmGetSampleTimeTaskIDArray(rtm) ((rtm)->Timing.sampleTimeTaskIDArray)
#endif

#ifndef rtmSetSampleTimeTaskIDArray
# define rtmSetSampleTimeTaskIDArray(rtm, val) ((rtm)->Timing.sampleTimeTaskIDArray = (val))
#endif

#ifndef rtmGetSampleTimeTaskIDPtr
# define rtmGetSampleTimeTaskIDPtr(rtm) ((rtm)->Timing.sampleTimeTaskIDPtr)
#endif

#ifndef rtmSetSampleTimeTaskIDPtr
# define rtmSetSampleTimeTaskIDPtr(rtm, val) ((rtm)->Timing.sampleTimeTaskIDPtr = (val))
#endif

#ifndef rtmGetSimMode
# define rtmGetSimMode(rtm)            ((rtm)->simMode)
#endif

#ifndef rtmSetSimMode
# define rtmSetSimMode(rtm, val)       ((rtm)->simMode = (val))
#endif

#ifndef rtmGetSimTimeStep
# define rtmGetSimTimeStep(rtm)        ((rtm)->Timing.simTimeStep)
#endif

#ifndef rtmSetSimTimeStep
# define rtmSetSimTimeStep(rtm, val)   ((rtm)->Timing.simTimeStep = (val))
#endif

#ifndef rtmGetStartTime
# define rtmGetStartTime(rtm)          ((rtm)->Timing.tStart)
#endif

#ifndef rtmSetStartTime
# define rtmSetStartTime(rtm, val)     ((rtm)->Timing.tStart = (val))
#endif

#ifndef rtmGetStepSize
# define rtmGetStepSize(rtm)           ((rtm)->Timing.stepSize)
#endif

#ifndef rtmSetStepSize
# define rtmSetStepSize(rtm, val)      ((rtm)->Timing.stepSize = (val))
#endif

#ifndef rtmGetStopRequestedFlag
# define rtmGetStopRequestedFlag(rtm)  ((rtm)->Timing.stopRequestedFlag)
#endif

#ifndef rtmSetStopRequestedFlag
# define rtmSetStopRequestedFlag(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
#endif

#ifndef rtmGetTaskCounters
# define rtmGetTaskCounters(rtm)       ()
#endif

#ifndef rtmSetTaskCounters
# define rtmSetTaskCounters(rtm, val)  ()
#endif

#ifndef rtmGetTaskTimeArray
# define rtmGetTaskTimeArray(rtm)      ((rtm)->Timing.tArray)
#endif

#ifndef rtmSetTaskTimeArray
# define rtmSetTaskTimeArray(rtm, val) ((rtm)->Timing.tArray = (val))
#endif

#ifndef rtmGetTimePtr
# define rtmGetTimePtr(rtm)            ((rtm)->Timing.t)
#endif

#ifndef rtmSetTimePtr
# define rtmSetTimePtr(rtm, val)       ((rtm)->Timing.t = (val))
#endif

#ifndef rtmGetTimingData
# define rtmGetTimingData(rtm)         ((rtm)->Timing.timingData)
#endif

#ifndef rtmSetTimingData
# define rtmSetTimingData(rtm, val)    ((rtm)->Timing.timingData = (val))
#endif

#ifndef rtmGetU
# define rtmGetU(rtm)                  ((rtm)->ModelData.inputs)
#endif

#ifndef rtmSetU
# define rtmSetU(rtm, val)             ((rtm)->ModelData.inputs = (val))
#endif

#ifndef rtmGetVarNextHitTimesListPtr
# define rtmGetVarNextHitTimesListPtr(rtm) ((rtm)->Timing.varNextHitTimesList)
#endif

#ifndef rtmSetVarNextHitTimesListPtr
# define rtmSetVarNextHitTimesListPtr(rtm, val) ((rtm)->Timing.varNextHitTimesList = (val))
#endif

#ifndef rtmGetY
# define rtmGetY(rtm)                  ((rtm)->ModelData.outputs)
#endif

#ifndef rtmSetY
# define rtmSetY(rtm, val)             ((rtm)->ModelData.outputs = (val))
#endif

#ifndef rtmGetZCCacheNeedsReset
# define rtmGetZCCacheNeedsReset(rtm)  ((rtm)->ModelData.zCCacheNeedsReset)
#endif

#ifndef rtmSetZCCacheNeedsReset
# define rtmSetZCCacheNeedsReset(rtm, val) ((rtm)->ModelData.zCCacheNeedsReset = (val))
#endif

#ifndef rtmGetZCSignalValues
# define rtmGetZCSignalValues(rtm)     ((rtm)->ModelData.zcSignalValues)
#endif

#ifndef rtmSetZCSignalValues
# define rtmSetZCSignalValues(rtm, val) ((rtm)->ModelData.zcSignalValues = (val))
#endif

#ifndef rtmGet_TimeOfLastOutput
# define rtmGet_TimeOfLastOutput(rtm)  ((rtm)->Timing.timeOfLastOutput)
#endif

#ifndef rtmSet_TimeOfLastOutput
# define rtmSet_TimeOfLastOutput(rtm, val) ((rtm)->Timing.timeOfLastOutput = (val))
#endif

#ifndef rtmGetdX
# define rtmGetdX(rtm)                 ((rtm)->ModelData.derivs)
#endif

#ifndef rtmSetdX
# define rtmSetdX(rtm, val)            ((rtm)->ModelData.derivs = (val))
#endif

#ifndef rtmGetChecksumVal
# define rtmGetChecksumVal(rtm, idx)   ((rtm)->Sizes.checksums[idx])
#endif

#ifndef rtmSetChecksumVal
# define rtmSetChecksumVal(rtm, idx, val) ((rtm)->Sizes.checksums[idx] = (val))
#endif

#ifndef rtmGetDWork
# define rtmGetDWork(rtm, idx)         ((rtm)->ModelData.dwork[idx])
#endif

#ifndef rtmSetDWork
# define rtmSetDWork(rtm, idx, val)    ((rtm)->ModelData.dwork[idx] = (val))
#endif

#ifndef rtmGetOffsetTime
# define rtmGetOffsetTime(rtm, idx)    ((rtm)->Timing.offsetTimes[idx])
#endif

#ifndef rtmSetOffsetTime
# define rtmSetOffsetTime(rtm, idx, val) ((rtm)->Timing.offsetTimes[idx] = (val))
#endif

#ifndef rtmGetSFunction
# define rtmGetSFunction(rtm, idx)     ((rtm)->childSfunctions[idx])
#endif

#ifndef rtmSetSFunction
# define rtmSetSFunction(rtm, idx, val) ((rtm)->childSfunctions[idx] = (val))
#endif

#ifndef rtmGetSampleTime
# define rtmGetSampleTime(rtm, idx)    ((rtm)->Timing.sampleTimes[idx])
#endif

#ifndef rtmSetSampleTime
# define rtmSetSampleTime(rtm, idx, val) ((rtm)->Timing.sampleTimes[idx] = (val))
#endif

#ifndef rtmGetSampleTimeTaskID
# define rtmGetSampleTimeTaskID(rtm, idx) ((rtm)->Timing.sampleTimeTaskIDPtr[idx])
#endif

#ifndef rtmSetSampleTimeTaskID
# define rtmSetSampleTimeTaskID(rtm, idx, val) ((rtm)->Timing.sampleTimeTaskIDPtr[idx] = (val))
#endif

#ifndef rtmGetVarNextHitTimeList
# define rtmGetVarNextHitTimeList(rtm, idx) ((rtm)->Timing.varNextHitTimesList[idx])
#endif

#ifndef rtmSetVarNextHitTimeList
# define rtmSetVarNextHitTimeList(rtm, idx, val) ((rtm)->Timing.varNextHitTimesList[idx] = (val))
#endif

#ifndef rtmIsContinuousTask
# define rtmIsContinuousTask(rtm, tid) ((tid) == 0)
#endif

#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

#ifndef rtmIsMajorTimeStep
# define rtmIsMajorTimeStep(rtm)       (((rtm)->Timing.simTimeStep) == MAJOR_TIME_STEP)
#endif

#ifndef rtmIsMinorTimeStep
# define rtmIsMinorTimeStep(rtm)       (((rtm)->Timing.simTimeStep) == MINOR_TIME_STEP)
#endif

#ifndef rtmIsSampleHit
# define rtmIsSampleHit(rtm, sti, tid) ((rtmIsMajorTimeStep((rtm)) && (rtm)->Timing.sampleHits[(rtm)->Timing.sampleTimeTaskIDPtr[sti]]))
#endif

#ifndef rtmGetStopRequested
# define rtmGetStopRequested(rtm)      ((rtm)->Timing.stopRequestedFlag)
#endif

#ifndef rtmSetStopRequested
# define rtmSetStopRequested(rtm, val) ((rtm)->Timing.stopRequestedFlag = (val))
#endif

#ifndef rtmGetStopRequestedPtr
# define rtmGetStopRequestedPtr(rtm)   (&((rtm)->Timing.stopRequestedFlag))
#endif

#ifndef rtmGetT
# define rtmGetT(rtm)                  (rtmGetTPtr((rtm))[0])
#endif

#ifndef rtmSetT
# define rtmSetT(rtm, val)                                       /* Do Nothing */
#endif

#ifndef rtmGetTFinal
# define rtmGetTFinal(rtm)             ((rtm)->Timing.tFinal)
#endif

#ifndef rtmSetTFinal
# define rtmSetTFinal(rtm, val)        ((rtm)->Timing.tFinal = (val))
#endif

#ifndef rtmGetTPtr
# define rtmGetTPtr(rtm)               ((rtm)->Timing.t)
#endif

#ifndef rtmSetTPtr
# define rtmSetTPtr(rtm, val)          ((rtm)->Timing.t = (val))
#endif

#ifndef rtmGetTStart
# define rtmGetTStart(rtm)             ((rtm)->Timing.tStart)
#endif

#ifndef rtmSetTStart
# define rtmSetTStart(rtm, val)        ((rtm)->Timing.tStart = (val))
#endif

#ifndef rtmGetTaskTime
# define rtmGetTaskTime(rtm, sti)      (rtmGetTPtr((rtm))[(rtm)->Timing.sampleTimeTaskIDPtr[sti]])
#endif

#ifndef rtmSetTaskTime
# define rtmSetTaskTime(rtm, sti, val) (rtmGetTPtr((rtm))[sti] = (val))
#endif

#ifndef rtmGetTimeOfLastOutput
# define rtmGetTimeOfLastOutput(rtm)   ((rtm)->Timing.timeOfLastOutput)
#endif

#ifdef rtmGetRTWSolverInfo
#undef rtmGetRTWSolverInfo
#endif

#define rtmGetRTWSolverInfo(rtm)       &((rtm)->solverInfo)

/* Definition for use in the target main file */
#define enkodery_new2_rtModel          RT_MODEL_enkodery_new2_T

/* Block signals (auto storage) */
typedef struct {
  real_T Fcn1;                         /* '<Root>/Fcn1' */
  real_T ManualSwitch3;                /* '<Root>/Manual Switch3' */
  real_T Constant2;                    /* '<Root>/Constant2' */
  real_T ProportionalGain;             /* '<S18>/Proportional Gain' */
  real_T DerivativeGain;               /* '<S18>/Derivative Gain' */
  real_T FilterCoefficient;            /* '<S18>/Filter Coefficient' */
  real_T Poloha;                       /* '<Root>/Poloha' */
  real_T ManualSwitch;                 /* '<Root>/Manual Switch' */
  real_T ManualSwitch2;                /* '<Root>/Manual Switch2' */
  real_T Abs;                          /* '<Root>/Abs' */
  real_T helvychlenkyvadla;            /* '<Root>/Úhel vychýlení kyvadla' */
  real_T TSamp;                        /* '<S6>/TSamp' */
  real_T yk;                           /* '<S22>/sum1' */
  real_T helvychlenkyvadla1;           /* '<Root>/Úhel vychýlení kyvadla1' */
  real_T TSamp_k;                      /* '<S8>/TSamp' */
  real_T yk_c;                         /* '<S23>/sum1' */
  real_T Fcn2;                         /* '<Root>/Fcn2' */
  real_T TSamp_i;                      /* '<S7>/TSamp' */
  real_T yk_e;                         /* '<S21>/sum1' */
  real_T Gain1;                        /* '<Root>/Gain1' */
  real_T TSamp_ii;                     /* '<S9>/TSamp' */
  real_T Diff;                         /* '<S9>/Diff' */
  real_T Poloha1;                      /* '<Root>/Poloha1' */
  real_T TSamp_j;                      /* '<S10>/TSamp' */
  real_T Diff_i;                       /* '<S10>/Diff' */
  real_T yk_k;                         /* '<S24>/sum1' */
  real_T yk_d;                         /* '<S20>/sum1' */
  real_T Gain2;                        /* '<Root>/Gain2' */
  real_T xk1;                          /* '<S20>/A*x(k) + B*u(k)' */
  real_T xk1_b;                        /* '<S21>/A*x(k) + B*u(k)' */
  real_T xk1_n;                        /* '<S22>/A*x(k) + B*u(k)' */
  real_T xk1_f;                        /* '<S23>/A*x(k) + B*u(k)' */
  real_T xk1_m;                        /* '<S24>/A*x(k) + B*u(k)' */
  real_T xk1_l;                        /* '<S25>/A*x(k) + B*u(k)' */
  real_T IntegralGain;                 /* '<S18>/Integral Gain' */
  boolean_T Compare;                   /* '<S1>/Compare' */
  boolean_T Compare_l;                 /* '<S3>/Compare' */
  boolean_T Compare_n;                 /* '<S2>/Compare' */
  boolean_T Compare_k;                 /* '<S4>/Compare' */
  boolean_T Compare_a;                 /* '<S5>/Compare' */
} B_enkodery_new2_T;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  real_T Delay_x_DSTATE;               /* '<S25>/Delay_x' */
  real_T UD_DSTATE;                    /* '<S6>/UD' */
  real_T Delay_x_DSTATE_k;             /* '<S22>/Delay_x' */
  real_T UD_DSTATE_i;                  /* '<S8>/UD' */
  real_T Delay_x_DSTATE_o;             /* '<S23>/Delay_x' */
  real_T UD_DSTATE_g;                  /* '<S7>/UD' */
  real_T Delay_x_DSTATE_e;             /* '<S21>/Delay_x' */
  real_T UD_DSTATE_m;                  /* '<S9>/UD' */
  real_T UD_DSTATE_gm;                 /* '<S10>/UD' */
  real_T Delay_x_DSTATE_p;             /* '<S24>/Delay_x' */
  real_T Delay_x_DSTATE_n;             /* '<S20>/Delay_x' */
  void *AnalogInput1_PWORK;            /* '<Root>/Analog Input1' */
  void *Motor_PWORK;                   /* '<Root>/Motor' */
  void *Kyvadlo1_PWORK;                /* '<Root>/Kyvadlo1' */
  void *Kyvadlo2_PWORK;                /* '<Root>/Kyvadlo2' */
  void *AnalogInput_PWORK;             /* '<Root>/Analog Input' */
  void *DigitalInput_PWORK;            /* '<Root>/Digital Input' */
  void *DigitalInput1_PWORK;           /* '<Root>/Digital Input1' */
  void *BRAKE_PWORK;                   /* '<Root>/BRAKE' */
  void *DIR_PWORK;                     /* '<Root>/DIR' */
  void *PWM_PWORK;                     /* '<Root>/PWM' */
  struct {
    void *LoggedData;
  } Armscope_PWORK;                    /* '<Root>/Arm - scope' */

  struct {
    void *LoggedData;
  } Armscope1_PWORK;                   /* '<Root>/Arm - scope1' */

  struct {
    void *LoggedData;
  } Arm2scope_PWORK;                   /* '<Root>/Arm2 - scope' */

  struct {
    void *LoggedData;
  } Arm2scope1_PWORK;                  /* '<Root>/Arm2 - scope1' */

  struct {
    void *LoggedData;
  } Arm2scope3_PWORK;                  /* '<Root>/Arm2 - scope3' */

  struct {
    void *LoggedData;
  } Arm2scope4_PWORK;                  /* '<Root>/Arm2 - scope4' */

  struct {
    void *LoggedData;
  } Cartscope_PWORK;                   /* '<Root>/Cart - scope' */

  struct {
    void *LoggedData[3];
  } Cartscope1_PWORK;                  /* '<Root>/Cart - scope1' */

  struct {
    void *LoggedData[2];
  } Cartscope2_PWORK;                  /* '<Root>/Cart - scope2' */

  struct {
    void *LoggedData;
  } Cartscope3_PWORK;                  /* '<Root>/Cart - scope3' */

  struct {
    void *LoggedData[3];
  } Cartscope4_PWORK;                  /* '<Root>/Cart - scope4' */

  struct {
    void *LoggedData[3];
  } Cartscope5_PWORK;                  /* '<Root>/Cart - scope5' */

  struct {
    void *LoggedData[3];
  } Cartscope6_PWORK;                  /* '<Root>/Cart - scope6' */

  struct {
    void *LoggedData[2];
  } Cartscope7_PWORK;                  /* '<Root>/Cart - scope7' */

  struct {
    void *LoggedData[2];
  } Cartscope8_PWORK;                  /* '<Root>/Cart - scope8' */

  struct {
    void *LoggedData[2];
  } Cartscope9_PWORK;                  /* '<Root>/Cart - scope9' */

  struct {
    void *LoggedData;
  } Currentscope_PWORK;                /* '<Root>/Current - scope' */

  struct {
    void *LoggedData;
  } CurrentRCscope_PWORK;              /* '<Root>/CurrentRC- scope' */

  struct {
    void *LoggedData[4];
  } Scope_PWORK;                       /* '<Root>/Scope' */

  struct {
    void *LoggedData;
  } Scope1_PWORK;                      /* '<Root>/Scope1' */

  struct {
    void *LoggedData;
  } Scope2_PWORK;                      /* '<Root>/Scope2' */
} DW_enkodery_new2_T;

/* Continuous states (auto storage) */
typedef struct {
  real_T Integrator_CSTATE;            /* '<S18>/Integrator' */
  real_T Filter_CSTATE;                /* '<S18>/Filter' */
} X_enkodery_new2_T;

/* State derivatives (auto storage) */
typedef struct {
  real_T Integrator_CSTATE;            /* '<S18>/Integrator' */
  real_T Filter_CSTATE;                /* '<S18>/Filter' */
} XDot_enkodery_new2_T;

/* State disabled  */
typedef struct {
  boolean_T Integrator_CSTATE;         /* '<S18>/Integrator' */
  boolean_T Filter_CSTATE;             /* '<S18>/Filter' */
} XDis_enkodery_new2_T;

#ifndef ODE3_INTG
#define ODE3_INTG

/* ODE3 Integration Data */
typedef struct {
  real_T *y;                           /* output */
  real_T *f[3];                        /* derivatives */
} ODE3_IntgData;

#endif

/* Backward compatible GRT Identifiers */
#define rtB                            enkodery_new2_B
#define BlockIO                        B_enkodery_new2_T
#define rtX                            enkodery_new2_X
#define ContinuousStates               X_enkodery_new2_T
#define rtXdot                         enkodery_new2_XDot
#define StateDerivatives               XDot_enkodery_new2_T
#define tXdis                          enkodery_new2_XDis
#define StateDisabled                  XDis_enkodery_new2_T
#define rtP                            enkodery_new2_P
#define Parameters                     P_enkodery_new2_T
#define rtDWork                        enkodery_new2_DW
#define D_Work                         DW_enkodery_new2_T

/* Parameters (auto storage) */
struct P_enkodery_new2_T_ {
  real_T ckfi;                         /* Variable: ckfi
                                        * Referenced by: '<Root>/Gain11'
                                        */
  real_T dd;                           /* Variable: dd
                                        * Referenced by: '<Root>/Gain11'
                                        */
  real_T h_norm[100];                  /* Variable: h_norm
                                        * Referenced by: '<Root>/Constant'
                                        */
  real_T v_inv[100];                   /* Variable: v_inv
                                        * Referenced by: '<Root>/Constant10'
                                        */
  real_T PIDController_D;              /* Mask Parameter: PIDController_D
                                        * Referenced by: '<S18>/Derivative Gain'
                                        */
  real_T PWM_Duty;                     /* Mask Parameter: PWM_Duty
                                        * Referenced by: '<Root>/PWM'
                                        */
  real_T PWM_DutyFinalValue;           /* Mask Parameter: PWM_DutyFinalValue
                                        * Referenced by: '<Root>/PWM'
                                        */
  real_T BRAKE_FinalValue;             /* Mask Parameter: BRAKE_FinalValue
                                        * Referenced by: '<Root>/BRAKE'
                                        */
  real_T DIR_FinalValue;               /* Mask Parameter: DIR_FinalValue
                                        * Referenced by: '<Root>/DIR'
                                        */
  real_T PWM_Frequency;                /* Mask Parameter: PWM_Frequency
                                        * Referenced by: '<Root>/PWM'
                                        */
  real_T PIDController_I;              /* Mask Parameter: PIDController_I
                                        * Referenced by: '<S18>/Integral Gain'
                                        */
  real_T DiscreteDerivative1_ICPrevScaledInput;/* Mask Parameter: DiscreteDerivative1_ICPrevScaledInput
                                                * Referenced by: '<S6>/UD'
                                                */
  real_T DiscreteDerivative3_ICPrevScaledInput;/* Mask Parameter: DiscreteDerivative3_ICPrevScaledInput
                                                * Referenced by: '<S8>/UD'
                                                */
  real_T DiscreteDerivative2_ICPrevScaledInput;/* Mask Parameter: DiscreteDerivative2_ICPrevScaledInput
                                                * Referenced by: '<S7>/UD'
                                                */
  real_T DiscreteDerivative4_ICPrevScaledInput;/* Mask Parameter: DiscreteDerivative4_ICPrevScaledInput
                                                * Referenced by: '<S9>/UD'
                                                */
  real_T DiscreteDerivative5_ICPrevScaledInput;/* Mask Parameter: DiscreteDerivative5_ICPrevScaledInput
                                                * Referenced by: '<S10>/UD'
                                                */
  real_T BRAKE_InitialValue;           /* Mask Parameter: BRAKE_InitialValue
                                        * Referenced by: '<Root>/BRAKE'
                                        */
  real_T DIR_InitialValue;             /* Mask Parameter: DIR_InitialValue
                                        * Referenced by: '<Root>/DIR'
                                        */
  real_T Motor_InputFilter;            /* Mask Parameter: Motor_InputFilter
                                        * Referenced by: '<Root>/Motor'
                                        */
  real_T Kyvadlo1_InputFilter;         /* Mask Parameter: Kyvadlo1_InputFilter
                                        * Referenced by: '<Root>/Kyvadlo1'
                                        */
  real_T Kyvadlo2_InputFilter;         /* Mask Parameter: Kyvadlo2_InputFilter
                                        * Referenced by: '<Root>/Kyvadlo2'
                                        */
  real_T AnalogInput1_MaxMissedTicks;  /* Mask Parameter: AnalogInput1_MaxMissedTicks
                                        * Referenced by: '<Root>/Analog Input1'
                                        */
  real_T Motor_MaxMissedTicks;         /* Mask Parameter: Motor_MaxMissedTicks
                                        * Referenced by: '<Root>/Motor'
                                        */
  real_T Kyvadlo1_MaxMissedTicks;      /* Mask Parameter: Kyvadlo1_MaxMissedTicks
                                        * Referenced by: '<Root>/Kyvadlo1'
                                        */
  real_T Kyvadlo2_MaxMissedTicks;      /* Mask Parameter: Kyvadlo2_MaxMissedTicks
                                        * Referenced by: '<Root>/Kyvadlo2'
                                        */
  real_T AnalogInput_MaxMissedTicks;   /* Mask Parameter: AnalogInput_MaxMissedTicks
                                        * Referenced by: '<Root>/Analog Input'
                                        */
  real_T DigitalInput_MaxMissedTicks;  /* Mask Parameter: DigitalInput_MaxMissedTicks
                                        * Referenced by: '<Root>/Digital Input'
                                        */
  real_T DigitalInput1_MaxMissedTicks; /* Mask Parameter: DigitalInput1_MaxMissedTicks
                                        * Referenced by: '<Root>/Digital Input1'
                                        */
  real_T BRAKE_MaxMissedTicks;         /* Mask Parameter: BRAKE_MaxMissedTicks
                                        * Referenced by: '<Root>/BRAKE'
                                        */
  real_T DIR_MaxMissedTicks;           /* Mask Parameter: DIR_MaxMissedTicks
                                        * Referenced by: '<Root>/DIR'
                                        */
  real_T PWM_MaxMissedTicks;           /* Mask Parameter: PWM_MaxMissedTicks
                                        * Referenced by: '<Root>/PWM'
                                        */
  real_T PIDController_N;              /* Mask Parameter: PIDController_N
                                        * Referenced by: '<S18>/Filter Coefficient'
                                        */
  real_T PIDController_P;              /* Mask Parameter: PIDController_P
                                        * Referenced by: '<S18>/Proportional Gain'
                                        */
  real_T AnalogInput1_YieldWhenWaiting;/* Mask Parameter: AnalogInput1_YieldWhenWaiting
                                        * Referenced by: '<Root>/Analog Input1'
                                        */
  real_T Motor_YieldWhenWaiting;       /* Mask Parameter: Motor_YieldWhenWaiting
                                        * Referenced by: '<Root>/Motor'
                                        */
  real_T Kyvadlo1_YieldWhenWaiting;    /* Mask Parameter: Kyvadlo1_YieldWhenWaiting
                                        * Referenced by: '<Root>/Kyvadlo1'
                                        */
  real_T Kyvadlo2_YieldWhenWaiting;    /* Mask Parameter: Kyvadlo2_YieldWhenWaiting
                                        * Referenced by: '<Root>/Kyvadlo2'
                                        */
  real_T AnalogInput_YieldWhenWaiting; /* Mask Parameter: AnalogInput_YieldWhenWaiting
                                        * Referenced by: '<Root>/Analog Input'
                                        */
  real_T DigitalInput_YieldWhenWaiting;/* Mask Parameter: DigitalInput_YieldWhenWaiting
                                        * Referenced by: '<Root>/Digital Input'
                                        */
  real_T DigitalInput1_YieldWhenWaiting;/* Mask Parameter: DigitalInput1_YieldWhenWaiting
                                         * Referenced by: '<Root>/Digital Input1'
                                         */
  real_T BRAKE_YieldWhenWaiting;       /* Mask Parameter: BRAKE_YieldWhenWaiting
                                        * Referenced by: '<Root>/BRAKE'
                                        */
  real_T DIR_YieldWhenWaiting;         /* Mask Parameter: DIR_YieldWhenWaiting
                                        * Referenced by: '<Root>/DIR'
                                        */
  real_T PWM_YieldWhenWaiting;         /* Mask Parameter: PWM_YieldWhenWaiting
                                        * Referenced by: '<Root>/PWM'
                                        */
  real_T CompareToConstant_const;      /* Mask Parameter: CompareToConstant_const
                                        * Referenced by: '<S1>/Constant'
                                        */
  int32_T DigitalInput_BitMode;        /* Mask Parameter: DigitalInput_BitMode
                                        * Referenced by: '<Root>/Digital Input'
                                        */
  int32_T DigitalInput1_BitMode;       /* Mask Parameter: DigitalInput1_BitMode
                                        * Referenced by: '<Root>/Digital Input1'
                                        */
  int32_T BRAKE_BitMode;               /* Mask Parameter: BRAKE_BitMode
                                        * Referenced by: '<Root>/BRAKE'
                                        */
  int32_T DIR_BitMode;                 /* Mask Parameter: DIR_BitMode
                                        * Referenced by: '<Root>/DIR'
                                        */
  int32_T AnalogInput1_Channels;       /* Mask Parameter: AnalogInput1_Channels
                                        * Referenced by: '<Root>/Analog Input1'
                                        */
  int32_T Motor_Channels;              /* Mask Parameter: Motor_Channels
                                        * Referenced by: '<Root>/Motor'
                                        */
  int32_T Kyvadlo1_Channels;           /* Mask Parameter: Kyvadlo1_Channels
                                        * Referenced by: '<Root>/Kyvadlo1'
                                        */
  int32_T Kyvadlo2_Channels;           /* Mask Parameter: Kyvadlo2_Channels
                                        * Referenced by: '<Root>/Kyvadlo2'
                                        */
  int32_T AnalogInput_Channels;        /* Mask Parameter: AnalogInput_Channels
                                        * Referenced by: '<Root>/Analog Input'
                                        */
  int32_T DigitalInput_Channels;       /* Mask Parameter: DigitalInput_Channels
                                        * Referenced by: '<Root>/Digital Input'
                                        */
  int32_T DigitalInput1_Channels;      /* Mask Parameter: DigitalInput1_Channels
                                        * Referenced by: '<Root>/Digital Input1'
                                        */
  int32_T BRAKE_Channels;              /* Mask Parameter: BRAKE_Channels
                                        * Referenced by: '<Root>/BRAKE'
                                        */
  int32_T DIR_Channels;                /* Mask Parameter: DIR_Channels
                                        * Referenced by: '<Root>/DIR'
                                        */
  int32_T PWM_Channels;                /* Mask Parameter: PWM_Channels
                                        * Referenced by: '<Root>/PWM'
                                        */
  int32_T AnalogInput1_RangeMode;      /* Mask Parameter: AnalogInput1_RangeMode
                                        * Referenced by: '<Root>/Analog Input1'
                                        */
  int32_T AnalogInput_RangeMode;       /* Mask Parameter: AnalogInput_RangeMode
                                        * Referenced by: '<Root>/Analog Input'
                                        */
  int32_T AnalogInput1_VoltRange;      /* Mask Parameter: AnalogInput1_VoltRange
                                        * Referenced by: '<Root>/Analog Input1'
                                        */
  int32_T AnalogInput_VoltRange;       /* Mask Parameter: AnalogInput_VoltRange
                                        * Referenced by: '<Root>/Analog Input'
                                        */
  real_T C_Gain;                       /* Expression: sps.C
                                        * Referenced by: '<S25>/C'
                                        */
  real_T D_Gain;                       /* Expression: sps.D
                                        * Referenced by: '<S25>/D'
                                        */
  real_T Saturation1_UpperSat;         /* Expression: 1
                                        * Referenced by: '<Root>/Saturation1'
                                        */
  real_T Saturation1_LowerSat;         /* Expression: -1
                                        * Referenced by: '<Root>/Saturation1'
                                        */
  real_T Delay_x_InitialCondition;     /* Expression: sps.x0
                                        * Referenced by: '<S25>/Delay_x'
                                        */
  real_T Constant2_Value;              /* Expression: 0.8
                                        * Referenced by: '<Root>/Constant2'
                                        */
  real_T Integrator_IC;                /* Expression: InitialConditionForIntegrator
                                        * Referenced by: '<S18>/Integrator'
                                        */
  real_T Filter_IC;                    /* Expression: InitialConditionForFilter
                                        * Referenced by: '<S18>/Filter'
                                        */
  real_T Constant1_Value;              /* Expression: 0.05
                                        * Referenced by: '<Root>/Constant1'
                                        */
  real_T Poloha_Gain;                  /* Expression: -0.3615
                                        * Referenced by: '<Root>/Poloha'
                                        */
  real_T Saturation2_UpperSat;         /* Expression: 1
                                        * Referenced by: '<Root>/Saturation2'
                                        */
  real_T Saturation2_LowerSat;         /* Expression: -0.73
                                        * Referenced by: '<Root>/Saturation2'
                                        */
  real_T Constant_Value;               /* Expression: 0
                                        * Referenced by: '<S3>/Constant'
                                        */
  real_T Constant_Value_o;             /* Expression: 0
                                        * Referenced by: '<S2>/Constant'
                                        */
  real_T helvychlenkyvadla_Gain;       /* Expression: 360/(2048)
                                        * Referenced by: '<Root>/Úhel vychýlení kyvadla'
                                        */
  real_T TSamp_WtEt;                   /* Computed Parameter: TSamp_WtEt
                                        * Referenced by: '<S6>/TSamp'
                                        */
  real_T D_Gain_m;                     /* Expression: sps.D
                                        * Referenced by: '<S22>/D'
                                        */
  real_T Delay_x_InitialCondition_l;   /* Expression: sps.x0
                                        * Referenced by: '<S22>/Delay_x'
                                        */
  real_T C_Gain_l;                     /* Expression: sps.C
                                        * Referenced by: '<S22>/C'
                                        */
  real_T helvychlenkyvadla1_Gain;      /* Expression: 360/(2000)
                                        * Referenced by: '<Root>/Úhel vychýlení kyvadla1'
                                        */
  real_T TSamp_WtEt_i;                 /* Computed Parameter: TSamp_WtEt_i
                                        * Referenced by: '<S8>/TSamp'
                                        */
  real_T D_Gain_ml;                    /* Expression: sps.D
                                        * Referenced by: '<S23>/D'
                                        */
  real_T Delay_x_InitialCondition_j;   /* Expression: sps.x0
                                        * Referenced by: '<S23>/Delay_x'
                                        */
  real_T C_Gain_j;                     /* Expression: sps.C
                                        * Referenced by: '<S23>/C'
                                        */
  real_T TSamp_WtEt_j;                 /* Computed Parameter: TSamp_WtEt_j
                                        * Referenced by: '<S7>/TSamp'
                                        */
  real_T D_Gain_o;                     /* Expression: sps.D
                                        * Referenced by: '<S21>/D'
                                        */
  real_T Delay_x_InitialCondition_i;   /* Expression: sps.x0
                                        * Referenced by: '<S21>/Delay_x'
                                        */
  real_T C_Gain_a;                     /* Expression: sps.C
                                        * Referenced by: '<S21>/C'
                                        */
  real_T Gain1_Gain;                   /* Expression: 2*pi/304
                                        * Referenced by: '<Root>/Gain1'
                                        */
  real_T TSamp_WtEt_it;                /* Computed Parameter: TSamp_WtEt_it
                                        * Referenced by: '<S9>/TSamp'
                                        */
  real_T Poloha1_Gain;                 /* Expression: 1/304*2*pi
                                        * Referenced by: '<Root>/Poloha1'
                                        */
  real_T TSamp_WtEt_p;                 /* Computed Parameter: TSamp_WtEt_p
                                        * Referenced by: '<S10>/TSamp'
                                        */
  real_T D_Gain_h;                     /* Expression: sps.D
                                        * Referenced by: '<S24>/D'
                                        */
  real_T Delay_x_InitialCondition_ip;  /* Expression: sps.x0
                                        * Referenced by: '<S24>/Delay_x'
                                        */
  real_T C_Gain_d;                     /* Expression: sps.C
                                        * Referenced by: '<S24>/C'
                                        */
  real_T D_Gain_l;                     /* Expression: sps.D
                                        * Referenced by: '<S20>/D'
                                        */
  real_T Delay_x_InitialCondition_b;   /* Expression: sps.x0
                                        * Referenced by: '<S20>/Delay_x'
                                        */
  real_T C_Gain_k;                     /* Expression: sps.C
                                        * Referenced by: '<S20>/C'
                                        */
  real_T Gain2_Gain;                   /* Expression: 0.0175
                                        * Referenced by: '<Root>/Gain2'
                                        */
  real_T A_Gain;                       /* Expression: sps.A
                                        * Referenced by: '<S20>/A'
                                        */
  real_T B_Gain;                       /* Expression: sps.B
                                        * Referenced by: '<S20>/B'
                                        */
  real_T A_Gain_c;                     /* Expression: sps.A
                                        * Referenced by: '<S21>/A'
                                        */
  real_T B_Gain_j;                     /* Expression: sps.B
                                        * Referenced by: '<S21>/B'
                                        */
  real_T A_Gain_f;                     /* Expression: sps.A
                                        * Referenced by: '<S22>/A'
                                        */
  real_T B_Gain_a;                     /* Expression: sps.B
                                        * Referenced by: '<S22>/B'
                                        */
  real_T A_Gain_n;                     /* Expression: sps.A
                                        * Referenced by: '<S23>/A'
                                        */
  real_T B_Gain_i;                     /* Expression: sps.B
                                        * Referenced by: '<S23>/B'
                                        */
  real_T A_Gain_a;                     /* Expression: sps.A
                                        * Referenced by: '<S24>/A'
                                        */
  real_T B_Gain_n;                     /* Expression: sps.B
                                        * Referenced by: '<S24>/B'
                                        */
  real_T A_Gain_ar;                    /* Expression: sps.A
                                        * Referenced by: '<S25>/A'
                                        */
  real_T B_Gain_o;                     /* Expression: sps.B
                                        * Referenced by: '<S25>/B'
                                        */
  uint8_T ManualSwitch3_CurrentSetting;/* Computed Parameter: ManualSwitch3_CurrentSetting
                                        * Referenced by: '<Root>/Manual Switch3'
                                        */
  uint8_T ManualSwitch1_CurrentSetting;/* Computed Parameter: ManualSwitch1_CurrentSetting
                                        * Referenced by: '<Root>/Manual Switch1'
                                        */
  uint8_T ManualSwitch_CurrentSetting; /* Computed Parameter: ManualSwitch_CurrentSetting
                                        * Referenced by: '<Root>/Manual Switch'
                                        */
  uint8_T ManualSwitch2_CurrentSetting;/* Computed Parameter: ManualSwitch2_CurrentSetting
                                        * Referenced by: '<Root>/Manual Switch2'
                                        */
  boolean_T Constant_Value_e;          /* Computed Parameter: Constant_Value_e
                                        * Referenced by: '<S4>/Constant'
                                        */
  boolean_T Constant_Value_c;          /* Computed Parameter: Constant_Value_c
                                        * Referenced by: '<S5>/Constant'
                                        */
};

/* Real-time Model Data Structure */
struct tag_RTM_enkodery_new2_T {
  const char_T *path;
  const char_T *modelName;
  struct SimStruct_tag * *childSfunctions;
  const char_T *errorStatus;
  SS_SimMode simMode;
  RTWExtModeInfo *extModeInfo;
  RTWSolverInfo solverInfo;
  RTWSolverInfo *solverInfoPtr;
  void *sfcnInfo;

  /*
   * ModelData:
   * The following substructure contains information regarding
   * the data used in the model.
   */
  struct {
    void *blockIO;
    const void *constBlockIO;
    void *defaultParam;
    ZCSigState *prevZCSigState;
    real_T *contStates;
    int_T *periodicContStateIndices;
    real_T *periodicContStateRanges;
    real_T *derivs;
    void *zcSignalValues;
    void *inputs;
    void *outputs;
    boolean_T *contStateDisabled;
    boolean_T zCCacheNeedsReset;
    boolean_T derivCacheNeedsReset;
    boolean_T blkStateChange;
    real_T odeY[2];
    real_T odeF[3][2];
    ODE3_IntgData intgData;
    void *dwork;
  } ModelData;

  /*
   * Sizes:
   * The following substructure contains sizes information
   * for many of the model attributes such as inputs, outputs,
   * dwork, sample times, etc.
   */
  struct {
    uint32_T checksums[4];
    uint32_T options;
    int_T numContStates;
    int_T numPeriodicContStates;
    int_T numU;
    int_T numY;
    int_T numSampTimes;
    int_T numBlocks;
    int_T numBlockIO;
    int_T numBlockPrms;
    int_T numDwork;
    int_T numSFcnPrms;
    int_T numSFcns;
    int_T numIports;
    int_T numOports;
    int_T numNonSampZCs;
    int_T sysDirFeedThru;
    int_T rtwGenSfcn;
  } Sizes;

  /*
   * SpecialInfo:
   * The following substructure contains special information
   * related to other components that are dependent on RTW.
   */
  struct {
    const void *mappingInfo;
    void *xpcData;
  } SpecialInfo;

  /*
   * Timing:
   * The following substructure contains information regarding
   * the timing information for the model.
   */
  struct {
    time_T stepSize;
    uint32_T clockTick0;
    uint32_T clockTickH0;
    time_T stepSize0;
    uint32_T clockTick1;
    uint32_T clockTickH1;
    time_T stepSize1;
    time_T tStart;
    time_T tFinal;
    time_T timeOfLastOutput;
    void *timingData;
    real_T *varNextHitTimesList;
    SimTimeStep simTimeStep;
    boolean_T stopRequestedFlag;
    time_T *sampleTimes;
    time_T *offsetTimes;
    int_T *sampleTimeTaskIDPtr;
    int_T *sampleHits;
    int_T *perTaskSampleHits;
    time_T *t;
    time_T sampleTimesArray[2];
    time_T offsetTimesArray[2];
    int_T sampleTimeTaskIDArray[2];
    int_T sampleHitArray[2];
    int_T perTaskSampleHitsArray[4];
    time_T tArray[2];
  } Timing;
};

/* Block parameters (auto storage) */
extern P_enkodery_new2_T enkodery_new2_P;

/* Block signals (auto storage) */
extern B_enkodery_new2_T enkodery_new2_B;

/* Continuous states (auto storage) */
extern X_enkodery_new2_T enkodery_new2_X;

/* Block states (auto storage) */
extern DW_enkodery_new2_T enkodery_new2_DW;

/* Model entry point functions */
extern void enkodery_new2_initialize(void);
extern void enkodery_new2_output(void);
extern void enkodery_new2_update(void);
extern void enkodery_new2_terminate(void);

/*====================*
 * External functions *
 *====================*/
extern enkodery_new2_rtModel *enkodery_new2(void);
extern void MdlInitializeSizes(void);
extern void MdlInitializeSampleTimes(void);
extern void MdlInitialize(void);
extern void MdlStart(void);
extern void MdlOutputs(int_T tid);
extern void MdlUpdate(int_T tid);
extern void MdlTerminate(void);

/* Real-time Model object */
extern RT_MODEL_enkodery_new2_T *const enkodery_new2_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'enkodery_new2'
 * '<S1>'   : 'enkodery_new2/Compare To Constant'
 * '<S2>'   : 'enkodery_new2/Compare To Zero'
 * '<S3>'   : 'enkodery_new2/Compare To Zero1'
 * '<S4>'   : 'enkodery_new2/Compare To Zero2'
 * '<S5>'   : 'enkodery_new2/Compare To Zero3'
 * '<S6>'   : 'enkodery_new2/Discrete Derivative1'
 * '<S7>'   : 'enkodery_new2/Discrete Derivative2'
 * '<S8>'   : 'enkodery_new2/Discrete Derivative3'
 * '<S9>'   : 'enkodery_new2/Discrete Derivative4'
 * '<S10>'  : 'enkodery_new2/Discrete Derivative5'
 * '<S11>'  : 'enkodery_new2/First-Order Filter'
 * '<S12>'  : 'enkodery_new2/First-Order Filter1'
 * '<S13>'  : 'enkodery_new2/First-Order Filter2'
 * '<S14>'  : 'enkodery_new2/First-Order Filter3'
 * '<S15>'  : 'enkodery_new2/First-Order Filter4'
 * '<S16>'  : 'enkodery_new2/First-Order Filter5'
 * '<S17>'  : 'enkodery_new2/MATLAB Function4'
 * '<S18>'  : 'enkodery_new2/PID Controller'
 * '<S19>'  : 'enkodery_new2/Ramp'
 * '<S20>'  : 'enkodery_new2/First-Order Filter/Model'
 * '<S21>'  : 'enkodery_new2/First-Order Filter1/Model'
 * '<S22>'  : 'enkodery_new2/First-Order Filter2/Model'
 * '<S23>'  : 'enkodery_new2/First-Order Filter3/Model'
 * '<S24>'  : 'enkodery_new2/First-Order Filter4/Model'
 * '<S25>'  : 'enkodery_new2/First-Order Filter5/Model'
 */
#endif                                 /* RTW_HEADER_enkodery_new2_h_ */
