How can I use a custom storage class in a Simulink data dictionary?

18 Ansichten (letzte 30 Tage)
I have the need for creating a custom storage class which I would like to use in a Simulink data dictionary. I have searched through the documentation and cannot find any reference to this. How can this be done?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 30 Okt. 2020
Bearbeitet: MathWorks Support Team am 30 Okt. 2020
Initially, a custom storage class (CSC) package needs to be created as described in the following example:
Once that is done, the CSC can be also used within a data dictionary. 
To add a parameter using the CSC, the "Customize class list" option needs to be selected. This shows all available classes that can be used to add a parameter to the data dictionary:
Now, you can select the corresponding CSC package. In this example, the custom CSC is called myPackage.Parameter. To ensure that the CSC appears in the class list, you need to have the package be visible on the MATLAB path:
Now it is possible to add a myPackage.Parameter and not only Simulink.Parameter. This would be the equivalent of doing "C1 = myPackage.Parameter(1);" in the base workspace, but now we are doing it in the data dictionary:
Now, you can set your desired custom storage class for this parameter. (In this example, a dummy "myCustomClass" was created using cscdesigner just so that it is visible in this instance). See how "Struct" and other storage classes also appear here:
 

Weitere Antworten (0)

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by