function rtobj_setRTDBItemValue

% 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')
% Set the project folder to Simulink
rtobj1.Project = 'Simulink'
% Get a list of tests that are available on the real-time host
testlist = rtobj1.getTestList
% Start the suspension_demo test. This will create a new test session
rtobj1.startTestSession('suspension_demo')
% Get test status
[status test] = rtobj1.getTestStatus
% Get list of Items in shared memory
itemList   = rtobj1.getSharedMemRTDBVarList('items')
% Get value of the road_height RTDB item
itemid = 5; %item id 5 corresponds to road_height
rtobj1.getRTDBItemValue(itemid)
% Set value of the road_height RTDB item
rtobj1.setRTDBItemValue(itemid,10)
% Get value of the road_height RTDB item
rtobj1.getRTDBItemValue(itemid)
rthosts = 

  simwb handle

  Properties:
    NumHosts: 3



ans = 

    'RedHawk1'
    'RedHawk2'
    'RedHawk3'


rtobj1 = 

  simwb.rtobj handle
  Package: simwb

  Properties:
    RTHostName: 'RedHawk1'
     Connected: 1
     RTWStruct: [1x1 struct]



testlist = 

    '2Dparameter'
    'CAN_TestLoopBack'
    'New_mulit_model'
    'VectorTest'
    'anishtest1'
    'ao16wave'
    'arinc429FIFOSched'
    'autotrans'
    'carjoy'
    'd96_single_board'
    'ert_cardemojoy'
    'f14_1'
    'fgfsUAV'
    'flex_dyn'
    'fuelsys'
    'multi_models'
    'multigen'
    'rtdemo1'
    'rtdemo1_sigg_c'
    'rtdemo1_sigg_py'
    'rtdemo2'
    'rtdemo_ref'
    'st_cardemo'
    'suspension_demo'
    'testanish1'

Test suspension_demo/Ses_0006 is already running.
Please stop this test to start a new one.

status =

     1


test =

suspension_demo/Ses_0006


itemList = 

    '1:suspension_demo%2ESWForceF'
    '2:suspension_demo%2ESWTHETAdot'
    '3:suspension_demo%2ESWZdot'
    '4:suspension_demo%2ESWlong_moment'
    '5:suspension_demo%2ESWroad_height'


ans =

    0.0086


ans =

oldvalue = 0.0018188, newvalue = 10



ans =

    10