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
lte-mac-sap.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Nicola Baldo <nbaldo@cttc.es>
19
*/
20
21
#ifndef LTE_MAC_SAP_H
22
#define LTE_MAC_SAP_H
23
24
#include <ns3/packet.h>
25
26
namespace
ns3 {
27
28
29
36
class
LteMacSapProvider
37
{
38
public
:
39
virtual
~LteMacSapProvider
();
40
45
struct
TransmitPduParameters
46
{
47
Ptr<Packet>
pdu
;
48
uint16_t
rnti
;
49
uint8_t
lcid
;
50
uint8_t
layer
;
51
uint8_t
harqProcessId
;
52
};
53
58
virtual
void
TransmitPdu
(
TransmitPduParameters
params) = 0;
59
60
66
struct
ReportBufferStatusParameters
67
{
68
uint16_t
rnti
;
69
uint8_t
lcid
;
70
uint32_t
txQueueSize
;
71
uint16_t
txQueueHolDelay
;
72
uint32_t
retxQueueSize
;
73
uint16_t
retxQueueHolDelay
;
74
uint16_t
statusPduSize
;
75
};
76
82
virtual
void
ReportBufferStatus
(
ReportBufferStatusParameters
params) = 0;
83
84
85
};
86
87
94
class
LteMacSapUser
95
{
96
public
:
97
virtual
~LteMacSapUser
();
105
virtual
void
NotifyTxOpportunity
(uint32_t bytes, uint8_t layer, uint8_t harqId) = 0;
106
113
virtual
void
NotifyHarqDeliveryFailure
() = 0;
114
115
121
virtual
void
ReceivePdu
(
Ptr<Packet>
p) = 0;
122
123
};
124
126
127
template
<
class
C>
128
class
EnbMacMemberLteMacSapProvider
:
public
LteMacSapProvider
129
{
130
public
:
131
EnbMacMemberLteMacSapProvider
(C* mac);
132
133
// inherited from LteMacSapProvider
134
virtual
void
TransmitPdu
(
TransmitPduParameters
params);
135
virtual
void
ReportBufferStatus
(
ReportBufferStatusParameters
params);
136
137
private
:
138
C*
m_mac
;
139
};
140
141
142
template
<
class
C>
143
EnbMacMemberLteMacSapProvider<C>::EnbMacMemberLteMacSapProvider
(C* mac)
144
: m_mac (mac)
145
{
146
}
147
148
template
<
class
C>
149
void
EnbMacMemberLteMacSapProvider<C>::TransmitPdu
(
TransmitPduParameters
params)
150
{
151
m_mac->DoTransmitPdu (params);
152
}
153
154
template
<
class
C>
155
void
EnbMacMemberLteMacSapProvider<C>::ReportBufferStatus
(
ReportBufferStatusParameters
params)
156
{
157
m_mac->DoReportBufferStatus (params);
158
}
159
160
161
}
// namespace ns3
162
163
164
#endif // LTE_MAC_SAP_H
src
lte
model
lte-mac-sap.h
Generated on Tue May 14 2013 11:08:25 for ns-3 by
1.8.1.2