A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
15
namespace
ns3
16
{
17
18
NS_OBJECT_ENSURE_REGISTERED
(LtePhyTag);
19
20
TypeId
21
LtePhyTag::GetTypeId
()
22
{
23
static
TypeId
tid =
24
TypeId
(
"ns3::LtePhyTag"
).
SetParent
<
Tag
>().SetGroupName(
"Lte"
).AddConstructor<
LtePhyTag
>();
25
return
tid;
26
}
27
28
TypeId
29
LtePhyTag::GetInstanceTypeId
()
const
30
{
31
return
GetTypeId
();
32
}
33
34
LtePhyTag::LtePhyTag
()
35
{
36
}
37
38
LtePhyTag::LtePhyTag
(uint16_t cellId)
39
: m_cellId(cellId)
40
{
41
}
42
43
LtePhyTag::~LtePhyTag
()
44
{
45
}
46
47
uint32_t
48
LtePhyTag::GetSerializedSize
()
const
49
{
50
return
2;
51
}
52
53
void
54
LtePhyTag::Serialize
(
TagBuffer
i)
const
55
{
56
i.
WriteU16
(
m_cellId
);
57
}
58
59
void
60
LtePhyTag::Deserialize
(
TagBuffer
i)
61
{
62
m_cellId
= i.
ReadU16
();
63
}
64
65
void
66
LtePhyTag::Print
(std::ostream& os)
const
67
{
68
os <<
m_cellId
;
69
}
70
71
uint16_t
72
LtePhyTag::GetCellId
()
const
73
{
74
return
m_cellId
;
75
}
76
77
}
// namespace ns3
ns3::LtePhyTag
Tag used to define PHY parameters.
Definition
lte-phy-tag.h:21
ns3::LtePhyTag::Print
void Print(std::ostream &os) const override
Definition
lte-phy-tag.cc:66
ns3::LtePhyTag::~LtePhyTag
~LtePhyTag() override
Definition
lte-phy-tag.cc:43
ns3::LtePhyTag::m_cellId
uint16_t m_cellId
the cell ID
Definition
lte-phy-tag.h:56
ns3::LtePhyTag::Deserialize
void Deserialize(TagBuffer i) override
Definition
lte-phy-tag.cc:60
ns3::LtePhyTag::LtePhyTag
LtePhyTag()
Create an empty LtePhyTag.
Definition
lte-phy-tag.cc:34
ns3::LtePhyTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
lte-phy-tag.cc:48
ns3::LtePhyTag::GetCellId
uint16_t GetCellId() const
Get cell ID.
Definition
lte-phy-tag.cc:72
ns3::LtePhyTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
lte-phy-tag.cc:21
ns3::LtePhyTag::Serialize
void Serialize(TagBuffer i) const override
Definition
lte-phy-tag.cc:54
ns3::LtePhyTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
lte-phy-tag.cc:29
ns3::TagBuffer
read and write tag data
Definition
tag-buffer.h:41
ns3::TagBuffer::ReadU16
TAG_BUFFER_INLINE uint16_t ReadU16()
Definition
tag-buffer.h:195
ns3::TagBuffer::WriteU16
TAG_BUFFER_INLINE void WriteU16(uint16_t v)
Definition
tag-buffer.h:169
ns3::Tag
tag a set of bytes in a packet
Definition
tag.h:28
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
uint32_t
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
lte-phy-tag.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lte
model
lte-phy-tag.cc
Generated on Sun Oct 13 2024 09:20:43 for ns-3 by
1.11.0