| Real-Time Workshop® | ![]() |
| On this page… |
|---|
LibBlockReportError(block, errorstring) LibBlockReportFatalError(block, errorstring) |
Use LibBlockReportError when reporting errors for a block. LibBlockReportError is designed to be used from block target files (e.g., the TLC file for an inlined S-function).
LibBlockReportError can be called with or without the block record scoped. To call the function without a block record scoped, pass the block record. To call the function when the block is scoped, pass block = [].
LibBlockReportError([],"error string") -- If block is scoped LibBlockReportError(blockrecord,"error string") -- If block record is available
See LibBlockReportError in matlabroot/rtw/c/tlc/lib/utillib.tlc.
Use LibBlockReportFatalError when reporting fatal (assert) errors for a block. Use LibBlockReportFatalError for defensive programming. Refer to TLC Error Handling.
See LibBlockReportFatalError in matlabroot/rtw/c/tlc/lib/utillib.tlc.
Use LibBlockReportWarning when reporting warnings for a block. LibBlockReportWarning is designed to be used from block target files (e.g., the TLC file for an inlined S-function).
LibBlockReportWarning can be called with or without the block record scoped. To call this function without a block record scoped, pass the block record. To call this function when the block is scoped, pass block = [].
LibBlockReportWarning([],"warn string") -- If block is scoped LibBlockReportWarning(blockrecord,"warn string) -- If block record is available
See LibBlockReportWarning in matlabroot/rtw/c/tlc/lib/utillib.tlc.
LibGetBlockName returns the short block path name string for a block record, excluding carriage returns and other special characters that can be present in the name.
See LibGetBlockName in matlabroot/rtw/c/tlc/lib/utillib.tlc.
LibGetBlockPath returns the full block path name string for a block record, including carriage returns and other special characters that can be present in the name. Currently, the only other special string sequences defined are '/*' and '*/'.
The full block path name string is useful when you are accessing blocks from MATLAB®. For example, you can use the full block name with hilite_system via FEVAL to match the Simulink® path name exactly.
Use LibGetFormattedBlockPath to get a block path suitable for placing in a comment or error message.
See LibGetBlockPath in matlabroot/rtw/c/tlc/lib/utillib.tlc.
LibGetFormattedBlockPath returns the full path name string of a block without any special characters. The string returned from LibGetFormattedBlockPath is suitable for placing the block name, in comments or generated code, on a single line.
Currently, the special characters are carriage returns, '/*', and '*/'. A carriage return is converted to a space, '/*' is converted to '/+', and '*/' is converted to '+/'. Note that a '/' in the name is automatically converted to a '//' to distinguish it from a path separator.
Use LibGetBlockPath to get the block path needed by MATLAB functions used in reference blocks in your model.
See LibGetFormattedBlockPath in matlabroot/rtw/c/tlc/lib/utillib.tlc.
![]() | Block State and Work Vector Functions | Code Configuration Functions | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |