mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
mrs_lib::TimeoutManager2 Class Reference

Manager for registering callbacks that are called after specified time of inactivity. More...

#include <timeout_manager.hpp>

Public Types

using Callback = std::function<void(rclcpp::Time)>

Public Member Functions

 TimeoutManager2 (TimeoutManagerNodeInterfaces node_interfaces, std::chrono::nanoseconds update_period)
 Construct the timeout manager.
 ~TimeoutManager2 ()
 Destructor.
 TimeoutManager2 (const TimeoutManager2 &)=delete
 TimeoutManager2 is not copyable.
TimeoutManager2 & operator= (const TimeoutManager2 &)=delete
 TimeoutManager2 is not copyable.
 TimeoutManager2 (TimeoutManager2 &&) noexcept
 Move constructor.
TimeoutManager2 & operator= (TimeoutManager2 &&) noexcept
 Move assignment.
std::shared_ptr< TimeoutManagerHandle > register_new (TimeoutManagerRegisterOptions options)
 Register a new timeout to be handled by this manager.
void start_all ()
 Start all timeouts managed by this manager.
void pause_all ()
 Stop all timeouts managed by this manager.
void clear_deleted ()
 Remove all timeouts for which the handles were already deleted.

Friends

class internal::TimeoutManagerHandleKey

Detailed Description

Manager for registering callbacks that are called after specified time of inactivity.

Constructor & Destructor Documentation

◆ TimeoutManager2()

mrs_lib::TimeoutManager2::TimeoutManager2 ( TimeoutManagerNodeInterfaces node_interfaces,
std::chrono::nanoseconds update_period )
explicit

Construct the timeout manager.

Parameters
node_interfacesROS node interfaces to use by the timeout manager.
update_periodHow often to check for the timeout expiration.

Member Function Documentation

◆ register_new()

auto mrs_lib::TimeoutManager2::register_new ( TimeoutManagerRegisterOptions options)

Register a new timeout to be handled by this manager.

Returns
RAII handle to the timeout for managing it.

The documentation for this class was generated from the following files:
  • /home/runner/work/mrs_lib/mrs_lib/include/mrs_lib/timeout_manager.hpp
  • /home/runner/work/mrs_lib/mrs_lib/src/timeout_manager/timeout_manager2.cpp