#include <iostream>
#include <vector>
#include <stdexcept>
#include <simthetic/misc.h>
#include <simthetic/array.h>
#include <simthetic/checkedvector.h>
Go to the source code of this file.
Namespaces | |
namespace | simth |
Sequence types with builtin-type names. | |
typedef SignalSequence< bool > | BoolSeq |
typedef SignalSequence< int > | IntSeq |
typedef SignalSequence< double > | DoubleSeq |
typedef SignalSequence< Complex > | ComplexSeq |
typedef simth::Array< Complex > | ComplexArray |
Sequence types with transmission system names. | |
typedef BoolSeq | BitSeq |
typedef IntSeq | ModIndSeq |
typedef DoubleSeq | PhaseSeq |
typedef ComplexSeq | ModSeq |
typedef ComplexArray | SignalSym |
typedef SignalSequence< SignalSym > | SymSeq |
typedef double | LlrType |
typedef double | LlvType |
typedef simth::checkedVector< LlvType > | Llv |
typedef SignalSequence< LlrType > | LlrSeq |
typedef SignalSequence< Complex, TimeSignalAttributes > | TimeSignal |
typedef SignalSequence< Complex, FreqSignalAttributes > | FreqSignal |
Declarations for LoadingInfoSeq | |
typedef simth::SignalSequence< LoadingInfo > | LoadingInfoSeq |
enum | ModType { UNMOD, PSK_2, PSK_4, PSK_8, RAM_8, QAM_4, QAM_16, QAM_32, RAM_32, QAM_64, QAM_128, RAM_128, QAM_256 } |
Defines | |
#define | DLLIMPORT |
Enumerations | |
enum | SequenceType { LLV_SEQ, LLR_SEQ } |
enum | ConversionFlag { CUT, FILL, FIT } |
Functions | |
SequenceType | string2SequenceType (const std::string &s) |
template<class Val, class Attr, class Cont, class Stor, class Accs> | |
std::ostream & | operator<< (std::ostream &os, const SignalSequenceBase< Val, Attr, Cont, Stor, Accs > &seq) |
template<class T, class A, class Cont> | |
std::ostream & | operator<< (std::ostream &os, const SignalSequenceStorage< T, A, Cont > &seq) |
std::ostream & | operator<< (std::ostream &os, const BitSeq &bits) |
unsigned | bits2value (BitSeq::const_iterator first, BitSeq::const_iterator behindLast) |
bool | value2bit (unsigned index, size_t bitPos) |
void | value2bits (unsigned index, BitSeq::iterator first, BitSeq::iterator behindLast) |
double | llrValue2llvValue (LlrType llrValue, bool bitValue) |
bool | llrValue2bit (LlrType llrValue) |
LlvType | bit2llvValue (bool bit, bool index) |
LlrType | bit2llrValue (bool bit) |
void | bitSeq2llvSeq (const BitSeq &bits, LlvSeq &llv) |
void | bitSeq2llvSeq (const BitSeq &bits, LlvSeq *llv) |
void | llrSeq2bitLlvSeq (const LlrSeq &llr, LlvSeq &llv) |
void | llrSeq2bitLlvSeq (const LlrSeq &llr, LlvSeq *llv) |
void | llrSeq2bitSeq (const LlrSeq &from, BitSeq &bits) |
void | llrSeq2bitSeq (const LlrSeq &from, BitSeq *bits) |
void | llvSeq2bitLlvSeq (const LlvSeq &from, LlvSeq &bitLlv) |
void | llvSeq2bitLlvSeq (const LlvSeq &from, LlvSeq *bitLlv) |
void | llvSeq2llrSeq (const LlvSeq &from, LlrSeq &to, size_t outputLength=0) |
void | llvSeq2llrSeq (const LlvSeq &from, LlrSeq *to, size_t outputLength=0) |
void | bitLlvSeq2llvSeq (const LlvSeq &from, LlvSeq &to, unsigned bitsPerState=0) |
void | bitLlvSeq2llvSeq (const LlvSeq &from, LlvSeq *to, unsigned bitsPerState=0) |
void | bitSeq2IntSeq (const simth::BitSeq &bs, simth::checkedVector< int > &IntSeq, int numBits) |
size_t | getSymSeqLength (size_t bitSeqLen, unsigned bitsPerSym, ConversionFlag flag=FIT) |
Variables | |
const double | HIGH_METRIC = 1e9 |
Beside the elements ("signal samples") itself, a sequence can hold additional information in its attributes class. For example, a simth::TimeSignal stores the time distance between two samples in the attributes class. The attributes can be accessed by mySequenceObj.rAttributes() and mySequenceObj.wAttributes() for read-only mode and for read-and-write mode, respectivley. Before using the wAttributes() and hence using the read-and-write mode, one should make sure that the attributes are not locked by the owner of the sequence/signal. This can be checked by the function rAttributes().isAttributesLocked(). As with the sequences, the attributes classes are not derived by a common base class, but they are plainly implemented as seperate classes that have to provide certain functions to be used as template argument of signal sequences.
Some sequences that are frequently used are
A sequence is available as two classes: One class that holds actual storage (simth::SignalSequenceStorage<T>
or equivalently simth::SignalSequence<T>::storage_type), and the other one only holding a shallow copy (i.e. pointers; SignalSequenceAccess<T>
or equivalently SignalSequence<T>::access_type
) to another SignalSequence<T>::storage_type
object. It is always possible and cheap to create a shallow copy object of an existing SignalSequence<T>::storage_type
or SignalSequence<T>::access_type
using the access_type. Creating a SignalSequence::storage_type (as deep copy), however, may be an expensive operation.
All the above mentioned sequences are included as typedefs in this file, where e.g. BitSeq::access_type stands for the shallow-copy object, and BitSeq::storage_type stands for the actual storage (deep-copy) object. For these typedef'd sequences, the templates are explicitly instantiated inside the simthetic program, so you don't need to include signalsequence_impl.h, which will speed up your compile time considerably.
To convert a sequence type to another, use the functions provided at the end of this file (see convertfunctions). E.g. to convert a LlvSeq to a LlrSeq use llvSeq2llrSeq();
AGAIN NOTE: This is *not* the full definition of the template classes. If you *need* the full definition (because e.g. you are using your own template argument to SignalSequence<YourClass>
), you additionally have to include the file signalsequence_impl.h.
|
|
|
SignalSequence of booleans. |
|
SignalSequence of integers |
|
SignalSequence of doubles |
|
SignalSequence of Complex values |
|
An array of Complex values. |
|
SignalSequence of bits. |
|
SignalSequence of bits which are mapped to integer values. The number of bits which are mapped for each integer value is not known by the sequence itself. This means, that from this point of view this sequence is just a sequence of integers. |
|
SignalSequence of phase values. |
|
SignalSequence of complex modulation symbols. |
|
Represents the samples of one complex symbol (e.g. ofdm symbol) to be transmitted. |
|
SignalSequence of signal symbols to be transmitted, or in other words: A sequence of ComplexArrays. |
|
Data type of the LLR (log-likelihood ratio) value |
|
Data type of the LLV (log-likelihood value) value |
|
Log-likelihood value of an M-ary decision. E.g: myLLV[0]=ln P(decision 0 is correct), myLLV[1]=ln P(decision 1 is correct), ...
|
|
SignalSequence of log likelihood ratios (LLR). LLR values represent both the probability of a bit decision u and the decision itself. They are defined by: ln p(u=0)/p(u=1). (This means that a negative LLR-value belongs to u=1!). LLR values can be stored in 2-ary LLV values with myLlv[0]=myllr/2 and myLlv[1]=-myllr/2. Hence, LLr sequences can be converted to 2-ary LLV sequences and vice versa.
|
|
Class that represents a sequence of time samples. The time distance between two samples can no longer be set by a constructor argument or by the function setDeltaT() -- instead, you have to use mysequence.wAttributes().setDeltaT() ! |
|
Class that represents a sequence of frequency samples. Note: The frequence distance between two samples can no longer be set by a constructor argument or by the function setDeltaF() -- instead, you have to use mysequence.wAttributes().setDeltaF() as a separate function call! |
|
A sequence of LoadingInfo objects which contains the information about the modulation scheme for particular subcarriers. Used by the simthlib::AdaptiveModulator and related classes. The declarations of LoadingInfo and LoadingInfoSeq have been moved to simthetic/signals.h because otherwise these types are not usable across different libraries. |
|
DEPRECATED. Auxiliary type flag for a demodulator/decoder to decide whether they exchage LLV or LLR values. Use string2SequenceType to convert from strings to this type. This type flag is not nice. You should find a different way in your class to decide which data type is being used -- maybe simply a Property, or rather a template argument. |
|
A type to distinguish between the different available modulation techniques. Used by the simthlib::AdaptiveModulator and related classes, and the more detailed information is in class simthlib::ModInfo. The declarations of LoadingInfo and LoadingInfoSeq have been moved to simthetic/signals.h because otherwise these types are not usable across different libraries. |
|
DEPRECATED. Conversion function from string to the SequenceType type flag. |
|
|
|
|
|
|
|
Constant value that can be used when an incredibly good metric is needed. |