author | Peter D. Barnes, Jr. <barnes26@llnl.gov> |
Tue, 13 Nov 2012 16:35:51 -0800 | |
branch | hash |
changeset 9931 | a3edc13a84f3 |
parent 9763 | 038d5627c5a9 |
child 9771 | ddea5860c58c |
permissions | -rw-r--r-- |
7886 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
3 |
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
7886 | 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 |
* |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
18 |
* Author: Author: Marco Miozzo <marco.miozzo@cttc.es> |
7886 | 19 |
*/ |
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
20 |
#ifndef LTE_RADIO_BEARER_TAG_H |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
21 |
#define LTE_RADIO_BEARER_TAG_H |
7886 | 22 |
|
8696
3979745b2835
lte module coding style issues pointed out by Mathieu
Nicola Baldo <nbaldo@cttc.es>
parents:
8462
diff
changeset
|
23 |
#include "ns3/tag.h" |
7886 | 24 |
|
25 |
namespace ns3 { |
|
26 |
||
27 |
class Tag; |
|
28 |
||
29 |
||
30 |
/** |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
31 |
* Tag used to define the RNTI and LC id for each MAC packet trasmitted |
7886 | 32 |
*/ |
33 |
||
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
34 |
class LteRadioBearerTag : public Tag |
7886 | 35 |
{ |
36 |
public: |
|
37 |
static TypeId GetTypeId (void); |
|
38 |
virtual TypeId GetInstanceTypeId (void) const; |
|
39 |
||
40 |
/** |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
41 |
* Create an empty LteRadioBearerTag |
7886 | 42 |
*/ |
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
43 |
LteRadioBearerTag (); |
7886 | 44 |
|
45 |
/** |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
46 |
* Create a LteRadioBearerTag with the given RNTI and LC id |
7886 | 47 |
*/ |
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
48 |
LteRadioBearerTag (uint16_t rnti, uint8_t lcId); |
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
49 |
|
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
8462
diff
changeset
|
50 |
/** |
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
51 |
* Create a LteRadioBearerTag with the given RNTI, LC id and layer |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
52 |
*/ |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
53 |
LteRadioBearerTag (uint16_t rnti, uint8_t lcId, uint8_t layer); |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
54 |
|
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
55 |
/** |
7886 | 56 |
* Set the RNTI to the given value. |
57 |
* |
|
58 |
* @param rnti the value of the RNTI to set |
|
59 |
*/ |
|
60 |
void SetRnti (uint16_t tid); |
|
61 |
||
62 |
/** |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
63 |
* Set the LC id to the given value. |
7886 | 64 |
* |
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
65 |
* @param lcid the value of the RNTI to set |
7886 | 66 |
*/ |
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
67 |
void SetLcid (uint8_t lcid); |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
68 |
|
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
69 |
/** |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
70 |
* Set the layer id to the given value. |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
71 |
* |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
72 |
* @param layer the value of the layer to set |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
73 |
*/ |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
74 |
void SetLayer (uint8_t lcid); |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
75 |
|
7886 | 76 |
|
77 |
virtual void Serialize (TagBuffer i) const; |
|
78 |
virtual void Deserialize (TagBuffer i); |
|
79 |
virtual uint32_t GetSerializedSize () const; |
|
80 |
virtual void Print (std::ostream &os) const; |
|
81 |
||
82 |
uint16_t GetRnti (void) const; |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
83 |
uint8_t GetLcid (void) const; |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
84 |
uint8_t GetLayer (void) const; |
7886 | 85 |
|
86 |
private: |
|
87 |
uint16_t m_rnti; |
|
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
88 |
uint8_t m_lcid; |
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
89 |
uint8_t m_layer; |
7886 | 90 |
|
91 |
}; |
|
92 |
||
93 |
||
94 |
||
95 |
} // namespace ns3 |
|
96 |
||
9763
038d5627c5a9
Trim excess copies from PacketTagList::Remove, add PacketTagList::Replace, documentation.
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9743
diff
changeset
|
97 |
#endif /* LTE_RADIO_BEARER_TAG_H */ |