diff --git a/src/core/model/nstime.h b/src/core/model/nstime.h index c0e977d78..e2998bfd0 100644 --- a/src/core/model/nstime.h +++ b/src/core/model/nstime.h @@ -530,7 +530,7 @@ public: /** Cast to int64x64_t */ - inline operator int64x64_t () const + explicit inline operator int64x64_t () const { return int64x64_t (m_data); } diff --git a/src/internet/test/ipv4-deduplication-test.cc b/src/internet/test/ipv4-deduplication-test.cc index 0dcfdab78..922ae512a 100644 --- a/src/internet/test/ipv4-deduplication-test.cc +++ b/src/internet/test/ipv4-deduplication-test.cc @@ -609,7 +609,8 @@ Ipv4DeduplicationPerformanceTest::DoRun (void) for (uint8_t i = 0; iGetNode ()->GetId (), Seconds (4+Seconds(jitter->GetValue ())), + Simulator::ScheduleWithContext (m_sockets[i]->GetNode ()->GetId (), + Seconds (4+jitter->GetValue ()), &Ipv4DeduplicationPerformanceTest::DoSendData, this, m_sockets[i], to, i); } diff --git a/src/lr-wpan/model/lr-wpan-mac.cc b/src/lr-wpan/model/lr-wpan-mac.cc index ecc4e8166..772ffe57d 100644 --- a/src/lr-wpan/model/lr-wpan-mac.cc +++ b/src/lr-wpan/model/lr-wpan-mac.cc @@ -449,8 +449,8 @@ LrWpanMac::McpsDataRequest (McpsDataRequestParams params, Ptr p) //TODO: check possible incorrect expire time here. - expireTime = MicroSeconds (Simulator::Now () + m_macTransactionPersistanceTime * - unitPeriodSymbols * 1000 * 1000 / m_phy->GetDataOrSymbolRate (false)); + expireTime = Simulator::Now () + m_macTransactionPersistanceTime + * MicroSeconds (unitPeriodSymbols * 1000 * 1000 / m_phy->GetDataOrSymbolRate (false)); indTxQElement->expireTime = expireTime; indTxQElement->txQMsduHandle = params.m_msduHandle; indTxQElement->txQPkt = p; diff --git a/src/lr-wpan/model/lr-wpan-phy.h b/src/lr-wpan/model/lr-wpan-phy.h index 9c34e6abf..5690daf51 100644 --- a/src/lr-wpan/model/lr-wpan-phy.h +++ b/src/lr-wpan/model/lr-wpan-phy.h @@ -432,6 +432,7 @@ public: /** * implement PLME SetAttribute confirm SAP + * bit rate is in kbit/s. Symbol rate is in ksymbol/s. * @param isData is true for data rate or false for symbol rate * @return the rate value of this PHY */ @@ -492,7 +493,8 @@ public: protected: /** * The data and symbol rates for the different PHY options. - * See Table 2 in section 6.1.2 IEEE 802.15.4-2006 + * See Table 2 in section 6.1.2 IEEE 802.15.4-2006. + * Bit rate is in kbit/s. Symbol rate is in ksymbol/s. */ static const LrWpanPhyDataAndSymbolRates dataSymbolRates[7]; /** diff --git a/src/traffic-control/test/codel-queue-disc-test-suite.cc b/src/traffic-control/test/codel-queue-disc-test-suite.cc index ac7e8eb9d..2e8054b9d 100644 --- a/src/traffic-control/test/codel-queue-disc-test-suite.cc +++ b/src/traffic-control/test/codel-queue-disc-test-suite.cc @@ -970,7 +970,7 @@ CoDelQueueDiscBasicMark::Dequeue (Ptr queue, uint32_t modeSize, "There should be 1 CE threshold exceeded marked packet"); } } - else if (initialCeThreshMarkCount > 0 && currentTime.GetMicroSeconds () < queue->GetInterval ()) + else if (initialCeThreshMarkCount > 0 && currentTime < queue->GetInterval ()) { if (initialCeThreshMarkCount < 2) { diff --git a/src/uan/model/uan-mac-rc.cc b/src/uan/model/uan-mac-rc.cc index 0b503ea90..f658b5bde 100644 --- a/src/uan/model/uan-mac-rc.cc +++ b/src/uan/model/uan-mac-rc.cc @@ -366,7 +366,7 @@ UanMacRc::ReceiveOkFromPhy (Ptr pkt, double sinr, UanTxMode mode) Time winDelay = ctsg.GetWindowTime (); - if (winDelay > 0) + if (winDelay > Time (0)) { m_rtsBlocked = false; Simulator::Schedule (winDelay, &UanMacRc::BlockRtsing, this); @@ -481,16 +481,9 @@ UanMacRc::ScheduleData (const UanHeaderRcCts &ctsh, const UanHeaderRcCtsGlobal & pkt->AddHeader (ch); Time eventTime = startDelay + frameDelay; - if (eventTime < 0) + if (eventTime < Time (0)) { - if (eventTime > -0.001) - { - eventTime = Time (); - } - else - { - NS_FATAL_ERROR ("Scheduling error resulted in very negative data transmission time! eventTime = " << eventTime.As (Time::S)); - } + NS_FATAL_ERROR ("Scheduling error resulted in very negative data transmission time! eventTime = " << eventTime.As (Time::S)); } NS_LOG_DEBUG (Now ().As (Time::S) << " Node " << Mac8Address::ConvertFrom (GetAddress ()) <<