Data Management for eFMU Algorithm Code to Component Generator

You can generate an ESP component from an eFMU with algorithm code.

This page discusses:

See Also
About eFMU Algorithm Code to Component Generator
eFMU Algorithm Code to Component Generation

Generated Assets

Once the eFMU Algorithm Code to Component Generator is executed, a set of files is generated in a folder as following:

<folder> <ComponentName>

  • <folder> eFmu (list of resources from initial eFMU)
    • <folder> schemas
    • <file> __content.xml
    • additional resources
  • <file> <componentName>.esp: Containing the description of the ESP component model.
  • <file> <componentName>_itf.h
  • <file> <componentName>_itf.c
  • <file> block.h
  • <file> block.c
  • <file> galec_stl.h
  • <file> galec_types.h
  • <file> mei_block_interface.c
  • <file> mei_block_interface.h
  • <file> sii_block_interface.c
  • <file> sii_block_interface.h

Translation of Elements

The ESP Component model is generated according to the following translation rules.

The following symbols are used in the tables:

  • ®: The object is referenced.
  • ©: The object is contained.
  • @: This is an attribute.

Algorithm Code Manifest Model Details
Manifest
  Name=”A”
Model
  ©Component:A
The component A is created for the manifest name.
Variables
  ©RealVariable
    Name=”B”
    blockCausality=”input”
        Min = ”B_MinValue”
    Max = ”B_MaxValue”
    UnitRefId = ”B_Unit”
    Start = ”B_InitValue”
or
Variables
  ©RealVariable
    Name=”B”
    blockCausality=”output”
        Min = ”B_MinValue”
    Max = ”B_MaxValue”
    UnitRefId = ”B_Unit”
    Start = ”B_InitValue”
Component:A
  ©Port:B:Direction:in
    ®Interface:B
Interface:B
  ©Data:B_data
    @Min:B_MinValue
    @Max:B_MaxValue
    ®Type:B_type
    ®Unit:B_Unit
    ®InitValue: B_InitValue

RealType:B_type
Unit:B_Unit
InitValue: B_InitValue

The Port B with direction “In” or “out” is created for variable B with blockCausality input or output.

An Interface B is created and referenced by Port B.

A Data B_data is created in interface B.

A RealType B_type is created.

A Unit B_Unit is created.

An InitValue B_InitValue is created.

Variables
  ©IntegerVariable
    Name=”B”
    blockCausality=”input”
    Min = ”B_MinValue”
    Max = ”B_MaxValue”
    UnitRefId = ”B_Unit”
    Start = ”B_InitValue”

or
Variables
  ©IntegerVariable
    Name=”B”
    blockCausality=”output”
Min = ”B_MinValue”
    Max = ”B_MaxValue”
    UnitRefId = ”B_Unit”
    Start = ”B_InitValue”
Component:A
  ©Port:B:Direction:in
    ®Interface:B
Interface:B
  ©Data:B_data
    ®Type:B_type
    ®Unit:B_Unit
    ®InitValue: B_InitValue

IntegerType:B_type
Unit:B_Unit
InitValue: B_InitValue

The Port B with direction “In” or “out” is created for variable B with blockCausality input or output.

An Interface B is created and referenced by Port B.

A Data B_data is created in interface B.

An IntegerType B_type is created.

A Unit B_Unit is created.

An InitValue B_InitValue is created.

Variables
  ©BooleanVariable
    Name=”B”
    blockCausality=”input”
    Start = ”B_InitValue”
or
Variables
  ©BooleanVariable
    Name=”B”
    blockCausality=”output”
    Start = ”B_InitValue”
Component:A
  ©Port:B:Direction:in
    ®Interface:B
Interface:B
  ©Data:B_data
    ®Type:B_type
    ®InitValue: B_InitValue

BooleanType:B_type
InitValue: B_InitValue

The Port B with direction “In” or “out” is created for variable B with blockCausality input or output.

An Interface B is created and referenced by Port B.

A Data B_data is created in interface B.

A BooleanType B_type is created.

An InitValue B_InitValue is created.

Clock
  Start = “T”
Model
 Behavior :Beh
    ® PeriodicExecution :T

PeriodicExecution :T
A Behavior B is created for the manifest name.

An PeriodicExecution T is created.