Syntax

rtobj.uploadHardwareDB(arg)

Description

uploadHardwareDB is a method of the simwb.rtobj object. This method will upload the hardware mappings file "hardwarerecord.db" present in the current directory to the RTDB specified by rtobj.RTWStruct.rtdb. The "hardwarerecord.db" file is created using the createRTDB method for blocks such as CAN DBC blocks that entail a hardware mapping. The uploadHardwareDB method will upload the "signal.db" file and name the RTDB with the name provided in the RTWStruct of the Real-Time Host Object.

Usage:
rtobj.uploadHardwareDB() appends the existing RTDB with the name specified in rtobj.RTWStruct.rtdb.
rtobj.uploadHardwareDB('-a') is the same as rtobj.uploadHardwareDB()
rtobj.uploadHardwareDB('-o') overwrites the existing RTDB with the name specified in rtobj.RTWStruct.rtdb.
Output: status =

Example:

% 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 localhost environment
rtobj1 = simwb.rtobj('localhost')
% Display RTWStruct
rtobj1.RTWStruct
% Populate RTWStruct
rtobj1.RT
% m is the name of the model. Assume m contains a correctly configured CAN DBC
% block, which will spawn hardware mappings to the appropriate CAN
% networks/channels.
rtobj1.RTWStruct.modelname = m
% rtdb is the name of the RTDB
rtobj1.RTWStruct.rtdb      = rtdb
% Use default values for all other settings.
% Create RTDB 
rtobj1.createRTDB
% Upload the RTDB to the Real-Time Host
rtobj1.uploadRTDB
% Upload the hardwarerecord.db file to the server. 
rtobj1.uploadHardwareDB('-a')
% The '-a' input argument replaces the hardware mappings for RTDB variables
% associated with this model with those specified the hardwarerecord.db 
% file in the current work directory. The '-o' input argument overwrites the
% entire hardwarerecord.db file on the real-time host.