Skip to content

Commit

Permalink
Node generator fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-99 committed Nov 12, 2023
1 parent d4c075b commit f62902c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package org.lflang.generator.cpp

<<<<<<< HEAD
import org.lflang.*
import org.lflang.lf.*
=======
import org.lflang.target.TargetConfig
import org.lflang.lf.Reactor
import org.lflang.target.property.FastProperty
import org.lflang.target.property.TimeOutProperty
import org.lflang.target.property.WorkersProperty
import org.lflang.toUnixString
>>>>>>> master

/** A C++ code generator for creating a ROS2 node from reactor definition */
class CppRos2NodeGenerator(
Expand Down Expand Up @@ -269,7 +266,7 @@ class CppRos2NodeGenerator(
|
|const std::string $nodeName::LF_FEDERATE_PREFIX_PARAM_NAME = "lf_federate_prefix";
|
|$nodeName::$nodeName(const rclcpp::NodeOptions& node_options)
|$nodeName::$nodeName(const rclcpp::NodeOptions& node_options = rclcpp::NodeOptions())
| : Node("$nodeName", node_options) {
| unsigned workers = ${if (targetConfig.get(WorkersProperty.INSTANCE) != 0) targetConfig.get(WorkersProperty.INSTANCE) else "std::thread::hardware_concurrency()"};
| bool fast{${targetConfig.get(FastProperty.INSTANCE)}};
Expand Down

0 comments on commit f62902c

Please sign in to comment.