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
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
* SPDX-License-Identifier: GPL-2.0-only
7
*
8
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
9
* Mirko Banchi <mk.banchi@gmail.com>
10
* Konstantinos Katsaros <dinos.katsaros@gmail.com>
11
*/
12
13
#ifndef SNR_TAG_H
14
#define SNR_TAG_H
15
16
#include "ns3/tag.h"
17
18
namespace
ns3
19
{
20
21
class
Tag;
22
23
class
SnrTag
:
public
Tag
24
{
25
public
:
26
/**
27
* @brief Get the type ID.
28
* @return the object TypeId
29
*/
30
static
TypeId
GetTypeId
();
31
32
/**
33
* Create a SnrTag with the default SNR 0
34
*/
35
SnrTag
();
36
37
TypeId
GetInstanceTypeId
()
const override
;
38
uint32_t
GetSerializedSize
()
const override
;
39
void
Serialize
(
TagBuffer
i)
const override
;
40
void
Deserialize
(
TagBuffer
i)
override
;
41
void
Print
(std::ostream& os)
const override
;
42
43
/**
44
* Set the SNR to the given value.
45
*
46
* @param snr the value of the SNR to set in linear scale
47
*/
48
void
Set
(
double
snr);
49
/**
50
* Return the SNR value.
51
*
52
* @return the SNR value in linear scale
53
*/
54
double
Get
()
const
;
55
56
private
:
57
double
m_snr
;
//!< SNR value in linear scale
58
};
59
60
}
// namespace ns3
61
62
#endif
/* SNR_TAG_H */
ns3::SnrTag
Introspection did not find any typical Config paths.
Definition
snr-tag.h:24
ns3::SnrTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
snr-tag.cc:23
ns3::SnrTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
snr-tag.cc:38
ns3::SnrTag::Set
void Set(double snr)
Set the SNR to the given value.
Definition
snr-tag.cc:73
ns3::SnrTag::Serialize
void Serialize(TagBuffer i) const override
Definition
snr-tag.cc:55
ns3::SnrTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
snr-tag.cc:49
ns3::SnrTag::Print
void Print(std::ostream &os) const override
Definition
snr-tag.cc:67
ns3::SnrTag::m_snr
double m_snr
SNR value in linear scale.
Definition
snr-tag.h:57
ns3::SnrTag::SnrTag
SnrTag()
Create a SnrTag with the default SNR 0.
Definition
snr-tag.cc:43
ns3::SnrTag::Deserialize
void Deserialize(TagBuffer i) override
Definition
snr-tag.cc:61
ns3::SnrTag::Get
double Get() const
Return the SNR value.
Definition
snr-tag.cc:79
ns3::TagBuffer
read and write tag data
Definition
tag-buffer.h:41
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
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
snr-tag.h
Generated on Thu Dec 12 2024 09:20:56 for ns-3 by
1.11.0