Template Class BasicPollingSubscriber

Class Documentation

template<typename MessageT, typename BridgeRequestPolicy>
class BasicPollingSubscriber

Public Types

using SharedPtr = std::shared_ptr<BasicPollingSubscriber<MessageT, BridgeRequestPolicy>>

Public Functions

inline explicit BasicPollingSubscriber(rclcpp::Node *node, const std::string &topic_name, const rclcpp::QoS &qos = rclcpp::QoS{1}, agnocast::SubscriptionOptions options = agnocast::SubscriptionOptions())
inline explicit BasicPollingSubscriber(agnocast::Node *node, const std::string &topic_name, const rclcpp::QoS &qos = rclcpp::QoS{1}, agnocast::SubscriptionOptions options = agnocast::SubscriptionOptions())
inline const agnocast::ipc_shared_ptr<const MessageT> takeData()

Deprecated:

Use take_data() instead.

inline AGNOCAST_PUBLIC const agnocast::ipc_shared_ptr< const MessageT > take_data ()

Retrieve the latest message. Always returns the most recent message even if already retrieved. Returns an empty pointer if no message has been published yet.

Returns:

Shared pointer to the latest message.