이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.
coder.mapping.api.CodeMapping
C 코드 생성을 위한 모델 데이터 및 함수 인터페이스 구성
설명
코드 매핑 객체와 관련 함수를 사용하면 Simulink® 모델의 데이터에 대한 C 코드 생성을 구성할 수 있습니다. 모델 데이터 요소의 경우, 코드 매핑을 통해 데이터 요소를 스토리지 클래스 및 스토리지 클래스 속성으로 구성된 구성과 연결합니다. 모델 전반에 걸쳐 데이터 요소 범주별 기본 구성을 지정함으로써 C 코드 생성을 위한 모델 준비에 드는 수고를 줄일 수 있습니다. 데이터 요소를 개별적으로 구성하여 기본 설정을 재정의하십시오. 더 작은 모델의 경우, 각 데이터 요소를 개별적으로 구성할 수 있습니다.
생성
Simulink 편집기의 앱 탭에서 Simulink Coder나 Embedded Coder와 같은 코드 생성 앱을 선택하면, 코드 매핑이 아직 존재하지 않는 경우 해당 앱이 coder.mapping.api.CodeMapping 객체를 생성합니다. 이 앱은 모델의 활성 구성 세트 객체에 저장된 코드 사용자 지정 설정을 기반으로 코드 매핑을 생성합니다. 구성 세트 객체는 데이터 및 함수를 위한 메모리 섹션을 지정할 수 있습니다.
coder.mapping.utils.create 함수를 호출하여 프로그래밍 방식으로 coder.mapping.api.CodeMapping 객체를 생성합니다.
객체 함수
addSignal | Add block output signal to model code mappings |
coder.mapping.api.get | Get code mappings for model |
coder.mapping.utils.create | Create code mappings object for configuring data and function interface for C and C++ code generation |
find | Get model elements for the category of model code mappings |
getDataDefault | Get default storage class or storage class property setting for model data category |
getDataStore | Get code and calibration configuration from code mappings for local or shared local data store |
getInport | Get code and calibration configuration from code mappings for root-level inport |
getModelParameter | Get code and calibration configuration from code mappings for model parameters |
getModelVariantControl | Get code configuration from code mappings for
Simulink.VariantControl object |
getModelVariantVariable | Get code configuration from code mappings for
Simulink.VariantVariable object |
getOutport | Get code and calibration configuration from code mappings for root-level outport |
getSignal | Get code and calibration configuration from code mappings for block output signal |
getState | Get code and calibration configuration from code mappings for block state |
removeSignal | Remove block output signal from model code mappings |
setDataDefault | Set default storage class and storage class property values for model data category |
setDataStore | Configure local or shared local data store for code and calibration file (a2l) generation |
setInport | Configure root-level inports for code and calibration file (a2l) generation |
setModelParameter | Configure model parameter for code and calibration file (a2l) generation |
setModelVariantControl | Configure Simulink.VariantControl object for code
generation |
setOutport | Configure root-level outport for code and calibration file (a2l) generation |
setSignal | Configure block signal data for code and calibration file (a2l) generation |
setState | Configure block states for code and calibration file (a2l) generation |
예제
버전 내역
R2020b에 개발됨참고 항목
coder.mapping.api.get | coder.mapping.utils.create | coder.mapping.api.CoderDictionary | coder.mapping.api.CodeMappingCPP (Embedded Coder)
도움말 항목
- C Data Code Interface Configuration for Model Interface Elements
- Programmatically Configure C++ Interface (Embedded Coder)
- Service Interfaces (Embedded Coder)