Commit e87d424d9db1d29ffd37e1d3b661e7c37710e4d1

Authored by Geoffrey Hunter
Committed by GitHub
2 parents 61f77cb9 43071ef7

Merge pull request #28 from SibertEnovates/master

Added getState
include/CppLinuxSerial/SerialPort.hpp
... ... @@ -173,6 +173,10 @@ namespace mn {
173 173 /// \throws CppLinuxSerial::Exception if state != OPEN.
174 174 int32_t Available();
175 175  
  176 + /// \brief Use to get the state of the serial port
  177 + /// \returns The state of the serial port
  178 + State GetState();
  179 +
176 180 private:
177 181  
178 182 /// \brief Configures the tty device as a serial port.
... ...
src/SerialPort.cpp
... ... @@ -638,6 +638,9 @@ namespace CppLinuxSerial {
638 638 return ret;
639 639  
640 640 }
  641 + State SerialPort::GetState() {
  642 + return state_;
  643 + }
641 644  
642 645 } // namespace CppLinuxSerial
643 646 } // namespace mn
... ...