.. _program_listing_file__tmp_ws_src_image_common_image_transport_tutorial_include_image_transport_tutorial_resized_subscriber.hpp: Program Listing for File resized_subscriber.hpp =============================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/image_common/image_transport_tutorial/include/image_transport_tutorial/resized_subscriber.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2021, Open Source Robotics Foundation, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef IMAGE_TRANSPORT_TUTORIAL__RESIZED_SUBSCRIBER_HPP_ #define IMAGE_TRANSPORT_TUTORIAL__RESIZED_SUBSCRIBER_HPP_ #include #include #include class ResizedSubscriber : public image_transport::SimpleSubscriberPlugin { public: virtual ~ResizedSubscriber() {} virtual std::string getTransportName() const { return "resized"; } protected: void subscribeImpl( rclcpp::Node * node, const std::string & base_topic, const Callback & callback, rmw_qos_profile_t custom_qos, rclcpp::SubscriptionOptions options) override { this->subscribeImplWithOptions(node, base_topic, callback, custom_qos, options); } virtual void internalCallback( const typename image_transport_tutorial::msg::ResizedImage::ConstSharedPtr & message, const Callback & user_cb); }; #endif // IMAGE_TRANSPORT_TUTORIAL__RESIZED_SUBSCRIBER_HPP_