"I want to use a struct that includes pointers in Embedded Coder."

조회 수: 6 (최근 30일)
dongwon
dongwon 2025년 4월 30일
답변: Walter Roberson 2025년 4월 30일
CheckPhaseOpen( analogInputs.currentA->value)
"I'm working with Data Store blocks, and I'm bringing in the data bus using a C Caller block. However, Simulink does not support importing data in pointer form, so it's difficult to implement something like CheckPhaseOpen(analogInputs.currentA->value). What would be a good way to implement this?"

답변 (1개)

Walter Roberson
Walter Roberson 2025년 4월 30일
You may need to use something like coder.ceval() in order to be able to use the pointers. MATLAB and Simulink do not support pointers, and the mechanism to support external pointers is entirely through opaque data types (an uninterpreted block of data that cannot be directly used as a pointer, but can be passed to external routines.)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by