Subversion Repositories HomeAutomation

Rev

Rev 1963 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1963 Rev 1987
Line 80... Line 80...
80
 
80
 
81
  try
81
  try
82
  {
82
  {
83
    if (this->serial_port_.is_open())
83
    if (this->serial_port_.is_open())
84
    {
84
    {
85
      this->serial_port_.write_some(boost::asio::buffer(data.Get(), data.GetMaxSize()));
85
      this->serial_port_.write_some(boost::asio::buffer(data.data(), data.size()));
86
    }
86
    }
87
  }
87
  }
88
  catch (std::exception& e)
88
  catch (std::exception& e)
89
  {
89
  {
90
    this->Disconnect();
90
    this->Disconnect();
Line 98... Line 98...
98
{
98
{
99
  LOG_DEBUG_ENTER;
99
  LOG_DEBUG_ENTER;
100
 
100
 
101
  Client::Read();
101
  Client::Read();
102
 
102
 
-
 
103
  log::Debug(log_module_, "this->buffer_.capacity()=%u", this->buffer_.capacity());
-
 
104
 
103
  this->serial_port_.async_read_some(boost::asio::buffer(this->buffer_.Get(), this->buffer_.GetMaxSize()),
105
  this->serial_port_.async_read_some(boost::asio::buffer(this->buffer_.data(), this->buffer_.capacity()),
104
                                     boost::bind(&SerialClient::ReadHandler,
106
                                     boost::bind(&SerialClient::ReadHandler,
105
                                                 this,
107
                                                 this,
106
                                                 boost::asio::placeholders::error,
108
                                                 boost::asio::placeholders::error,
107
                                                 boost::asio::placeholders::bytes_transferred));
109
                                                 boost::asio::placeholders::bytes_transferred));
108
 
110