expose rcl handles
This commit is contained in:
parent
124500511b
commit
688c83a44c
8 changed files with 76 additions and 2 deletions
|
@ -68,6 +68,10 @@ public:
|
||||||
const std::string &
|
const std::string &
|
||||||
get_service_name() const;
|
get_service_name() const;
|
||||||
|
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
rcl_client_t *
|
||||||
|
get_client_handle();
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
const rcl_client_t *
|
const rcl_client_t *
|
||||||
get_client_handle() const;
|
get_client_handle() const;
|
||||||
|
@ -100,6 +104,10 @@ protected:
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
rcl_node_t *
|
rcl_node_t *
|
||||||
|
get_rcl_node_handle();
|
||||||
|
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
const rcl_node_t *
|
||||||
get_rcl_node_handle() const;
|
get_rcl_node_handle() const;
|
||||||
|
|
||||||
rclcpp::node_interfaces::NodeGraphInterface::WeakPtr node_graph_;
|
rclcpp::node_interfaces::NodeGraphInterface::WeakPtr node_graph_;
|
||||||
|
|
|
@ -98,6 +98,18 @@ public:
|
||||||
const rmw_gid_t &
|
const rmw_gid_t &
|
||||||
get_intra_process_gid() const;
|
get_intra_process_gid() const;
|
||||||
|
|
||||||
|
/// Get the rcl publisher handle.
|
||||||
|
/** \return The rcl publisher handle. */
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
rcl_publisher_t *
|
||||||
|
get_publisher_handle();
|
||||||
|
|
||||||
|
/// Get the rcl publisher handle.
|
||||||
|
/** \return The rcl publisher handle. */
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
const rcl_publisher_t *
|
||||||
|
get_publisher_handle() const;
|
||||||
|
|
||||||
/// Compare this publisher to a gid.
|
/// Compare this publisher to a gid.
|
||||||
/**
|
/**
|
||||||
* Note that this function calls the next function.
|
* Note that this function calls the next function.
|
||||||
|
|
|
@ -60,9 +60,13 @@ public:
|
||||||
get_service_name();
|
get_service_name();
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
const rcl_service_t *
|
rcl_service_t *
|
||||||
get_service_handle();
|
get_service_handle();
|
||||||
|
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
const rcl_service_t *
|
||||||
|
get_service_handle() const;
|
||||||
|
|
||||||
virtual std::shared_ptr<void> create_request() = 0;
|
virtual std::shared_ptr<void> create_request() = 0;
|
||||||
virtual std::shared_ptr<rmw_request_id_t> create_request_header() = 0;
|
virtual std::shared_ptr<rmw_request_id_t> create_request_header() = 0;
|
||||||
virtual void handle_request(
|
virtual void handle_request(
|
||||||
|
@ -74,6 +78,10 @@ protected:
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
rcl_node_t *
|
rcl_node_t *
|
||||||
|
get_rcl_node_handle();
|
||||||
|
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
const rcl_node_t *
|
||||||
get_rcl_node_handle() const;
|
get_rcl_node_handle() const;
|
||||||
|
|
||||||
std::shared_ptr<rcl_node_t> node_handle_;
|
std::shared_ptr<rcl_node_t> node_handle_;
|
||||||
|
|
|
@ -78,6 +78,10 @@ public:
|
||||||
const char *
|
const char *
|
||||||
get_topic_name() const;
|
get_topic_name() const;
|
||||||
|
|
||||||
|
RCLCPP_PUBLIC
|
||||||
|
rcl_subscription_t *
|
||||||
|
get_subscription_handle();
|
||||||
|
|
||||||
RCLCPP_PUBLIC
|
RCLCPP_PUBLIC
|
||||||
const rcl_subscription_t *
|
const rcl_subscription_t *
|
||||||
get_subscription_handle() const;
|
get_subscription_handle() const;
|
||||||
|
|
|
@ -48,6 +48,12 @@ ClientBase::get_service_name() const
|
||||||
return this->service_name_;
|
return this->service_name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rcl_client_t *
|
||||||
|
ClientBase::get_client_handle()
|
||||||
|
{
|
||||||
|
return &client_handle_;
|
||||||
|
}
|
||||||
|
|
||||||
const rcl_client_t *
|
const rcl_client_t *
|
||||||
ClientBase::get_client_handle() const
|
ClientBase::get_client_handle() const
|
||||||
{
|
{
|
||||||
|
@ -115,6 +121,12 @@ ClientBase::wait_for_service_nanoseconds(std::chrono::nanoseconds timeout)
|
||||||
}
|
}
|
||||||
|
|
||||||
rcl_node_t *
|
rcl_node_t *
|
||||||
|
ClientBase::get_rcl_node_handle()
|
||||||
|
{
|
||||||
|
return node_handle_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
const rcl_node_t *
|
||||||
ClientBase::get_rcl_node_handle() const
|
ClientBase::get_rcl_node_handle() const
|
||||||
{
|
{
|
||||||
return node_handle_.get();
|
return node_handle_.get();
|
||||||
|
|
|
@ -125,6 +125,18 @@ PublisherBase::get_intra_process_gid() const
|
||||||
return intra_process_rmw_gid_;
|
return intra_process_rmw_gid_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rcl_publisher_t *
|
||||||
|
PublisherBase::get_publisher_handle()
|
||||||
|
{
|
||||||
|
return &publisher_handle_;
|
||||||
|
}
|
||||||
|
|
||||||
|
const rcl_publisher_t *
|
||||||
|
PublisherBase::get_publisher_handle() const
|
||||||
|
{
|
||||||
|
return &publisher_handle_;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PublisherBase::operator==(const rmw_gid_t & gid) const
|
PublisherBase::operator==(const rmw_gid_t & gid) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,13 +46,25 @@ ServiceBase::get_service_name()
|
||||||
return this->service_name_;
|
return this->service_name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rcl_service_t *
|
rcl_service_t *
|
||||||
ServiceBase::get_service_handle()
|
ServiceBase::get_service_handle()
|
||||||
{
|
{
|
||||||
return service_handle_;
|
return service_handle_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const rcl_service_t *
|
||||||
|
ServiceBase::get_service_handle() const
|
||||||
|
{
|
||||||
|
return service_handle_;
|
||||||
|
}
|
||||||
|
|
||||||
rcl_node_t *
|
rcl_node_t *
|
||||||
|
ServiceBase::get_rcl_node_handle()
|
||||||
|
{
|
||||||
|
return node_handle_.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
const rcl_node_t *
|
||||||
ServiceBase::get_rcl_node_handle() const
|
ServiceBase::get_rcl_node_handle() const
|
||||||
{
|
{
|
||||||
return node_handle_.get();
|
return node_handle_.get();
|
||||||
|
|
|
@ -79,6 +79,12 @@ SubscriptionBase::get_topic_name() const
|
||||||
return rcl_subscription_get_topic_name(&subscription_handle_);
|
return rcl_subscription_get_topic_name(&subscription_handle_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rcl_subscription_t *
|
||||||
|
SubscriptionBase::get_subscription_handle()
|
||||||
|
{
|
||||||
|
return &subscription_handle_;
|
||||||
|
}
|
||||||
|
|
||||||
const rcl_subscription_t *
|
const rcl_subscription_t *
|
||||||
SubscriptionBase::get_subscription_handle() const
|
SubscriptionBase::get_subscription_handle() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue