All Classes Namespaces Files Functions Variables Enumerations Enumerator
programs/UrgRecorder/RecordConnection.h
Go to the documentation of this file.
00001 #ifndef RECORD_CONNECTION_H
00002 #define RECORD_CONNECTION_H
00003 
00013 #include "Connection.h"
00014 #include <memory>
00015 
00016 
00017 class RecordConnection : public qrk::Connection
00018 {
00019     RecordConnection(void);
00020     RecordConnection(const RecordConnection& rhs);
00021     RecordConnection& operator = (const RecordConnection& rhs);
00022 
00023     struct pImpl;
00024     const std::auto_ptr<pImpl> pimpl;
00025 
00026 public:
00027     RecordConnection(qrk::Connection* connection,
00028                      const char* send_save_file, const char* receive_save_file);
00029     ~RecordConnection(void);
00030 
00031     const char* what(void) const;
00032 
00033     bool connect(const char* device, long baudrate);
00034     void disconnect(void);
00035     bool setBaudrate(long baudrate);
00036     long baudrate(void) const;
00037     bool isConnected(void) const;
00038     int send(const char* data, size_t count);
00039     int receive(char* data, size_t count, int timeout);
00040     size_t size(void) const;
00041     void flush(void);
00042     void clear(void);
00043     void ungetc(const char ch);
00044 };
00045 
00046 #endif /* !RECORD_CONNECTION_H */