주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

데이터 및 함수 인터페이스

모델 데이터 요소와 함수를 코드 정의에 매핑합니다.

코드 표준 및 지침을 준수하고 코드 생성을 위한 모델 데이터 요소와 진입점 함수의 표현을 구성하려면 모델 데이터 요소와 함수를 미리 정의된 코드 정의에 매핑하십시오.

이에 대한 소개는 C Data Code Interface Configuration for Model Interface Elements 항목을 참조하십시오.

코드 매핑 편집기Associate model elements with code interface definitions

객체

coder.mapping.api.CodeMappingModel data and function interface configuration for C code generation

함수

모두 확장

model_initializeGenerated C/C++ entry-point function that contains initialization code for a Simulink model
model_resetGenerated C/C++ entry-point function that contains reset code for a Simulink model
model_stepGenerated C/C++ entry-point function that contains execution code for each step in a Simulink model
model_terminateGenerated C/C++ entry-point function that contains termination code for a Simulink model

코드 매핑 만들기 및 찾기

coder.mapping.api.getGet code mappings for model
coder.mapping.utils.createCreate code mappings object for configuring data and function interface for C and C++ code generation
findGet model elements for the category of model code mappings

디폴트 구성

getDataDefaultGet default storage class or storage class property setting for model data category
setDataDefaultSet default storage class and storage class property values for model data category

루트 수준 인포트 및 아웃포트 구성

getInportGet code and calibration configuration from code mappings for root-level inport
getOutportGet code and calibration configuration from code mappings for root-level outport
setInportConfigure root-level inports for code and calibration file (a2l) generation
setOutportConfigure root-level outport for code and calibration file (a2l) generation

파라미터 구성

getModelParameterGet code and calibration configuration from code mappings for model parameters
getModelVariantControlGet code configuration from code mappings for Simulink.VariantControl object (R2025a 이후)
getModelVariantVariableGet code configuration from code mappings for Simulink.VariantVariable object (R2025a 이후)
setModelParameterConfigure model parameter for code and calibration file (a2l) generation
setModelVariantControlConfigure Simulink.VariantControl object for code generation (R2025a 이후)

신호, 상태, 데이터 저장소 구성

addSignalAdd block output signal to model code mappings
getDataStoreGet code and calibration configuration from code mappings for local or shared local data store
getSignalGet code and calibration configuration from code mappings for block output signal
getStateGet code and calibration configuration from code mappings for block state
removeSignalRemove block output signal from model code mappings
setDataStoreConfigure local or shared local data store for code and calibration file (a2l) generation
setSignalConfigure block signal data for code and calibration file (a2l) generation
setStateConfigure block states for code and calibration file (a2l) generation

도움말 항목

구성 기본 사항

데이터 구성

함수 구성

데이터 액세스 및 초기화

추천 예제