Getting Started with Boost.Asio: Timers and Serial Ports

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024

ความคิดเห็น • 8

  • @rk40155
    @rk40155 2 หลายเดือนก่อน

    Fantastic, this helped me out in my GUI application reading Data from Arduino, thank you so much!

  • @kltechhub
    @kltechhub ปีที่แล้ว

    Fantastic examples and very comprehensive explanations! Thanks you so much for making these videos!

  • @SamWhitlock
    @SamWhitlock ปีที่แล้ว

    This is fantastic! I was having a hard time grokking asio due to the rather obtuse documentation bits, but this brings it together nicely!

  • @StevenMartinGuitar
    @StevenMartinGuitar ปีที่แล้ว

    thanks for making this!

  • @bzdzgwa
    @bzdzgwa ปีที่แล้ว +1

    In the serial port example, what will happen if the incoming data doesn't have a newline character? Asio::streambuf will be allocating more and more memory and will eventually run out of it? Or the handler will be invoked with an error?

    • @UtahCppProgrammers
      @UtahCppProgrammers  ปีที่แล้ว

      In my example, I control the data that is being generated on the serial port, so I know that it will contain a newline without causing large amounts of buffering on the receiver side.
      If the amount of data coming in is unknown, you can call async_read_some instead of async_read_until and it will tell you how many bytes it read. (async_read_until also tells you how many bytes were read, but we didn't need that information directly in my example.)

  • @Polynuttery
    @Polynuttery 11 หลายเดือนก่อน

    Serial ports begins at 45m:30s.