Simulink.Parameter with a nested struct
조회 수: 25 (최근 30일)
이전 댓글 표시
I was trying to set the data type of a Simulink.Parameter that contains nested structs using a bus object like so:
p=Simulink.Parameter;
p.Value=struct_params;
p.CoderInfo.storageClass='ExportedGlobal';
struct_params=p;
clear p;
busInfo=Simulink.Bus.createObject(struct_params.Value);
ParamType = eval(busInfo.busName);
struct_params.DataType='Bus: ParamType';
clear (busInfo.busName);
clear busInfo;
the problem is, that for the nested structs a bus type is created automaticly with the same name as the struct itself.
for example, a nested struct called subParams will get a bus type with the name subParams.
the c code can not manage a variable with a name that is the same as a data type.
(Like calling a variable uint32...)
is there a way to control the bus types of the inner structs?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!