Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E EMAM2MQTT
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • monticore
  • EmbeddedMontiArcEmbeddedMontiArc
  • generators
  • EMAM2MQTT
  • Issues
  • #16
Closed
Open
Issue created Jun 28, 2019 by Alexander David Hellwig@alexander.hellwigOwner

Add basic Adapter generation

Add basic generation of a Adapter .cpp and .h files

Deliverables:

  • new Template Adapter.cpp.ftl and/or Adapter.h.ftl

    • Can be based on Adapter.ftl template in EMAM2Roscpp. Possible easiest if you implement your own MQTTMacro.ftl(reference: RosMacros.ftl) and use the original Adapter.ftl.
    • Result should look or work similar to your example adapter .cpp and .h
    • Assume all values are written/read as doubles for now(e.g. ignore all Matrix/Vector types, Struct Types)
    • You can ignore all generics, for now
    • The resulting class should should be named MQTTAdapter_${escapedCompName}, where ${escapedCompName} is componentInstance.getFullName() with all ., [,] replaced by _
  • In MQTTTemplates:

    • A new constant + fill method pair for the new template(s)
  • A new Class MQTTAdapterModel:

    • can be based on the RosAdapterModel in RosCpp
    • should contain all information needed to generate the Adapter
      • (escaped) name of the component instance
      • MQTTPorts of the component
        • Possibly grouped by incomming/outgoing(for subscribers/publishers respectivly)
  • In MQTTGenerator:

    • a method + List<File> generateAdapter(EMAComponentInstanceSymbol) that generates the CMake file using the MQTTTemplate Class and the template Adapter.cpp.ftl and/or Adapter.h.ftl.
  • Add a test case:

    • as previously(Issue #13 (closed)):
      • parse a simple componentInstance
      • manually add MQTTConnectionSymbols with EMAPortInstanceSymbol::setMiddlewareSymbol
    • call generateCMake on the componentInstance
    • compare the resulting File(s) with an expected result(AbstractSymtabTest::testFilesAreEqual)
Assignee
Assign to
Time tracking