OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [RspPacket.h] - Diff between revs 63 and 462

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 63 Rev 462
Line 29... Line 29...
#ifndef RSP_PACKET__H
#ifndef RSP_PACKET__H
#define RSP_PACKET__H
#define RSP_PACKET__H
 
 
#include <iostream>
#include <iostream>
 
 
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//! Class for RSP packets
//! Class for RSP packets
 
 
//! Can't be null terminated, since it may include zero bytes
//! Can't be null terminated, since it may include zero bytes
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class RspPacket
class RspPacket {
{
 
public:
public:
 
 
  //! The data buffer. Allow direct access to avoid unnecessary copying.
  //! The data buffer. Allow direct access to avoid unnecessary copying.
  char *data;
  char *data;
 
 
Line 54... Line 52...
  // Accessors
  // Accessors
  int   getBufSize ();
  int   getBufSize ();
  int   getLen ();
  int   getLen ();
  void  setLen (int  _len);
  void  setLen (int  _len);
 
 
 
 
private:
private:
 
 
  //! The data buffer size
  //! The data buffer size
  int   bufSize;
  int   bufSize;
 
 
  //! Number of chars in the data buffer (<= bufSize)
  //! Number of chars in the data buffer (<= bufSize)
  int   len;
  int   len;
 
 
};
};
 
 
 
 
//! Stream output
//! Stream output
std::ostream &operator<< (std::ostream &s,
std::ostream & operator<<(std::ostream & s, RspPacket & p);
                          RspPacket    &p);
 
 
 
 
 
#endif  // RSP_PACKET_SC__H
#endif  // RSP_PACKET_SC__H
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.