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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librlink/] [RlinkConnect.hpp] - 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: RlinkConnect.hpp 611 2014-12-10 23:23:58Z mueller $
// $Id: RlinkConnect.hpp 626 2015-01-03 14:41:37Z mueller $
//
//
// Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
// Copyright 2011-2015 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
// Software Foundation, either version 2, or at your option any later version.
// Software Foundation, either version 2, or at your option any later version.
//
//
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
 
// 2015-01-01   626   2.1    full rlink v4 implementation
 
// 2014-12-25   621   2.0.2  Reorganize packet send/revd stats
 
// 2014-12-20   616   2.0.1  add BlockDone expect checks
// 2014-12-10   611   2.0    re-organize for rlink v4
// 2014-12-10   611   2.0    re-organize for rlink v4
// 2013-04-21   509   1.3.3  add SndAttn() method
// 2013-04-21   509   1.3.3  add SndAttn() method
// 2013-03-05   495   1.3.2  add Exec() without emsg (will send emsg to LogFile)
// 2013-03-05   495   1.3.2  add Exec() without emsg (will send emsg to LogFile)
// 2013-03-01   493   1.3.1  add Server(Active..|SignalAttn)() methods
// 2013-03-01   493   1.3.1  add Server(Active..|SignalAttn)() methods
// 2013-02-23   492   1.3    use scoped_ptr for Port; Close allways allowed
// 2013-02-23   492   1.3    use scoped_ptr for Port; Close allways allowed
Line 30... Line 33...
// 2011-01-15   356   0.1    First draft
// 2011-01-15   356   0.1    First draft
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
/*!
/*!
  \file
  \file
  \version $Id: RlinkConnect.hpp 611 2014-12-10 23:23:58Z mueller $
  \version $Id: RlinkConnect.hpp 626 2015-01-03 14:41:37Z mueller $
  \brief   Declaration of class \c RlinkConnect.
  \brief   Declaration of class \c RlinkConnect.
*/
*/
 
 
#ifndef included_Retro_RlinkConnect
#ifndef included_Retro_RlinkConnect
#define included_Retro_RlinkConnect 1
#define included_Retro_RlinkConnect 1
Line 111... Line 114...
 
 
      double        WaitAttn(double timeout, uint16_t& apat, RerrMsg& emsg);
      double        WaitAttn(double timeout, uint16_t& apat, RerrMsg& emsg);
      bool          SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg);
      bool          SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg);
      bool          SndAttn(RerrMsg& emsg);
      bool          SndAttn(RerrMsg& emsg);
 
 
 
      uint32_t      SysId() const;
 
      size_t        RbufSize() const;
 
      size_t        BlockSizeMax() const;
 
      size_t        BlockSizePrudent() const;
 
 
      bool          AddrMapInsert(const std::string& name, uint16_t addr);
      bool          AddrMapInsert(const std::string& name, uint16_t addr);
      bool          AddrMapErase(const std::string& name);
      bool          AddrMapErase(const std::string& name);
      bool          AddrMapErase(uint16_t addr);
      bool          AddrMapErase(uint16_t addr);
      void          AddrMapClear();
      void          AddrMapClear();
 
 
      const RlinkAddrMap& AddrMap() const;
      const RlinkAddrMap& AddrMap() const;
 
 
      const Rstats& Stats() const;
      const Rstats& Stats() const;
      const Rstats& SndStats() const;
      const Rstats& SndStats() const;
      const Rstats& RcvStats() const;
      const Rstats& RcvStats() const;
 
 
      void          SetLogOpts(const LogOpts& opts);
      void          SetLogOpts(const LogOpts& opts);
Line 154... Line 162...
 
 
      static const uint16_t kSBCNTL_V_RLMON = 15; //!< SBCNTL: rlmon enable bit
      static const uint16_t kSBCNTL_V_RLMON = 15; //!< SBCNTL: rlmon enable bit
      static const uint16_t kSBCNTL_V_RLBMON= 14; //!< SBCNTL: rlbmon enable bit
      static const uint16_t kSBCNTL_V_RLBMON= 14; //!< SBCNTL: rlbmon enable bit
      static const uint16_t kSBCNTL_V_RBMON = 13; //!< SBCNTL: rbmon enable bit
      static const uint16_t kSBCNTL_V_RBMON = 13; //!< SBCNTL: rbmon enable bit
 
 
 
      // space beyond data for rblk =  8 :cmd(1) cnt(2) dcnt(2) stat(1) crc(2)
 
      //                   and wblk =  3 :cmd(1) cnt(2)
 
      static const uint16_t kRbufBlkDelta=16; //!< rbuf needed for rblk or wblk
 
      // 512 byte are enough space for a prudent amount of non-blk commands
 
      static const uint16_t kRbufPrudentDelta=512; //!< Rbuf space reserve
 
 
    // statistics counter indices
    // statistics counter indices
      enum stats {
      enum stats {
        kStatNExec = 0,                     //!< Exec() calls
        kStatNExec = 0,                     //!< Exec() calls
        kStatNExecPart,                     //!< ExecPart() calls
        kStatNExecPart,                     //!< ExecPart() calls
        kStatNCmd,                          //!< commands executed
        kStatNCmd,                          //!< commands executed
Line 168... Line 182...
        kStatNLabo,                         //!< labo commands
        kStatNLabo,                         //!< labo commands
        kStatNAttn,                         //!< attn commands
        kStatNAttn,                         //!< attn commands
        kStatNInit,                         //!< init commands
        kStatNInit,                         //!< init commands
        kStatNRblkWord,                     //!< words rcvd with rblk
        kStatNRblkWord,                     //!< words rcvd with rblk
        kStatNWblkWord,                     //!< words send with wblk
        kStatNWblkWord,                     //!< words send with wblk
        kStatNTxPktByt,                     //!< Tx packet bytes send
 
        kStatNRxPktByt,                     //!< Rx packet bytes rcvd
 
        kStatNExpData,                      //!< Expect() for data defined
        kStatNExpData,                      //!< Expect() for data defined
        kStatNExpStat,                      //!< Expect() for stat defined"
        kStatNExpDone,                      //!< Expect() for done defined
 
        kStatNExpStat,                      //!< Expect() for stat defined
        kStatNChkData,                      //!< expect data failed
        kStatNChkData,                      //!< expect data failed
 
        kStatNChkDone,                      //!< expect done failed
        kStatNChkStat,                      //!< expect stat failed
        kStatNChkStat,                      //!< expect stat failed
        kStatNSndOob,                       //!< SndOob() calls
        kStatNSndOob,                       //!< SndOob() calls
        kStatNErrMiss,                      //!< decode: missing data
        kStatNErrMiss,                      //!< decode: missing data
        kStatNErrCmd,                       //!< decode: command mismatch
        kStatNErrCmd,                       //!< decode: command mismatch
        kStatNErrLen,                       //!< decode: length mismatch
        kStatNErrLen,                       //!< decode: length mismatch
Line 210... Line 224...
      LogOpts       fLogOpts;               //!< log options
      LogOpts       fLogOpts;               //!< log options
      boost::shared_ptr<RlogFile> fspLog;   //!< log file ptr
      boost::shared_ptr<RlogFile> fspLog;   //!< log file ptr
      boost::recursive_mutex fConnectMutex; //!< mutex to lock whole connect
      boost::recursive_mutex fConnectMutex; //!< mutex to lock whole connect
      uint16_t      fAttnNotiPatt;          //!< attn notifier pattern
      uint16_t      fAttnNotiPatt;          //!< attn notifier pattern
      double        fTsLastAttnNoti;        //!< time stamp last attn notify
      double        fTsLastAttnNoti;        //!< time stamp last attn notify
 
      uint32_t      fSysId;                 //!< SYSID of connected device
 
      size_t        fRbufSize;              //!< Rbuf size (in bytes)
  };
  };
 
 
} // end namespace Retro
} // end namespace Retro
 
 
#include "RlinkConnect.ipp"
#include "RlinkConnect.ipp"

powered by: WebSVN 2.1.0

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