Fixed 'simulink.bus' for property declaration
Mostrar comentarios más antiguos
Hi All
I'm trying to create my first class and I'm struggeling to define my property as a fixed 'simulink.bus' type. I created a simulink.bus (struct) 'ST_DATARECORD' with (at this moment) 2 variables. I want to use this bus to define the internal property.
classdef myFunct < matlab.System
properties (Access = public)
bCmdAddDataPrevScan uint8 = 0
arrstDataBuffer ST_DATARECORD % Buffer holding the supplied data
nWriteIndex uint16 = 0
end
function obj = mAddData(obj,i_Input)
obj.arrstDataBuffer.variable1 = i_Input; % Copy input data to buffer location
end
end
How to create this? The simulink.bus definition is available in my workspace. The supplied code above is only an example (pseudo) code, so I can understand what to do. Thanks for any anser.
Regards
Ludo
1 comentario
Ludo Houben
el 23 de Ag. de 2023
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Composite Interfaces en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!