Conversion
This page contains a toolbar, a search box, and a table that includes all functions found in the project. Functions are presented in a hierarchy given by folder and file they are contained in.
The table below describes the toolbar actions.
Icon |
Description |
|
Collapse entire tree project structure shown in Name column |
|
Expand entire tree project structure shown in Name column |
|
Convert selected element/s. Note that if a container element is selected (e.g. project, folder or .c file element), then all functions under the selected container element will be converted |
|
Convert all functions listed under Name column |
|
Stop conversion of selected element/s. If a container element is selected it will stop conversion for all functions under the container |
|
Stop conversion for all functions |
The search box allows you to easily locate elements under the Name column. It will automatically filter elements as you type in the text field and only show the ones that match the search term.
Elements that match the filter will appear in bold. If a container element matches the filter, then all its descendants are shown.
The main table contains the following columns:
- Name: shows the element name. An element could be the project root, a subfolder, a .c file or a function. A tree structure describes the hierarchy.
- Recommendation: indicates the recommended conversion type based on analysis of the code. Possible values are:
Simulink, Stateflow, S-Function and Don't Convert.
For descriptions about each of these options, see Conversion Type below.
If Modelify recommends that a function should not be converted, then a message to explain the reason is shown when you hover over the Don't Convert value.
- Conversion Type: indicates type of conversion. Possible values are listed below.
- Inherit from parent: conversion type will be inherited from parent element
- Simulink: function will be converted to a Simulink model where function logic will be modeled with blocks and lines.
- Stateflow: function will be converted to a Simulink model that contains a Stateflow Chart block. Function logic will be modeled as a flow chart with junctions and transitions.
- S-Function: function will be converted to a Simulink model that contains an S-Function block. The S-function block will invoke the original C function code. This could require setting a C compiler in MATLAB. See MATLAB setup for S-Function conversion.
- Don't convert: select this option if you want to exclude a given function from conversion. A stub model - that is, a model that only contains Inports and Outports - will be generated if the function is called from some other function.
- Component: indicates which type of component must be created. Possible values are listed below.
- Model: a Simulink model will be created for the function
- Subsystem: the function will be converted to a Subsystem block. This is only possible when the function is called only once, then it can be converted as a Subsystem in the model corresponding to the caller function.
- Library Block: a library block will be created for the function and included in a library model. This is useful when the function is called from a number of places and should be shared. The library name can be specified (see User Library section)
- Status: indicates mapping/conversion status for the element. Possible values are listed below.
- Not found in Code Map: element has not been mapped by Atlas yet
- Staged: element was mapped by Atlas and it's ready to be converted
- Can not convert: indicates the element cannot be converted.
- Processing: conversion is in progress
- Canceled: conversion has been canceled by the user
- Ready for review: conversion is successfully done and model is ready for review
- Partially completed: for function element it indicates there was a problem during conversion and a partial model was generated. For container elements (folder, .c files), it indicates there was a conversion problem in at least one contained function
- Error: there was a problem during the conversion and no model was generated
- Information: it provides relevant information for some status values. For example, information about the error when a conversion failed.
As shown in the image above, there could be an extra column with an empty header between Name and Conversion Type. This column is included for license options that require a conversion bundle to generate models. Functions included in the bundle will include a check mark under this column.
You can apply an action on multiple elements by selecting the elements and selecting an option from a context menu.
Context menu actions are explained below.
- Open Model: if the selected function was converted to a model, then it opens the Simulink model in MATLAB. If a model screenshot was instead generated for the function, then it opens an HTML report that include the screenshot.
- View Source: it applies to .c files and functions and it jumps to the source in the eclipse text editor.
- Show in Worklist: it shows worklist items (e.g. conversion limitations or problems) for the selected function in the Modelify Worklist view. The menu option will be disabled if there are no worklist items associated with the selection.
- Open Initialization File: opens the initialization file. This file can either be an M script or a Data Dictionary file. See Data Storage section for details about this file. R2014b or higher is required to open a Data Dictionary file.
- Open HTML Report: opens the HTML report. See HTML Report section for details about the report.
- Convert: it converts the selected elements.
- Cancel: it cancels conversions for selected elements.
- Conversion Type: allows changing the conversion type.
- Component: allows changing the type of component.
- Clear Conversion Status: clears the conversion status and sets the corresponding mapping status depending on whether the element is mapped or not.
- Restore Default Settings: restore conversion type and type of component to original settings proposed by Modelify.