Main Content

slxpinfo

High-level information about protected model

Since R2024b

Description

fileinfo = slxpinfo(filename) returns high-level information about the protected model specified by filename. The function returns equivalent information to the summary of the protected model report regardless of whether the protected model report is available.

example

Examples

collapse all

Suppose you have a protected model named mymodel.slxp. To return a structure that provides information about the protected model, you would enter this command.

report = slxpinfo("mymodel")
report = 

  struct with fields:

                        File: 'C:\mydir\mymodel.slxp'
             GeneratedReport: 'Off'
                ModelVersion: '1.2'
             SimulinkVersion: 'R2024b'
        SimulinkCoderVersion: '24.2 (R2024b) 25-Mar-2024'
             HDLCoderVersion: ''
                 DateCreated: '2024-05-06T14:03:12Z'
                    Platform: 'win64'
                         Tag: 'GIT_COMMIT_27468#52​@TEAM_A'
         ReadOnlyViewSupport: 'Off'
           SimulationSupport: 'On'
       CodeGenerationSupport: 'On'
    HDLCodeGenerationSupport: 'Off'
    ConcurrentTaskingSupport: 'Off'
               CodeInterface: 'Model reference'
                      Target: 'ert'
                 Obfuscation: 'On'
    GeneratedCodeContentType: 'Obfuscated source code'

The structure includes high-level information about the protected model. For example, the output includes the corresponding version of the design file, the date the protected model was created, and whether or not the protected model supports various functionalities.

Input Arguments

collapse all

Protected model filename or path, specified as a character vector or string scalar.

The filename can include a partial path, complete path, relative path, or no path. When you do not provide a path, the file extension (.slxp) is optional.

When multiple protected models with the same name are on the MATLAB® path, the function uses the file higher on the path. For more information, see Shadowed Files.

Example: slxpinfo("mymodel")

Example: slxpinfo("mymodel.slxp")

Example: slxpinfo("mydir/mymodel.slxp")

Example: slxpinfo("C:/mydir/mymodel.slxp")

Data Types: char | string

Output Arguments

collapse all

High-level protected model information, returned as a structure.

The structure contains these fields:

  • File — Full path of file

  • GeneratedReport — Whether the protected model includes a report

  • ModelVersion — Corresponding version of the design file

  • SimulinkVersion — Simulink® release used to generate the protected model

  • SimulinkCoderVersionSimulink Coder™ release used to generate code for the protected model

  • HDLCoderVersion — HDL Coder™ release used to generate code for the protected model

  • DateCreated — Creation date and time for the protected model

  • Platform — Platform used to generate the protected model

  • Tag — Tag with custom text to help identify the protected model

  • ReadOnlyViewSupport — Whether the protected model includes a read-only web view

  • SimulationSupport — Whether a model that references the protected model can run in normal, accelerator, or rapid accelerator mode

  • CodeGenerationSupport — Whether a model that references the protected model can run in external mode and support C and C++ code generation

  • HDLCodeGenerationSupport — Whether a model that references the protected model supports HDL code generation

  • ConcurrentTaskingSupportAllow tasks to execute concurrently on target setting during model protection

  • CodeInterface — Interface for the generated code

  • Target — Supported system target files based on the System target file (Simulink Coder) setting during model protection and additions by the Simulink.ProtectedModel.addTarget (Simulink Coder) function

  • Obfuscation — Whether generated code is obfuscated

  • GeneratedCodeContentType — Appearance of the generated code

When you use this function to get information about a protected model created in a release before R2024b, the SimulinkCoderVersion and HDLCoderVersion fields are empty regardless of the supported functionality.

Alternative Functionality

When model protection generates a report for the protected model, open the report with the Simulink.ProtectedModel.open (Simulink Coder) function.

Version History

Introduced in R2024b