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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librw11/] [Rw11UnitTerm.hpp] - Diff between revs 19 and 20

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

Rev 19 Rev 20
Line 1... Line 1...
// $Id: Rw11UnitTerm.hpp 504 2013-04-13 15:37:24Z mueller $
// $Id: Rw11UnitTerm.hpp 508 2013-04-20 18:43:28Z mueller $
//
//
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2013- 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
 
// 2013-04-20   508   1.0.1  add 7bit and non-printable masking; add log file
// 2013-04-13   504   1.0    Initial version
// 2013-04-13   504   1.0    Initial version
// 2013-02-19   490   0.1    First draft
// 2013-02-19   490   0.1    First draft
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
 
 
/*!
/*!
  \file
  \file
  \version $Id: Rw11UnitTerm.hpp 504 2013-04-13 15:37:24Z mueller $
  \version $Id: Rw11UnitTerm.hpp 508 2013-04-20 18:43:28Z mueller $
  \brief   Declaration of class Rw11UnitTerm.
  \brief   Declaration of class Rw11UnitTerm.
*/
*/
 
 
#ifndef included_Retro_Rw11UnitTerm
#ifndef included_Retro_Rw11UnitTerm
#define included_Retro_Rw11UnitTerm 1
#define included_Retro_Rw11UnitTerm 1
 
 
 
#include <iostream>
 
#include <fstream>
#include <deque>
#include <deque>
 
 
#include "Rw11VirtTerm.hpp"
#include "Rw11VirtTerm.hpp"
 
 
#include "Rw11UnitVirt.hpp"
#include "Rw11UnitVirt.hpp"
Line 40... Line 43...
                    Rw11UnitTerm(Rw11Cntl* pcntl, size_t index);
                    Rw11UnitTerm(Rw11Cntl* pcntl, size_t index);
                   ~Rw11UnitTerm();
                   ~Rw11UnitTerm();
 
 
      const std::string& ChannelId() const;
      const std::string& ChannelId() const;
 
 
      void          SetRcv7bit(bool rcv7bit);
      void          SetTo7bit(bool to7bit);
      bool          Rcv7bit() const;
      void          SetToEnpc(bool toenpc);
 
      void          SetTi7bit(bool ti7bit);
 
      bool          To7bit() const;
 
      bool          ToEnpc() const;
 
      bool          Ti7bit() const;
 
 
 
      void          SetLog(const std::string& fname);
 
      const std::string&  Log() const;
 
 
      virtual bool  RcvQueueEmpty();
      virtual bool  RcvQueueEmpty();
      virtual size_t RcvQueueSize();
      virtual size_t RcvQueueSize();
      virtual uint8_t RcvNext();
      virtual uint8_t RcvNext();
      virtual size_t Rcv(uint8_t* buf, size_t count);
      virtual size_t Rcv(uint8_t* buf, size_t count);
Line 55... Line 65...
      virtual bool  RcvCallback(const uint8_t* buf, size_t count);
      virtual bool  RcvCallback(const uint8_t* buf, size_t count);
      virtual void  WakeupCntl();
      virtual void  WakeupCntl();
 
 
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
 
 
 
    // statistics counter indices
 
      enum stats {
 
        kStatNPreAttDrop = Rw11Unit::kDimStat,
 
        kDimStat
 
      };
 
 
    protected:
    protected:
      virtual void  AttachSetup();
      virtual void  AttachSetup();
 
 
    protected:
    protected:
      bool          fRcv7bit;               //<! discard parity bit on input
      bool          fTo7bit;                //<! discard parity bit on output
 
      bool          fToEnpc;                //<! escape non-printabls on output
 
      bool          fTi7bit;                //<! discard parity bit on input
      std::deque<uint8_t>  fRcvQueue;       //<! input queue
      std::deque<uint8_t>  fRcvQueue;       //<! input queue
 
      std::string   fLogFname;              //<! log file name
 
      std::ofstream fLogStream;             //<! log file stream
 
      bool          fLogOptCrlf;            //<! log file: crlf option given
 
      bool          fLogCrPend;             //<! log file: cr pending
 
      bool          fLogLfLast;             //<! log file: lf was last char
  };
  };
 
 
} // end namespace Retro
} // end namespace Retro
 
 
#include "Rw11UnitTerm.ipp"
#include "Rw11UnitTerm.ipp"

powered by: WebSVN 2.1.0

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