Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2RosCpp
Commits
1940782c
Commit
1940782c
authored
Sep 27, 2019
by
Alexander David Hellwig
Browse files
Merge branch 'patch-ros2macros' into 'master'
Update Ros2Macros.ftl See merge request
!17
parents
7ae180ad
56058b2f
Pipeline
#188172
passed with stages
in 5 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
1940782c
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<groupId>
de.monticore.lang.monticar
</groupId>
<groupId>
de.monticore.lang.monticar
</groupId>
<artifactId>
embedded-montiarc-math-roscpp-generator
</artifactId>
<artifactId>
embedded-montiarc-math-roscpp-generator
</artifactId>
<version>
0.1.
7
-SNAPSHOT
</version>
<version>
0.1.
8
-SNAPSHOT
</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
<!-- == PROJECT DEPENDENCIES ============================================= -->
...
...
src/main/resources/de/monticore/lang/monticar/generator/roscpp/template/Ros2Macros.ftl
View file @
1940782c
...
@@ -39,13 +39,20 @@
...
@@ -39,13 +39,20 @@
</#macro>
</#macro>
<#macro callback sub>
<#macro callback sub>
void ${sub.getMethodName()}(const ${sub.getTypeNameInTargetLanguage()}::SharedPtr msg){
void ${sub.getMethodName()}(const ${sub.getTypeNameInTargetLanguage()}::SharedPtr msg){
<#if !sub.isStructInterface() && sub.getRosConnectionSymbol().getMsgField().isPresent()>
<#if !sub.isStructInterface() &&
!sub.isMatrixInterface() &&
sub.getRosConnectionSymbol().getMsgField().isPresent()>
component->${sub.getPortNameInTargetLanguage()} = msg->${sub.getRosConnectionSymbol().getMsgField().get()};
component->${sub.getPortNameInTargetLanguage()} = msg->${sub.getRosConnectionSymbol().getMsgField().get()};
<#else>
<#else>
<#-- ${sub.getRos2SetStructInstruction()} -->
<#if sub.isMatrixInterface()>
${sub.getRos2SetMatrixInstruction()}
<#else>
${sub.getRos2SetStructInstruction()}
${sub.getRos2SetStructInstruction()}
</#if>
</#if>
</#if>
}
}
</#macro>
</#macro>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment