Ecos-platform / sspgen

A Kotlin DSL for generating SSP archives
MIT License
3 stars 1 forks source link

Feature/OSP-IS #8

Closed markaren closed 3 years ago

markaren commented 3 years ago

This PR adds support for OSP-IS. This means that systems with FMUs that bundles an OspModelDescription.xml somewhere within the FMU can define connections like so:

// note that it does not matter which variable definition is defined left or right of the separator
ospConnections {
  "chassis.linear mechanical port" to "wheel.chassis port"
  "wheel.ground port" to "ground.linear mechanical port"
 }

rather than:

connections {
  "chassis.p.e" to "wheel.p1.e"
  "wheel.p1.f" to "chassis.p.f"
  "wheel.p.e" to "ground.p.e"
  "ground.p.f" to "wheel.p.f"
}

The resulting SSP connection XML element transpiles to the same value regardless.

This change has a minor backwards combability issue as the resources block must be defined prior to ssd.

Closes #4