OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007,2008,2009 INRIA, UDcast | 3 * Copyright (c) 2007,2008,2009 INRIA, UDcast |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 SubscriberStationNetDevice::Enqueue (Ptr<Packet> packet, | 657 SubscriberStationNetDevice::Enqueue (Ptr<Packet> packet, |
658 const MacHeaderType &hdrType, | 658 const MacHeaderType &hdrType, |
659 Ptr<WimaxConnection> connection) | 659 Ptr<WimaxConnection> connection) |
660 { | 660 { |
661 NS_ASSERT_MSG (connection != 0, "SS: Can not enqueue the packet: the selected
connection is nor initialized"); | 661 NS_ASSERT_MSG (connection != 0, "SS: Can not enqueue the packet: the selected
connection is nor initialized"); |
662 | 662 |
663 GenericMacHeader hdr; | 663 GenericMacHeader hdr; |
664 | 664 |
665 if (hdrType.GetType () == MacHeaderType::HEADER_TYPE_GENERIC) | 665 if (hdrType.GetType () == MacHeaderType::HEADER_TYPE_GENERIC) |
666 { | 666 { |
667 hdr.SetLen (packet->GetSize () + hdr.GetSerializedSize ()); | 667 hdr.SetLen (static_cast<uint16_t> (packet->GetSize () + hdr.GetSerializedS
ize ())); |
668 hdr.SetCid (connection->GetCid ()); | 668 hdr.SetCid (connection->GetCid ()); |
669 | 669 |
670 } | 670 } |
671 | 671 |
672 if (connection->GetType () == Cid::TRANSPORT) | 672 if (connection->GetType () == Cid::TRANSPORT) |
673 { | 673 { |
674 | 674 |
675 if (connection->GetSchedulingType () == ServiceFlow::SF_TYPE_UGS && m_sche
duler->GetPollMe ()) | 675 if (connection->GetSchedulingType () == ServiceFlow::SF_TYPE_UGS && m_sche
duler->GetPollMe ()) |
676 { | 676 { |
677 NS_ASSERT_MSG (hdrType.GetType () != MacHeaderType::HEADER_TYPE_BANDWI
DTH, | 677 NS_ASSERT_MSG (hdrType.GetType () != MacHeaderType::HEADER_TYPE_BANDWI
DTH, |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 } | 1163 } |
1164 } | 1164 } |
1165 else | 1165 else |
1166 { | 1166 { |
1167 if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING &&
cid | 1167 if (ulMapIe.GetUiuc () == OfdmUlBurstProfile::UIUC_INITIAL_RANGING &&
cid |
1168 == GetBroadcastConnection ()->GetCid ()) // regular ranging interv
al | 1168 == GetBroadcastConnection ()->GetCid ()) // regular ranging interv
al |
1169 | 1169 |
1170 { | 1170 { |
1171 if (GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize () !
= 0) | 1171 if (GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize () !
= 0) |
1172 { | 1172 { |
1173 m_linkManager->SetNrRangingTransOpps ((ulMapIe.GetDuration ()
* GetPhy ()->GetPsPerSymbol ()) | 1173 m_linkManager->SetNrRangingTransOpps (static_cast<uint8_t> ((u
lMapIe.GetDuration () * GetPhy ()->GetPsPerSymbol ()) |
1174 / GetCurrentUcd ().GetCh
annelEncodings ().GetRangReqOppSize ()); | 1174 / GetCurrentUcd ().GetCh
annelEncodings ().GetRangReqOppSize ())); |
1175 | 1175 |
1176 } | 1176 } |
1177 | 1177 |
1178 if (GetState () == SS_STATE_WAITING_REG_RANG_INTRVL || GetState ()
== SS_STATE_ADJUSTING_PARAMETERS) | 1178 if (GetState () == SS_STATE_WAITING_REG_RANG_INTRVL || GetState ()
== SS_STATE_ADJUSTING_PARAMETERS) |
1179 { | 1179 { |
1180 m_linkManager->StartContentionResolution (); | 1180 m_linkManager->StartContentionResolution (); |
1181 } | 1181 } |
1182 | 1182 |
1183 } | 1183 } |
1184 } | 1184 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 if (GetState () == SS_STATE_STOPPED) | 1277 if (GetState () == SS_STATE_STOPPED) |
1278 { | 1278 { |
1279 Simulator::Cancel (eventId); // cancelling this event (already scheduled i
n function call) | 1279 Simulator::Cancel (eventId); // cancelling this event (already scheduled i
n function call) |
1280 return; | 1280 return; |
1281 } | 1281 } |
1282 | 1282 |
1283 event = eventId; | 1283 event = eventId; |
1284 } | 1284 } |
1285 | 1285 |
1286 } // namespace ns` | 1286 } // namespace ns` |
OLD | NEW |