A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-carrier-aggregation.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Biljana Bojovic <biljana.bojovic@cttc.es>
7 *
8 */
9
10#ifndef TEST_CARRIER_AGGREGATION_H
11#define TEST_CARRIER_AGGREGATION_H
12
13#include "fcntl.h"
14
15#include "ns3/lte-common.h"
16#include "ns3/simulator.h"
17#include "ns3/test.h"
18
19#include <map>
20
21using namespace ns3;
22
23/**
24 * \ingroup lte-test
25 *
26 * \brief This system test program creates different test cases with a single eNB and
27 * several UEs, all having the same Radio Bearer specification. In each test
28 * case, the UEs see the same SINR from the eNB; different test cases are
29 * implemented obtained by using different SINR values and different numbers of
30 * UEs. eNb and UEs are configured to use the secondary carrier and the component
31 * carrier manager is configured to split the data equally between primary and
32 * secondary carrier. The test consists of checking that the throughput
33 * obtained over different carriers are equal within a given tolerance.
34 */
36{
37 public:
38 static bool s_writeResults; ///< write results flag, determines whether to write results to
39 ///< outoput files
40
41 /**
42 * Constructor of test case
43 *
44 * \param nUser number of users
45 * \param dist the distance
46 * \param dlbandwidth the DL bandwidth
47 * \param ulBandwidth the UL badnwidth
48 * \param numberOfComponentCarriers number of component carriers to be used in test
49 * configuration
50 */
51 CarrierAggregationTestCase(uint16_t nUser,
52 uint16_t dist,
53 uint32_t dlbandwidth,
54 uint32_t ulBandwidth,
55 uint32_t numberOfComponentCarriers);
57 /**
58 * DL Scheduling function that is used in this test as callback function of DL scheduling trace
59 * \param dlInfo the DL scheduling callback info
60 */
62 /**
63 * UL Scheduling function that is used in this test as callback function of UL scheduling trace
64 * \param frameNo the frame number
65 * \param subframeNo the subframe number
66 * \param rnti the RNTI
67 * \param mcs the MCS
68 * \param sizeTb
69 * \param componentCarrierId the component carrier ID
70 */
71 void UlScheduling(uint32_t frameNo,
72 uint32_t subframeNo,
73 uint16_t rnti,
74 uint8_t mcs,
75 uint16_t sizeTb,
76 uint8_t componentCarrierId);
77 /// Write result to file function
78 void WriteResultToFile() const;
79
80 private:
81 void DoRun() override;
82 /**
83 * Builds the test name string based on provided parameter values
84 * \param nUser number of users
85 * \param dist the distance
86 * \param dlBandwidth the DL bandwidth
87 * \param ulBandwidth the UL badnwidth
88 * \param numberOfComponentCarriers number of component carriers
89 * \returns the test name
90 */
91 static std::string BuildNameString(uint16_t nUser,
92 uint16_t dist,
93 uint32_t dlBandwidth,
94 uint32_t ulBandwidth,
95 uint32_t numberOfComponentCarriers);
96
97 uint16_t m_nUser; ///< the number of users
98 uint16_t m_dist; ///< the distance
99 uint16_t m_dlBandwidth; ///< DL bandwidth
100 uint16_t m_ulBandwidth; ///< UL bandwidth
101 uint32_t m_numberOfComponentCarriers; ///< number of component carriers
102
103 std::map<uint8_t, uint32_t> m_ccDownlinkTraffic; ///< CC DL traffic
104 std::map<uint8_t, uint32_t> m_ccUplinkTraffic; ///< CC UL traffic
105 uint64_t m_dlThroughput; ///< DL throughput
106 uint64_t m_ulThroughput; ///< UL throughput
107 double m_statsDuration; ///< stats duration
108};
109
110/**
111 * \ingroup lte-test
112 *
113 * \brief Test Carrier Aggregation Suite
114 */
116{
117 public:
119};
120
121#endif /* TEST_CARRIER_AGGREGATION_H */
This system test program creates different test cases with a single eNB and several UEs,...
void DoRun() override
Implementation to actually run this TestCase.
uint32_t m_numberOfComponentCarriers
number of component carriers
void DlScheduling(DlSchedulingCallbackInfo dlInfo)
DL Scheduling function that is used in this test as callback function of DL scheduling trace.
static bool s_writeResults
write results flag, determines whether to write results to outoput files
CarrierAggregationTestCase(uint16_t nUser, uint16_t dist, uint32_t dlbandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers)
Constructor of test case.
uint16_t m_nUser
the number of users
std::map< uint8_t, uint32_t > m_ccDownlinkTraffic
CC DL traffic.
void UlScheduling(uint32_t frameNo, uint32_t subframeNo, uint16_t rnti, uint8_t mcs, uint16_t sizeTb, uint8_t componentCarrierId)
UL Scheduling function that is used in this test as callback function of UL scheduling trace.
void WriteResultToFile() const
Write result to file function.
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t dlBandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers)
Builds the test name string based on provided parameter values.
std::map< uint8_t, uint32_t > m_ccUplinkTraffic
CC UL traffic.
Test Carrier Aggregation Suite.
encapsulates test code
Definition test.h:1050
A suite of tests to run.
Definition test.h:1267
Every class exported by the ns3 library is enclosed in the ns3 namespace.
DlSchedulingCallbackInfo structure.
Definition lte-common.h:226