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
mu-snr-tag.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Stefano Avallone <stavallo@unina.it>
7
*/
8
9
#ifndef MU_SNR_TAG_H
10
#define MU_SNR_TAG_H
11
12
#include "ns3/tag.h"
13
14
#include <map>
15
16
namespace
ns3
17
{
18
19
/**
20
* @ingroup wifi
21
*
22
* A tag to be attached to a response to a multi-user UL frame, that carries the SNR
23
* values with which the individual frames have been received.
24
*/
25
class
MuSnrTag
:
public
Tag
26
{
27
public
:
28
/**
29
* @brief Get the type ID.
30
* @return the object TypeId
31
*/
32
static
TypeId
GetTypeId
();
33
TypeId
GetInstanceTypeId
()
const override
;
34
35
/**
36
* Create an empty MuSnrTag
37
*/
38
MuSnrTag
();
39
40
uint32_t
GetSerializedSize
()
const override
;
41
void
Serialize
(
TagBuffer
i)
const override
;
42
void
Deserialize
(
TagBuffer
i)
override
;
43
void
Print
(std::ostream& os)
const override
;
44
45
/**
46
* Reset the content of the tag.
47
*/
48
void
Reset
();
49
/**
50
* Set the SNR for the given sender to the given value.
51
*
52
* @param staId the STA-ID of the given sender
53
* @param snr the value of the SNR to set in linear scale
54
*/
55
void
Set
(uint16_t staId,
double
snr);
56
/**
57
* Return true if the SNR value for the given STA-ID is present
58
*
59
* @param staId the STA-ID
60
* @return true if the SNR value for the given STA-ID is present
61
*/
62
bool
IsPresent
(uint16_t staId)
const
;
63
/**
64
* Return the SNR value for the given sender.
65
*
66
* @param staId the STA-ID of the given sender
67
* @return the SNR value in linear scale
68
*/
69
double
Get
(uint16_t staId)
const
;
70
71
private
:
72
std::map<uint16_t, double>
m_snrMap
;
//!< Map containing (STA-ID, SNR) pairs
73
};
74
75
}
// namespace ns3
76
77
#endif
/* MU_SNR_TAG_H */
ns3::MuSnrTag
A tag to be attached to a response to a multi-user UL frame, that carries the SNR values with which t...
Definition
mu-snr-tag.h:26
ns3::MuSnrTag::m_snrMap
std::map< uint16_t, double > m_snrMap
Map containing (STA-ID, SNR) pairs.
Definition
mu-snr-tag.h:72
ns3::MuSnrTag::Print
void Print(std::ostream &os) const override
Definition
mu-snr-tag.cc:90
ns3::MuSnrTag::Reset
void Reset()
Reset the content of the tag.
Definition
mu-snr-tag.cc:35
ns3::MuSnrTag::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
mu-snr-tag.cc:17
ns3::MuSnrTag::Get
double Get(uint16_t staId) const
Return the SNR value for the given sender.
Definition
mu-snr-tag.cc:53
ns3::MuSnrTag::IsPresent
bool IsPresent(uint16_t staId) const
Return true if the SNR value for the given STA-ID is present.
Definition
mu-snr-tag.cc:47
ns3::MuSnrTag::Serialize
void Serialize(TagBuffer i) const override
Definition
mu-snr-tag.cc:66
ns3::MuSnrTag::Set
void Set(uint16_t staId, double snr)
Set the SNR for the given sender to the given value.
Definition
mu-snr-tag.cc:41
ns3::MuSnrTag::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition
mu-snr-tag.cc:60
ns3::MuSnrTag::Deserialize
void Deserialize(TagBuffer i) override
Definition
mu-snr-tag.cc:78
ns3::MuSnrTag::MuSnrTag
MuSnrTag()
Create an empty MuSnrTag.
Definition
mu-snr-tag.cc:30
ns3::MuSnrTag::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition
mu-snr-tag.cc:25
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
he
mu-snr-tag.h
Generated on Thu Dec 12 2024 18:40:49 for ns-3 by
1.11.0