Commit Graph

322 Commits

Author SHA1 Message Date
Eduardo Almeida
85ade4e18d Fix Doxygen comment formatting and typos 2022-10-16 14:49:21 +01:00
Eduardo Almeida
dfc6fb9d2d Remove emacs comment from C++ files 2022-10-14 14:13:12 +00:00
Eduardo Almeida
e25ff966fe Apply clang-format to codebase 2022-10-07 20:08:35 +00:00
Eduardo Almeida
ebb596910c Fix remaining clang-tidy warnings 2022-10-07 11:48:11 +00:00
Eduardo Almeida
c1e7757315 Fix clang-tidy readability-isolate-declaration warnings 2022-10-07 11:48:11 +00:00
Eduardo Almeida
1b78ecc117 Fix clang-tidy readability-braces-around-statements warnings 2022-10-07 11:48:11 +00:00
Eduardo Almeida
f87b53bbc5 Fix clang-tidy modernize-use-emplace warnings 2022-10-07 11:48:11 +00:00
Eduardo Almeida
4af0fe4b85 Fix clang-tidy modernize-use-nullptr warnings 2022-10-07 11:48:10 +00:00
Eduardo Almeida
be07b6487a Fix clang-tidy modernize-use-override warnings 2022-10-07 11:48:10 +00:00
Eduardo Almeida
6bb6383562 Fix clang-tidy modernize-redundant-void-arg warnings 2022-10-07 11:48:10 +00:00
Eduardo Almeida
b2af8bbe48 wifi, lte, dsr, examples: Optimize vector initialization 2022-10-06 11:20:57 +00:00
Peter D. Barnes, Jr
d635a72cbc Use variadic argument lists in various Helpers.
QosWaveMacHelper::SetType() and NqosWaveMacHelper::SetType() were
virtual, but then they can't be templated to handle variadic
argument lists.  The base class is not virtual, and nothing derives from
these classes, so virtual doesn't seem to be required.
2022-09-04 12:01:11 -07:00
Stefano Avallone
3e20515664 core: Use std::function to implement callbacks 2022-09-02 19:04:38 +00:00
Sebastien Deronne
6723c9d997 spectrum: Apply puncturing mask to HE transmit PSD 2022-08-31 18:38:29 +00:00
Sebastien Deronne
83db8b2c36 spectrum: Do not allocate power to subcarriers that belongs to an inactive 20 MHz subchannel 2022-08-31 18:38:29 +00:00
Sébastien Deronne
33807b6e46 spectrum: Fix allocated power per subcarrier in 802.11n PSD 2022-08-31 18:38:29 +00:00
Sebastien Deronne
a2c5cb8f4a spectrum: Reduce copy-pasted code in WifiSpectrumValueHelper 2022-08-31 18:38:29 +00:00
Sebastien Deronne
990cc9cef4 spectrum: Add TX PSD to transmit duplicated OFDM signals over multiple 20 MHz subchannels 2022-08-31 18:38:29 +00:00
Peter D. Barnes, Jr
c9b72c7a35 doc: remove trailing white space in attributes and trace source strings 2022-08-30 20:30:42 +00:00
Tommaso Pecorella
606eb84448 doc: fix doxygen in various examples 2022-08-30 20:30:42 +00:00
Peter D. Barnes, Jr
e461e54d5a Update Ptr validity checks to new Ptr<>::operator bool 2022-08-18 08:59:30 -07:00
Gabriel Ferreira
c5d0c8efb4 bindings: remove pybindgen bindings sources 2022-08-01 21:24:02 +00:00
Tommaso Pecorella
1dfc512dba doc: fix doxygen warnings 2022-07-16 21:47:32 -05:00
Sébastien Deronne
a5cb1c0df0 spectrum: Compute received PSD at reception instead of at transmission 2022-07-15 15:30:18 +00:00
Sébastien Deronne
793042d63f spectrum: Pass SpectrumSignalParameters to CalcRxPowerSpectralDensity 2022-07-15 15:30:18 +00:00
Sébastien Deronne
575671c389 spectrum: SpectrumSignalParameters::Copy can be const 2022-07-15 15:30:18 +00:00
Gabriel Ferreira
60e1e4032c fixing dead links 2022-06-18 17:57:05 -03:00
Stefano Avallone
e5805a53fb network: Queue uses a generic type of container to store items internally 2022-06-08 15:31:44 +02:00
Tom Henderson
b6a5ee8151 Run utils/trim-trailing-whitespace.py on codebase 2022-06-05 21:01:11 -07:00
Tom Henderson
a614114865 bindings: Rescan all APIs 2022-04-18 15:30:35 -07:00
Alexander Krotov
339c06c6ec NS-3 GSoC 2017 LTE CA handover milestone 2 and 3 2022-02-28 12:44:29 -08:00
Gabriel Ferreira
e32c177e45 build: remove waf files, tests and references 2022-02-21 22:08:45 -03:00
Tom Henderson
5367f1fed7 bindings: Rescan APIs of most modules 2022-02-16 15:59:27 -08:00
Tommaso Pecorella
48e6ac5405 spectrum: doxygen fixes 2022-01-30 12:06:53 -06:00
Gabriel Ferreira
41aacec626 build: CMake refactoring
Includes:
- refactor build_lib and build_lib_example macros
    - unify src and contrib macros
    - replace macro with function not to leak definitions
    - parse list of arguments
- different cmake-format file for modules to list one item per line
2022-01-28 10:20:18 -03:00
Biljana Bojovic
167aaada6e antenna, buildings, lr-wpan, lte, netanim, propagation, spectrum, wifi, wimax: Update Python bindings 2022-01-22 11:43:31 +01:00
Biljana Bojovic
33097e47d9 spectrum: GetAntenna supports antenna arrays (address Tommaso Zugno's comment on !686) 2022-01-22 11:43:31 +01:00
bbojovic
00e3374159 spectrum: ThreeGppChannelModel is adapted so it can be inherited and GetNewChannel virtual 2022-01-22 11:43:31 +01:00
bbojovic
a4b43d0132 spectrum: Move doppler term D and alpha and improve (Thanks to Sandra Lagen)
Co-authored-by: Sandra Lagen <sandra.lagen@cttc.es>

This commit also fixes an issue that was discovered during this implementation,
and that is that the stream was never assigned for the uniform random variable used for
the term D and alpha generation.

-Store term D and alpha into the channel params structure.
-Make sure to use correct angles and zenit of departure and arrival:
Save the direction of the generation of the channel params and channel matrix,
in order to know when regenerating channel matrix if the saved angles aoa, aod,
zoa and zod are of of s-to-u or u-to-s, so to properly use them.
- Simplify the type of the key of channel matrix map
- Remove unecessary if statements and abort replace by assert
- Add a more detailed description of the ThreeGppSpectrumPropagationLossModel changes
2022-01-22 11:43:28 +01:00
bbojovic
f53c28229d spectrum, propagation: Fix the way channel condition is saved and checked if equal
It seems that is not the best way to save in the structure the pointer
to the channel condition model because the underlying condition,
and later when we compare the new condition with the old one, we
are basically comparing the underlying object with itself, because
we saved the pointer to it in the structure.

Instead we should save the concrete values of LOS and O2I condition
in the 3gpp structure, and then once the ChannelCondition state changes,
we can compare these saved values against the new once.
This could not be done when the pointer was being changed because pointer
was pointing to the same object.

This fixes basically the condition in 3gpp whether th channel needs to be
updated when condition changes.
2022-01-22 11:42:20 +01:00
bbojovic
2f0a4c9957 spectrum: Split 3gpp channel matrix and channel parameters into two different structures
-Create separate base structures for matrix and params in MatrixBasedChannelModel
-Change the key of m_channelParamsMap to be based on the pair of nodeIds instead of pair of antenna arrays:
Since the parameters in the m_channelParamsMap are common for all the channels among the same pair of nodes,
these parameters should be saved per the pair of node ids, instead per the pair of panels.
On the other hand, the map m_channelMatrixMap saves the channel matrixes per the pair of antenna arrays.
- Implement the update of the channel params and channel matrix of ThreeGppChannelModel
- Fix doxygen and remove unused structures in ThreeGppChannelModel
- Save 3gpp channel matrix and long term per antenna pair instead of node pair
- Split GetNewChannel function in two parts: parameter generation and matrix generation
- Split 3gpp channel matrix and parameters into two different structures
2022-01-22 03:45:09 +01:00
bbojovic
4ca8b12ea0 spectrum: Support passing the TX and RX PhasedArrayModel objects to spectrum model
This possibility is needed for the types of spectrum propagation models that need to have a pointer
to the TX and RX antenna arrays to perform calculations, such as e.g.,
ThreeGppSpectrumPropagationLossModel, which currently has hard limitation of having a maximum of 1
antenna array instance per device. ThreeGppSpectrumPropagationLossModel now inherits a new class
PhasedArraySpectrumPropagationLossModel. Its DoCalcRxPowerSpectralDensity function has now two
additional parameters: TX and RX antenna arrays. Also, AddDevice function is removed from
ThreeGppSpectrumPropagationLossModel, because it is not anymore needed to specify for each
device its TX/RX antenna, since these are now passed as parameters. Hence, to use
ThreeGppSpectrumPropagationLossModel, when implementing Spectrum PHY features,
modules should implement the function of SpectrumPhy GetAntenna to return the instance of
PhasedArrayModel of that SpectrumPhy. These instances will be passed by MultiModelSpectrumChannel
(one of the core classes in the spectrum module) to propagation classes, children of
PhasedArraySpectrumPropagationLossModel, when it is necessary to DoCalcRxPowerSpectralDensity to
callculate the propagation loss.

Additionally: Fixed pair key generation for 3gpp channel model: Previous implementation was
using a cantor function of two integer of 32 bits and as a results was giving a unique
representatio of 32 bits. This is wrong, because such function needed even more than 64
bits to represent that value. Even if in ns-3 simulation we are not going to have such large
node numbers, we should fix this. Instead of just changing 64 bits from cantor function, I propose to
replace the cantor function with just simple concatenation of two 32 bits.

I also propose moving min and max inside of the function, to prevent some eventual future errors
in using GetKey, because with the previous implementation there was assumption that who calls GetKey
will previously sort its parameters, and first provide the min value, and then the max value,
and this was not even documented.
2022-01-22 03:42:49 +01:00
Tom Henderson
aad79536bf bindings: Rescan all APIs 2021-12-18 16:41:52 -08:00
Eduardo Almeida
4ebdc0c6c6 Mark deleted ctors and operator= with delete keyword 2021-12-18 15:22:44 -08:00
Gabriel Ferreira
a893eba7e3 build: Fix CMake and ns3 script bugs, add a test suite and fix formatting 2021-12-05 21:53:49 +00:00
Gabriel Ferreira
9c876c7f5a CMake buildsystem 2021-12-01 12:29:55 -08:00
Gabriel Arrobo
78c116e32a Formatting changes
* Ran check-style script)
* Moved variables to inside for loops
* Addressed Doxygen warnings
* Removed unused variable (H_NLOS)
* Renamed variables as per ns-3 coding style
2021-11-27 08:37:10 -08:00
Gabriel Arrobo
c527506471 Avoid multiple log and sqrt calculations for the same value(s) 2021-11-27 08:36:34 -08:00
Gabriel Arrobo
262fe14fe7 Code simplifications 2021-11-27 08:36:34 -08:00
Gabriel Arrobo
b7ab6aa5d2 changed exp^(0 + xi) to cos(x) + i*sin(x) 2021-11-27 08:36:34 -08:00