rclcpp  master
C++ ROS Client Library API
Classes | Functions
rclcpp::detail Namespace Reference

Classes

struct  AnySubscriptionCallbackHelper
 
struct  MessageDeleterHelper
 
class  MutexTwoPriorities
 
struct  PublisherQosParametersTraits
 
class  QosParameters
 
class  RMWImplementationSpecificPayload
 Mechanism for passing rmw implementation specific settings through the ROS interfaces. More...
 
class  RMWImplementationSpecificPublisherPayload
 
class  RMWImplementationSpecificSubscriptionPayload
 Subscription payload that may be rmw implementation specific. More...
 
struct  SubscriptionCallbackTypeHelper
 Template metaprogramming helper used to resolve the callback argument into a std::function. More...
 
struct  SubscriptionQosParametersTraits
 
struct  value >>
 
struct  value >>
 
struct  value >>
 
struct  value >>
 
struct  value >>
 
struct  value >>
 

Functions

template<typename MessageT , typename AllocatorT = std::allocator<void>, typename PublisherT = rclcpp::Publisher<MessageT, AllocatorT>, typename NodeParametersT , typename NodeTopicsT >
std::shared_ptr< PublisherT > create_publisher (NodeParametersT &node_parameters, NodeTopicsT &node_topics, const std::string &topic_name, const rclcpp::QoS &qos, const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &options=(rclcpp::PublisherOptionsWithAllocator< AllocatorT >()))
 Create and return a publisher of the given MessageT type. More...
 
template<typename MessageT , typename CallbackT , typename AllocatorT , typename CallbackMessageT , typename SubscriptionT , typename MessageMemoryStrategyT , typename NodeParametersT , typename NodeTopicsT >
std::shared_ptr< SubscriptionT > create_subscription (NodeParametersT &node_parameters, NodeTopicsT &node_topics, const std::string &topic_name, const rclcpp::QoS &qos, CallbackT &&callback, const rclcpp::SubscriptionOptionsWithAllocator< AllocatorT > &options=(rclcpp::SubscriptionOptionsWithAllocator< AllocatorT >()), typename MessageMemoryStrategyT::SharedPtr msg_mem_strat=(MessageMemoryStrategyT::create_default()))
 
inline ::rclcpp::ParameterValue get_default_qos_param_value (rclcpp::QosPolicyKind policy, const rclcpp::QoS &qos)
 
void apply_qos_override (rclcpp::QosPolicyKind policy, rclcpp::ParameterValue value, rclcpp::QoS &qos)
 
rclcpp::ParameterValue declare_parameter_or_get (rclcpp::node_interfaces::NodeParametersInterface &parameters_interface, const std::string &param_name, rclcpp::ParameterValue param_value, rcl_interfaces::msg::ParameterDescriptor descriptor)
 
template<typename NodeT , typename EntityQosParametersTraits >
std::enable_if_t< rclcpp::node_interfaces::has_node_parameters_interface< decltype(std::declval< typename rcpputils::remove_pointer< NodeT >::type >))>::value||std::is_same< typename std::decay_t< NodeT >, rclcpp::node_interfaces::NodeParametersInterface::SharedPtr >::value, rclcpp::QoSdeclare_qos_parameters (const ::rclcpp::QosOverridingOptions &options, NodeT &node, const std::string &topic_name, const ::rclcpp::QoS &default_qos, EntityQosParametersTraits)
 
int64_t rmw_duration_to_int64_t (rmw_time_t rmw_duration)
 Convert rmw_time_t to int64_t that can be used as a parameter value. More...
 
const char * check_if_stringified_policy_is_null (const char *policy_value_stringified, QosPolicyKind kind)
 
template<typename OptionsT , typename NodeBaseT >
bool resolve_enable_topic_statistics (const OptionsT &options, const NodeBaseT &node_base)
 Return whether or not topic statistics is enabled, resolving "NodeDefault" if needed. More...
 
template<typename CallbackMessageT , typename AllocatorT >
rclcpp::IntraProcessBufferType resolve_intra_process_buffer_type (const rclcpp::IntraProcessBufferType buffer_type, const rclcpp::AnySubscriptionCallback< CallbackMessageT, AllocatorT > &any_subscription_callback)
 Return the buffer type, resolving the "CallbackDefault" type to an actual type if needed. More...
 
template<typename OptionsT , typename NodeBaseT >
bool resolve_use_intra_process (const OptionsT &options, const NodeBaseT &node_base)
 Return whether or not intra process is enabled, resolving "NodeDefault" if needed. More...
 
std::vector< std::stringget_unparsed_ros_arguments (int argc, char const *const argv[], rcl_arguments_t *arguments, rcl_allocator_t allocator)
 
template<typename T >
auto get_value_helper (const rclcpp::Parameter *parameter)
 
template<>
auto get_value_helper< rclcpp::ParameterValue > (const rclcpp::Parameter *parameter)
 
template<>
auto get_value_helper< rclcpp::Parameter > (const rclcpp::Parameter *parameter)
 

Function Documentation

◆ create_publisher()

template<typename MessageT , typename AllocatorT = std::allocator<void>, typename PublisherT = rclcpp::Publisher<MessageT, AllocatorT>, typename NodeParametersT , typename NodeTopicsT >
std::shared_ptr<PublisherT> rclcpp::detail::create_publisher ( NodeParametersT &  node_parameters,
NodeTopicsT &  node_topics,
const std::string topic_name,
const rclcpp::QoS qos,
const rclcpp::PublisherOptionsWithAllocator< AllocatorT > &  options = (    rclcpp::PublisherOptionsWithAllocator<AllocatorT>()  ) 
)

Create and return a publisher of the given MessageT type.

◆ create_subscription()

template<typename MessageT , typename CallbackT , typename AllocatorT , typename CallbackMessageT , typename SubscriptionT , typename MessageMemoryStrategyT , typename NodeParametersT , typename NodeTopicsT >
std::shared_ptr<SubscriptionT> rclcpp::detail::create_subscription ( NodeParametersT &  node_parameters,
NodeTopicsT &  node_topics,
const std::string topic_name,
const rclcpp::QoS qos,
CallbackT &&  callback,
const rclcpp::SubscriptionOptionsWithAllocator< AllocatorT > &  options = (    rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>()  ),
typename MessageMemoryStrategyT::SharedPtr  msg_mem_strat = (    MessageMemoryStrategyT::create_default()  ) 
)

◆ get_default_qos_param_value()

rclcpp::ParameterValue rclcpp::detail::get_default_qos_param_value ( rclcpp::QosPolicyKind  policy,
const rclcpp::QoS qos 
)

◆ apply_qos_override()

void rclcpp::detail::apply_qos_override ( rclcpp::QosPolicyKind  policy,
rclcpp::ParameterValue  value,
rclcpp::QoS qos 
)
inline

◆ declare_parameter_or_get()

rclcpp::ParameterValue rclcpp::detail::declare_parameter_or_get ( rclcpp::node_interfaces::NodeParametersInterface parameters_interface,
const std::string param_name,
rclcpp::ParameterValue  param_value,
rcl_interfaces::msg::ParameterDescriptor  descriptor 
)
inline

◆ declare_qos_parameters()

template<typename NodeT , typename EntityQosParametersTraits >
std::enable_if_t< rclcpp::node_interfaces::has_node_parameters_interface< decltype(std::declval<typename rcpputils::remove_pointer<NodeT>::type>))>::value || std::is_same<typename std::decay_t<NodeT>, rclcpp::node_interfaces::NodeParametersInterface::SharedPtr>::value, rclcpp::QoS> rclcpp::detail::declare_qos_parameters ( const ::rclcpp::QosOverridingOptions options,
NodeT &  node,
const std::string topic_name,
const ::rclcpp::QoS default_qos,
EntityQosParametersTraits   
)
Template Parameters
NodeTNode pointer or reference type.
EntityQosParametersTraitsA class with two static methods: entity_type() and allowed_policies(). See PublisherQosParametersTraits and SubscriptionQosParametersTraits.
Parameters
optionsUser provided options that indicate if QoS parameter overrides should be declared or not, which policy can have overrides, and optionally a callback to validate the profile.
nodeParameters will be declared using this node.
topic_nameName of the topic of the entity.
default_qosUser provided qos. It will be used as a default for the parameters declared.
Returns
qos profile based on the user provided parameter overrides.

◆ rmw_duration_to_int64_t()

int64_t rclcpp::detail::rmw_duration_to_int64_t ( rmw_time_t  rmw_duration)
inline

Convert rmw_time_t to int64_t that can be used as a parameter value.

◆ check_if_stringified_policy_is_null()

const char* rclcpp::detail::check_if_stringified_policy_is_null ( const char *  policy_value_stringified,
QosPolicyKind  kind 
)
inline

◆ resolve_enable_topic_statistics()

template<typename OptionsT , typename NodeBaseT >
bool rclcpp::detail::resolve_enable_topic_statistics ( const OptionsT &  options,
const NodeBaseT &  node_base 
)

Return whether or not topic statistics is enabled, resolving "NodeDefault" if needed.

◆ resolve_intra_process_buffer_type()

template<typename CallbackMessageT , typename AllocatorT >
rclcpp::IntraProcessBufferType rclcpp::detail::resolve_intra_process_buffer_type ( const rclcpp::IntraProcessBufferType  buffer_type,
const rclcpp::AnySubscriptionCallback< CallbackMessageT, AllocatorT > &  any_subscription_callback 
)

Return the buffer type, resolving the "CallbackDefault" type to an actual type if needed.

◆ resolve_use_intra_process()

template<typename OptionsT , typename NodeBaseT >
bool rclcpp::detail::resolve_use_intra_process ( const OptionsT &  options,
const NodeBaseT &  node_base 
)

Return whether or not intra process is enabled, resolving "NodeDefault" if needed.

◆ get_unparsed_ros_arguments()

std::vector<std::string> rclcpp::detail::get_unparsed_ros_arguments ( int  argc,
char const *const  argv[],
rcl_arguments_t arguments,
rcl_allocator_t  allocator 
)

◆ get_value_helper()

template<typename T >
auto rclcpp::detail::get_value_helper ( const rclcpp::Parameter parameter)

◆ get_value_helper< rclcpp::ParameterValue >()

template<>
auto rclcpp::detail::get_value_helper< rclcpp::ParameterValue > ( const rclcpp::Parameter parameter)
inline

◆ get_value_helper< rclcpp::Parameter >()

template<>
auto rclcpp::detail::get_value_helper< rclcpp::Parameter > ( const rclcpp::Parameter parameter)
inline