25 #include <boost/thread.hpp> 27 #include "serial_client.h" 30 const std::string& delimiter)
36 bool goby::util::SerialClient::start_specific()
40 serial_port_.open(name_);
42 catch (std::exception& e)
48 serial_port_.set_option(boost::asio::serial_port_base::baud_rate(baud_));
51 serial_port_.set_option(boost::asio::serial_port_base::flow_control(
52 boost::asio::serial_port_base::flow_control::none));
55 serial_port_.set_option(boost::asio::serial_port_base::character_size(8));
56 serial_port_.set_option(
57 boost::asio::serial_port_base::parity(boost::asio::serial_port_base::parity::none));
58 serial_port_.set_option(
59 boost::asio::serial_port_base::stop_bits(boost::asio::serial_port_base::stop_bits::one));
SerialClient(const std::string &name="", unsigned baud=9600, const std::string &delimiter="\r\n")
create a serial client