86 lines
2.0 KiB
Plaintext
86 lines
2.0 KiB
Plaintext
/*
|
|
* OpenBTS provides an open source alternative to legacy telco protocols and
|
|
* traditionally complex, proprietary hardware systems.
|
|
*
|
|
* Copyright 2008 Free Software Foundation, Inc.
|
|
* Copyright 2014 Range Networks, Inc.
|
|
*
|
|
* This software is distributed under the terms of the GNU General Public
|
|
* License version 3. See the COPYING and NOTICE files in the current
|
|
* directory for licensing information.
|
|
*
|
|
* This use of this software may be subject to additional restrictions.
|
|
* See the LEGAL file in the main directory for details.
|
|
*/
|
|
|
|
|
|
#ifndef __SIGNALVECTOR_H__
|
|
#define __SIGNALVECTOR_H__
|
|
|
|
|
|
#include "Vector.h"
|
|
#include "Complex.h"
|
|
#include "UMTSTransfer.h"
|
|
|
|
|
|
using namespace UMTS;
|
|
|
|
/** Indicated signalVector symmetry */
|
|
typedef enum Symmetry {
|
|
NONE = 0,
|
|
ABSSYM = 1
|
|
};
|
|
|
|
/** the core data structure of the Transceiver */
|
|
class signalVector: public Vector<complex>
|
|
{
|
|
|
|
private:
|
|
|
|
Symmetry symmetry; ///< the symmetry of the vector
|
|
bool realOnly; ///< true if vector is real-valued, not complex-valued
|
|
|
|
public:
|
|
|
|
/** Constructors */
|
|
signalVector(int dSize=0, Symmetry wSymmetry = NONE):
|
|
Vector<complex>(dSize),
|
|
realOnly(false)
|
|
{
|
|
symmetry = wSymmetry;
|
|
};
|
|
|
|
signalVector(complex* wData, size_t start,
|
|
size_t span, Symmetry wSymmetry = NONE):
|
|
Vector<complex>(NULL,wData+start,wData+start+span),
|
|
realOnly(false)
|
|
{
|
|
symmetry = wSymmetry;
|
|
};
|
|
|
|
signalVector(const signalVector &vec1, const signalVector &vec2):
|
|
Vector<complex>(vec1,vec2),
|
|
realOnly(false)
|
|
{
|
|
symmetry = vec1.symmetry;
|
|
};
|
|
|
|
signalVector(const signalVector &wVector):
|
|
Vector<complex>(wVector.size()),
|
|
realOnly(false)
|
|
{
|
|
wVector.copyTo(*this);
|
|
symmetry = wVector.getSymmetry();
|
|
};
|
|
|
|
/** symmetry operators */
|
|
Symmetry getSymmetry() const { return symmetry;};
|
|
void setSymmetry(Symmetry wSymmetry) { symmetry = wSymmetry;};
|
|
|
|
/** real-valued operators */
|
|
bool isRealOnly() const { return realOnly;};
|
|
void isRealOnly(bool wOnly) { realOnly = wOnly;};
|
|
};
|
|
|
|
#endif
|