A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-phy-tag.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Marco Miozzo <marco.miozzo@cttc.es>
7 * Nicola Baldo <nbaldo@cttc.es>
8 */
9
10#include "lte-phy-tag.h"
11
12#include "ns3/tag.h"
13#include "ns3/uinteger.h"
14
15namespace ns3
16{
17
19
20TypeId
22{
23 static TypeId tid =
24 TypeId("ns3::LtePhyTag").SetParent<Tag>().SetGroupName("Lte").AddConstructor<LtePhyTag>();
25 return tid;
26}
27
30{
31 return GetTypeId();
32}
33
37
38LtePhyTag::LtePhyTag(uint16_t cellId)
39 : m_cellId(cellId)
40{
41}
42
46
49{
50 return 2;
51}
52
53void
58
59void
64
65void
66LtePhyTag::Print(std::ostream& os) const
67{
68 os << m_cellId;
69}
70
71uint16_t
73{
74 return m_cellId;
75}
76
77} // namespace ns3
Tag used to define PHY parameters.
Definition lte-phy-tag.h:21
void Print(std::ostream &os) const override
~LtePhyTag() override
uint16_t m_cellId
the cell ID
Definition lte-phy-tag.h:56
void Deserialize(TagBuffer i) override
LtePhyTag()
Create an empty LtePhyTag.
uint32_t GetSerializedSize() const override
uint16_t GetCellId() const
Get cell ID.
static TypeId GetTypeId()
Get the type ID.
void Serialize(TagBuffer i) const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
read and write tag data
Definition tag-buffer.h:41
TAG_BUFFER_INLINE uint16_t ReadU16()
Definition tag-buffer.h:195
TAG_BUFFER_INLINE void WriteU16(uint16_t v)
Definition tag-buffer.h:169
tag a set of bytes in a packet
Definition tag.h:28
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition object-base.h:35
Every class exported by the ns3 library is enclosed in the ns3 namespace.