| 760 | } |
| 761 | |
| 762 | bool |
| 763 | SerialStream::GetRTS() |
| 764 | try |
| 765 | { |
| 766 | auto my_buffer = dynamic_cast<SerialStreamBuf *>(this->rdbuf()) ; |
| 767 | |
| 768 | // Make sure that we are dealing with a SerialStreamBuf before |
| 769 | // proceeding. This check also makes sure that we have a non-NULL |
| 770 | // buffer associated with this stream. |
| 771 | if (my_buffer != nullptr) |
| 772 | { |
| 773 | // Try to get the RTS line state. |
| 774 | return my_buffer->GetRTS() ; |
| 775 | } |
| 776 | // If the dynamic_cast above failed then we either have a NULL |
| 777 | // streambuf associated with this stream or we have a buffer of |
| 778 | // class other than SerialStreamBuf. In either case, we have a |
| 779 | // problem and we should stop all I/O using this stream. |
| 780 | setstate(badbit) ; |
| 781 | return false ; |
| 782 | } |
| 783 | catch (const std::exception&) |
| 784 | { |
| 785 | setstate(std::ios_base::failbit) ; |
| 786 | throw ; |
| 787 | } |
| 788 | |
| 789 | bool |
| 790 | SerialStream::GetCTS() |
nothing calls this directly
no outgoing calls
no test coverage detected