A Discrete-Event Network Simulator
API
lte-phy-tag.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Marco Miozzo <marco.miozzo@cttc.es>
18  * Nicola Baldo <nbaldo@cttc.es>
19  */
20 #ifndef LTE_PHY_TAG_H
21 #define LTE_PHY_TAG_H
22 
23 #include "ns3/tag.h"
24 
25 namespace ns3
26 {
27 
31 class LtePhyTag : public Tag
32 {
33  public:
38  static TypeId GetTypeId();
39  TypeId GetInstanceTypeId() const override;
40 
44  LtePhyTag();
45 
50  LtePhyTag(uint16_t cellId);
51 
52  ~LtePhyTag() override;
53 
54  void Serialize(TagBuffer i) const override;
55  void Deserialize(TagBuffer i) override;
56  uint32_t GetSerializedSize() const override;
57  void Print(std::ostream& os) const override;
58 
64  uint16_t GetCellId() const;
65 
66  private:
67  uint16_t m_cellId;
68 };
69 
70 } // namespace ns3
71 
72 #endif /* LTE_PHY_TAG_H */
Tag used to define PHY parameters.
Definition: lte-phy-tag.h:32
void Print(std::ostream &os) const override
Definition: lte-phy-tag.cc:77
~LtePhyTag() override
Definition: lte-phy-tag.cc:54
uint16_t m_cellId
the cell ID
Definition: lte-phy-tag.h:67
void Deserialize(TagBuffer i) override
Definition: lte-phy-tag.cc:71
LtePhyTag()
Create an empty LtePhyTag.
Definition: lte-phy-tag.cc:45
uint32_t GetSerializedSize() const override
Definition: lte-phy-tag.cc:59
uint16_t GetCellId() const
Get cell ID.
Definition: lte-phy-tag.cc:83
static TypeId GetTypeId()
Get the type ID.
Definition: lte-phy-tag.cc:32
void Serialize(TagBuffer i) const override
Definition: lte-phy-tag.cc:65
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: lte-phy-tag.cc:40
read and write tag data
Definition: tag-buffer.h:52
tag a set of bytes in a packet
Definition: tag.h:39
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.