Commit 1940782c authored by Alexander David Hellwig's avatar 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
......@@ -10,7 +10,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-roscpp-generator</artifactId>
<version>0.1.7-SNAPSHOT</version>
<version>0.1.8-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -39,13 +39,20 @@
</#macro>
<#macro callback sub>
void ${sub.getMethodName()}(const ${sub.getTypeNameInTargetLanguage()}::SharedPtr msg){
<#if !sub.isStructInterface() && sub.getRosConnectionSymbol().getMsgField().isPresent()>
component->${sub.getPortNameInTargetLanguage()} = msg->${sub.getRosConnectionSymbol().getMsgField().get()};
void ${sub.getMethodName()}(const ${sub.getTypeNameInTargetLanguage()}::SharedPtr msg){
<#if !sub.isStructInterface() && !sub.isMatrixInterface() && sub.getRosConnectionSymbol().getMsgField().isPresent()>
component->${sub.getPortNameInTargetLanguage()} = msg->${sub.getRosConnectionSymbol().getMsgField().get()};
<#else>
<#-- ${sub.getRos2SetStructInstruction()} -->
<#if sub.isMatrixInterface()>
${sub.getRos2SetMatrixInstruction()}
<#else>
${sub.getRos2SetStructInstruction()}
</#if>
</#if>
}
}
</#macro>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment