cohydra.channel.wifi¶
Wireless channel.
Classes
A WiFiChannel is a physical (but of course wireless) connection between two or more wireless devices. |
-
class
cohydra.channel.wifi.
WiFiChannel
(network, nodes, frequency=None, channel=1, channel_width=40, antennas=1, tx_power=20.0, standard: cohydra.channel.wifi.WiFiChannel.WiFiStandard = <WiFiStandard.WIFI_802_11b: 1>, data_rate: cohydra.channel.wifi.WiFiChannel.WiFiDataRate = <WiFiDataRate.DSSS_RATE_11Mbps: 'DsssRate11Mbps'>)[source]¶ Bases:
cohydra.channel.channel.Channel
A WiFiChannel is a physical (but of course wireless) connection between two or more wireless devices.
Further information can be found reading the ns-3 source here.
- Parameters
channel (int) – The WiFi channel to use. This will be ignored if frequency is set.
frequency (int) – The frequency of the wireless channel in MHz.
channel_width (int) – The width of the channel in MHz. Valid values are
5
,10
,20
,22
,40
,80
,160
.antennas (int) – The number of antennas / spatial streams to use.
tx_power (float) – The sending power in dBm.
standard (
WiFiStandard
) – The WiFi standard to use.data_rate (
WiFiDataRate
) – The WiFi data rate to use. Please make sure to pick a valid data rate for yourstandard
.
-
class
WiFiStandard
[source]¶ Bases:
enum.Enum
All available WiFi standards.
See here for further information: https://en.wikipedia.org/wiki/IEEE_802.11.
-
WIFI_802_11a
= 0¶ The first WiFi standard from 1999.
-
WIFI_802_11b
= 1¶ Standard with maximum raw data rate of 11 Mbit/s.
-
WIFI_802_11g
= 2¶ Standard with maximum raw bitrate of 54 Mbit/s in 2.4GHz band.
-
WIFI_802_11n
= 7¶ Standard from 2009 in 2.4GHz band.
-
WIFI_802_11n_5G
= 8¶ Standard from 2009 in 5GHz band.
-
WIFI_802_11ac
= 10¶ Standard from 2013.
-
WIFI_802_11ax
= 11¶ “WiFi 6”.
-
WIFI_802_11p
= 3¶
-
-
class
WiFiDataRate
[source]¶ Bases:
enum.Enum
All available WiFi data rates.
Choosing the correct and best data rate depends on the standard you are using. The data rate list is incomplete. Please consider reading the ns-3 source here. You can pass another valid string to the channel, too.
-
OFDM_RATE_6Mbps
= 'OfdmRate6Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_9Mbps
= 'OfdmRate9Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_12Mbps
= 'OfdmRate12Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_18Mbps
= 'OfdmRate18Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_24Mbps
= 'OfdmRate24Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_36Mbps
= 'OfdmRate36Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_48Mbps
= 'OfdmRate48Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
OFDM_RATE_54Mbps
= 'OfdmRate54Mbps'¶ Use with
WiFiStandard.WIFI_802_11a
.
-
DSSS_RATE_1Mbps
= 'DsssRate1Mbps'¶ Use with
WiFiStandard.WIFI_802_11b
,WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
DSSS_RATE_2Mbps
= 'DsssRate2Mbps'¶ Use with
WiFiStandard.WIFI_802_11b
,WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
DSSS_RATE_5_5Mbps
= 'DsssRate5_5Mbps'¶ Use with
WiFiStandard.WIFI_802_11b
,WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
DSSS_RATE_11Mbps
= 'DsssRate11Mbps'¶ Use with
WiFiStandard.WIFI_802_11b
,WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_6Mbps
= 'ErpOfdmRate6Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_9Mbps
= 'ErpOfdmRate9Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_12Mbps
= 'ErpOfdmRate12Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_18Mbps
= 'ErpOfdmRate18Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_24Mbps
= 'ErpOfdmRate24Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_36Mbps
= 'ErpOfdmRate36Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_48Mbps
= 'ErpOfdmRate48Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
ERP_OFDM_RATE_54Mbps
= 'ErpOfdmRate54Mbps'¶ Use with
WiFiStandard.WIFI_802_11g
,WiFiStandard.WIFI_802_11ac
orWiFiStandard.WIFI_802_11ax
.
-
OFDM_RATE_BW_3Mbps
= 'OfdmRate3MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_4_5Mbps
= 'OfdmRate4_5MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_6Mbps
= 'OfdmRate6MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_9Mbps
= 'OfdmRate9MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_12Mbps
= 'OfdmRate12MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_18Mbps
= 'OfdmRate18MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_24Mbps
= 'OfdmRate24MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
OFDM_RATE_BW_27Mbps
= 'OfdmRate27MbpsBW10MHz'¶ Use with
WiFiStandard.WIFI_802_11p
.
-
-
channel
= None¶ The channel to use.
-
frequency
= None¶ The frequency to use.
This could collide with other WiFi channels.
-
channel_width
= None¶ The width of the channel in MHz.
-
antennas
= None¶ The number of antennas to use.
-
tx_power
= None¶ The sending power in dBm.
-
standard
= None¶ The WiFi standard to use.
-
data_rate
= None¶ The data rate to use.
-
property
nodes
¶ Return all nodes of this channel.
- Returns
The list of nodes in this channel.
- Return type
list of
Node
-
wifi
= None¶ Helper for creating the WiFi channel.
-
wifi_mac_helper
= None¶ Helper for creating MAC layers.
-
devices_container
= None¶ All ns-3 devices on this channel.
-
prepare
(simulation)[source]¶ Prepare the channel (for logging).
- Parameters
simulation (
Simulation
) – The simulation to prepare the channel for.
Inheritance Diagramm