| 260 | } |
| 261 | |
| 262 | void SerialPort::write(const Bytes& bytes) |
| 263 | { |
| 264 | int ptr = 0; |
| 265 | while (ptr < bytes.size()) |
| 266 | { |
| 267 | ssize_t wlen = this->write(bytes.cbegin() + ptr, bytes.size() - ptr); |
| 268 | ptr += wlen; |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | void SerialPort::writeLine(const std::string& chars) |
| 273 | { |