이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.
coder.mapping.api.CodeMapping
R2026bC 코드 생성을 위한 모델 데이터 및 함수 인터페이스 구성
설명
코드 매핑 객체와 관련 함수를 사용하면 Simulink® 모델의 데이터 및 함수에 대한 C 코드 생성을 구성할 수 있습니다. 모델 데이터 요소의 경우, 코드 매핑을 통해 데이터 요소를 스토리지 클래스 및 스토리지 클래스 속성으로 구성된 구성과 연결합니다. 함수의 경우, 코드 매핑은 진입점 함수를 함수 사용자 지정 템플릿으로 구성된 구성과 연결합니다. 모델 전반에 걸쳐 데이터 요소 및 함수의 범주에 대한 기본 구성을 지정함으로써 C 코드 생성을 위한 모델 준비에 드는 수고를 줄일 수 있습니다. 데이터 요소 또는 함수를 개별적으로 구성하여 기본 구성을 재정의할 수 있습니다. 더 작은 모델의 경우, 각 데이터 요소과 함수을 개별적으로 구성할 수 있습니다. Embedded Coder 사전이 첨부된 모델의 경우, 모델 요소를 해당 사전에 정의된 서비스 인터페이스에 매핑할 수 있습니다.
생성
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 |
getDataTransfer | Get code configuration from code mappings for signal representing data transfer |
getDeploymentType | 모델의 배포 유형 가져오기 |
getFunction | Get code configuration from code mappings for model function |
getFunctionDefault | Get default function customization template or memory section for model functions category |
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 |
setDataTransfer | Set code configuration in code mappings for signal representing data transfer |
setDeploymentType | 모델의 배포 유형 설정 |
setFunction | Set coder mapping information for model function |
setFunctionDefault | Set default function customization template and memory section for model functions category |
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 |