A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
snr-tag.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2005,2006 INRIA
3
* Copyright (c) 2009 MIRKO BANCHI
4
* Copyright (c) 2013 University of Surrey
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
* Mirko Banchi <mk.banchi@gmail.com>
21
* Konstantinos Katsaros <dinos.katsaros@gmail.com>
22
*/
23
24
#ifndef SNR_TAG_H
25
#define SNR_TAG_H
26
27
#include "ns3/tag.h"
28
29
namespace
ns3
30
{
31
32
class
Tag;
33
34
class
SnrTag
:
public
Tag
35
{
36
public
:
41
static
TypeId
GetTypeId
();
42
46
SnrTag
();
47
48
TypeId
GetInstanceTypeId
()
const override
;
49
uint32_t
GetSerializedSize
()
const override
;
50
void
Serialize
(
TagBuffer
i)
const override
;
51
void
Deserialize
(
TagBuffer
i)
override
;
52
void
Print
(std::ostream& os)
const override
;
53
59
void
Set
(
double
snr);
65
double
Get
()
const
;
66
67
private
:
68
double
m_snr
;
69
};
70
71
}
// namespace ns3
72
73
#endif
/* SNR_TAG_H */
ns3::SnrTag
Definition:
snr-tag.h:35
ns3::SnrTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
snr-tag.cc:34
ns3::SnrTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
snr-tag.cc:49
ns3::SnrTag::Set
void Set(double snr)
Set the SNR to the given value.
Definition:
snr-tag.cc:84
ns3::SnrTag::Serialize
void Serialize(TagBuffer i) const override
Definition:
snr-tag.cc:66
ns3::SnrTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
snr-tag.cc:60
ns3::SnrTag::Print
void Print(std::ostream &os) const override
Definition:
snr-tag.cc:78
ns3::SnrTag::m_snr
double m_snr
SNR value in linear scale.
Definition:
snr-tag.h:68
ns3::SnrTag::SnrTag
SnrTag()
Create a SnrTag with the default SNR 0.
Definition:
snr-tag.cc:54
ns3::SnrTag::Deserialize
void Deserialize(TagBuffer i) override
Definition:
snr-tag.cc:72
ns3::SnrTag::Get
double Get() const
Return the SNR value.
Definition:
snr-tag.cc:90
ns3::TagBuffer
read and write tag data
Definition:
tag-buffer.h:52
ns3::Tag
tag a set of bytes in a packet
Definition:
tag.h:39
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
snr-tag.h
Generated on Sun Mar 3 2024 17:11:11 for ns-3 by
1.9.1