aboutsummaryrefslogtreecommitdiffstats
path: root/emu-radio/lte-emulator/src/lte-emulator.h
blob: a602a612ab7c465126a4a4a21b9d204f24d7fb04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
 * Copyright (c) 2016, Cisco Systems
 *
 * @author Mauro Sardara (msardara@cisco.com)
 */

#ifndef Lte_EMULATOR_LteEMULATOR_H
#define Lte_EMULATOR_LteEMULATOR_H

#include "../extensions/lte-tap-helper.h"
#include <unordered_map>

#include "emulator.h"

#define CONSTANT_POSITION "constant_position"
#define RANDOM_WAYPOINT   "random_waypoint"

//NS_LOG_COMPONENT_DEFINE ("Lte-emulator");

#define SSID "ns-3-ssid"

namespace ns3
{
namespace emulator
{

class LteEmulator : public Emulator {

 public:
  explicit LteEmulator (std::unordered_map <std::string, ns3::Ptr<ns3::Node>> &mapNameNode, Ptr <LteTapHelper> ltehelper);

  std::pair<double, double> getStationCoordinates (const std::string &station);

  bool setStationCoordinates (const std::string &station, double x, double y);

  bool setStationXCoordinate (const std::string &station, double x);

  bool getStationYCoordinate (const std::string &station, double *y);

  bool getStationXCoordinate (const std::string &station, double *x);

  bool setStationYCoordinate (const std::string &station, double y);

  LteEmulator &
  moveStationAlongSegment (const std::string &station, double start_x, double start_y, double end_x, double end_y, double duration);

  bool getTransmissionRate (const std::string &station, double *transmissionRate);

 private:

  std::unordered_map <std::string, ns3::Ptr<ns3::Node>> m_mapNameNs3node;

  Ptr <LteTapHelper> m_lteTapHelper;

};

} // End namespace emulator

} // End namespace ns3

#endif //Lte_EMULATOR_LteEMULATOR_H