00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef NS2EXT_WIFI_HELPER_H
00024 #define NS2EXT_WIFI_HELPER_H
00025
00026 #include "wifi-helper.h"
00027 #include "ns3/ns2ext-wifi-channel.h"
00028
00029 namespace ns3 {
00030
00031 class Ns2ExtWifiChannelHelper
00032 {
00033 public:
00034 Ns2ExtWifiChannelHelper ();
00035
00036 static Ns2ExtWifiChannelHelper Default (void);
00037
00038 void AddPropagationLoss (std::string name,
00039 std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
00040 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
00041 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
00042 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
00043 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
00044 std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
00045 std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
00046 std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
00047 void SetPropagationDelay (std::string name,
00048 std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
00049 std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
00050 std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
00051 std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
00052 std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
00053 std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
00054 std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
00055 std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
00056
00057 Ptr<Ns2ExtWifiChannel> Create (void) const;
00058
00059 private:
00060 std::vector<ObjectFactory> m_propagationLoss;
00061 ObjectFactory m_propagationDelay;
00062 };
00063
00064 class Ns2ExtWifiPhyHelper : public WifiPhyHelper
00065 {
00066 public:
00067 Ns2ExtWifiPhyHelper ();
00068
00069 static Ns2ExtWifiPhyHelper Default (void);
00070
00071 void SetChannel (Ptr<Ns2ExtWifiChannel> channel);
00072 void Set (std::string name, const AttributeValue &v);
00073
00074 virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<WifiNetDevice> device) const;
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid);
00089
00090
00091
00092
00093
00094
00095
00096 static void EnablePcap (std::string filename, NetDeviceContainer d);
00097
00098
00099
00100
00101
00102
00103
00104
00105 static void EnablePcap (std::string filename, NodeContainer n);
00106
00107
00108
00109
00110
00111
00112 static void EnablePcapAll (std::string filename);
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 static void EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid);
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 static void EnableAscii (std::ostream &os, NetDeviceContainer d);
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143 static void EnableAscii (std::ostream &os, NodeContainer n);
00144
00145
00146
00147
00148
00149
00150
00151 static void EnableAsciiAll (std::ostream &os);
00152
00153 private:
00154 ObjectFactory m_phy;
00155 Ptr<Ns2ExtWifiChannel> m_channel;
00156 };
00157
00158 }
00159
00160 #endif