A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
uan-mac.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Leonard Tracy <lentracy@gmail.com>
19
*/
20
21
#ifndef UAN_MAC_H
22
#define UAN_MAC_H
23
24
#include "ns3/address.h"
25
#include "ns3/object.h"
26
#include "ns3/packet.h"
27
28
#include "ns3/address.h"
29
#include "ns3/nstime.h"
30
#include "ns3/ptr.h"
31
32
namespace
ns3
{
33
34
class
UanPhy;
35
class
UanChannel;
36
class
UanNetDevice;
37
class
UanTransducer;
38
class
UanTxMode;
39
class
UanAddress;
40
41
42
48
class
UanMac
:
public
Object
49
{
50
public
:
55
static
TypeId
GetTypeId
(
void
);
56
62
virtual
Address
GetAddress
(
void
) = 0;
63
69
virtual
void
SetAddress
(
UanAddress
addr) = 0;
70
79
virtual
bool
Enqueue
(
Ptr<Packet>
pkt,
const
Address
&dest, uint16_t protocolNumber) = 0;
87
virtual
void
SetForwardUpCb
(
Callback
<
void
,
Ptr<Packet>
,
const
UanAddress
&> cb) = 0;
88
97
virtual
void
AttachPhy
(
Ptr<UanPhy>
phy) = 0;
98
104
virtual
Address
GetBroadcast
(
void
)
const
= 0;
105
107
virtual
void
Clear
(
void
) = 0;
108
117
virtual
int64_t
AssignStreams
(int64_t stream) = 0;
118
125
typedef
void (*
PacketModeTracedCallback
)
126
(
const
Ptr<const Packet>
packet,
const
UanTxMode
& mode);
127
128
};
// class UanMac
129
130
}
// namespace ns3
131
132
#endif
/* UAN_MAC_H */
ns3::UanMac::Enqueue
virtual bool Enqueue(Ptr< Packet > pkt, const Address &dest, uint16_t protocolNumber)=0
Enqueue packet to be transmitted.
ns3::UanMac::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition:
uan-mac.cc:27
ns3::Ptr< Packet >
ns3::Callback
Callback template class.
Definition:
callback.h:978
ns3::UanMac::AssignStreams
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model...
ns3::Address
a polymophic address class
Definition:
address.h:90
ns3::UanMac
Virtual base class for all UAN MAC protocols.
Definition:
uan-mac.h:48
ns3::UanMac::GetAddress
virtual Address GetAddress(void)=0
Get the MAC Address.
ns3::UanAddress
A class used for addressing UAN MAC's.
Definition:
uan-address.h:40
ns3::UanTxMode
Abstraction of packet modulation information.
Definition:
uan-tx-mode.h:41
ns3::UanMac::GetBroadcast
virtual Address GetBroadcast(void) const =0
Get the broadcast address.
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::UanMac::SetAddress
virtual void SetAddress(UanAddress addr)=0
Set the address.
ns3::UanMac::SetForwardUpCb
virtual void SetForwardUpCb(Callback< void, Ptr< Packet >, const UanAddress & > cb)=0
Set the callback to forward packets up to higher layers.
ns3::UanMac::Clear
virtual void Clear(void)=0
Clears all pointer references.
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:87
ns3::UanMac::AttachPhy
virtual void AttachPhy(Ptr< UanPhy > phy)=0
Attach PHY layer to this MAC.
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:51
ns3::UanMac::PacketModeTracedCallback
void(* PacketModeTracedCallback)(const Ptr< const Packet > packet, const UanTxMode &mode)
TracedCallback signature for packet reception/enqueue/dequeue events.
Definition:
uan-mac.h:126
src
uan
model
uan-mac.h
Generated on Thu Feb 5 2015 18:33:54 for ns-3 by
1.8.9.1