--- branches/linux-serial/Serial.h 2007/02/05 10:10:18 54 +++ branches/linux-serial/Serial.h 2008/06/04 13:06:09 76 @@ -9,7 +9,6 @@ #include #include #include -typedef std::vector UCVector; #ifndef _MSC_VER // inline void Sleep(int x) { usleep(x*1000);} @@ -58,6 +57,9 @@ int readByte(); void writeByte(unsigned char out); + void writeBytes(unsigned char* buf, unsigned int len); + int readBytes(unsigned char* buf, unsigned int maxLen); + #ifdef _MSC_VER COMSTAT getComstat() const; #endif @@ -68,15 +70,18 @@ bool isOpen() { return mIsopen; } - //void writeBytes(UCVector out); - //UCVector readBytes(int maxcount); protected: void printByte(char* description, unsigned char byte); int convertBaudrate(Baudrate rate); + #ifdef _MSC_VER void openWindows(); + int readBytesWindows(unsigned char*buf, unsigned int maxLen); + void writeBytesWindows(unsigned char* buf, unsigned int len); #else void openLinux(); + int readBytesLinux(unsigned char* buf, unsigned int maxLen); + void writeBytesLinux(unsigned char* buf, unsigned int len); #endif };