rclcpp  master
C++ ROS Client Library API
Protected Member Functions | List of all members
rclcpp::wait_set_policies::SequentialSynchronization Class Reference

WaitSet policy that explicitly provides no thread synchronization. More...

#include <sequential_synchronization.hpp>

Inheritance diagram for rclcpp::wait_set_policies::SequentialSynchronization:
Inheritance graph
[legend]
Collaboration diagram for rclcpp::wait_set_policies::SequentialSynchronization:
Collaboration graph
[legend]

Protected Member Functions

 SequentialSynchronization (rclcpp::Context::SharedPtr)
 
 ~SequentialSynchronization ()=default
 
const std::array< std::shared_ptr< rclcpp::GuardCondition >, 0 > & get_extra_guard_conditions ()
 Return any "extra" guard conditions needed to implement the synchronization policy. More...
 
void sync_add_subscription (std::shared_ptr< rclcpp::SubscriptionBase > &&subscription, const rclcpp::SubscriptionWaitSetMask &mask, std::function< void(std::shared_ptr< rclcpp::SubscriptionBase > &&, const rclcpp::SubscriptionWaitSetMask &) > add_subscription_function)
 Add subscription without thread-safety. More...
 
void sync_remove_subscription (std::shared_ptr< rclcpp::SubscriptionBase > &&subscription, const rclcpp::SubscriptionWaitSetMask &mask, std::function< void(std::shared_ptr< rclcpp::SubscriptionBase > &&, const rclcpp::SubscriptionWaitSetMask &) > remove_subscription_function)
 Remove guard condition without thread-safety. More...
 
void sync_add_guard_condition (std::shared_ptr< rclcpp::GuardCondition > &&guard_condition, std::function< void(std::shared_ptr< rclcpp::GuardCondition > &&)> add_guard_condition_function)
 Add guard condition without thread-safety. More...
 
void sync_remove_guard_condition (std::shared_ptr< rclcpp::GuardCondition > &&guard_condition, std::function< void(std::shared_ptr< rclcpp::GuardCondition > &&)> remove_guard_condition_function)
 Remove guard condition without thread-safety. More...
 
void sync_add_timer (std::shared_ptr< rclcpp::TimerBase > &&timer, std::function< void(std::shared_ptr< rclcpp::TimerBase > &&)> add_timer_function)
 Add timer without thread-safety. More...
 
void sync_remove_timer (std::shared_ptr< rclcpp::TimerBase > &&timer, std::function< void(std::shared_ptr< rclcpp::TimerBase > &&)> remove_timer_function)
 Remove timer without thread-safety. More...
 
void sync_add_client (std::shared_ptr< rclcpp::ClientBase > &&client, std::function< void(std::shared_ptr< rclcpp::ClientBase > &&)> add_client_function)
 Add client without thread-safety. More...
 
void sync_remove_client (std::shared_ptr< rclcpp::ClientBase > &&client, std::function< void(std::shared_ptr< rclcpp::ClientBase > &&)> remove_client_function)
 Remove client without thread-safety. More...
 
void sync_add_service (std::shared_ptr< rclcpp::ServiceBase > &&service, std::function< void(std::shared_ptr< rclcpp::ServiceBase > &&)> add_service_function)
 Add service without thread-safety. More...
 
void sync_remove_service (std::shared_ptr< rclcpp::ServiceBase > &&service, std::function< void(std::shared_ptr< rclcpp::ServiceBase > &&)> remove_service_function)
 Remove service without thread-safety. More...
 
void sync_add_waitable (std::shared_ptr< rclcpp::Waitable > &&waitable, std::shared_ptr< void > &&associated_entity, std::function< void(std::shared_ptr< rclcpp::Waitable > &&, std::shared_ptr< void > &&) > add_waitable_function)
 Add waitable without thread-safety. More...
 
void sync_remove_waitable (std::shared_ptr< rclcpp::Waitable > &&waitable, std::function< void(std::shared_ptr< rclcpp::Waitable > &&)> remove_waitable_function)
 Remove waitable without thread-safety. More...
 
void sync_prune_deleted_entities (std::function< void()> prune_deleted_entities_function)
 Prune deleted entities without thread-safety. More...
 
template<class WaitResultT >
WaitResultT sync_wait (std::chrono::nanoseconds time_to_wait_ns, std::function< void()> rebuild_rcl_wait_set, std::function< rcl_wait_set_t &()> get_rcl_wait_set, std::function< WaitResultT(WaitResultKind wait_result_kind)> create_wait_result)
 Implements wait without any thread-safety. More...
 
void sync_wait_result_acquire ()
 
void sync_wait_result_release ()
 
- Protected Member Functions inherited from rclcpp::wait_set_policies::detail::SynchronizationPolicyCommon
 SynchronizationPolicyCommon ()=default
 
 ~SynchronizationPolicyCommon ()=default
 
std::function< bool()> create_loop_predicate (std::chrono::nanoseconds time_to_wait_ns, std::chrono::steady_clock::time_point start)
 
std::chrono::nanoseconds calculate_time_left_to_wait (std::chrono::nanoseconds original_time_to_wait_ns, std::chrono::steady_clock::time_point start)
 

Detailed Description

WaitSet policy that explicitly provides no thread synchronization.

Constructor & Destructor Documentation

◆ SequentialSynchronization()

rclcpp::wait_set_policies::SequentialSynchronization::SequentialSynchronization ( rclcpp::Context::SharedPtr  )
inlineexplicitprotected

◆ ~SequentialSynchronization()

rclcpp::wait_set_policies::SequentialSynchronization::~SequentialSynchronization ( )
protecteddefault

Member Function Documentation

◆ get_extra_guard_conditions()

const std::array<std::shared_ptr<rclcpp::GuardCondition>, 0>& rclcpp::wait_set_policies::SequentialSynchronization::get_extra_guard_conditions ( )
inlineprotected

Return any "extra" guard conditions needed to implement the synchronization policy.

Since this policy provides no thread-safety, it also needs no extra guard conditions to implement it.

◆ sync_add_subscription()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_add_subscription ( std::shared_ptr< rclcpp::SubscriptionBase > &&  subscription,
const rclcpp::SubscriptionWaitSetMask mask,
std::function< void(std::shared_ptr< rclcpp::SubscriptionBase > &&, const rclcpp::SubscriptionWaitSetMask &) >  add_subscription_function 
)
inlineprotected

Add subscription without thread-safety.

Does not throw, but storage function may throw.

◆ sync_remove_subscription()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_remove_subscription ( std::shared_ptr< rclcpp::SubscriptionBase > &&  subscription,
const rclcpp::SubscriptionWaitSetMask mask,
std::function< void(std::shared_ptr< rclcpp::SubscriptionBase > &&, const rclcpp::SubscriptionWaitSetMask &) >  remove_subscription_function 
)
inlineprotected

Remove guard condition without thread-safety.

Does not throw, but storage function may throw.

◆ sync_add_guard_condition()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_add_guard_condition ( std::shared_ptr< rclcpp::GuardCondition > &&  guard_condition,
std::function< void(std::shared_ptr< rclcpp::GuardCondition > &&)>  add_guard_condition_function 
)
inlineprotected

Add guard condition without thread-safety.

Does not throw, but storage function may throw.

◆ sync_remove_guard_condition()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_remove_guard_condition ( std::shared_ptr< rclcpp::GuardCondition > &&  guard_condition,
std::function< void(std::shared_ptr< rclcpp::GuardCondition > &&)>  remove_guard_condition_function 
)
inlineprotected

Remove guard condition without thread-safety.

Does not throw, but storage function may throw.

◆ sync_add_timer()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_add_timer ( std::shared_ptr< rclcpp::TimerBase > &&  timer,
std::function< void(std::shared_ptr< rclcpp::TimerBase > &&)>  add_timer_function 
)
inlineprotected

Add timer without thread-safety.

Does not throw, but storage function may throw.

◆ sync_remove_timer()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_remove_timer ( std::shared_ptr< rclcpp::TimerBase > &&  timer,
std::function< void(std::shared_ptr< rclcpp::TimerBase > &&)>  remove_timer_function 
)
inlineprotected

Remove timer without thread-safety.

Does not throw, but storage function may throw.

◆ sync_add_client()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_add_client ( std::shared_ptr< rclcpp::ClientBase > &&  client,
std::function< void(std::shared_ptr< rclcpp::ClientBase > &&)>  add_client_function 
)
inlineprotected

Add client without thread-safety.

Does not throw, but storage function may throw.

◆ sync_remove_client()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_remove_client ( std::shared_ptr< rclcpp::ClientBase > &&  client,
std::function< void(std::shared_ptr< rclcpp::ClientBase > &&)>  remove_client_function 
)
inlineprotected

Remove client without thread-safety.

Does not throw, but storage function may throw.

◆ sync_add_service()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_add_service ( std::shared_ptr< rclcpp::ServiceBase > &&  service,
std::function< void(std::shared_ptr< rclcpp::ServiceBase > &&)>  add_service_function 
)
inlineprotected

Add service without thread-safety.

Does not throw, but storage function may throw.

◆ sync_remove_service()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_remove_service ( std::shared_ptr< rclcpp::ServiceBase > &&  service,
std::function< void(std::shared_ptr< rclcpp::ServiceBase > &&)>  remove_service_function 
)
inlineprotected

Remove service without thread-safety.

Does not throw, but storage function may throw.

◆ sync_add_waitable()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_add_waitable ( std::shared_ptr< rclcpp::Waitable > &&  waitable,
std::shared_ptr< void > &&  associated_entity,
std::function< void(std::shared_ptr< rclcpp::Waitable > &&, std::shared_ptr< void > &&) >  add_waitable_function 
)
inlineprotected

Add waitable without thread-safety.

Does not throw, but storage function may throw.

◆ sync_remove_waitable()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_remove_waitable ( std::shared_ptr< rclcpp::Waitable > &&  waitable,
std::function< void(std::shared_ptr< rclcpp::Waitable > &&)>  remove_waitable_function 
)
inlineprotected

Remove waitable without thread-safety.

Does not throw, but storage function may throw.

◆ sync_prune_deleted_entities()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_prune_deleted_entities ( std::function< void()>  prune_deleted_entities_function)
inlineprotected

Prune deleted entities without thread-safety.

Does not throw, but storage function may throw.

◆ sync_wait()

template<class WaitResultT >
WaitResultT rclcpp::wait_set_policies::SequentialSynchronization::sync_wait ( std::chrono::nanoseconds  time_to_wait_ns,
std::function< void()>  rebuild_rcl_wait_set,
std::function< rcl_wait_set_t &()>  get_rcl_wait_set,
std::function< WaitResultT(WaitResultKind wait_result_kind)>  create_wait_result 
)
inlineprotected

Implements wait without any thread-safety.

◆ sync_wait_result_acquire()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_wait_result_acquire ( )
inlineprotected

◆ sync_wait_result_release()

void rclcpp::wait_set_policies::SequentialSynchronization::sync_wait_result_release ( )
inlineprotected

The documentation for this class was generated from the following file: