| Simulink® | ![]() |
[checksum,details] = Simulink.SubSystem.getChecksum(subsys)
[checksum,details] = Simulink.SubSystem.getChecksum(subsys) returns the checksum of the specified subsystem. Simulink® software computes the checksum based on subsystem parameter settings and the blocks the subsystem contains.
One use of this command is to determine why code generated for a subsystem is not being reused. For an example, see Determining Why Subsystem Code Is Not Reused in the Real-Time Workshop® documentation.
Note Simulink.SubSystem.getChecksum compiles the model that contains the specified subsystem, 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.SubSystem.getChecksum. |
This command accepts the argument subsys, which is the full name or handle of the atomic subsystem block for which you are returning checksum data.
This command returns the following output:
checksum — Structure of the form
Value: [4x1 uint32] MarkedUnique: [bool]
Value — Array of four 32-bit integers that represents the subsystem's 128-bit checksum.
MarkedUnique — True if the subsystem or the blocks it contains have properties that would prevent the code generated for the subsystem from being reused; otherwise, false.
details — Structure of the form
ContentsChecksum: [1x1 struct] InterfaceChecksum: [1x1 struct] ContentsChecksumItems: [nx1 struct] InterfaceChecksumItems: [mx1 struct]
ContentsChecksum — Structure of the same form as checksum, representing a checksum that provides information about all blocks in the system.
InterfaceChecksum — Structure of the same form as checksum, representing a checksum that provides information about the subsystem's block parameters and connections.
ContentsChecksumItems and InterfaceChecksumItems — Structure arrays of the following form 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.BlockDiagram.getChecksum
![]() | Simulink.SubSystem.deleteContents | sint | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |