function rtobj_checkCompliance
rthosts = simwb.rthosts
rthosts.getRTEnvNames
rtobj1 = simwb.rtobj('RedHawk1')
rtobj1.RTWStruct
rtobj1.RTWStruct.modelname = 'my_sldemo_suspn';
rtobj1.RTWStruct.rtdb = 'sldemo_rtdb';
rtobj1.RTWStruct.systemtargetfile ;
rtobj1.RTWStruct.SWprefix = 2
rtobj1.createRTDB
rtobj1.uploadRTDB
rtobj1.getConfigRTDBName
[matched_inport, matched_outport, unmatched_inport, unmatched_outport] ...
= rtobj1.checkCompliance
unmatched_inport{1}
rthosts =
simwb handle
Properties:
NumHosts: 1
ans =
'RedHawk1'
rtobj1 =
simwb.rtobj handle
Package: simwb
Properties:
RTHostName: 'RedHawk1'
Connected: 1
RTWStruct: [1x1 struct]
ans =
modelname: ''
rtdb: ''
systemtargetfile: ''
SWprefix: ''
rtobj1 =
simwb.rtobj handle
Package: simwb
Properties:
RTHostName: 'RedHawk1'
Connected: 1
RTWStruct: [1x1 struct]
#### Creating RTDB for model my_sldemo_suspn
## Creating file signal.db in current folder...
## Analyzing sources in the model...
## Mapping all source blocks with 'SW' prefix to RTDB variables.
## Mapping all source blocks to RTDB variables.
##
## Analyzing sinks in the model...
## Mapping all sink blocks with 'SW' prefix to RTDB variables.
## Mapping all sink blocks to RTDB variables.
## signal.db successfully created in current folder.
*****END Creating RTDB for the model*****************
RTDB sldemo_rtdb appended on real-time host RedHawk1
ans =
sldemo_rtdb
*****START Checking model compliance with RTDB ***************
#### Checking model compliance with RTDB.
### Working on model "my_sldemo_suspn"
and RTDB "sldemo_rtdb"
## Analyzing sources in the model...
== Matching Simulink model block long_moment to RTDB item with name long_moment
== Matching Simulink model block road_height to RTDB item with name road_height
##
## Analyzing sinks in the model...
== Matching Simulink model sinks SWFrontForce to RTDB item with name FrontForce
== Matching Simulink model sinks SWThetadot to RTDB item with name Thetadot
== Matching Simulink model sinks SWZdot to RTDB item with name Zdot
##
## Model has 5 ports that are compliant with the selected RTDB.
## Warning!!! Model has 1 port that is NOT compliant with the selected RTDB.
*****END Checking model compliance with RTDB *****************
matched_inport =
[1x1 struct] [1x1 struct]
matched_outport =
[1x1 struct] [1x1 struct] [1x1 struct]
unmatched_inport =
[1x1 struct]
unmatched_outport =
[]
ans =
Name: 'acceleration
due to gravity'
Datatype: {'double'}
Dimensions: [1 1]
Width: 1
Published with MATLAB® 7.11