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 CTTC | 3 * Copyright (c) 2009 CTTC |
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 void | 215 void |
216 AthstatsWifiTraceSink::PhyRxErrorTrace (std::string context, Ptr<const Packet> p
acket, double snr) | 216 AthstatsWifiTraceSink::PhyRxErrorTrace (std::string context, Ptr<const Packet> p
acket, double snr) |
217 { | 217 { |
218 NS_LOG_FUNCTION (this << context << packet << " snr=" << snr ); | 218 NS_LOG_FUNCTION (this << context << packet << " snr=" << snr ); |
219 ++m_phyRxErrorCount; | 219 ++m_phyRxErrorCount; |
220 } | 220 } |
221 | 221 |
222 void | 222 void |
223 AthstatsWifiTraceSink::PhyTxTrace (std::string context, Ptr<const Packet> packet
, WifiMode mode, WifiPreamble preamble, uint8_t txPower) | 223 AthstatsWifiTraceSink::PhyTxTrace (std::string context, Ptr<const Packet> packet
, WifiMode mode, WifiPreamble preamble, uint8_t txPower) |
224 { | 224 { |
225 NS_LOG_FUNCTION (this << context << packet << "PHYTX mode=" << mode ); | 225 NS_LOG_FUNCTION (this << context << packet << "PHYTX mode=" << mode << "Preamb
le=" << preamble << "Power=" << txPower); |
226 ++m_phyTxCount; | 226 ++m_phyTxCount; |
227 } | 227 } |
228 | 228 |
229 void | 229 void |
230 AthstatsWifiTraceSink::PhyStateTrace (std::string context, Time start, Time dura
tion, WifiPhy::State state) | 230 AthstatsWifiTraceSink::PhyStateTrace (std::string context, Time start, Time dura
tion, WifiPhy::State state) |
231 { | 231 { |
232 NS_LOG_FUNCTION (this << context << start << duration << state); | 232 NS_LOG_FUNCTION (this << context << start << duration << state); |
233 | |
234 } | 233 } |
235 | 234 |
236 void | 235 void |
237 AthstatsWifiTraceSink::Open (std::string const &name) | 236 AthstatsWifiTraceSink::Open (std::string const &name) |
238 { | 237 { |
239 NS_LOG_FUNCTION (this << name); | 238 NS_LOG_FUNCTION (this << name); |
240 NS_ABORT_MSG_UNLESS (m_writer == 0, "AthstatsWifiTraceSink::Open (): m_writer
already allocated (std::ofstream leak detected)"); | 239 NS_ABORT_MSG_UNLESS (m_writer == 0, "AthstatsWifiTraceSink::Open (): m_writer
already allocated (std::ofstream leak detected)"); |
241 | 240 |
242 m_writer = new std::ofstream (); | 241 m_writer = new std::ofstream (); |
243 NS_ABORT_MSG_UNLESS (m_writer, "AthstatsWifiTraceSink::Open (): Cannot allocat
e m_writer"); | 242 NS_ABORT_MSG_UNLESS (m_writer, "AthstatsWifiTraceSink::Open (): Cannot allocat
e m_writer"); |
244 | 243 |
245 NS_LOG_LOGIC ("Created writer " << m_writer); | 244 NS_LOG_LOGIC ("Created writer " << m_writer); |
246 | 245 |
(...skipping 30 matching lines...) Expand all Loading... |
277 { | 276 { |
278 | 277 |
279 *m_writer << str; | 278 *m_writer << str; |
280 | 279 |
281 ResetCounters (); | 280 ResetCounters (); |
282 Simulator::Schedule (m_interval, &AthstatsWifiTraceSink::WriteStats, this)
; | 281 Simulator::Schedule (m_interval, &AthstatsWifiTraceSink::WriteStats, this)
; |
283 } | 282 } |
284 } | 283 } |
285 | 284 |
286 } //namespace ns3 | 285 } //namespace ns3 |
OLD | NEW |