A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
uan-mac.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 University of Washington
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mitch Watrous <watrous@u.washington.edu>
7
*/
8
9
#include "
uan-mac.h
"
10
11
namespace
ns3
12
{
13
14
NS_OBJECT_ENSURE_REGISTERED
(UanMac);
15
16
UanMac::UanMac
()
17
: m_txModeIndex(0)
18
{
19
}
20
21
TypeId
22
UanMac::GetTypeId
()
23
{
24
static
TypeId
tid =
TypeId
(
"ns3::UanMac"
).
SetParent
<
Object
>().SetGroupName(
"Uan"
);
25
return
tid;
26
}
27
28
void
29
UanMac::SetTxModeIndex
(
uint32_t
txModeIndex)
30
{
31
m_txModeIndex
= txModeIndex;
32
}
33
34
uint32_t
35
UanMac::GetTxModeIndex
()
const
36
{
37
return
m_txModeIndex
;
38
}
39
40
Address
41
UanMac::GetAddress
()
42
{
43
return
m_address
;
44
}
45
46
void
47
UanMac::SetAddress
(
Mac8Address
addr)
48
{
49
m_address
= addr;
50
}
51
52
Address
53
UanMac::GetBroadcast
()
const
54
{
55
Mac8Address
broadcast =
Mac8Address
(255);
56
return
broadcast;
57
}
58
59
}
// namespace ns3
ns3::Address
a polymophic address class
Definition
address.h:90
ns3::Mac8Address
A class used for addressing MAC8 MAC's.
Definition
mac8-address.h:33
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::UanMac::SetTxModeIndex
void SetTxModeIndex(uint32_t txModeIndex)
Set the Tx mode index (Modulation type).
Definition
uan-mac.cc:29
ns3::UanMac::GetTxModeIndex
uint32_t GetTxModeIndex() const
Get the Tx mode index (Modulation type).
Definition
uan-mac.cc:35
ns3::UanMac::SetAddress
virtual void SetAddress(Mac8Address addr)
Set the address.
Definition
uan-mac.cc:47
ns3::UanMac::m_txModeIndex
uint32_t m_txModeIndex
Modulation type.
Definition
uan-mac.h:129
ns3::UanMac::m_address
Mac8Address m_address
The MAC address.
Definition
uan-mac.h:131
ns3::UanMac::GetBroadcast
virtual Address GetBroadcast() const
Get the broadcast address.
Definition
uan-mac.cc:53
ns3::UanMac::GetAddress
virtual Address GetAddress()
Get the MAC Address.
Definition
uan-mac.cc:41
ns3::UanMac::UanMac
UanMac()
Default constructor.
Definition
uan-mac.cc:16
ns3::UanMac::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition
uan-mac.cc:22
uint32_t
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uan-mac.h
src
uan
model
uan-mac.cc
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0