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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
uan-channel.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_CHANNEL_H
22
#define UAN_CHANNEL_H
23
24
#include "ns3/net-device.h"
25
#include "ns3/channel.h"
26
#include "ns3/packet.h"
27
#include "ns3/uan-prop-model.h"
28
#include "ns3/uan-noise-model.h"
29
30
#include <list>
31
#include <vector>
32
33
namespace
ns3 {
34
35
class
UanNetDevice;
36
class
UanPhy;
37
class
UanTransducer;
38
class
UanTxMode;
39
44
class
UanChannel
:
public
Channel
45
{
46
public
:
50
typedef
std::vector<std::pair<Ptr<UanNetDevice>,
Ptr<UanTransducer>
> >
UanDeviceList
;
51
52
53
UanChannel
();
54
virtual
~UanChannel
();
55
56
static
TypeId
GetTypeId
();
57
58
// Methods inherrited from base class
59
virtual
uint32_t
GetNDevices
(
void
)
const
;
60
virtual
Ptr<NetDevice>
GetDevice
(uint32_t i)
const
;
61
69
void
TxPacket
(
Ptr<UanTransducer>
src,
Ptr<Packet>
packet,
double
txPowerDb,
70
UanTxMode
txmode);
71
78
void
AddDevice
(
Ptr<UanNetDevice>
dev,
Ptr<UanTransducer>
trans);
79
83
void
SetPropagationModel
(
Ptr<UanPropModel>
prop);
84
89
void
SetNoiseModel
(
Ptr<UanNoiseModel>
noise);
90
95
double
GetNoiseDbHz
(
double
fKhz);
96
100
void
Clear
(
void
);
101
102
private
:
103
UanDeviceList
m_devList
;
104
Ptr<UanPropModel>
m_prop
;
105
Ptr<UanNoiseModel>
m_noise
;
106
bool
m_cleared
;
107
108
void
SendUp
(uint32_t i,
Ptr<Packet>
packet,
double
rxPowerDb,
UanTxMode
txMode,
UanPdp
pdp);
109
protected
:
110
virtual
void
DoDispose
();
111
};
112
113
}
114
115
#endif
/* UAN_CHANNEL_H */
src
uan
model
uan-channel.h
Generated on Tue Nov 13 2012 10:32:23 for ns-3 by
1.8.1.2