|
|
| 38 |
class WifiChannel; |
38 |
class WifiChannel; |
| 39 |
class NetDevice; |
39 |
class NetDevice; |
| 40 |
|
40 |
|
|
|
41 |
struct snrDbm |
| 42 |
{ |
| 43 |
double signal; |
| 44 |
double noise; |
| 45 |
}; |
| 46 |
|
| 47 |
struct mpduInfo |
| 48 |
{ |
| 49 |
uint8_t packetType; |
| 50 |
uint32_t referenceNumber; |
| 51 |
}; |
| 52 |
|
| 41 |
/** |
53 |
/** |
| 42 |
* \brief receive notifications about phy events. |
54 |
* \brief receive notifications about phy events. |
| 43 |
*/ |
55 |
*/ |
|
|
| 209 |
* power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
221 |
* power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
| 210 |
* \param preamble the type of preamble to use to send this packet. |
222 |
* \param preamble the type of preamble to use to send this packet. |
| 211 |
* \param packetType the type of the packet 0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU |
223 |
* \param packetType the type of the packet 0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU |
|
|
224 |
* \param mpduReferenceNumber the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
| 212 |
*/ |
225 |
*/ |
| 213 |
virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType) = 0; |
226 |
virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType, uint32_t mpduReferenceNumber) = 0; |
| 214 |
|
227 |
|
| 215 |
/** |
228 |
/** |
| 216 |
* \param listener the new listener |
229 |
* \param listener the new listener |
|
|
| 997 |
* \param channelNumber the channel on which the packet is received |
1010 |
* \param channelNumber the channel on which the packet is received |
| 998 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
1011 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
| 999 |
* units used both for the radiotap and for the prism header) |
1012 |
* units used both for the radiotap and for the prism header) |
| 1000 |
* \param isShortPreamble true if short preamble is used, false otherwise |
1013 |
* \param preamble the preamble of the packet |
| 1001 |
* \param txVector the txvector that holds rx parameters |
1014 |
* \param txVector the txvector that holds rx parameters |
| 1002 |
* \param signalDbm signal power in dBm |
1015 |
* \param aMpdu the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) |
| 1003 |
* \param noiseDbm noise power in dBm |
1016 |
* and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
|
|
1017 |
* \param snr signal power and noise power in dBm |
| 1004 |
*/ |
1018 |
*/ |
| 1005 |
void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, |
1019 |
void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, |
| 1006 |
uint16_t channelNumber, uint32_t rate, |
1020 |
uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, |
| 1007 |
bool isShortPreamble, WifiTxVector txvector, |
1021 |
WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDbm snr); |
| 1008 |
double signalDbm, double noiseDbm); |
|
|
| 1009 |
|
1022 |
|
| 1010 |
/** |
1023 |
/** |
| 1011 |
* TracedCallback signature for monitor mode receive events. |
1024 |
* TracedCallback signature for monitor mode receive events. |
|
|
| 1022 |
* \param channelNumber the channel on which the packet is received |
1035 |
* \param channelNumber the channel on which the packet is received |
| 1023 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
1036 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
| 1024 |
* units used both for the radiotap and for the prism header) |
1037 |
* units used both for the radiotap and for the prism header) |
| 1025 |
* \param isShortPreamble true if short preamble is used, false otherwise |
1038 |
* \param preamble the preamble of the packet |
| 1026 |
* \param txVector the txvector that holds rx parameters |
1039 |
* \param txVector the txvector that holds rx parameters |
| 1027 |
* \param signalDbm signal power in dBm |
1040 |
* \param aMpdu the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) |
| 1028 |
* \param noiseDbm noise power in dBm |
1041 |
* and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
|
|
1042 |
* \param snr signal power and noise power in dBm |
| 1029 |
*/ |
1043 |
*/ |
| 1030 |
typedef void (* MonitorSnifferRxCallback)(Ptr<const Packet> packet, uint16_t channelFreqMhz, |
1044 |
typedef void (* MonitorSnifferRxCallback)(Ptr<const Packet> packet, uint16_t channelFreqMhz, |
| 1031 |
uint16_t channelNumber, uint32_t rate, |
1045 |
uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, |
| 1032 |
bool isShortPreamble, WifiTxVector txvector, |
1046 |
WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDbm snr); |
| 1033 |
double signalDbm, double noiseDbm); |
|
|
| 1034 |
|
1047 |
|
| 1035 |
/** |
1048 |
/** |
| 1036 |
* Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted. |
1049 |
* Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted. |
|
|
| 1042 |
* \param channelNumber the channel on which the packet is transmitted |
1055 |
* \param channelNumber the channel on which the packet is transmitted |
| 1043 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
1056 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
| 1044 |
* units used both for the radiotap and for the prism header) |
1057 |
* units used both for the radiotap and for the prism header) |
| 1045 |
* \param isShortPreamble true if short preamble is used, false otherwise |
1058 |
* \param preamble the preamble of the packet |
| 1046 |
* \param txVector the txvector that holds tx parameters |
1059 |
* \param txVector the txvector that holds tx parameters |
|
|
1060 |
* \param aMpdu the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) |
| 1061 |
* and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
| 1047 |
*/ |
1062 |
*/ |
| 1048 |
void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, |
1063 |
void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, |
| 1049 |
uint16_t channelNumber, uint32_t rate, |
1064 |
uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, |
| 1050 |
bool isShortPreamble, WifiTxVector txvector); |
1065 |
WifiTxVector txvector, struct mpduInfo aMpdu); |
| 1051 |
|
1066 |
|
| 1052 |
/** |
1067 |
/** |
| 1053 |
* TracedCallback signature for monitor mode transmit events. |
1068 |
* TracedCallback signature for monitor mode transmit events. |
|
|
| 1058 |
* \param channelNumber the channel on which the packet is transmitted |
1073 |
* \param channelNumber the channel on which the packet is transmitted |
| 1059 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
1074 |
* \param rate the PHY data rate in units of 500kbps (i.e., the same |
| 1060 |
* units used both for the radiotap and for the prism header) |
1075 |
* units used both for the radiotap and for the prism header) |
| 1061 |
* \param isShortPreamble true if short preamble is used, false otherwise |
1076 |
* \param preamble the preamble of the packet |
| 1062 |
* \param txVector the txvector that holds tx parameters |
1077 |
* \param txVector the txvector that holds tx parameters |
|
|
1078 |
* \param aMpdu the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) |
| 1079 |
* and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) |
| 1063 |
*/ |
1080 |
*/ |
| 1064 |
typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet, uint16_t channelFreqMhz, |
1081 |
typedef void (* MonitorSnifferTxCallback)(const Ptr<const Packet> packet, uint16_t channelFreqMhz, |
| 1065 |
uint16_t channelNumber, uint32_t rate, |
1082 |
uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, |
| 1066 |
bool isShortPreamble, WifiTxVector txvector); |
1083 |
WifiTxVector txvector, struct mpduInfo aMpdu); |
| 1067 |
|
1084 |
|
| 1068 |
/** |
1085 |
/** |
| 1069 |
* Assign a fixed random variable stream number to the random variables |
1086 |
* Assign a fixed random variable stream number to the random variables |
|
|
| 1199 |
* |
1216 |
* |
| 1200 |
* \see class CallBackTraceSource |
1217 |
* \see class CallBackTraceSource |
| 1201 |
*/ |
1218 |
*/ |
| 1202 |
TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool, WifiTxVector, double, double> m_phyMonitorSniffRxTrace; |
1219 |
TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, WifiPreamble, WifiTxVector, struct mpduInfo, struct snrDbm> m_phyMonitorSniffRxTrace; |
| 1203 |
|
1220 |
|
| 1204 |
/** |
1221 |
/** |
| 1205 |
* A trace source that emulates a wifi device in monitor mode |
1222 |
* A trace source that emulates a wifi device in monitor mode |
|
|
| 1211 |
* |
1228 |
* |
| 1212 |
* \see class CallBackTraceSource |
1229 |
* \see class CallBackTraceSource |
| 1213 |
*/ |
1230 |
*/ |
| 1214 |
TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool, WifiTxVector> m_phyMonitorSniffTxTrace; |
1231 |
TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, WifiPreamble, WifiTxVector, struct mpduInfo> m_phyMonitorSniffTxTrace; |
| 1215 |
|
1232 |
|
| 1216 |
uint32_t m_totalAmpduNumSymbols; //!< Number of symbols previously transmitted for the MPDUs in an A-MPDU, used for the computation of the number of symbols needed for the last MPDU in the A-MPDU |
1233 |
uint32_t m_totalAmpduNumSymbols; //!< Number of symbols previously transmitted for the MPDUs in an A-MPDU, used for the computation of the number of symbols needed for the last MPDU in the A-MPDU |
| 1217 |
uint32_t m_totalAmpduSize; //!< Total size of the previously transmitted MPDUs in an A-MPDU, used for the computation of the number of symbols needed for the last MPDU in the A-MPDU |
1234 |
uint32_t m_totalAmpduSize; //!< Total size of the previously transmitted MPDUs in an A-MPDU, used for the computation of the number of symbols needed for the last MPDU in the A-MPDU |