summaryrefslogtreecommitdiff
path: root/plugins/common/serialport.hpp
diff options
context:
space:
mode:
authorKevron Rees <kevron.m.rees@intel.com>2014-04-30 14:22:11 -0700
committerKevron Rees <kevron.m.rees@intel.com>2014-04-30 14:22:11 -0700
commit234dc4eb298080144dea34738716eba20a4a8eb6 (patch)
treec603b68fe826be293842058312c047d66fc7fa11 /plugins/common/serialport.hpp
parenta576244fb22eb613a0760a61d677e62b98a4c33f (diff)
downloadautomotive-message-broker-234dc4eb298080144dea34738716eba20a4a8eb6.tar.gz
reworked tests in gpsnmea
Diffstat (limited to 'plugins/common/serialport.hpp')
-rw-r--r--plugins/common/serialport.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/common/serialport.hpp b/plugins/common/serialport.hpp
index 469c5f3b..4fa0418d 100644
--- a/plugins/common/serialport.hpp
+++ b/plugins/common/serialport.hpp
@@ -20,7 +20,7 @@ private:
public:
SerialPort(std::string _tty)
- :tty(_tty)
+ :tty(_tty), fd(0)
{
speed = B9600;
}
@@ -93,6 +93,11 @@ public:
return true;
}
+ bool isOpen()
+ {
+ return (fd > 0);
+ }
+
int fileDescriptor() { return fd; }
bool close()