OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2010 Jens Mittag, Stylianos Papanastasiou |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Authors: Jens Mittag <jens.mittag@kit.edu> |
| 19 */ |
| 20 |
| 21 #ifndef PHYSIM_WIFI_FRAME_CONSTRUCTION_TEST_H |
| 22 #define PHYSIM_WIFI_FRAME_CONSTRUCTION_TEST_H |
| 23 |
| 24 #include "ns3/log.h" |
| 25 #include "ns3/test.h" |
| 26 #include "ns3/ptr.h" |
| 27 #include "ns3/packet.h" |
| 28 #include "ns3/physim-wifi-phy-tag.h" |
| 29 #include <itpp/itcomm.h> |
| 30 |
| 31 using namespace ns3; |
| 32 |
| 33 /** |
| 34 * Test case to check whether the frame construction process of the physical |
| 35 * layer logic adheres to the reference given in the IEEE 802.11 standard in |
| 36 * Section 17. |
| 37 */ |
| 38 class PhySimWifiFrameConstructionTest : public TestCase |
| 39 { |
| 40 |
| 41 public: |
| 42 PhySimWifiFrameConstructionTest (); |
| 43 virtual ~PhySimWifiFrameConstructionTest (); |
| 44 |
| 45 private: |
| 46 bool DoRun (void); |
| 47 void PhyTxCallback (Ptr<const Packet> packet, Ptr<const PhySimWifiPhyTag> tag)
; |
| 48 bool CompareVectors (const itpp::cvec &input, const itpp::cvec &reference); |
| 49 std::complex<double> RoundComplex (const std::complex<double> input); |
| 50 double RoundIEEE (const double num); |
| 51 |
| 52 itpp::cvec m_txSamples; |
| 53 |
| 54 itpp::cvec m_refShortSymbol; |
| 55 itpp::cvec m_refLongSymbol; |
| 56 itpp::cvec m_refSIGNAL; |
| 57 itpp::cvec m_refFirstDATAblock; |
| 58 itpp::cvec m_refSecondDATAblock; |
| 59 itpp::cvec m_refThirdDATAblock; |
| 60 itpp::cvec m_refFourthDATAblock; |
| 61 itpp::cvec m_refFifthDATAblock; |
| 62 itpp::cvec m_refSixthDATAblock; |
| 63 |
| 64 }; |
| 65 |
| 66 #endif /* PHYSIM_WIFI_FRAME_CONSTRUCTION_TEST_H */ |
OLD | NEW |