.. _program_listing_file__tmp_ws_src_transport_drivers_serial_driver_include_serial_driver_serial_driver.hpp: Program Listing for File serial_driver.hpp ========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/transport_drivers/serial_driver/include/serial_driver/serial_driver.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2021 LeoDrive, Copyright 2021 The Autoware Foundation // // 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 SERIAL_DRIVER__SERIAL_DRIVER_HPP_ #define SERIAL_DRIVER__SERIAL_DRIVER_HPP_ #include #include #include "io_context/io_context.hpp" #include "serial_driver/serial_port.hpp" namespace drivers { namespace serial_driver { class SerialDriver { public: explicit SerialDriver(const IoContext & ctx); void init_port(const std::string & device_name, const SerialPortConfig & config); std::shared_ptr port() const; private: const IoContext & m_ctx; std::shared_ptr m_port; }; } // namespace serial_driver } // namespace drivers #endif // SERIAL_DRIVER__SERIAL_DRIVER_HPP_