| 787 | } |
| 788 | |
| 789 | bool |
| 790 | SerialStream::GetCTS() |
| 791 | try |
| 792 | { |
| 793 | auto my_buffer = dynamic_cast<SerialStreamBuf *>(this->rdbuf()) ; |
| 794 | |
| 795 | // Make sure that we are dealing with a SerialStreamBuf before |
| 796 | // proceeding. This check also makes sure that we have a non-NULL |
| 797 | // buffer associated with this stream. |
| 798 | if (my_buffer != nullptr) |
| 799 | { |
| 800 | // Try to get the CTS line state. |
| 801 | return my_buffer->GetCTS() ; |
| 802 | } |
| 803 | // If the dynamic_cast above failed then we either have a NULL |
| 804 | // streambuf associated with this stream or we have a buffer of |
| 805 | // class other than SerialStreamBuf. In either case, we have a |
| 806 | // problem and we should stop all I/O using this stream. |
| 807 | setstate(badbit) ; |
| 808 | return false ; |
| 809 | } |
| 810 | catch (const std::exception&) |
| 811 | { |
| 812 | setstate(std::ios_base::failbit) ; |
| 813 | throw ; |
| 814 | } |
| 815 | |
| 816 | bool |
| 817 | SerialStream::GetDSR() |
nothing calls this directly
no outgoing calls
no test coverage detected