qc_get_downloaded_models qc_load_model navigation bar

Table of Contents

qc_remove_downloaded_model

Deletes a previously downloaded model on a QUARC target.

Syntax

result = qc_remove_downloaded_model(model, name)      % Remove model name on the target associated with model.
result = qc_remove_downloaded_model(config_set, name) % Remove model name on the target associated with the configuration set.
result = qc_remove_downloaded_model(target_uri, name) % Remove model name on the target specified by the target URI.
result = qc_remove_downloaded_model(name)             % Remove model name on its associated target.
result = qc_remove_downloaded_model                   % Remove the current model on the target associated with it.
    

Description

Deletes a previously downloaded model on a target. If model is specified, then the target URI associated with the active configuration set of that model is used to identify the target. If a configuration set is specified then its associated target URI is used. If a target URI is specified then it is used directly to access the target.

The name argument is the name of the model to remove on the target. To remove multiple models at the same time, use a cell array of strings.

If no target URI is specified via a model, configuration set or URI then the target is identified by the settings for the active configuration of the model being removed. Note that in this case all the models listed in the name argument must be open in order to extract the target URI associated with each model name.

To remove all models on the target associated with the currently open model, issue the command:

qc_remove_downloaded_model(bdroot, qc_get_downloaded_models)

In this case, because the target URI is specified explicitly by giving the model (bdroot) from which to get the target URI, there is no need to have all the models open that are being removed from the target. Only one model need be open.

Parameters

model

A string indicating the name of the model to download. eg. 'q_a_lpbk'.

config_set

A Simulink.ConfigSet configuration set (see getConfigSet).

target_uri

A string containing the URI used for communicating with the QUARC Target Manager on the target.

name

A string indicating the name of the model to remove or a cell array of strings e.g. 'test_model'.

Outputs

result

Returns 0 on success and a negative error code on failure. See qc_error and qc_get_error_message for handling error codes. If no output is assigned it issues an error on failure.

Examples

qc_remove_downloaded_model; % Removes the current model on the target

% Remove all models downloaded to the target associated with the current model
qc_remove_downloaded_model(bdroot, qc_get_downloaded_models);
    

See Also

 

navigation bar