function rtobj_checkCompliance

% Create a new real-time host environment collection object
rthosts = simwb.rthosts
% Get names of real-time host environments present in the collection
rthosts.getRTEnvNames
% Create a new real-time host object and link it to the RedHawk1
% environment
rtobj1 = simwb.rtobj('RedHawk1')
% Display RTWStruct
rtobj1.RTWStruct
% Populate RTWStruct
% Use model created in Getting Started tutorial video
rtobj1.RTWStruct.modelname = 'my_sldemo_suspn'; % Name of the model
rtobj1.RTWStruct.rtdb      = 'sldemo_rtdb';     % Name of the RTDB
% System Target File is required for generating code
rtobj1.RTWStruct.systemtargetfile = 'grt.tlc' ;
rtobj1.RTWStruct.SWprefix = 2 % SWprefix option take values 0,1, or 2
% Create RTDB for the my_sldemo_suspn model
rtobj1.createRTDB
% Upload the RTDB to the real-time host
rtobj1.uploadRTDB
% Get the name of the configuration RTDB
rtobj1.getConfigRTDBName
% Check model compliance with the configuration RTDB
[matched_inport, matched_outport, unmatched_inport, unmatched_outport] ...
    = rtobj1.checkCompliance
% Generate code, tranfer source code to real-time host, and create
% executable on the real-time host
rtobj1.rtwBuild
rthosts = 

  simwb handle

  Properties:
    NumHosts: 2



ans = 

    'RedHawk1'
    'SimWB_RTHost1'


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 =

     []



*****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 *****************


*****START Create temporary SimWB Compliant Model******
*****STOP Create temporary SimWB Compliant Model*******

*****START SimWB Compliant Code Generation ************
### Starting Real-Time Workshop build procedure for model: my_sldemo_suspn
### Generating code into build directory: c:\work\my_sldemo_suspn_ccurrt
### Invoking Target Language Compiler on my_sldemo_suspn.rtw
### Using System Target File: K:\SimWB_Target\grt.tlc
### Loading TLC function libraries
.....
### Initial pass through model to cache user defined code
..
### Caching model source code
.............
### Generating TLC interface API.
.........
### Writing source file my_sldemo_suspn_capi.c
.....
### Writing header file my_sldemo_suspn_capi.h
...........................
### Writing header file my_sldemo_suspn.h
### Writing header file my_sldemo_suspn_types.h
.
### Writing header file rtwtypes.h
### Writing source file my_sldemo_suspn.c
### Writing header file my_sldemo_suspn_private.h
.
### Writing header file rtmodel.h
### Writing source file my_sldemo_suspn_data.c
### Writing header file rt_nonfinite.h
.
### Writing source file rt_nonfinite.c
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
.
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### TLC code generation complete.
.### Creating project marker file: rtw_proj.tmw
### Evaluating PostCodeGenCommand specified in the model
.
### Processing Template Makefile: K:\SimWB_Target\simwb_grt.tmf
### Wrapping unrecognized make command (angle brackets added)
###    <make>
### in default batch file
### Creating my_sldemo_suspn.mk from K:\SimWB_Target\simwb_grt.tmf
### Make will not be invoked - template makefile is for a different host
### Successful completion of Real-Time Workshop build procedure for model: my_sldemo_suspn

*****END SimWB Compliant Code Generation **********

## Transferring my_sldemo_suspn.mk file to real-time host...
.
## Transferring my_sldemo_suspn.zip file to real-time host...
## All source files successfully transferred to real-time host. Ready for MAKE!
## Running MAKE ........
.
## Successfully completed MAKE.