DESERT 4.0.0
uwhermesphy.h
Go to the documentation of this file.
1//
2// Copyright (c) 2017 Regents of the SIGNET lab, University of Padova.
3// All rights reserved.
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions
7// are met:
8// 1. Redistributions of source code must retain the above copyright
9// notice, this list of conditions and the following disclaimer.
10// 2. Redistributions in binary form must reproduce the above copyright
11// notice, this list of conditions and the following disclaimer in the
12// documentation and/or other materials provided with the distribution.
13// 3. Neither the name of the University of Padova (SIGNET lab) nor the
14// names of its contributors may be used to endorse or promote products
15// derived from this software without specific prior written permission.
16//
17// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28//
29
39#ifndef UWHERMESPHY_H
40#define UWHERMESPHY_H
41
42#include "uwphysical.h"
43#include <iostream>
44#include <map>
45#include <math.h>
46
47typedef ::std::map<double, double> PdrLut;
48typedef PdrLut::iterator PdrLutIt;
49
51{
52
53public:
58
62 virtual ~UwHermesPhy();
63
74 virtual int command(int, const char *const *);
75
76protected:
83 virtual void endRx(Packet *p);
84
96 virtual double getPER(double snr, int nbits, Packet *);
97
98 virtual void initializeLUT();
99
100private:
107 virtual double getDistance(Packet *);
108
115 virtual double matchPS(double distance, int size);
116
124 virtual double linearInterpolator(
125 double x, double x1, double y1, double x2, double y2);
126
127 virtual double chunckInterpolator(double p, int size);
128
129 string pdr_file_name_; // LUT file name
130 char pdr_token_separator_; // LUT token separator
133
141 int BCH_N; // by default = 15; BCH(15,11,1)
142 int BCH_K; // by default = 11
143 int BCH_T; // by default = 1; unused, just for completeness
144
145 int FRAME_BIT; // by default = (9120 info bit +32 CRC bit)
146};
147
148#endif /* UWHERMESPHY_H */
Definition uwphysical.h:100
Definition uwhermesphy.h:51
string pdr_file_name_
Definition uwhermesphy.h:129
virtual void initializeLUT()
Definition uwhermesphy.cpp:114
virtual double matchPS(double distance, int size)
Definition uwhermesphy.cpp:274
virtual void endRx(Packet *p)
Definition uwhermesphy.cpp:143
int FRAME_BIT
Definition uwhermesphy.h:145
PdrLut range2pdr_
Definition uwhermesphy.h:131
int BCH_T
Definition uwhermesphy.h:143
virtual int command(int, const char *const *)
Definition uwhermesphy.cpp:84
virtual double linearInterpolator(double x, double x1, double y1, double x2, double y2)
Definition uwhermesphy.cpp:310
UwHermesPhy()
Definition uwhermesphy.cpp:66
virtual double getDistance(Packet *)
Definition uwhermesphy.cpp:260
virtual double getPER(double snr, int nbits, Packet *)
Definition uwhermesphy.cpp:253
virtual double chunckInterpolator(double p, int size)
Definition uwhermesphy.cpp:328
int BCH_K
Definition uwhermesphy.h:142
int BCH_N
Definition uwhermesphy.h:141
virtual ~UwHermesPhy()
Definition uwhermesphy.cpp:79
bool initLUT_
Definition uwhermesphy.h:132
char pdr_token_separator_
Definition uwhermesphy.h:130
PdrLut::iterator PdrLutIt
Definition uwhermesphy.h:48
::std::map< double, double > PdrLut
Definition uwhermesphy.h:47
Definition of UwPhysical class.