Reproducing a Module as SWC Wrapper

Note

This topic explains how to reproduce a block diagram or ESDL module as SWC Wrapper. Reproducing components in general is described in Reproducing a Component.

  1. In the Component Manager, select the block diagram or ESDL module you want to reproduce as SWC wrapper.

  2. In the Edit menu, point to Reproduce As and select SWC Wrapper.

    Note

    Without activated Enable Creation of AUTOSAR Components option, you cannot create AUTOSAR components, neither via Insert > AUTOSAR > * nor via Reproduce As > *.

    ClosedThe following happens.

    • A software component named SWC_<module name> is created. The software component contains an instance of the module. The module instance in the SWC uses the same implementation set and data set as the original module instance in its parent project.

    • For each process in the module, a runnable with identical name is added to the software component. Each runnable calls its process.

    • A project named (by default) P_<module name> is created. The ANSI-C target and the newest RTE-AUTOSAR * operating system supported by ASCET are selected. The software component is added to the project.

    • If the module contains at least one receive message, a SenderReceiver interface SRI_Require_<module name> is created. See SenderReceiver Interface Require Port for details.

      The SenderReceiver interface is added to the software component as Rport.

    • If the module contains at least one send message or one SendReceive message, a SenderReceiver interface SRI_Provide_<module name> is created. See SenderReceiver Interface Provide Port for details.

      The SenderReceiver interface is added to the software component as Pport.

    • If the module contains, directly or indirectly, at least one imported parameter, a Calibration interface Calibration_<module name> is created. See Calibration Interface for details.

      The Calibration interface is added to the software component as Rport.

    • For each prototype class or service routine referenced by the original module, a ClientServer interface is created. See ClientServer Interface for details.

      The ClientServer interfaces are added to the SWC as Rports.

    • Automatic parameter mapping is performed.

    • For each SendReceive message in the module, an interrunnable with identical name is created.

    • Automatic message mapping (internal and external) is performed.

      Note

      In the ASCET options window, "Modeling\Reproduce As" node, you can customize the names of the generated SWC, project, AUTOSAR interfaces, Rports and Pports, return arguments of operations in generated ClientServer interfaces, and the prototype class of a generated ClientServer interface.

    ClosedThe following can happen.

    If the component contains, directly or indirectly, imported elements, the database/workspace is searched for a project that can provide information on implementation and data of these elements. If several projects are found, a selection window opens.

    1. In that window, select the project you want to determine the project context.
    2. Click OK to continue.
  3. You may want to rename the new components to avoid confusion.

See also

Reproducing a Component

Reproducing Database/Workspace Items

Example: Reproducing a Block Diagram as ESDL Component

Managing Database/Workspace Items

Message Mapping

Parameter Mapping