How can I validate Model Configuration Inputs
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm working on a System Target in Simulink Coder and want the user to enter data into a prompt within the model configuration pane. Therefor I added the prompt to the pane using the rtwoptions structure and added an option-callback function. Within this function I check the user input against a regular expression and want to create a standard RTW Options error message with an own message string inside the standard RTW error dialog. Rising the error with the error() function or by throwing an exception results in following behavior:
- The RWT error dialog opens
- A message "The code generation option [...] has invalid settings in its callback field [...]
Now the questions * Is this the correct way to validate user inputs? * How can I specify an own error message? * How can I force the user to enter valid data before the compilation?
Thanks in advance.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!