Cosmetics: '\n' was replaced with std::endl, Camel case for attributes

This commit is contained in:
Kirill Andreev
2009-08-24 18:05:31 +04:00
parent 9e65a76f58
commit 544f915f0e
18 changed files with 82 additions and 81 deletions

View File

@@ -164,8 +164,9 @@ MeshHeader::Deserialize (Buffer::Iterator start)
void
MeshHeader::Print (std::ostream &os) const
{
os << "flags = " << (uint16_t) m_meshFlags << "\nttl = " << (uint16_t) m_meshTtl << "\nseqno = "
<< m_meshSeqno << "\naddr4 = " << m_addr4 << "\naddr5 = " << m_addr5 << "\naddr6 = " << m_addr6;
os << "flags = " << (uint16_t) m_meshFlags << std::endl << "ttl = " << (uint16_t) m_meshTtl
<< std::endl << "seqno = " << m_meshSeqno << std::endl<< "addr4 = " << m_addr4 << std::endl
<< "addr5 = " << m_addr5 << std::endl << "addr6 = " << m_addr6 << std::endl;
}
bool
operator== (const MeshHeader & a, const MeshHeader & b)

View File

@@ -448,10 +448,10 @@ HwmpProtocolMac::Statistics::Print (std::ostream & os) const
void
HwmpProtocolMac::Report (std::ostream & os) const
{
os << "<HwmpProtocolMac\n"
"address =\"" << m_parent->GetAddress () << "\">\n";
os << "<HwmpProtocolMac" << std::endl <<
"address =\"" << m_parent->GetAddress () << "\">" << std::endl;
m_stats.Print (os);
os << "</HwmpProtocolMac>\n";
os << "</HwmpProtocolMac>" << std::endl;
}
void
HwmpProtocolMac::ResetStats ()

View File

@@ -53,7 +53,7 @@ HwmpProtocol::GetTypeId ()
&HwmpProtocol::m_randomStart),
MakeTimeChecker ()
)
.AddAttribute ( "maxQueueSize",
.AddAttribute ( "MaxQueueSize",
"Maximum number of packets we can store when resolving route",
UintegerValue (255),
MakeUintegerAccessor (
@@ -115,42 +115,42 @@ HwmpProtocol::GetTypeId ()
&HwmpProtocol::m_dot11MeshHWMPrannInterval),
MakeTimeChecker ()
)
.AddAttribute ( "maxTtl",
.AddAttribute ( "MaxTtl",
"Initial value of Time To Live field",
UintegerValue (32),
MakeUintegerAccessor (
&HwmpProtocol::m_maxTtl),
MakeUintegerChecker<uint8_t> (2)
)
.AddAttribute ( "unicastPerrThreshold",
.AddAttribute ( "UnicastPerrThreshold",
"Maximum number of PERR receivers, when we send a PERR as a chain of unicasts",
UintegerValue (32),
MakeUintegerAccessor (
&HwmpProtocol::m_unicastPerrThreshold),
MakeUintegerChecker<uint8_t> (1)
)
.AddAttribute ( "unicastPreqThreshold",
.AddAttribute ( "UnicastPreqThreshold",
"Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts",
UintegerValue (1),
MakeUintegerAccessor (
&HwmpProtocol::m_unicastPreqThreshold),
MakeUintegerChecker<uint8_t> (1)
)
.AddAttribute ( "unicastDataThreshold",
.AddAttribute ( "UnicastDataThreshold",
"Maximum number ofbroadcast receivers, when we send a broadcast as a chain of unicasts",
UintegerValue (1),
MakeUintegerAccessor (
&HwmpProtocol::m_unicastDataThreshold),
MakeUintegerChecker<uint8_t> (1)
)
.AddAttribute ( "doFlag",
.AddAttribute ( "DoFlag",
"Destination only HWMP flag",
BooleanValue (false),
MakeBooleanAccessor (
&HwmpProtocol::m_doFlag),
MakeBooleanChecker ()
)
.AddAttribute ( "rfFlag",
.AddAttribute ( "RfFlag",
"Reply and forward flag",
BooleanValue (true),
MakeBooleanAccessor (
@@ -1101,7 +1101,7 @@ void HwmpProtocol::Statistics::Print (std::ostream & os) const
"totalDropped=\"" << totalDropped << "\" "
"initiatedPreq=\"" << initiatedPreq << "\" "
"initiatedPrep=\"" << initiatedPrep << "\" "
"initiatedPerr=\"" << initiatedPerr << "\"\n";
"initiatedPerr=\"" << initiatedPerr << "\"" << std::endl;
}
void
HwmpProtocol::Report (std::ostream & os) const
@@ -1129,7 +1129,7 @@ HwmpProtocol::Report (std::ostream & os) const
{
plugin->second->Report (os);
}
os << "</Hwmp>\n";
os << "</Hwmp>" << std::endl;
}
void
HwmpProtocol::ResetStats ()

View File

@@ -148,11 +148,11 @@ IeBeaconTiming::GetInformationSize () const
void
IeBeaconTiming::PrintInformation (std::ostream& os) const
{
os << "Number of units: " << (uint16_t) m_numOfUnits << "\n";
os << "Number of units: " << (uint16_t) m_numOfUnits << std::endl;
for (NeighboursTimingUnitsList::const_iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
{
os << "AID=" << (uint16_t) (*j)->GetAid () << ", Last beacon was at " << (*j)->GetLastBeacon ()
<< ", with beacon interval " << (*j)->GetBeaconInterval () << "\n";
<< ", with beacon interval " << (*j)->GetBeaconInterval () << std::endl;
}
}
void

View File

@@ -156,12 +156,12 @@ void
IeConfiguration::PrintInformation (std::ostream& os) const
{
os << "Number of neighbors: = " << (uint16_t) m_neighbors
<< "\nActive Path Selection Protocol ID: = " << (uint32_t) m_APSPId
<< "\nActive Path Selection Metric ID: = " << (uint32_t) m_APSMId
<< "\nCongestion Control Mode ID: = " << (uint32_t) m_CCMId
<< "\nSynchronize protocol ID: = " << (uint32_t) m_SPId
<< "\nAuthentication protocol ID: = " << (uint32_t) m_APId
<< "\nCapabilities: = " << m_meshCap.GetUint16 () << "\n";
<< std::endl << "Active Path Selection Protocol ID: = " << (uint32_t) m_APSPId
<< std::endl << "Active Path Selection Metric ID: = " << (uint32_t) m_APSMId
<< std::endl << "Congestion Control Mode ID: = " << (uint32_t) m_CCMId
<< std::endl << "Synchronize protocol ID: = " << (uint32_t) m_SPId
<< std::endl << "Authentication protocol ID: = " << (uint32_t) m_APId
<< std::endl << "Capabilities: = " << m_meshCap.GetUint16 () << std::endl;
}
void
IeConfiguration::SetRouting (dot11sPathSelectionProtocol routingId)

View File

@@ -149,11 +149,11 @@ void
IePeerManagement::PrintInformation (std::ostream& os) const
{
os << " Subtype: = " << (uint16_t) m_subtype << "\n";
os << " Length: = " << (uint16_t) m_length << "\n";
os << " LocalLinkId: = " << m_localLinkId << "\n";
os << " PeerLinkId: = " << m_peerLinkId << "\n";
os << " ReasonCode: = " << m_reasonCode << "\n";
os << " Subtype: = " << (uint16_t) m_subtype << std::endl;
os << " Length: = " << (uint16_t) m_length << std::endl;
os << " LocalLinkId: = " << m_localLinkId << std::endl;
os << " PeerLinkId: = " << m_peerLinkId << std::endl;
os << " ReasonCode: = " << m_reasonCode << std::endl;
}
bool
operator== (const IePeerManagement & a, const IePeerManagement & b)

View File

@@ -45,7 +45,7 @@ IePerr::PrintInformation (std::ostream &os) const
os << "Failed destination address: = " << m_addressUnits[j].destination << ", sequence number = "
<< m_addressUnits[j].seqnum;
}
os << "\n";
os << std::endl;
}
uint8_t
IePerr::GetNumOfDest ()

View File

@@ -190,10 +190,10 @@ IePrep::GetInformationSize () const
void
IePrep::PrintInformation (std::ostream& os) const
{
os << "Flags: = " << m_flags << "\nHopcount: = " << m_hopcount << "\nTTL: = " << m_ttl
<< "\nDestination: = " << m_destinationAddress << "\nDest. seqnum: = " << m_destSeqNumber
<< "\nLifetime: = " << m_lifetime << "\nMetric: = " << m_metric << "\nOriginator: = "
<< m_originatorAddress << "\nOrig. seqnum: = " << m_originatorSeqNumber << "\n";
os << "Flags: = " << m_flags << std::endl << "Hopcount: = " << m_hopcount << std::endl << "TTL: = " << m_ttl
<< std::endl<< "Destination: = " << m_destinationAddress << std::endl << "Dest. seqnum: = " << m_destSeqNumber
<< std::endl << "Lifetime: = " << m_lifetime << std::endl<< "Metric: = " << m_metric << std::endl << "Originator: = "
<< m_originatorAddress << std::endl << "Orig. seqnum: = " << m_originatorSeqNumber << std::endl;
}
bool
operator== (const IePrep & a, const IePrep & b)

View File

@@ -323,17 +323,17 @@ IePreq::GetInformationSize () const
void
IePreq::PrintInformation (std::ostream &os) const
{
os << " originator address = " << m_originatorAddress << "\n";
os << " TTL = " << (uint16_t) m_ttl << "\n";
os << " hop count = " << (uint16_t) m_hopCount << "\n";
os << " metric = " << m_metric << "\n";
os << " seqno = " << m_originatorSeqNumber << "\n";
os << " lifetime = " << m_lifetime << "\n";
os << " preq ID = " << m_preqId << "\n";
os << " Destinations are:\n";
os << " originator address = " << m_originatorAddress << "std::endl";
os << " TTL = " << (uint16_t) m_ttl << "std::endl";
os << " hop count = " << (uint16_t) m_hopCount << "std::endl";
os << " metric = " << m_metric << "std::endl";
os << " seqno = " << m_originatorSeqNumber << "std::endl";
os << " lifetime = " << m_lifetime << "std::endl";
os << " preq ID = " << m_preqId << "std::endl";
os << " Destinations are:std::endl";
for (int j = 0; j < m_destCount; j++)
{
os << " " << m_destinations[j]->GetDestinationAddress () << "\n";
os << " " << m_destinations[j]->GetDestinationAddress () << "std::endl";
}
}
std::vector<Ptr<DestinationAddressUnit> >

View File

@@ -153,12 +153,12 @@ IeRann::GetInformationSize () const
void
IeRann::PrintInformation (std::ostream &os) const
{
os << " flags = " << (int) m_flags << "\n";
os << " hop count = " << (int) m_hopcount << "\n";
os << " TTL = " << (int) m_ttl << "\n";
os << " originator address = " << m_originatorAddress << "\n";
os << " dst seq. number = " << m_destSeqNumber << "\n";
os << " metric = " << m_metric << "\n";
os << " flags = " << (int) m_flags << "std::endl";
os << " hop count = " << (int) m_hopcount << "std::endl";
os << " TTL = " << (int) m_ttl << "std::endl";
os << " originator address = " << m_originatorAddress << "std::endl";
os << " dst seq. number = " << m_destSeqNumber << "std::endl";
os << " metric = " << m_metric << "std::endl";
}
bool

View File

@@ -97,9 +97,9 @@ PeerLinkFrameStart::GetInstanceTypeId () const
void
PeerLinkFrameStart::Print (std::ostream &os) const
{
os << "subtype = " << (uint16_t) m_subtype << "\ncapability = " << m_capability << "\naid = "
<< (uint16_t) m_aid << "\nrates = " << m_rates << "\nmeshId = " << m_meshId << "\nconfiguration = "
<< m_config << "\nreason code = " << m_reasonCode;
os << "subtype = " << (uint16_t) m_subtype << "std::endlcapability = " << m_capability << "std::endlaid = "
<< (uint16_t) m_aid << "std::endlrates = " << m_rates << "std::endlmeshId = " << m_meshId << "std::endlconfiguration = "
<< m_config << "std::endlreason code = " << m_reasonCode;
}
uint32_t
PeerLinkFrameStart::GetSerializedSize () const

View File

@@ -288,27 +288,27 @@ void
PeerManagementProtocolMac::Statistics::Print (std::ostream & os) const
{
os << "<Statistics "
"txOpen=\"" << txOpen << "\"\n"
"txConfirm=\"" << txConfirm << "\"\n"
"txClose=\"" << txClose << "\"\n"
"rxOpen=\"" << rxOpen << "\"\n"
"rxConfirm=\"" << rxConfirm << "\"\n"
"rxClose=\"" << rxClose << "\"\n"
"dropped=\"" << dropped << "\"\n"
"brokenMgt=\"" << brokenMgt << "\"\n"
"txMgt=\"" << txMgt << "\"\n"
"txMgtBytes=\"" << txMgtBytes << "\"\n"
"rxMgt=\"" << rxMgt << "\"\n"
"rxMgtBytes=\"" << rxMgtBytes << "\"\n"
"beaconShift=\"" << beaconShift << "\"/>\n";
"txOpen=\"" << txOpen << "\"" << std::endl <<
"txConfirm=\"" << txConfirm << "\"" << std::endl <<
"txClose=\"" << txClose << "\"" << std::endl <<
"rxOpen=\"" << rxOpen << "\"" << std::endl <<
"rxConfirm=\"" << rxConfirm << "\"" << std::endl <<
"rxClose=\"" << rxClose << "\"" << std::endl <<
"dropped=\"" << dropped << "\"" << std::endl <<
"brokenMgt=\"" << brokenMgt << "\"" << std::endl <<
"txMgt=\"" << txMgt << "\"" << std::endl <<
"txMgtBytes=\"" << txMgtBytes << "\"" << std::endl <<
"rxMgt=\"" << rxMgt << "\"" << std::endl <<
"rxMgtBytes=\"" << rxMgtBytes << "\"" << std::endl <<
"beaconShift=\"" << beaconShift << "\"/>" << std::endl;
}
void
PeerManagementProtocolMac::Report (std::ostream & os) const
{
os << "<PeerManagementProtocolMac "
"address=\"" << m_parent->GetAddress () << "\">\n";
"address=\"" << m_parent->GetAddress () << "\">" << std::endl;
m_stats.Print (os);
os << "</PeerManagementProtocolMac>\n";
os << "</PeerManagementProtocolMac>" << std::endl;
}
void
PeerManagementProtocolMac::ResetStats ()

View File

@@ -547,7 +547,7 @@ PeerManagementProtocol::Statistics::Print (std::ostream & os) const
void
PeerManagementProtocol::Report (std::ostream & os) const
{
os << "<PeerManagementProtocol>\n";
os << "<PeerManagementProtocol>" << std::endl;
m_stats.Print (os);
for (PeerManagementProtocolMacMap::const_iterator plugins = m_plugins.begin (); plugins != m_plugins.end (); plugins++)
{
@@ -561,7 +561,7 @@ PeerManagementProtocol::Report (std::ostream & os) const
(*i)->Report (os);
}
}
os << "</PeerManagementProtocol>\n";
os << "</PeerManagementProtocol>" << std::endl;
}
void
PeerManagementProtocol::ResetStats ()

View File

@@ -49,8 +49,8 @@ FlameHeader::GetInstanceTypeId (void) const
void
FlameHeader::Print (std::ostream &os) const
{
os << "Cost = " << (uint16_t) m_cost << "\nSequence number = " << m_seqno
<< "\nOrig Destination = " << m_origDst << "\nOrig Source = " << m_origSrc << "\n";
os << "Cost = " << (uint16_t) m_cost << std::endl << "Sequence number = " << m_seqno
<< std::endl << "Orig Destination = " << m_origDst << std::endl << "Orig Source = " << m_origSrc << std::endl;
}
uint32_t
FlameHeader::GetSerializedSize (void) const

View File

@@ -107,15 +107,15 @@ FlameProtocolMac::Statistics::Print (std::ostream &os) const
"txBytes=\"" << txBytes << "\" "
"rxUnicast=\"" << rxUnicast << "\" "
"rxBroadcast=\"" << rxBroadcast << "\" "
"rxBytes=\"" << rxBytes << "\"/>\n";
"rxBytes=\"" << rxBytes << "\"/>" << std::endl;
}
void
FlameProtocolMac::Report (std::ostream & os) const
{
os << "<FlameProtocolMac\n"
"address =\"" << m_parent->GetAddress () << "\">\n";
os << "<FlameProtocolMac" << std::endl <<
"address =\"" << m_parent->GetAddress () << "\">" << std::endl;
m_stats.Print (os);
os << "</FlameProtocolMac>\n";
os << "</FlameProtocolMac>" << std::endl;
}
void

View File

@@ -345,21 +345,21 @@ FlameProtocol::Statistics::Print (std::ostream & os) const
"txBroadcast=\"" << txBroadcast << "\" "
"txBytes=\"" << txBytes << "\" "
"droppedTtl=\"" << droppedTtl << "\" "
"totalDropped=\"" << totalDropped << "\"/>\n";
"totalDropped=\"" << totalDropped << "\"/>" << std::endl;
}
void
FlameProtocol::Report (std::ostream & os) const
{
os << "<Flame "
"address=\"" << m_address << "\"\n"
"broadcastInterval=\"" << m_broadcastInterval.GetSeconds () << "\"\n"
"maxCost=\"" << (uint16_t) m_maxCost << "\">\n";
"address=\"" << m_address << "\"" << std::endl <<
"broadcastInterval=\"" << m_broadcastInterval.GetSeconds () << "\"" << std::endl <<
"maxCost=\"" << (uint16_t) m_maxCost << "\">" << std::endl;
m_stats.Print (os);
for (FlamePluginMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin++)
{
plugin->second->Report (os);
}
os << "</Flame>\n";
os << "</Flame>" << std::endl;
}
void
FlameProtocol::ResetStats ()

View File

@@ -36,7 +36,7 @@ FlameRtable::GetTypeId ()
static TypeId tid =
TypeId ("ns3::flame::FlameRtable")
.SetParent<Object> () .AddConstructor<FlameRtable> ()
.AddAttribute ( "lifetime",
.AddAttribute ( "Lifetime",
"The lifetime of the routing enrty",
TimeValue (Seconds (120)), MakeTimeAccessor (
&FlameRtable::m_lifetime),

View File

@@ -66,9 +66,9 @@ WifiInformationElement::Deserialize (Buffer::Iterator i)
void
WifiInformationElement::Print (std::ostream &os) const
{
os << "\n<information_element id=" << ElementId () << ">\n";
os << std::endl << "<information_element id=" << ElementId () << ">" << std::endl;
PrintInformation (os);
os << "</information_element>\n";
os << "</information_element>" << std::endl;
}
bool
operator< (WifiInformationElement const & a, WifiInformationElement const & b)