Contenuto principale

slrealtime.ModelReference.protect

R2026b

Add model protection support to Linux target device

Since R2026a

Description

Add-On Required: This feature requires the Embedded Coder Support Package For Real-Time Linux add-on.

slrealtime.ModelReference.protect(target_object,model_name,Name=Value) wraps around the Simulink.ModelReference.protect function to pass relevant arguments to the function and to add support for remote build of protected models for Linux target devices. The slrealtime.ModelReference.protect uses the Target (Simulink Real-Time) object to remote build the generated code from the model then package the .a lib file in the .SLXP file. For more information, see Model Protection .

example

Examples

collapse all

Add model protection support for the Linux target device for cross compilation of the protected model SLXP file.

% previously created Target object myLinuxTgDevice
% the protected and unprotected models named myProtectedModelName 
% . . . are available on the MATLAB path
slrealtime.ModelReference.protect(myLinuxTgDevice, myProtectedModelName, 'ObfuscateCode', false);

Input Arguments

collapse all

Object that represents a Linux target device, specified as a Target object. The object provides access to methods that manipulate the Linux target device properties.

Example: tg

Example: 'slrt_ex_osc'

Data Types: char | string | handle

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: ObfuscateCode=false

Selects whether to overwrite an existing binary file in output binaries folder.

Example: ObfuscateCode=false

Version History

Introduced in R2026a