ConnectTo -> Attach
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 29 Nov 2007 15:50:15 +0100
changeset 2169 06af4e3c25a2
parent 2168 e076c907a143
child 2170 b24ae0343c4f
ConnectTo -> Attach
samples/main-adhoc-wifi.cc
samples/main-ap-wifi.cc
src/devices/wifi/wifi-net-device.cc
src/devices/wifi/wifi-net-device.h
--- a/samples/main-adhoc-wifi.cc	Thu Nov 29 15:45:12 2007 +0100
+++ b/samples/main-adhoc-wifi.cc	Thu Nov 29 15:50:15 2007 +0100
@@ -47,7 +47,7 @@
 {
   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);
--- a/samples/main-ap-wifi.cc	Thu Nov 29 15:45:12 2007 +0100
+++ b/samples/main-ap-wifi.cc	Thu Nov 29 15:50:15 2007 +0100
@@ -75,7 +75,7 @@
   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 @@
   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);
--- a/src/devices/wifi/wifi-net-device.cc	Thu Nov 29 15:45:12 2007 +0100
+++ b/src/devices/wifi/wifi-net-device.cc	Thu Nov 29 15:50:15 2007 +0100
@@ -292,11 +292,11 @@
 }
 
 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 @@
   return true;
 }
 void
-AdhocWifiNetDevice::NotifyConnected (void)
+AdhocWifiNetDevice::NotifyAttached (void)
 {
   NotifyLinkUp ();
 }
@@ -496,7 +496,7 @@
   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 @@
   return true;
 }
 void
-NqapWifiNetDevice::NotifyConnected (void)
+NqapWifiNetDevice::NotifyAttached (void)
 {
   NotifyLinkUp ();
 }
--- a/src/devices/wifi/wifi-net-device.h	Thu Nov 29 15:45:12 2007 +0100
+++ b/src/devices/wifi/wifi-net-device.h	Thu Nov 29 15:50:15 2007 +0100
@@ -80,7 +80,7 @@
    * \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 @@
   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 @@
   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 @@
   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 @@
 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;