1
0
mirror of https://github.com/wfjm/w11.git synced 2026-02-06 00:35:11 +00:00

use std::boolalpha; add and use RosPrintf(bool)

This commit is contained in:
wfjm
2018-12-23 09:07:25 +01:00
parent 93bf5ce03b
commit 5bf5d405c3
28 changed files with 182 additions and 100 deletions

View File

@@ -1,4 +1,4 @@
// $Id: ReventLoop.cpp 1089 2018-12-19 10:45:41Z mueller $
// $Id: ReventLoop.cpp 1090 2018-12-21 12:17:35Z mueller $
//
// Copyright 2013-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2018-12-19 1090 1.2.6 use RosPrintf(bool)
// 2018-12-18 1089 1.2.5 use c++ style casts
// 2018-12-17 1085 1.2.4 use std::lock_guard instead of boost
// 2018-12-15 1083 1.2.3 AddPollHandler(): use rval ref and move
@@ -191,8 +192,8 @@ void ReventLoop::Dump(std::ostream& os, int ind, const char* text,
{
RosFill bl(ind);
os << bl << (text?text:"--") << "ReventLoop @ " << this << endl;
os << bl << " fStopPending: " << fStopPending << endl;
os << bl << " fUpdatePoll: " << fUpdatePoll << endl;
os << bl << " fStopPending: " << RosPrintf(fStopPending) << endl;
os << bl << " fUpdatePoll: " << RosPrintf(fUpdatePoll) << endl;
{
lock_guard<mutex> lock(const_cast<ReventLoop*>(this)->fPollDscMutex);
os << bl << " fPollDsc.size: " << fPollDsc.size() << endl;

View File

@@ -1,4 +1,4 @@
// $Id: RlinkCommand.cpp 1076 2018-12-02 12:45:49Z mueller $
// $Id: RlinkCommand.cpp 1090 2018-12-21 12:17:35Z mueller $
//
// Copyright 2011-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2018-12-19 1090 1.4.1 use RosPrintf(bool)
// 2018-12-01 1076 1.4 use unique_ptr
// 2017-04-07 868 1.3.2 Dump(): add detail arg
// 2017-03-11 859 1.3.1 add CommandInfo()
@@ -528,6 +529,7 @@ void RlinkCommand::Dump(std::ostream& os, int ind, const char* text,
}
os << endl;
}
os << bl << " fExpectStatusSet:" << RosPrintf(fExpectStatusSet) << endl;
os << bl << " fExpectStatusVal:" << RosPrintBvi(fExpectStatusVal,0) << endl;
os << bl << " fExpectStatusMsk:" << RosPrintBvi(fExpectStatusMsk,0) << endl;
if (fupExpect) fupExpect->Dump(os, ind+2, "fupExpect: ", detail);

View File

@@ -1,4 +1,4 @@
// $Id: RlinkConnect.cpp 1089 2018-12-19 10:45:41Z mueller $
// $Id: RlinkConnect.cpp 1090 2018-12-21 12:17:35Z mueller $
//
// Copyright 2011-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2018-12-19 1090 2.8.3 use RosPrintf(bool)
// 2018-12-18 1089 2.8.2 use c++ style casts
// 2018-12-17 1085 2.8.1 use std::lock_guard instead of boost
// 2018-12-08 1079 2.8 add HasPort(); return ref for Port()
@@ -689,15 +690,16 @@ void RlinkConnect::Dump(std::ostream& os, int ind, const char* text,
os << bl << (text?text:"--") << "RlinkConnect @ " << this << endl;
if (HasPort()) {
Port().Dump(os, ind+2, "fupPort: ", detail);
Port().Dump(os, ind+2, "fupPort: ", detail);
} else {
os << bl << " fupPort: " << fupPort.get() << endl;
os << bl << " fupPort: " << fupPort.get() << endl;
}
os << bl << " fLinkInitDone: " << fLinkInitDone << endl;
os << bl << " fLinkInitDeferred:" << RosPrintf(fLinkInitDeferred) << endl;
os << bl << " fLinkInitDone: " << RosPrintf(fLinkInitDone) << endl;
os << bl << " fpServ: " << fpServ << endl;
os << bl << " fSeqNumber: ";
os << bl << " fpServ: " << fpServ << endl;
os << bl << " fSeqNumber: ";
for (auto& o: fSeqNumber) os << RosPrintBvi(o,16) << " ";
os << endl;
@@ -706,18 +708,18 @@ void RlinkConnect::Dump(std::ostream& os, int ind, const char* text,
fContext.Dump(os, ind+2, "fContext: ", detail);
fAddrMap.Dump(os, ind+2, "fAddrMap: ", detail-1);
fStats.Dump(os, ind+2, "fStats: ", detail-1);
os << bl << " fLogBaseAddr: " << fLogBaseAddr << endl;
os << bl << " fLogBaseData: " << fLogBaseData << endl;
os << bl << " fLogBaseStat: " << fLogBaseStat << endl;
os << bl << " fPrintLevel: " << fPrintLevel << endl;
os << bl << " fDumpLevel " << fDumpLevel << endl;
os << bl << " fTraceLevel " << fTraceLevel << endl;
os << bl << " fLogBaseAddr: " << fLogBaseAddr << endl;
os << bl << " fLogBaseData: " << fLogBaseData << endl;
os << bl << " fLogBaseStat: " << fLogBaseStat << endl;
os << bl << " fPrintLevel: " << fPrintLevel << endl;
os << bl << " fDumpLevel " << fDumpLevel << endl;
os << bl << " fTraceLevel " << fTraceLevel << endl;
fspLog->Dump(os, ind+2, "fspLog: ");
os << bl << " fAttnNotiPatt: " << RosPrintBvi(fAttnNotiPatt,16) << endl;
os << bl << " fTsLastAttnNoti: " << fTsLastAttnNoti << endl;
os << bl << " fSysId: " << RosPrintBvi(fSysId,16) << endl;
os << bl << " fUsrAcc: " << RosPrintBvi(fUsrAcc,16) << endl;
os << bl << " fRbufSize: " << RosPrintf(fRbufSize,"d",6) << endl;
os << bl << " fAttnNotiPatt: " << RosPrintBvi(fAttnNotiPatt,16) << endl;
os << bl << " fTsLastAttnNoti: " << fTsLastAttnNoti << endl;
os << bl << " fSysId: " << RosPrintBvi(fSysId,16) << endl;
os << bl << " fUsrAcc: " << RosPrintBvi(fUsrAcc,16) << endl;
os << bl << " fRbufSize: " << RosPrintf(fRbufSize,"d",6) << endl;
return;
}

View File

@@ -1,4 +1,4 @@
// $Id: RlinkPacketBufSnd.cpp 1089 2018-12-19 10:45:41Z mueller $
// $Id: RlinkPacketBufSnd.cpp 1090 2018-12-21 12:17:35Z mueller $
//
// Copyright 2014-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2018-12-19 1090 1.2.2 use RosPrintf(bool)
// 2018-12-18 1089 1.2.1 use c++ style casts
// 2018-12-08 1079 1.2 use ref not ptr for RlinkPort
// 2017-04-07 868 1.1.1 Dump(): add detail arg
@@ -219,7 +220,7 @@ void RlinkPacketBufSnd::Dump(std::ostream& os, int ind, const char* text,
RosFill bl(ind);
os << bl << (text?text:"--") << "RlinkPacketBufSnd @ " << this << endl;
os << bl << " fXonEscape: " << fXonEscape << endl;
os << bl << " fXonEscape: " << RosPrintf(fXonEscape) << endl;
size_t rawbufsize = fRawBuf.size();
os << bl << " fRawBuf(size): " << RosPrintf(rawbufsize,"d",4);

View File

@@ -1,4 +1,4 @@
// $Id: RlinkPort.cpp 1089 2018-12-19 10:45:41Z mueller $
// $Id: RlinkPort.cpp 1090 2018-12-21 12:17:35Z mueller $
//
// Copyright 2011-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
//
@@ -13,6 +13,7 @@
//
// Revision History:
// Date Rev Version Comment
// 2018-12-19 1090 1.4.4 use RosPrintf(bool)
// 2018-12-18 1089 1.4.3 use c++ style casts
// 2017-04-29 888 1.4.2 BUGFIX: RawRead(): proper irc for exactsize=false
// 2017-04-07 868 1.4.1 Dump(): add detail arg
@@ -300,9 +301,9 @@ void RlinkPort::Dump(std::ostream& os, int ind, const char* text,
RosFill bl(ind);
os << bl << (text?text:"--") << "RlinkPort @ " << this << endl;
os << bl << " fIsOpen: " << int(fIsOpen) << endl;
os << bl << " fIsOpen: " << RosPrintf(fIsOpen) << endl;
fUrl.Dump(os, ind+2, "fUrl: ");
os << bl << " fXon: " << fXon << endl;
os << bl << " fXon: " << RosPrintf(fXon) << endl;
os << bl << " fFdRead: " << fFdRead << endl;
os << bl << " fFdWrite: " << fFdWrite << endl;
os << bl << " fspLog: " << fspLog.get() << endl;