Main Page | Class Hierarchy | Class List | File List | Class Members

IOInterfaceSerial.h

00001 // Copyright (c) 2004, Thomas Lochmatter, thl@lothosoft.ch 00002 00003 #ifndef classIOInterfaceSerial 00004 #define classIOInterfaceSerial 00005 00006 #include <string> 00007 #include "IOInterface.h" 00008 00010 00013 class IOInterfaceSerial: public IOInterface { 00014 00015 private: 00017 std::string mDevice; 00019 int mBaudRate; 00021 int mTermiosLocalMode; 00022 00023 protected: 00025 unsigned long BaudRateConstant(int baudrate); 00026 00027 public: 00029 IOInterfaceSerial(IOInterfaceList *iolist, const std::string &device="", int baudrate=9600); 00030 00032 virtual void OnBeforeClose() {} 00034 virtual void OnAfterOpen() {} 00036 virtual void OnAfterOpenError() {} 00037 00039 std::string GetDevice() const {return mDevice;} 00041 int GetBaudRate() const {return mBaudRate;} 00043 bool GetTermiosLocalMode() const {return mTermiosLocalMode;} 00044 00046 void SetDevice(const std::string &device); 00048 void SetBaudRate(int baudrate); 00050 void SetTermiosLocalMode(int mode); 00051 00053 bool Open(); 00055 bool Close(); 00057 bool Reopen(); 00058 }; 00059 00060 #endif

Generated on Wed Jun 1 09:19:07 2005 for libmip by doxygen 1.3.8