/*
 *
 * $Id: connection.h 2 2008-07-30 09:28:03Z mschneider $
 * $URL: svn://localhost/Bioloid/trunk/connection.h $
 
 * \version   $Rev: 2 $
 * \author    Markus Schneider
 * \date      17.07.08
 *
 */

#ifndef CONNECTION_H
#define CONNECTION_H

#include "serialport.h"
#include "packet.h"
#include "packetparser.h"

class Connection
{
public:
  Connection(SerialPort *sp);
  virtual int write(const Packet *pkt) const;
  virtual int read(Packet *pkt) const;
  
  virtual ~Connection();
  
protected:
  SerialPort *sp;
  PacketParser *pp;
};

#endif
