Hello!
Simulink.SimulationData.createStructOfTimeseries always reporting an error when the bus object contains unsigned 64 bit element.
Error using Simulink.SimulationData.createStructOfTimeseries
Invalid argument for structure timeseries initialization. Element 2 is of type uint64 but the bus object requires type embedded.fi.
Running the following dummy code:
clear
elems(1) = Simulink.BusElement;
elems(1).Name = 'a';
elems(1).DataType = 'uint32';
elems(2) = Simulink.BusElement;
elems(2).Name = 'b';
elems(2).DataType = 'uint64';
TopBus = Simulink.Bus;
TopBus.Elements = elems;
dummyTestStruct = Simulink.Bus.createMATLABStruct('TopBus');
dummyTestStruct.a = timeseries(uint32([0 0 0]), linspace(0,0.1, 3));
dummyTestStruct.a.Data = squeeze(dummyTestStruct.a.Data);
dummyTestStruct.a = setuniformtime(dummyTestStruct.a,'StartTime',0,'EndTime',0.1);
dummyTestStruct.b = timeseries(uint64([0 0 0]), linspace(0,0.1, 3));
dummyTestStruct.b.Data = squeeze(dummyTestStruct.b.Data);
dummyTestStruct.b = setuniformtime(dummyTestStruct.b,'StartTime',0,'EndTime',0.1);
dummyTestTimeSeries = Simulink.SimulationData.createStructOfTimeseries('TopBus',dummyTestStruct);
Thanks