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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librlink/] [RlinkPacketBufSnd.cpp] - Diff between revs 27 and 28

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

Rev 27 Rev 28
Line 1... Line 1...
// $Id: RlinkPacketBufSnd.cpp 606 2014-11-24 07:08:51Z mueller $
// $Id: RlinkPacketBufSnd.cpp 621 2014-12-26 21:20:05Z mueller $
//
//
// Copyright 2014- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2014- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
Line 11... Line 11...
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
// 
// 
// Revision History: 
// Revision History: 
// Date         Rev Version  Comment
// Date         Rev Version  Comment
 
// 2014-12-25   621   1.0.1  Reorganize packet send/revd stats
// 2014-11-15   604   1.0    Initial version
// 2014-11-15   604   1.0    Initial version
// 2014-11-02   600   0.1    First draft (re-organize PacketBuf for rlink v4)
// 2014-11-02   600   0.1    First draft (re-organize PacketBuf for rlink v4)
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
/*!
/*!
  \file
  \file
  \version $Id: RlinkPacketBufSnd.cpp 606 2014-11-24 07:08:51Z mueller $
  \version $Id: RlinkPacketBufSnd.cpp 621 2014-12-26 21:20:05Z mueller $
  \brief   Implemenation of class RlinkPacketBuf.
  \brief   Implemenation of class RlinkPacketBuf.
 */
 */
 
 
#include <sys/time.h>
#include <sys/time.h>
 
 
Line 47... Line 48...
 
 
RlinkPacketBufSnd::RlinkPacketBufSnd()
RlinkPacketBufSnd::RlinkPacketBufSnd()
  : fRawBuf()
  : fRawBuf()
{
{
  // Statistic setup
  // Statistic setup
 
  fStats.Define(kStatNTxPktByt, "NTxPktByt", "Tx packet bytes send");
  fStats.Define(kStatNTxEsc,    "NTxEsc",    "Tx data escapes");
  fStats.Define(kStatNTxEsc,    "NTxEsc",    "Tx data escapes");
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! Destructor
//! Destructor
Line 106... Line 108...
  }
  }
 
 
  PutRawEsc(kEcEop);                        // <EOP>
  PutRawEsc(kEcEop);                        // <EOP>
  fStats.Inc(kStatNTxEsc   , double(nesc));
  fStats.Inc(kStatNTxEsc   , double(nesc));
 
 
  return SndRaw(port, emsg);
  bool sndok = SndRaw(port, emsg);
 
  if (sndok) fStats.Inc(kStatNTxPktByt, double(PktSize()));
 
  return sndok;
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 

powered by: WebSVN 2.1.0

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