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
lora-utils.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 University of Padova
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Romagnolo Stefano <romagnolostefano93@gmail.com>
7
*/
8
9
#ifndef LORA_UTILS_H
10
#define LORA_UTILS_H
11
12
#include "ns3/nstime.h"
13
#include "ns3/uinteger.h"
14
15
namespace
ns3
16
{
17
namespace
lorawan
18
{
19
20
/**
21
* Convert from dBm to Watts.
22
*
23
* \param dbm The power in dBm.
24
*
25
* \return The equivalent Watts for the given dBm value.
26
*/
27
double
DbmToW
(
double
dbm);
28
/**
29
* Convert from dB to ratio.
30
*
31
* \param db The dB value.
32
*
33
* \return The equivalent ratio from the given dB value.
34
*/
35
double
DbToRatio
(
double
db);
36
/**
37
* Convert from Watts to dBm.
38
*
39
* \param w The power in Watts.
40
*
41
* \return The equivalent dBm for the given Watts.
42
*/
43
double
WToDbm
(
double
w);
44
/**
45
* Convert from ratio to dB.
46
*
47
* \param ratio The ratio value.
48
*
49
* \return The equivalent dB from the given ratio value.
50
*/
51
double
RatioToDb
(
double
ratio);
52
53
}
// namespace lorawan
54
55
}
// namespace ns3
56
#endif
/* LORA_UTILS_H */
ns3::lorawan::DbmToW
double DbmToW(double dBm)
Convert from dBm to Watts.
Definition
lora-utils.cc:26
ns3::lorawan::WToDbm
double WToDbm(double w)
Convert from Watts to dBm.
Definition
lora-utils.cc:33
ns3::lorawan::RatioToDb
double RatioToDb(double ratio)
Convert from ratio to dB.
Definition
lora-utils.cc:39
ns3::lorawan::DbToRatio
double DbToRatio(double dB)
Convert from dB to ratio.
Definition
lora-utils.cc:19
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lorawan
model
lora-utils.h
Generated on Fri Nov 8 2024 13:59:02 for ns-3 by
1.11.0