From 64b8435719ae4469c3abbb7551b3688b645ef21d Mon Sep 17 00:00:00 2001 From: "Walter F.J. Mueller" Date: Mon, 17 Apr 2017 14:08:38 +0200 Subject: [PATCH] code cosmetics --- doc/CHANGELOG.md | 18 ++++++++++++++++++ tools/src/librlink/ReventLoop.cpp | 10 +++++----- tools/src/librlink/RlinkAddrMap.cpp | 6 +++--- tools/src/librlink/RlinkPacketBuf.cpp | 6 +++--- tools/src/librlink/RlinkPacketBufRcv.cpp | 6 +++--- tools/src/librtools/Rstats.cpp | 6 +++--- tools/src/librw11/Rw11CntlTM11.cpp | 6 +++--- tools/src/librw11/Rw11RdmaDisk.cpp | 6 +++--- tools/src/librw11/Rw11VirtDiskOver.cpp | 6 +++--- tools/src/librw11/Rw11VirtTermTcp.cpp | 10 +++++----- 10 files changed, 49 insertions(+), 31 deletions(-) diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index cb4344b5..cd294d51 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -17,6 +17,24 @@ software or firmware builds or that the documentation is consistent. The full set of tests is only run for tagged releases. ### Summary +- factor out controller class specifics; add useful M_default output + - RtclRw11Cntl*Base: add classes with Rdma,Disk,Stream.Tape,Term specifics + - RtclRw11Cntl*: add class in ctor; derive from RtclRw11Cntl*Base +- make list cpus,cntls,units command gettable; make controller class gettable + - RtclRw11: add CpuCommands() and cpus getter + - RtclRw11Cntl: add UnitCommands() and uints and class getter + - RtclRw11Cpu: add ControllerCommands() and cntls getter + - RtclGet: add Tcl_Obj* getter +- make attach status and attach url gettable for units + - Rw11Cntl,Rw11CntlBase: NUnit() now pure; add UnitBase() + - Rw11Unit: add IsAttached(), AttachUrl() + - Rw11UnitVirt: add VirtBase() + - Rw11Virt: add Url() const getter + - RtclRw11UnitBase: add attached,attachutl getters +- ensure that defaulted scheme visible in displayed open urls + - pass default scheme to RparseUrl in Open() + - add Open() overloads for Rw11VirtDiskFile and Rw11VirtDiskOver + - RparseUrl: add Set() with default scheme handling - revise interface for ibd_ibmon and rbd_rbmon - use start,stop,suspend,resume functions; improved stop on wrap handling - add 'repeat collapse' logic (store only first and last of a sequence) diff --git a/tools/src/librlink/ReventLoop.cpp b/tools/src/librlink/ReventLoop.cpp index a5411da9..3bd37914 100644 --- a/tools/src/librlink/ReventLoop.cpp +++ b/tools/src/librlink/ReventLoop.cpp @@ -1,4 +1,4 @@ -// $Id: ReventLoop.cpp 868 2017-04-07 20:09:33Z mueller $ +// $Id: ReventLoop.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2013-2017 by Walter F.J. Mueller // @@ -24,7 +24,7 @@ /*! \file - \version $Id: ReventLoop.cpp 868 2017-04-07 20:09:33Z mueller $ + \version $Id: ReventLoop.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of class ReventLoop. */ @@ -194,9 +194,9 @@ void ReventLoop::Dump(std::ostream& os, int ind, const char* text, os << bl << " fUpdatePoll: " << fUpdatePoll << endl; { boost::lock_guard lock(((ReventLoop*)this)->fPollDscMutex); - os << bl << " fPollDsc.size " << fPollDsc.size() << endl; - os << bl << " fPollFd.size " << fPollFd.size() << endl; - os << bl << " fPollHdl.size " << fPollHdl.size() << endl; + os << bl << " fPollDsc.size: " << fPollDsc.size() << endl; + os << bl << " fPollFd.size: " << fPollFd.size() << endl; + os << bl << " fPollHdl.size: " << fPollHdl.size() << endl; for (size_t i=0; i // @@ -22,7 +22,7 @@ /*! \file - \version $Id: RlinkAddrMap.cpp 868 2017-04-07 20:09:33Z mueller $ + \version $Id: RlinkAddrMap.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of class RlinkAddrMap. */ @@ -187,7 +187,7 @@ void RlinkAddrMap::Dump(std::ostream& os, int ind, const char* text, RosFill bl(ind); os << bl << (text?text:"--") << "RlinkAddrMap @ " << this << endl; if (detail < 0) { - os << bl << " fAddrMap.size(): " << fAddrMap.size() << endl; + os << bl << " fAddrMap.size: " << fAddrMap.size() << endl; } else { Print(os,ind+2); } diff --git a/tools/src/librlink/RlinkPacketBuf.cpp b/tools/src/librlink/RlinkPacketBuf.cpp index 188d8a0f..033a64cb 100644 --- a/tools/src/librlink/RlinkPacketBuf.cpp +++ b/tools/src/librlink/RlinkPacketBuf.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkPacketBuf.cpp 868 2017-04-07 20:09:33Z mueller $ +// $Id: RlinkPacketBuf.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2011-2017 by Walter F.J. Mueller // @@ -25,7 +25,7 @@ /*! \file - \version $Id: RlinkPacketBuf.cpp 868 2017-04-07 20:09:33Z mueller $ + \version $Id: RlinkPacketBuf.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of class RlinkPacketBuf. */ @@ -100,7 +100,7 @@ void RlinkPacketBuf::Dump(std::ostream& os, int ind, const char* text, os << bl << " fFlags: " << RosPrintBvi(fFlags, 0) << endl; fStats.Dump(os, ind+2, "fStats: ", detail-1); - os << bl << " fPktBuf(size): " << RosPrintf(fPktBuf.size(),"d",4); + os << bl << " fPktBuf.size: " << RosPrintf(fPktBuf.size(),"d",4); size_t ncol = max(1, (80-ind-4-6)/(2+1)); for (size_t i=0; i< fPktBuf.size(); i++) { if (i%ncol == 0) os << "\n" << bl << " " << RosPrintf(i,"d",4) << ": "; diff --git a/tools/src/librlink/RlinkPacketBufRcv.cpp b/tools/src/librlink/RlinkPacketBufRcv.cpp index 68e2edf6..18de87c0 100644 --- a/tools/src/librlink/RlinkPacketBufRcv.cpp +++ b/tools/src/librlink/RlinkPacketBufRcv.cpp @@ -1,4 +1,4 @@ -// $Id: RlinkPacketBufRcv.cpp 868 2017-04-07 20:09:33Z mueller $ +// $Id: RlinkPacketBufRcv.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2014-2017 by Walter F.J. Mueller // @@ -22,7 +22,7 @@ /*! \file - \version $Id: RlinkPacketBufRcv.cpp 868 2017-04-07 20:09:33Z mueller $ + \version $Id: RlinkPacketBufRcv.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of class RlinkPacketBuf. */ @@ -199,7 +199,7 @@ void RlinkPacketBufRcv::Dump(std::ostream& os, int ind, const char* text, os << bl << " fEscSeen: " << RosPrintf(fEscSeen) << endl; os << bl << " fNakIndex: " << RosPrintf(fNakIndex,"d",4) << endl; - os << bl << " fDropData(size): " << RosPrintf(fDropData.size(),"d",4); + os << bl << " fDropData.size:" << RosPrintf(fDropData.size(),"d",4); size_t ncol = max(1, (80-ind-4-6)/(2+1)); for (size_t i=0; i // @@ -22,7 +22,7 @@ /*! \file - \version $Id: Rstats.cpp 865 2017-04-02 16:45:06Z mueller $ + \version $Id: Rstats.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of Rstats . */ @@ -190,7 +190,7 @@ void Rstats::Dump(std::ostream& os, int ind, const char* text, << " '" << fText[i] << "'" << endl; } } else { - os << bl << " fValue.size(): " + os << bl << " fValue.size: " << RosPrintf(fValue.size(),"d",2) << endl; } diff --git a/tools/src/librw11/Rw11CntlTM11.cpp b/tools/src/librw11/Rw11CntlTM11.cpp index 6501cc93..3acffabc 100644 --- a/tools/src/librw11/Rw11CntlTM11.cpp +++ b/tools/src/librw11/Rw11CntlTM11.cpp @@ -1,4 +1,4 @@ -// $Id: Rw11CntlTM11.cpp 865 2017-04-02 16:45:06Z mueller $ +// $Id: Rw11CntlTM11.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2015-2017 by Walter F.J. Mueller // Other credits: @@ -25,7 +25,7 @@ /*! \file - \version $Id: Rw11CntlTM11.cpp 865 2017-04-02 16:45:06Z mueller $ + \version $Id: Rw11CntlTM11.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of Rw11CntlTM11. */ @@ -293,7 +293,7 @@ void Rw11CntlTM11::Dump(std::ostream& os, int ind, const char* text, os << bl << " fRd_nwrd: " << RosPrintf(fRd_nwrd,"d",6) << endl; os << bl << " fRd_fu: " << fRd_fu << endl; os << bl << " fRd_opcode: " << fRd_opcode << endl; - os << bl << " fBuf.size() " << RosPrintf(fBuf.size(),"d",6) << endl; + os << bl << " fBuf.size: " << RosPrintf(fBuf.size(),"d",6) << endl; fRdma.Dump(os, ind+2, "fRdma: ", detail); Rw11CntlBase::Dump(os, ind, " ^", detail); return; diff --git a/tools/src/librw11/Rw11RdmaDisk.cpp b/tools/src/librw11/Rw11RdmaDisk.cpp index 4f2c1d77..b4b48b67 100644 --- a/tools/src/librw11/Rw11RdmaDisk.cpp +++ b/tools/src/librw11/Rw11RdmaDisk.cpp @@ -1,4 +1,4 @@ -// $Id: Rw11RdmaDisk.cpp 865 2017-04-02 16:45:06Z mueller $ +// $Id: Rw11RdmaDisk.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2015-2017 by Walter F.J. Mueller // @@ -19,7 +19,7 @@ /*! \file - \version $Id: Rw11RdmaDisk.cpp 865 2017-04-02 16:45:06Z mueller $ + \version $Id: Rw11RdmaDisk.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of Rw11RdmaDisk. */ @@ -133,7 +133,7 @@ void Rw11RdmaDisk::Dump(std::ostream& os, int ind, const char* text, { RosFill bl(ind); os << bl << (text?text:"--") << "Rw11RdmaDisk @ " << this << endl; - os << bl << " fBuf.size() " << RosPrintf(fBuf.size(),"d",5) << endl; + os << bl << " fBuf.size: " << RosPrintf(fBuf.size(),"d",5) << endl; os << bl << " fpUnit: " << fpUnit << endl; os << bl << " fNWord: " << RosPrintf(fNWord,"d",5) << endl; os << bl << " fNBlock: " << RosPrintf(fNBlock,"d",5) << endl; diff --git a/tools/src/librw11/Rw11VirtDiskOver.cpp b/tools/src/librw11/Rw11VirtDiskOver.cpp index 3bbe2631..98ed7138 100644 --- a/tools/src/librw11/Rw11VirtDiskOver.cpp +++ b/tools/src/librw11/Rw11VirtDiskOver.cpp @@ -1,4 +1,4 @@ -// $Id: Rw11VirtDiskOver.cpp 875 2017-04-15 21:58:50Z mueller $ +// $Id: Rw11VirtDiskOver.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2017- by Walter F.J. Mueller // @@ -20,7 +20,7 @@ /*! \file - \version $Id: Rw11VirtDiskOver.cpp 875 2017-04-15 21:58:50Z mueller $ + \version $Id: Rw11VirtDiskOver.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of Rw11VirtDiskOver. */ @@ -174,7 +174,7 @@ void Rw11VirtDiskOver::Dump(std::ostream& os, int ind, const char* text, RosFill bl(ind); os << bl << (text?text:"--") << "Rw11VirtDiskOver @ " << this << endl; - os << bl << " fBlkMap.size " << fBlkMap.size() << endl; + os << bl << " fBlkMap.size: " << fBlkMap.size() << endl; Rw11VirtDiskFile::Dump(os, ind, " ^", detail); return; } diff --git a/tools/src/librw11/Rw11VirtTermTcp.cpp b/tools/src/librw11/Rw11VirtTermTcp.cpp index 9a8ecb3b..1fa895e6 100644 --- a/tools/src/librw11/Rw11VirtTermTcp.cpp +++ b/tools/src/librw11/Rw11VirtTermTcp.cpp @@ -1,4 +1,4 @@ -// $Id: Rw11VirtTermTcp.cpp 875 2017-04-15 21:58:50Z mueller $ +// $Id: Rw11VirtTermTcp.cpp 880 2017-04-17 12:03:52Z mueller $ // // Copyright 2013-2017 by Walter F.J. Mueller // @@ -25,7 +25,7 @@ /*! \file - \version $Id: Rw11VirtTermTcp.cpp 875 2017-04-15 21:58:50Z mueller $ + \version $Id: Rw11VirtTermTcp.cpp 880 2017-04-17 12:03:52Z mueller $ \brief Implemenation of Rw11VirtTermTcp. */ @@ -253,9 +253,9 @@ void Rw11VirtTermTcp::Dump(std::ostream& os, int ind, const char* text, case ts_Subiac: t_state = "ts_Subiac"; break; default: t_state = "???"; } - os << bl << " fState: " << t_state << endl; - os << bl << " fTcpTrace: " << fTcpTrace << endl; - os << bl << " fSndPreConQue.size" << fSndPreConQue.size() << endl; + os << bl << " fState: " << t_state << endl; + os << bl << " fTcpTrace: " << fTcpTrace << endl; + os << bl << " fSndPreConQue.size:" << fSndPreConQue.size() << endl; Rw11VirtTerm::Dump(os, ind, " ^", detail); return; }