#include <modulationschemes.h>
Inheritance diagram for simthlib::ConstellationDiagram:
Public Member Functions | |
ConstellationDiagram (unsigned bitsPerSymb) | |
virtual | ~ConstellationDiagram () |
unsigned | getBitsPerSymbol () const |
const simth::Complex & | getComplSymbol (unsigned symbolIndex) const |
unsigned | getNumStates () const |
void | scaleConstellation (const simth::Complex &scaleFactor) |
const simth::Complex & | hardDecision (const simth::Complex &r) const |
virtual void | print (std::ostream &os, bool gnuplotFormat=false) const |
Protected Member Functions | |
virtual void | setComplSymbols (unsigned symbolIndex, const simth::Complex &newValue) |
virtual void | initComplSymbols ()=0 |
The class ConstellationDiagram is an abstract base class wich provides an interface for a particular constellation diagram class (e.g. a PSK constellation diagramm class).
A modulation scheme defines points in an m-dimensional signal space (see Proakis, Digital Communications) used to transmit information in a digital transmission system. Actually, the modulation schemes declared in this file deals with two-dimensional signal spaces only. Therefore, the modulation schemes defined here can be described as a mapping between a two dimensional vector within the signal space and a so-called symbol index.
This (and the derived classes) performs an association between a finite number of bits (represented by an integer value) and the corresponding points in the constellation diagram or more precisely in the two-dimensional signal space (see Proakis, Digital Communications) represented here by the complex plane.
The points in the constellation diagram are represented by the so-called symbol indexes. The complex value that corresponds to a certain symbol index is returned by the public member function getComplSymbol().
The number of bits per symbol, respective the number of (different) symbol indexes, is passed as an argument of the constructor.
|
Class constructor.
|
|
Virtual destructor. |
|
Returns the number of bits per symbol, as specified in the constructor. |
|
Returns the complex value corresponding to the given symbol-index. This function is inline, hence it is supposed to be quite fast. |
|
Returns the modulation valency of the constellation diagram, or, more precisely, returns the number of transmit vectors within the (arbitrary) two-dimensional signal space. (FIXME: "transmitted" or "transmission" ?) |
|
Make a hard decision on the input symbol |
|
The derived functions of this pure virtual function determines the allocation between the symbol indexes and the complex values in the constellation diagram. The pairs of complex value and symbol index are set by using this function initComplSymbols() which has to be overridden by derived classes. This derived function has to be called in the constructor of the derived class! We use this somehow weird approach so that the getComplSymbol() function can be left non-virtual so that it can be inlined. Implemented in simthlib::QamConstellationDiagram. |
|
Print some information about this diagram |
|
Scales the constellation diagram, i.e. all points within the signal space are multiplied with the given complex factor. |
|
Sets the complex value corresponding to the given symbol index.
|