Ieee80211BitDomainTest.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // Copyright (C) 2014 OpenSim Ltd.
  3. //
  4. // This program is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser General Public License
  6. // as published by the Free Software Foundation; either version 2
  7. // of the License, or (at your option) any later version.
  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 Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public License
  15. // along with this program; if not, see <http://www.gnu.org/licenses/>.
  16. //
  17. #ifndef __INET_IEEE80211BITDOMAINTEST_H_
  18. #define __INET_IEEE80211BITDOMAINTEST_H_
  19. #include "inet/physicallayer/common/bitlevel/ConvolutionalCoderModule.h"
  20. #include "inet/physicallayer/ieee80211/bitlevel/Ieee80211OFDMInterleaverModule.h"
  21. #include "inet/physicallayer/common/bitlevel/AdditiveScramblerModule.h"
  22. #include "inet/common/INETDefs.h"
  23. #include "inet/common/ModuleAccess.h"
  24. using namespace inet::physicallayer;
  25. namespace inet {
  26. class INET_API Ieee80211BitDomainTest : public cSimpleModule
  27. {
  28. protected:
  29. AdditiveScramblerModule *scrambler;
  30. Ieee80211OFDMInterleaverModule *interleaver;
  31. ConvolutionalCoderModule *convCoder;
  32. std::ifstream *fileStream;
  33. const char *testType;
  34. protected:
  35. virtual int numInitStages() const { return NUM_INIT_STAGES; }
  36. virtual void initialize(int stage);
  37. virtual void handleMessage(cMessage *msg) { throw cRuntimeError("This module doesn't handle self messages"); }
  38. void testConvolutionalCoder(unsigned int numberOfRandomErrors) const;
  39. void testScrambler() const;
  40. void testInterleaver() const;
  41. void testIeee80211BitDomain() const;
  42. };
  43. } /* namespace inet */
  44. #endif /* __INET_IEEE80211BITDOMAINTEST_H_ */