필터 지우기
필터 지우기

How can I validate Model Configuration Inputs

조회 수: 1 (최근 30일)
Daniel
Daniel 2014년 12월 4일
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개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by