A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wimax-channel.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 */
8
9#include "wimax-channel.h"
10
11#include "wimax-phy.h"
12
13#include "ns3/assert.h"
14#include "ns3/net-device.h"
15
16namespace ns3
17{
18
19NS_LOG_COMPONENT_DEFINE("WimaxChannel");
20
21NS_OBJECT_ENSURE_REGISTERED(WimaxChannel);
22
23TypeId
25{
26 static TypeId tid = TypeId("ns3::WimaxChannel").SetParent<Channel>().SetGroupName("Wimax");
27 return tid;
28}
29
33
37
38void
43
44std::size_t
46{
47 return DoGetNDevices();
48}
49
51WimaxChannel::GetDevice(std::size_t index) const
52{
53 return DoGetDevice(index);
54}
55
56} // namespace ns3
Abstract Channel Base Class.
Definition channel.h:34
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
std::size_t GetNDevices() const override
static TypeId GetTypeId()
Get the type ID.
virtual std::size_t DoGetNDevices() const =0
Get number of devices on the channel.
void Attach(Ptr< WimaxPhy > phy)
attach the channel to a physical layer of a device
~WimaxChannel() override
virtual void DoAttach(Ptr< WimaxPhy > phy)=0
Attach a phy to the channel.
virtual Ptr< NetDevice > DoGetDevice(std::size_t i) const =0
Get device corresponding to index.
Ptr< NetDevice > GetDevice(std::size_t i) const override
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Every class exported by the ns3 library is enclosed in the ns3 namespace.