37 WifiNetDevice::GetTypeId (void) |
37 WifiNetDevice::GetTypeId (void) |
38 { |
38 { |
39 static TypeId tid = TypeId ("ns3::WifiNetDevice") |
39 static TypeId tid = TypeId ("ns3::WifiNetDevice") |
40 .SetParent<NetDevice> () |
40 .SetParent<NetDevice> () |
41 .AddAttribute ("Channel", "The channel attached to this device", |
41 .AddAttribute ("Channel", "The channel attached to this device", |
42 Pointer (), |
42 PointerValue (), |
43 MakePointerAccessor (&WifiNetDevice::DoGetChannel, |
43 MakePointerAccessor (&WifiNetDevice::DoGetChannel, |
44 &WifiNetDevice::SetChannel), |
44 &WifiNetDevice::SetChannel), |
45 MakePointerChecker<WifiChannel> ()) |
45 MakePointerChecker<WifiChannel> ()) |
46 .AddAttribute ("Phy", "The PHY layer attached to this device.", |
46 .AddAttribute ("Phy", "The PHY layer attached to this device.", |
47 Pointer (), |
47 PointerValue (), |
48 MakePointerAccessor (&WifiNetDevice::GetPhy, |
48 MakePointerAccessor (&WifiNetDevice::GetPhy, |
49 &WifiNetDevice::SetPhy), |
49 &WifiNetDevice::SetPhy), |
50 MakePointerChecker<WifiPhy> ()) |
50 MakePointerChecker<WifiPhy> ()) |
51 .AddAttribute ("Mac", "The MAC layer attached to this device.", |
51 .AddAttribute ("Mac", "The MAC layer attached to this device.", |
52 Pointer (), |
52 PointerValue (), |
53 MakePointerAccessor (&WifiNetDevice::GetMac, |
53 MakePointerAccessor (&WifiNetDevice::GetMac, |
54 &WifiNetDevice::SetMac), |
54 &WifiNetDevice::SetMac), |
55 MakePointerChecker<WifiMac> ()) |
55 MakePointerChecker<WifiMac> ()) |
56 .AddAttribute ("RemoteStationManager", "The station manager attached to this device.", |
56 .AddAttribute ("RemoteStationManager", "The station manager attached to this device.", |
57 Pointer (), |
57 PointerValue (), |
58 MakePointerAccessor (&WifiNetDevice::SetRemoteStationManager, |
58 MakePointerAccessor (&WifiNetDevice::SetRemoteStationManager, |
59 &WifiNetDevice::GetRemoteStationManager), |
59 &WifiNetDevice::GetRemoteStationManager), |
60 MakePointerChecker<WifiRemoteStationManager> ()) |
60 MakePointerChecker<WifiRemoteStationManager> ()) |
61 .AddTraceSource ("Rx", "Received payload from the MAC layer.", |
61 .AddTraceSource ("Rx", "Received payload from the MAC layer.", |
62 MakeTraceSourceAccessor (&WifiNetDevice::m_rxLogger)) |
62 MakeTraceSourceAccessor (&WifiNetDevice::m_rxLogger)) |