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) 2009 University of Washington | 3 * Copyright (c) 2009 University of Washington |
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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 { | 824 { |
825 m_state = CCABUSY; | 825 m_state = CCABUSY; |
826 NotifyListenersCcaStart (); | 826 NotifyListenersCcaStart (); |
827 } | 827 } |
828 | 828 |
829 } | 829 } |
830 | 830 |
831 void | 831 void |
832 UanPhyGen::RxEndEvent (Ptr<Packet> pkt, double rxPowerDb, UanTxMode txMode) | 832 UanPhyGen::RxEndEvent (Ptr<Packet> pkt, double rxPowerDb, UanTxMode txMode) |
833 { | 833 { |
| 834 NS_UNUSED(rxPowerDb); |
834 if (pkt != m_pktRx) | 835 if (pkt != m_pktRx) |
835 { | 836 { |
836 return; | 837 return; |
837 } | 838 } |
838 | 839 |
839 if (m_state == DISABLED || m_state == SLEEP) | 840 if (m_state == DISABLED || m_state == SLEEP) |
840 { | 841 { |
841 NS_LOG_DEBUG ("Sleep mode or dead. Dropping packet"); | 842 NS_LOG_DEBUG ("Sleep mode or dead. Dropping packet"); |
842 m_pktRx = 0; | 843 m_pktRx = 0; |
843 NotifyRxDrop (pkt); // traced source netanim | 844 NotifyRxDrop (pkt); // traced source netanim |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 UanPhyGen::AssignStreams (int64_t stream) | 1034 UanPhyGen::AssignStreams (int64_t stream) |
1034 { | 1035 { |
1035 NS_LOG_FUNCTION (this << stream); | 1036 NS_LOG_FUNCTION (this << stream); |
1036 m_pg->SetStream (stream); | 1037 m_pg->SetStream (stream); |
1037 return 1; | 1038 return 1; |
1038 } | 1039 } |
1039 | 1040 |
1040 void | 1041 void |
1041 UanPhyGen::NotifyTransStartTx (Ptr<Packet> packet, double txPowerDb, UanTxMode t
xMode) | 1042 UanPhyGen::NotifyTransStartTx (Ptr<Packet> packet, double txPowerDb, UanTxMode t
xMode) |
1042 { | 1043 { |
| 1044 NS_UNUSED(txPowerDb); |
1043 if (m_pktRx) | 1045 if (m_pktRx) |
1044 { | 1046 { |
1045 m_minRxSinrDb = -1e30; | 1047 m_minRxSinrDb = -1e30; |
1046 } | 1048 } |
1047 } | 1049 } |
1048 | 1050 |
1049 void | 1051 void |
1050 UanPhyGen::NotifyIntChange (void) | 1052 UanPhyGen::NotifyIntChange (void) |
1051 { | 1053 { |
1052 if (m_state == CCABUSY && GetInterferenceDb (Ptr<Packet> ()) < m_ccaThreshDb) | 1054 if (m_state == CCABUSY && GetInterferenceDb (Ptr<Packet> ()) < m_ccaThreshDb) |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 } | 1170 } |
1169 | 1171 |
1170 Ptr<Packet> | 1172 Ptr<Packet> |
1171 UanPhyGen::GetPacketRx (void) const | 1173 UanPhyGen::GetPacketRx (void) const |
1172 { | 1174 { |
1173 return m_pktRx; | 1175 return m_pktRx; |
1174 } | 1176 } |
1175 | 1177 |
1176 | 1178 |
1177 } // namespace ns3 | 1179 } // namespace ns3 |
OLD | NEW |