The PortReplicator2 extension view is used for establishing the external communication on CompositionSwComponentTypes based on its' contained components. Its main purpose is to establish the external interface of an ECU.
Example Port Replicator2
Prerequisites
- The Autosar Meta model containing SW ECUs, Components and Interfaces
- An installation of the SystemWeaver Explorer client (swExplorer) version R34 or later
- The SystemWeaver SWExtension.PortReplicator2 extension is located in the Client's swExplorerExtensions directory
- Assignment of the SW Architect role in the server
Configuring the View
- Go to File > Configure the explorer.
- On the Item views tab, select Port replicator 2.
- Click View example XML and copy the script as a starting point for your configuration.
- Click Edit configuration and paste the script in the Edit XML window.
- Modify the configuration to meet the needs of the use case. (See the explanation of available elements below.)
- When you are ready to test and make it available to users, check the Active box. Users must log out and back in to see the new option.
Example Configuration
<PortReplicator2ViewConfigs> <PortReplicator2ViewConfig id="1"> <ViewSettings> <Caption>Port replicator 1</Caption> <RibbonGroup>Autosar</RibbonGroup> <Description>An extension for working with delegating ports on compositions.</Description> <Image guiImage="31"/> </ViewSettings> <Parameters> <Parameter name="autosarSystem" caption="Autosar system" hintContextPath="9IES;9ICF;ARSC;ARCW*"> <Values> <ForEachPathReference path="9IES;9ICF;ARSC;ARCW*"> <AddValue/> </ForEachPathReference> </Values> </Parameter> </Parameters> <AutosarSystemParameter select="$autosarSystem"/> </PortReplicator2ViewConfig> </PortReplicator2ViewConfigs>
Explanation of the Configuration Elements
The PortReplicator2 view requires minimal configuration to make the view available for users.
<PortReplicator2ViewConfigs> is the top tag which can include one or more <AutosarInterfaceEditorConfig>.
<PortReplicator2ViewConfig> is the top tag of each configuration and must have an id attribute. The id attribute in <PortReplicator2ViewConfig> identifies the specific configuration, and should be a unique string value when multiple configurations exist.
Note: There is no need to define more than one <PortReplicator2ViewConfig> even though it is possible. |
<ViewSettings> enables you to set a custom view label, hover-tip, icon, etc. See How to Configure Item View Menu Button Settings.
<Parameters> is the tag which defines the path to the potential Autosar System from the selected composition. This tag's functionality is equal to the parameter functionality of the Script language in SystemWeaver.
Note: Normally the parameter example provided is not altered. |
<AutosarSystemParameter> is the tag which defines the name of the Parameter that shall be used as the input Autosar System for the view.