ConnectTo -> Attach
This commit is contained in:
@@ -47,7 +47,7 @@ CreateAdhocNode (Ptr<WifiChannel> channel,
|
||||
{
|
||||
Ptr<Node> node = Create<Node> ();
|
||||
Ptr<AdhocWifiNetDevice> device = Create<AdhocWifiNetDevice> (node, Mac48Address (address));
|
||||
device->ConnectTo (channel);
|
||||
device->Attach (channel);
|
||||
Ptr<MobilityModel> mobility = Create<StaticMobilityModel> ();
|
||||
mobility->SetPosition (position);
|
||||
node->AddInterface (mobility);
|
||||
|
||||
@@ -75,7 +75,7 @@ CreateApNode (Ptr<WifiChannel> channel,
|
||||
Ptr<NqapWifiNetDevice> device = Create<NqapWifiNetDevice> (node, Mac48Address (macAddress));
|
||||
device->SetSsid (ssid);
|
||||
Simulator::Schedule (at, &NqapWifiNetDevice::StartBeaconing, device);
|
||||
device->ConnectTo (channel);
|
||||
device->Attach (channel);
|
||||
Ptr<MobilityModel> mobility = Create<StaticMobilityModel> ();
|
||||
mobility->SetPosition (position);
|
||||
node->AddInterface (mobility);
|
||||
@@ -92,7 +92,7 @@ CreateStaNode (Ptr<WifiChannel> channel,
|
||||
Ptr<NqstaWifiNetDevice> device = Create<NqstaWifiNetDevice> (node, Mac48Address (macAddress));
|
||||
Simulator::ScheduleNow (&NqstaWifiNetDevice::StartActiveAssociation, device,
|
||||
ssid);
|
||||
device->ConnectTo (channel);
|
||||
device->Attach (channel);
|
||||
Ptr<MobilityModel> mobility = Create<StaticMobilityModel> ();
|
||||
mobility->SetPosition (position);
|
||||
node->AddInterface (mobility);
|
||||
|
||||
@@ -292,11 +292,11 @@ WifiNetDevice::GetTraceResolver (void) const
|
||||
}
|
||||
|
||||
void
|
||||
WifiNetDevice::ConnectTo (Ptr<WifiChannel> channel)
|
||||
WifiNetDevice::Attach (Ptr<WifiChannel> channel)
|
||||
{
|
||||
m_channel = channel;
|
||||
m_phy->SetChannel (channel);
|
||||
NotifyConnected ();
|
||||
NotifyAttached ();
|
||||
}
|
||||
bool
|
||||
WifiNetDevice::SendTo (Ptr<Packet> packet, const Address &to, uint16_t protocolNumber)
|
||||
@@ -419,7 +419,7 @@ AdhocWifiNetDevice::DoSendTo (Ptr<const Packet> packet, Mac48Address const &to)
|
||||
return true;
|
||||
}
|
||||
void
|
||||
AdhocWifiNetDevice::NotifyConnected (void)
|
||||
AdhocWifiNetDevice::NotifyAttached (void)
|
||||
{
|
||||
NotifyLinkUp ();
|
||||
}
|
||||
@@ -496,7 +496,7 @@ NqstaWifiNetDevice::DoSendTo (Ptr<const Packet> packet, Mac48Address const &to)
|
||||
return true;
|
||||
}
|
||||
void
|
||||
NqstaWifiNetDevice::NotifyConnected (void)
|
||||
NqstaWifiNetDevice::NotifyAttached (void)
|
||||
{
|
||||
// do nothing because link status is kept track of in
|
||||
// ::Associated and ::Disassociated
|
||||
@@ -603,7 +603,7 @@ NqapWifiNetDevice::DoSendTo (Ptr<const Packet> packet, Mac48Address const & to)
|
||||
return true;
|
||||
}
|
||||
void
|
||||
NqapWifiNetDevice::NotifyConnected (void)
|
||||
NqapWifiNetDevice::NotifyAttached (void)
|
||||
{
|
||||
NotifyLinkUp ();
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
* \param channel the channel to connect this 802.11
|
||||
* interface to.
|
||||
*/
|
||||
void ConnectTo (Ptr<WifiChannel> channel);
|
||||
void Attach (Ptr<WifiChannel> channel);
|
||||
|
||||
/**
|
||||
* \returns the Mac48Address of this 802.11 interface.
|
||||
@@ -108,7 +108,7 @@ private:
|
||||
virtual bool SendTo (Ptr<Packet> packet, const Address &to, uint16_t protocolNumber);
|
||||
virtual Ptr<TraceResolver> GetTraceResolver (void) const;
|
||||
// defined for children
|
||||
virtual void NotifyConnected (void) = 0;
|
||||
virtual void NotifyAttached (void) = 0;
|
||||
virtual bool DoSendTo (Ptr<const Packet> packet, const Mac48Address &to) = 0;
|
||||
// private helper
|
||||
void Construct (void);
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
void DoConstruct (void);
|
||||
void ForwardUp (void);
|
||||
virtual bool DoSendTo (Ptr<const Packet> packet, Mac48Address const & to);
|
||||
virtual void NotifyConnected (void);
|
||||
virtual void NotifyAttached (void);
|
||||
|
||||
Ssid m_ssid;
|
||||
DcaTxop *m_dca;
|
||||
@@ -200,7 +200,7 @@ private:
|
||||
void Associated (void);
|
||||
void DisAssociated (void);
|
||||
virtual bool DoSendTo (Ptr<const Packet> packet, Mac48Address const & to);
|
||||
virtual void NotifyConnected (void);
|
||||
virtual void NotifyAttached (void);
|
||||
Ssid m_ssid;
|
||||
DcaTxop *m_dca;
|
||||
MacHighNqsta *m_high;
|
||||
@@ -233,7 +233,7 @@ protected:
|
||||
private:
|
||||
void DoConstruct (void);
|
||||
virtual bool DoSendTo (Ptr<const Packet> packet, Mac48Address const & to);
|
||||
virtual void NotifyConnected (void);
|
||||
virtual void NotifyAttached (void);
|
||||
Ssid m_ssid;
|
||||
DcaTxop *m_dca;
|
||||
DcaTxop *m_beaconDca;
|
||||
|
||||
Reference in New Issue
Block a user