rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__EXECUTORS__STATIC_SINGLE_THREADED_EXECUTOR_HPP_
16 #define RCLCPP__EXECUTORS__STATIC_SINGLE_THREADED_EXECUTOR_HPP_
94 rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr,
95 bool notify =
true)
override;
117 rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr,
118 bool notify =
true)
override;
146 template<
typename ResponseT,
typename TimeRepT =
int64_t,
typename TimeT = std::milli>
153 if (status == std::future_status::ready) {
161 end_time += timeout_ns;
169 entities_collector_->refresh_wait_set(timeout_left);
173 if (status == std::future_status::ready) {
182 if (now >= end_time) {
186 timeout_left = std::chrono::duration_cast<std::chrono::nanoseconds>(end_time - now);
206 StaticExecutorEntitiesCollector::SharedPtr entities_collector_;
212 #endif // RCLCPP__EXECUTORS__STATIC_SINGLE_THREADED_EXECUTOR_HPP_
rclcpp::FutureReturnCode spin_until_future_complete(std::shared_future< ResponseT > &future, std::chrono::duration< TimeRepT, TimeT > timeout=std::chrono::duration< TimeRepT, TimeT >(-1))
Spin (blocking) until the future is complete, it times out waiting, or rclcpp is interrupted.
Definition: static_single_threaded_executor.hpp:148
void add_node(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, bool notify=true) override
Add a node to the executor.
FutureReturnCode
Return codes to be used with spin_until_future_complete.
Definition: future_return_code.hpp:33
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
rcl_guard_condition_t interrupt_guard_condition_
Guard condition for signaling the rmw layer to wake up for special events.
Definition: executor.hpp:329
memory_strategy::MemoryStrategy::SharedPtr memory_strategy_
The memory strategy: an interface for handling user-defined memory allocation strategies.
Definition: executor.hpp:338
virtual ~StaticSingleThreadedExecutor()
Default destrcutor.
Coordinate the order and timing of available communication tasks.
Definition: executor.hpp:58
bool ok(rclcpp::Context::SharedPtr context=nullptr)
Check rclcpp's status.
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Static executor implementation.
Definition: static_single_threaded_executor.hpp:57
#define RCLCPP_SMART_PTR_DEFINITIONS(...)
Definition: macros.hpp:36
Options to be passed to the executor constructor.
Definition: executor_options.hpp:28
void remove_node(rclcpp::node_interfaces::NodeBaseInterface::SharedPtr node_ptr, bool notify=true) override
Remove a node from the executor.
void spin() override
Static executor implementation of spin.
StaticSingleThreadedExecutor(const rclcpp::ExecutorOptions &options=rclcpp::ExecutorOptions())
Default constructor. See the default constructor for Executor.
rcl_wait_set_t wait_set_
Wait set for managing entities that the rmw layer waits on.
Definition: executor.hpp:332
void execute_ready_executables()
Check which executables in ExecutableList struct are ready from wait_set and execute them.
std::shared_ptr< rclcpp::Context > context_
The context associated with this executor.
Definition: executor.hpp:341