A Discrete-Event Network Simulator
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
11namespace ns3
12{
13
15
17 : m_txModeIndex(0)
18{
19}
20
23{
24 static TypeId tid = TypeId("ns3::UanMac").SetParent<Object>().SetGroupName("Uan");
25 return tid;
26}
27
28void
30{
31 m_txModeIndex = txModeIndex;
32}
33
36{
37 return m_txModeIndex;
38}
39
42{
43 return m_address;
44}
45
46void
48{
49 m_address = addr;
50}
51
54{
55 Mac8Address broadcast = Mac8Address(255);
56 return broadcast;
57}
58
59} // namespace ns3
a polymophic address class
Definition address.h:90
A class used for addressing MAC8 MAC's.
A base class which provides memory management and object aggregation.
Definition object.h:78
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
void SetTxModeIndex(uint32_t txModeIndex)
Set the Tx mode index (Modulation type).
Definition uan-mac.cc:29
uint32_t GetTxModeIndex() const
Get the Tx mode index (Modulation type).
Definition uan-mac.cc:35
virtual void SetAddress(Mac8Address addr)
Set the address.
Definition uan-mac.cc:47
uint32_t m_txModeIndex
Modulation type.
Definition uan-mac.h:129
Mac8Address m_address
The MAC address.
Definition uan-mac.h:131
virtual Address GetBroadcast() const
Get the broadcast address.
Definition uan-mac.cc:53
virtual Address GetAddress()
Get the MAC Address.
Definition uan-mac.cc:41
UanMac()
Default constructor.
Definition uan-mac.cc:16
static TypeId GetTypeId()
Register this type.
Definition uan-mac.cc:22
#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.