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
namespace
ns3
13
{
14
namespace
lorawan
15
{
16
17
/**
18
* Convert from dBm to Watts.
19
*
20
* @param dbm The power in dBm.
21
*
22
* @return The equivalent Watts for the given dBm value.
23
*/
24
double
DbmToW
(
double
dbm);
25
/**
26
* Convert from dB to ratio.
27
*
28
* @param db The dB value.
29
*
30
* @return The equivalent ratio from the given dB value.
31
*/
32
double
DbToRatio
(
double
db);
33
/**
34
* Convert from Watts to dBm.
35
*
36
* @param w The power in Watts.
37
*
38
* @return The equivalent dBm for the given Watts.
39
*/
40
double
WToDbm
(
double
w);
41
/**
42
* Convert from ratio to dB.
43
*
44
* @param ratio The ratio value.
45
*
46
* @return The equivalent dB from the given ratio value.
47
*/
48
double
RatioToDb
(
double
ratio);
49
50
}
// namespace lorawan
51
}
// namespace ns3
52
53
#endif
/* LORA_UTILS_H */
ns3::lorawan
Definition
forwarder-helper.cc:19
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
for ns-3 by
1.15.0