Esempio n. 1
0
	void read_start(void)
	{ // Start an asynchronous read and call read_complete when it completes or fails
		serialPort.async_read_some(boost::asio::buffer(read_msg_, max_read_length),
			boost::bind(&ComClient::read_complete, this,
				boost::asio::placeholders::error,
				boost::asio::placeholders::bytes_transferred));
	}
Esempio n. 2
0
  void read_some()
  {
    port.async_read_some(boost::asio::buffer(read_msg_,sizeof(read_msg_)),
			 boost::bind(&serial::handler,this,
				     boost::asio::placeholders::error,
				     boost::asio::placeholders::bytes_transferred));
  }