Untitled
By: a guest | Mar 20th, 2010 | Syntax:
C++ | Size: 0.48 KB | Hits: 44 | Expires: Never
#ifndef IOLINE_H
#define IOLINE_H
#include <cstring>
#include <stdexcept>
#include <string>
#include <stdint.h>
class IOLineError : public std::runtime_error
{
public:
IOLineError(std::string const& s);
};
class IOLine
{
public:
IOLine();
virtual ~IOLine();
virtual size_t read(int toread, uint8_t* buf) = 0;
virtual size_t write(int towrite, uint8_t* buf) = 0;
virtual void purge() = 0;
virtual bool setSpeed(int speed) = 0;
};
#endif // IOLINE_H