| Real-Time Workshop® Embedded Coder™ | ![]() |
[susbsysH, success] = importerObj.createComponentAsSubsystem(ComponentName)
[susbsysH, success] = importerObj.createComponentAsSubsystem(ComponentName,
Property1, Value1, Property2, Value2...)
createComponentAsSubsystem is a method of the class arxml.importer that creates an AUTOSAR atomic software component as a Simulink atomic subsystem.
[susbsysH, success] = importerObj.createComponentAsSubsystem(ComponentName) creates a Simulink subsystem corresponding to the AUTOSAR atomic software component 'COMPONENT' described in the XML file imported by the arxml.importer object importerObj. ComponentName is the absolute short name path of the atomic software component .
[susbsysH, success] = importerObj.createComponentAsSubsystem(ComponentName, Property1, Value1, Property2, Value2...) creates the Simulink subsystem and can specify the following parameter/value pairs:
Boolean value, true or false (default is true). If it is true, this function creates the Simulink.AliasType and Simulink.NumericType corresponding to the AUTOSAR data types in the XML file.
'overwrite' or 'makenameunique' or 'error' (default is 'overwrite'). Use this parameter to control the action to take when a Simulink model with the same name as the component already exists.
Boolean value, true or false (default is false). If it is true, this function automatically saves the generated Simulink model.
Outputs:
Subsystem handle.
True if this function is successful. Otherwise, it is false.
You can perform AUTOSAR configuration and code generation on atomic subsystems or function call subsystems. These subsystems must be convertible to model reference blocks by using the method:
Simulink.SubSystem.convertToModelReference
Note The AUTOSAR target automatically checks that the subsystem meets this requirement when you perform a subsystem build. |
You do not have to convert your subsystem to a model reference block; it is optional. If you convert your subsystem to a referenced model, you can configure AUTOSAR options within the referenced model.
You can export functions for a single function-call subsystem. First configure your function-call subsystem AUTOSAR options (e.g., using the GUI from the Configuration Parameters dialog or by calling autosar_gui_launch(subsystemName)). Then right-click the subsystem and select Real-Time Workshop > Export Functions.
importer_obj.createComponentAsSubsystem('/package/autosar_component2')createComponentAsModel; getComponentNames; getDependencies; getFile; setDependencies; setFile
![]() | createComponentAsModel | getArgCategory (C++ Encapsulation Interface Control) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |