| Simulink® | ![]() |
[checksum,details] = Simulink.BlockDiagram.getChecksum(mdl)
[checksum,details] = Simulink.BlockDiagram.getChecksum(mdl) returns the checksum of the specified model. Simulink® software computes the checksum based on attributes of the model and the blocks the model contains.
One use of this command is to determine why the Accelerator mode in Simulink software regenerates code. For an example, see the demo slAccelDemoWhyRebuild.
Note Simulink.BlockDiagram.getChecksum compiles the specified model, using the command model([], [], [], 'compileForRTW'), if the model is not already in a compiled state. To get the checksum for the model when Simulink software compiles it for simulation, use the command model([], [], [], 'compile') to place the model in a compiled state before using Simulink.BlockDiagram.getChecksum. |
This command accepts the argument mdl, which is the full name or handle of the model for which you are returning checksum data.
This command returns the following output:
checksum — Array of four 32-bit integers that represents the model's 128-bit checksum.
details — Structure of the form
ContentsChecksum: [1x1 struct] InterfaceChecksum: [1x1 struct] ContentsChecksumItems: [nx1 struct] InterfaceChecksumItems: [mx1 struct]
ContentsChecksum — Structure of the following form that represents a checksum that provides information about all blocks in the model.
Value: [4x1 uint32] MarkedUnique: [bool]
Value — Array of four 32-bit integers that represents the model's 128-bit checksum.
MarkedUnique — True if any blocks in the model have a property that prevents code reuse.
InterfaceChecksum — Structure of the following form that represents a checksum that provides information about the model.
Value: [4x1 uint32] MarkedUnique: [bool]
Value — Array of four 32-bit integers that represents the model's 128-bit checksum.
MarkedUnique — Always true. Present for consistency with ContentsChecksum structure.
ContentsChecksumItems and InterfaceChecksumItems — Structure arrays of the following form that contain information that Simulink software uses to compute the checksum for ContentsChecksum and InterfaceChecksum, respectively:
Handle: [char array] Identifier: [char array] Value: [type]
Handle — Object for which Simulink software added an item to the checksum. For a block, the handle is a full block path. For a block port, the handle is the full block path and a string that identifies the port.
Identifier — Descriptor of the item Simulink software added to the checksum. If the item is a documented parameter, the identifier is the parameter name.
Value — Value of the item Simulink software added to the checksum. If the item is a parameter, Value is the value returned by
get_param(handle, identifier)
Simulink.SubSystem.getChecksum
![]() | Simulink.BlockDiagram.deleteContents | Simulink.BlockDiagram.getInitialState | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |