Skip to content

Commit

Permalink
Merge pull request #11 from tomhenderson/psc-1.0
Browse files Browse the repository at this point in the history
Updates for Python support
  • Loading branch information
richardrouil authored Sep 21, 2018
2 parents 43cc3bd + 787548b commit dcff08a
Show file tree
Hide file tree
Showing 14 changed files with 1,104 additions and 76 deletions.
3 changes: 3 additions & 0 deletions src/buildings/bindings/callbacks_list.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

547 changes: 524 additions & 23 deletions src/buildings/bindings/modulegen__gcc_ILP32.py

Large diffs are not rendered by default.

547 changes: 524 additions & 23 deletions src/buildings/bindings/modulegen__gcc_LP64.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/buildings/model/hybrid-3gpp-propagation-loss-model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
*/

#include "ns3/log.h"
#include "ns3/mobility-model.h"
#include "ns3/double.h"
#include "ns3/outdoor-to-outdoor-propagation-loss-model.h"
#include "ns3/indoor-to-indoor-propagation-loss-model.h"
Expand Down
8 changes: 1 addition & 7 deletions src/buildings/model/hybrid-3gpp-propagation-loss-model.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include <ns3/buildings-propagation-loss-model.h>
#include <ns3/propagation-environment.h>
#include <ns3/mobility-model.h>
#include <ns3/traced-callback.h>
#include "ns3/node.h"

Expand Down Expand Up @@ -131,13 +132,6 @@ class Hybrid3gppPropagationLossModel : public BuildingsPropagationLossModel
*/
bool IsMacroComm (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;

/**
* set the rooftop height
*
* \param rooftopHeight the rooftop height in meters
*/
void SetRooftopHeight (double rooftopHeight);

/**
* Compute the pathloss based on the positions of the two nodes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#include <cmath>
#include "scm-urbanmacrocell-propagation-loss-model.h"
#include <ns3/node.h>
#include <ns3/lte-enb-net-device.h>
#include <ns3/lte-ue-net-device.h>
#include <ns3/pointer.h>
#include <ns3/object-map.h>
#include <ns3/object-factory.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ UrbanMacroCellPropagationLossModel::GetTypeId (void)
"The trace export mobility of the transmitter and receiver, pathloss, shadowing, probLos"
"and the random number used to decide LOS and NLOS",
MakeTraceSourceAccessor (&UrbanMacroCellPropagationLossModel::m_losTrace),
"ns3::SpectrumChannel::LosTracedCallback")
"ns3::SpectrumChannel::GainTracedCallback")
;

return tid;
Expand Down
3 changes: 2 additions & 1 deletion src/buildings/model/urbanmacrocell-propagation-loss-model.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include <ns3/buildings-propagation-loss-model.h>
#include <ns3/propagation-environment.h>
#include <ns3/traced-callback.h>

namespace ns3 {

Expand Down Expand Up @@ -147,7 +148,7 @@ class UrbanMacroCellPropagationLossModel : public BuildingsPropagationLossModel
Ptr<UniformRandomVariable> m_rand; ///< Random number to generate
mutable std::map<MobilityDuo, double> m_randomMap; ///< Map to keep track of random numbers generated per pair of nodes
mutable std::map<Ptr<MobilityModel>, std::map<Ptr<MobilityModel>, double> > m_shadowingLossMap; ///< Map to keep track of shadowing values
TracedCallback<Ptr<MobilityModel>, Ptr<MobilityModel>, double, double, double, double> m_losTrace; ///< Trace
TracedCallback<Ptr<const MobilityModel>, Ptr<const MobilityModel>, double, double, double, double> m_losTrace; ///< Trace

};

Expand Down
20 changes: 16 additions & 4 deletions src/lte/bindings/modulegen__gcc_ILP32.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions src/lte/bindings/modulegen__gcc_LP64.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/lte/examples/lte-wrap-around-hex-topology.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ SaveNodesPositions (std::string fileName)
}

void
SaveWrapAroundPositions (std::string filename, std::map<std::vector<double>,std::vector<Vector> > mapOfWAround )
SaveWrapAroundPositions (std::string filename, std::map<std::vector<double>,WrapAroundReplicas> mapOfWAround)
{
NS_LOG_DEBUG ("Printing wrap-around position map of size " << mapOfWAround.size ());

Expand All @@ -398,7 +398,7 @@ SaveWrapAroundPositions (std::string filename, std::map<std::vector<double>,std:
outFile << "Node\tsiteCounter\tX\tY" << std::endl;
for (auto const &i : mapOfWAround)
{
for (auto const &k : i.second)
for (auto const &k : i.second.positions)
{
outFile << "enb\t" << siteCounter << "\t" << k.x << "\t" << k.y << std::endl;
siteCounter++;
Expand Down Expand Up @@ -544,7 +544,7 @@ int main (int argc, char *argv[])
topoHelper->AttachWithWrapAround (lossModel, ueDevs, enbDevs);
NS_LOG_DEBUG ("Attached UE's to the eNB with wrap-around");

std::map<std::vector<double>,std::vector<Vector> > mapOfWAround = topoHelper->GetWrapAroundPositions ();
std::map<std::vector<double>,WrapAroundReplicas> mapOfWAround = topoHelper->GetWrapAroundPositions ();
std::map<uint64_t,WrapAroundInfo_t> wrapAroundAttachInfo = topoHelper->GetWrapAroundAttachInfo ();

std::string frAlgorithmType = lteHelper->GetFfrAlgorithmType ();
Expand Down
8 changes: 5 additions & 3 deletions src/lte/helper/lte-3gpp-hex-grid-enb-topology-helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,9 @@ Lte3gppHexGridEnbTopologyHelper::GetClosestPositionInWrapAround (Vector txPos, V
minPos = pos;
}

std::pair<std::map<std::vector<double>,std::vector<Vector> >::iterator,bool> insertion = m_mapForWAround.insert (std::make_pair (m_enbPositionsCCluster,m_wAroundReplica));
WrapAroundReplicas replicas;
replicas.positions = m_wAroundReplica;
std::pair<std::map<std::vector<double>,WrapAroundReplicas >::iterator,bool> insertion = m_mapForWAround.insert (std::make_pair (m_enbPositionsCCluster, replicas));
m_enbPositionsCCluster.erase (m_enbPositionsCCluster.begin (),m_enbPositionsCCluster.end ());
m_wAroundReplica.erase (m_wAroundReplica.begin (), m_wAroundReplica.end ());

Expand Down Expand Up @@ -1009,8 +1011,8 @@ Lte3gppHexGridEnbTopologyHelper::AssignStreams (int64_t stream)
return 1;
}

std::map<std::vector<double>,std::vector<Vector> >
Lte3gppHexGridEnbTopologyHelper::GetWrapAroundPositions ()
std::map<std::vector<double>,WrapAroundReplicas>
Lte3gppHexGridEnbTopologyHelper:: GetWrapAroundPositions ()
{
NS_LOG_FUNCTION (this);
return m_mapForWAround;
Expand Down
Loading

0 comments on commit dcff08a

Please sign in to comment.