Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

simth Namespace Reference

Namespace for all basic classes in the Simthetic simulation system. More...


Classes

class  Array
class  Device
 Abstract base class of all devices used in a FreeConnectionSystem. More...
class  CompatibleDevice
 DEPRECATED! Device class with lesser Constructor arguments. More...
class  DeviceFactory
 Abstract base class of classes used to create devices. More...
class  SimulationSystem
 Abstract base class of all classes representing a simulation system. More...
class  locking_error
class  BufferReservoir
class  checkedVector
class  CmdLineParser
class  Connection
 This class represents a connection between two interfaces of two devices. More...
class  checkedVector2d
class  vector2d
class  intVector2d
class  boolVector2d
class  intVector3d
class  Array2d
class  ControlInterface
 Abstract base class of control interfaces used to wrap member functions of devices with an common interface. More...
class  ControlInterfaceVoid
 Abstract base class of control interfaces used to wrap functions with an empty argument lists. More...
class  ControlInterfaceVoidD
 Control interface to wrap a function with an empty argument list. More...
class  ControlInterfaceT
 Abstract base class of control interfaces used to wrap functions that takes one argument. More...
class  ControlInterfaceTD
 Control interface to wrap a function that takes one argument. More...
class  DeviceDescription
 Device description from devicelist XML file. More...
class  DeviceManager
 Management of XML devicelist files. More...
class  DeviceDescriptionPriv
class  DeviceManagerPriv
class  DeviceSystemIntf
 Abstract base class of a simulation system interface. More...
class  ParameterErr
 Exception for errors in parameter files. More...
class  FitErr
class  token_not_found
 Exception for parameters that are not found. More...
class  no_such_parameter
 Exception for when a parameter is not found. More...
class  file_not_found
 Exception when a file is not found. More...
class  library_dependencies
 Exception for when library dependencies are not fulfilled. More...
class  name_conflict
 Exception for name conflicts of parameters (probably unused?). More...
class  type_error
 Exception for type errors in parameter files. More...
class  connection_error
 Exception for when newly created connections have errors. More...
class  type_mismatch_connection
 Exception for when a type mismatch occurs when creating a connection. More...
class  no_connection_error
 Exception for when an interface is not connected. More...
class  no_such_interface
 Exception for non-existent interface numbers. More...
class  no_such_loop_control
 Exception for non-existent loop control variables. More...
class  no_input_interface
 Exception for interfaces that are not input interfaces. More...
class  no_such_scheme
class  init_incomplete
class  bad_device_file
 Exception for error in device file. More...
class  device_not_found
 Exception for nonexistent device. More...
class  bad_device_description
 Exception for error in device description. More...
class  FreeConnectionSystem
 Abstract base class of a simulation systems that supports a free connection architecture. More...
class  DataInterface
 Abstract base class of input and output interfaces. More...
class  InputInterface
 Abstract base class of all input interfaces. More...
class  InputInterfaceT
 Input interface with template argument as data type. More...
class  OutputInterface
 Abstract base class of all output interfaces. More...
class  OutputInterfaceT
 Output interface with template argument as data type. More...
class  LoopControl
 Loop controls are used to control the process flow of a simulation run. More...
class  CounterLoopControl
 Loop control that increments a counter each iteration. More...
class  LinearLoopControl
 Loop control that increments a value each iteration by a fixed addend. More...
class  ParameterDescription
class  PathManager
class  BadConversion
class  GslRandomWrapper
 This class wrapps the random genererator of the Gnu Scientific Library. More...
class  RandomGenerator
class  RandomGeneratorGsl
class  GaussRng
 The function get() of this class returns a Gaussian random variate, with mean zero and standard deviation sigma. More...
class  RayleighRng
 Rayleigh distributed random number generator. More...
class  JakesRng
 Jakes distributed random number generator. More...
class  UniformRng
 Random generator for uniform distributed variates. More...
class  ExponentialMaxLimitRng
 Random generator for exponentially distributed variates with an upper interval bound for the generated values ("truncated exponential"). More...
class  DiscreteUniformRng
 Random generator for discrete uniform distributed variates. More...
class  Property
 A Property for the configuration of a device. More...
class  PropertyList
 List of properties that configures a device. More...
class  SignalSequenceBase
 Abstract base class for implementing access to a sequence. More...
class  SignalSequence
 Base class for implementing access to a sequence. More...
class  SignalSequenceAccess
 Implementation of a shallow copy of a sequence. More...
class  SignalSequenceStorage
 This class implements a sequence, including all memory allocation for storage of that sequence. More...
class  NoAttributes
class  TimeSignalAttributes
class  FreqSignalAttributes
class  LlvSeqAttributes
class  LlvSeq
class  LlvSeqStorage
class  LlvSeqAccess
class  LoadingInfo
class  BasicSimulationSystemFactory
 Abstract base class of factory classes used to create simulation systems. More...
class  SimulationSystemFactory
class  StreamDrivenSystem
 This class represents an stream driven system. More...

Sequence types with builtin-type names.

typedef SignalSequence< bool > BoolSeq
typedef SignalSequence< int > IntSeq
typedef SignalSequence< double > DoubleSeq
typedef SignalSequence< ComplexComplexSeq
typedef simth::Array< ComplexComplexArray

Sequence types with transmission system names.

typedef BoolSeq BitSeq
typedef IntSeq ModIndSeq
typedef DoubleSeq PhaseSeq
typedef ComplexSeq ModSeq
typedef ComplexArray SignalSym
typedef SignalSequence< SignalSymSymSeq
typedef double LlrType
typedef double LlvType
typedef simth::checkedVector<
LlvType
Llv
typedef SignalSequence< LlrTypeLlrSeq
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
}

Global functions.

This section contains globally defined (template) functions which do not particularly refer to any classes. These functions are defined in misc.h.

Global functions by definition should rather be avoided in an object oriented library. Please try to add this functionality inside your objects. If you really really think a global function would make sense, then please add a detailed description about the intended use case and (especially for template functions) potential side-effects.

Globally defined functions which only make sense with respect to certain classes should be especially avoided and rather be defined inside these classes.

template<class Type>
Type sqr (Type a)
 Returns the square of a parameter.

Parameter file reading

template<class T>
bool isComment (const std::string &token)
void nextLine (std::istream &inputStream)
bool seekToToken (const std::string &token, std::istream &parameterStream, bool ignoreComments=true)
bool isToken (const std::string &token, std::istream &parameterStream, bool ignoreComments=true)
std::string getStream (const std::string &token, std::istream &is)
std::string getStream (const std::string &region, const std::string &token, std::istream &is)
std::string getString (const std::string &token, std::istream &parameterStream)
std::string getPathname (const std::string &token, std::istream &parameterStream)
simth::checkedVector< std::string > getPathnameSeq (const std::string &token, std::istream &istr)
bool getBool (const std::string &token, std::istream &parameterStream)
int getInt (const std::string &token, std::istream &parameterStream)
unsigned getOctal (const std::string &istring)
int getOctal (const std::string &token, std::istream &parameterStream)
double getDouble (const std::string &token, std::istream &parameterStream)
template<class T>
checkedVector< T > getDecSeq (const std::string &token, std::istream &is)
std::vector< int > getOctalSeq (const std::string &helpString)
checkedVector< int > getOctalSeq (const std::string &token, std::istream &is)
template<class T>
checkedVector< std::complex<
T > > 
getComplSeq (const std::string &token, std::istream &is)
std::string getString (const std::string &token, std::istream &parameterStream, std::string defaultStr)
std::string getLine (const std::string &token, std::istream &parameterStream, std::string defaultStr)
std::string getPathname (const std::string &token, std::istream &parameterStream, std::string defaultStr)
bool getBool (const std::string &token, std::istream &parameterStream, bool defaultStatus)
int getInt (const std::string &token, std::istream &parameterStream, int defaultVal)
int getOctal (const std::string &token, std::istream &parameterStream, int defaultVal)
double getDouble (const std::string &token, std::istream &parameterStream, double defaultVal)
bool seekToToken (const std::string &region, const std::string &token, std::istream &parameterStream, const std::string endQualifier="[end]")
bool isToken (const std::string &region, const std::string &token, std::istream &parameterStream)
std::string getString (const std::string &region, const std::string &token, std::istream &parameterStream)
std::string getPathname (const std::string &region, const std::string &token, std::istream &parameterStream)
bool getBool (const std::string &region, const std::string &token, std::istream &parameterStream)
int getInt (const std::string &region, const std::string &token, std::istream &parameterStream)
int getOctal (const std::string &region, const std::string &token, std::istream &parameterStream)
double getDouble (const std::string &region, const std::string &token, std::istream &parameterStream)
Complex getComplex (const std::string &region, const std::string &token, std::istream &is)
checkedVector< int > getDecSeq (const std::string &region, const std::string &token, std::istream &is)
checkedVector< int > getOctalSeq (const std::string &region, const std::string &token, std::istream &is)
template<class T>
std::vector< T > getSeq (const std::string &)
template<class T>
checkedVector< T > getSeq (const std::string &region, const std::string &token, std::istream &is)
template<class T>
checkedVector< T > getSeq (const std::string &region, const std::string &token, std::istream &is, checkedVector< T > defaultSeq)
template<class T>
checkedVector< std::complex<
T > > 
getComplSeq (const std::string &region, const std::string &token, std::istream &is)
std::string getString (const std::string &region, const std::string &token, std::istream &parameterStream, std::string defaultStr)
std::string getLine (const std::string &region, const std::string &token, std::istream &parameterStream, std::string defaultStr)
std::string getPathname (const std::string &region, const std::string &token, std::istream &parameterStream, std::string defaultStr)
bool getBool (const std::string &region, const std::string &token, std::istream &parameterStream, bool defaultStatus)
int getInt (const std::string &region, const std::string &token, std::istream &parameterStream, int defaultVal)
int getOctal (const std::string &region, const std::string &token, std::istream &parameterStream, int defaultVal)
double getDouble (const std::string &region, const std::string &token, std::istream &parameterStream, double defaultVal)
size_t getSequenceLength (const std::string &token, std::istream &parameterStream)
size_t getSequenceLength (const std::string &token, std::istream &parameterStream, int defaultVal)
size_t getSequenceLength (const std::string &region, const std::string &token, std::istream &parameterStream)
size_t getSequenceLength (const std::string &region, const std::string &token, std::istream &parameterStream, int defaultVal)
template<class T>
std::ostream & printParameter (const std::string &name, T value, std::ostream &os)
bool isFilemaskMatched (const char *mask, const char *s)

Global constants for the simulation system

const double PI = M_PI
const double PI2 = 2.0 * PI
const long double ZERO_THRESHOLD = 1.0E-10
const unsigned int MAX_BITS_PER_SYMBOL = 8
const unsigned int MAX_STATES_PER_SYMBOL = 1<<MAX_BITS_PER_SYMBOL
const unsigned int MAX_GENERATOR_POLYNOM = 10000

Typedefs

typedef std::complex< double > Complex
 Type for complex-valued numbers.

Enumerations

enum  SequenceType { LLV_SEQ, LLR_SEQ }
enum  ConversionFlag { CUT, FILL, FIT }

Functions

template<class T>
std::ostream & operator<< (std::ostream &os, const Array< T > &a)
std::ostream & operator<< (std::ostream &os, const DeviceFactory::FactoryMap &fm)
template<class T>
std::ostream & operator<< (std::ostream &os, const checkedVector< T > &seq)
std::ostream & operator<< (std::ostream &os, const checkedVector< Complex > &compSeq)
template<class T>
void twoDim2oneDim (const Array2d< T > &arr, Array< T > *vec, bool fortranlike=false)
template<class T>
void oneDim2twoDim (const Array< T > &vec, size_t xSize, size_t ySize, Array2d< T > *arr, bool fortranlike=false)
template<class T>
std::ostream & operator<< (std::ostream &os, const Array2d< T > &a)
std::ostream & operator<< (std::ostream &os, const DeviceManager::DDMap &dds)
void readProperties (const std::string &region, std::istream &parameterStream, PropertyList &properties)
std::string i2string (int value)
std::string oct2string (int value)
int oct2int (int oct)
std::string demangle (const char *symbol)
template<typename T>
std::string stringify (const T &x)
template<typename T>
convertTo (const std::string &s, bool failIfLeftoverChars=true)
double arg (const Complex &comp)
int inversePower2 (int x)
double db2linearPowerRatio (double snr)
double db2reciprocalLinearPowerRatio (double snr)
void computeSplittedSizes (size_t inSize, size_t inBits1, size_t inBits2, size_t &outSize1, size_t &outSize2)
template<class T>
void splitSequence (const T &in, T *out1, T *out2, size_t bits1, size_t bits2)
template<class T>
void mergeSequences (const T &out1, const T &out2, size_t bits1, size_t bits2, T *outSeq)
void computeSplittedSizes (size_t inSize, size_t inBits1, size_t inBits2, size_t *outSize1, size_t *outSize2)
double gsl_ran_gaussian (const gsl_rng *, double)
double gsl_ran_rayleigh (const gsl_rng *, double)
std::ostream & operator<< (std::ostream &os, const PropertyList &pl)
Property::StringPairList to_stringpairs (const char **a)
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


Detailed Description

Namespace for all basic classes in the Simthetic simulation system.

In this namespace, the base classes for a simulation system with Devices is defined. Also, the implementation for a Stream Driven system is here, along with the classes for the data streams called SignalSequence. There are additional helper classes for often needed data types as well.

However, the Devices that are needed to build such a system can be found in another library simtheticlib, which also defines its classes in another namespace simthlib.


Typedef Documentation

typedef std::complex<double> simth::Complex
 

Type for complex-valued numbers.

Throughout all of Simthetic, we use this type for the complex numbers.

typedef SignalSequence<bool> simth::BoolSeq
 

SignalSequence of booleans.

typedef SignalSequence<int> simth::IntSeq
 

SignalSequence of integers

typedef SignalSequence<double> simth::DoubleSeq
 

SignalSequence of doubles

typedef SignalSequence<Complex> simth::ComplexSeq
 

SignalSequence of Complex values

typedef simth::Array<Complex> simth::ComplexArray
 

An array of Complex values.

typedef BoolSeq simth::BitSeq
 

SignalSequence of bits.

typedef IntSeq simth::ModIndSeq
 

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.

typedef DoubleSeq simth::PhaseSeq
 

SignalSequence of phase values.

typedef ComplexSeq simth::ModSeq
 

SignalSequence of complex modulation symbols.

typedef ComplexArray simth::SignalSym
 

Represents the samples of one complex symbol (e.g. ofdm symbol) to be transmitted.

typedef SignalSequence<SignalSym> simth::SymSeq
 

SignalSequence of signal symbols to be transmitted, or in other words: A sequence of ComplexArrays.

typedef double simth::LlrType
 

Data type of the LLR (log-likelihood ratio) value

typedef double simth::LlvType
 

Data type of the LLV (log-likelihood value) value

typedef simth::checkedVector<LlvType> simth::Llv
 

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), ...

See also:
LlvSeq LlrSeq Functions to convert sequences

typedef SignalSequence<LlrType> simth::LlrSeq
 

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.

See also:
LlvSeq Functions to convert sequences

typedef SignalSequence<Complex,TimeSignalAttributes> simth::TimeSignal
 

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() !

typedef SignalSequence<Complex,FreqSignalAttributes> simth::FreqSignal
 

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!

typedef simth::SignalSequence<LoadingInfo> simth::LoadingInfoSeq
 

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.


Enumeration Type Documentation

enum simth::SequenceType
 

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.

Enumeration values:
LLV_SEQ 
LLR_SEQ 

enum simth::ModType
 

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.

Enumeration values:
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 


Function Documentation

std::ostream& operator<< std::ostream &  os,
const DeviceFactory::FactoryMap &  fm
 

For easy writing to output.

std::ostream& operator<< std::ostream &  os,
const DeviceManager::DDMap &  dds
 

For easy writing to output.

template<class Type>
Type sqr Type  a  )  [inline]
 

Returns the square of a parameter.

Template function for the squaring of a parameter if and only if the operator "multiplication" is defined for this type (and is commutative). In other words, this will probably work for int, double, and Complex, but definitely not for vectors and matrices.

template<class T>
class bool isComment const std::string &  token  ) 
 

void nextLine std::istream &  inputStream  ) 
 

bool seekToToken const std::string &  token,
std::istream &  parameterStream,
bool  ignoreComments = true
 

bool isToken const std::string &  token,
std::istream &  parameterStream,
bool  ignoreComments = true
 

std::string getStream const std::string &  token,
std::istream &  is
 

std::string getStream const std::string &  region,
const std::string &  token,
std::istream &  is
 

std::string getString const std::string &  token,
std::istream &  parameterStream
 

std::string getPathname const std::string &  token,
std::istream &  parameterStream
 

simth::checkedVector<std::string> getPathnameSeq const std::string &  token,
std::istream &  istr
 

bool getBool const std::string &  token,
std::istream &  parameterStream
 

int getInt const std::string &  token,
std::istream &  parameterStream
 

unsigned getOctal const std::string &  istring  ) 
 

int getOctal const std::string &  token,
std::istream &  parameterStream
 

double getDouble const std::string &  token,
std::istream &  parameterStream
 

template<class T>
checkedVector< int > simth::getDecSeq const std::string &  token,
std::istream &  is
 

std::vector<int> getOctalSeq const std::string &  helpString  ) 
 

checkedVector<int> getOctalSeq const std::string &  token,
std::istream &  is
 

template<class T>
checkedVector<std::complex<T> > getComplSeq const std::string &  token,
std::istream &  is
 

std::string getString const std::string &  token,
std::istream &  parameterStream,
std::string  defaultStr
 

std::string getLine const std::string &  token,
std::istream &  parameterStream,
std::string  defaultStr
 

std::string getPathname const std::string &  token,
std::istream &  parameterStream,
std::string  defaultStr
 

bool getBool const std::string &  token,
std::istream &  parameterStream,
bool  defaultStatus
 

int getInt const std::string &  token,
std::istream &  parameterStream,
int  defaultVal
 

int getOctal const std::string &  token,
std::istream &  parameterStream,
int  defaultVal
 

double getDouble const std::string &  token,
std::istream &  parameterStream,
double  defaultVal
 

bool seekToToken const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
const std::string  endQualifier = "[end]"
 

bool isToken const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

std::string getString const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

std::string getPathname const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

bool getBool const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

int getInt const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

int getOctal const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

double getDouble const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

Complex getComplex const std::string &  region,
const std::string &  token,
std::istream &  is
 

checkedVector<int> getDecSeq const std::string &  region,
const std::string &  token,
std::istream &  is
 

checkedVector<int> getOctalSeq const std::string &  region,
const std::string &  token,
std::istream &  is
 

template<class T>
std::vector<T> getSeq const std::string &   ) 
 

template<class T>
checkedVector<T> getSeq const std::string &  region,
const std::string &  token,
std::istream &  is
 

template<class T>
checkedVector<T> getSeq const std::string &  region,
const std::string &  token,
std::istream &  is,
checkedVector< T >  defaultSeq
 

template<class T>
checkedVector<std::complex<T> > getComplSeq const std::string &  region,
const std::string &  token,
std::istream &  is
 

std::string getString const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
std::string  defaultStr
 

std::string getLine const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
std::string  defaultStr
 

std::string getPathname const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
std::string  defaultStr
 

bool getBool const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
bool  defaultStatus
 

int getInt const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
int  defaultVal
 

int getOctal const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
int  defaultVal
 

double getDouble const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
double  defaultVal
 

size_t getSequenceLength const std::string &  token,
std::istream &  parameterStream
 

Reads a parameter value from the given stream. It works as simth::getInt(...) save it encounters a negative value. In that case the return value equals DataInterface::undefinedLength(). If the sequence length of an InputInterface is set to this length and the firts input sequence arrives the sequence length will be set to the length of that very first input length.

size_t getSequenceLength const std::string &  token,
std::istream &  parameterStream,
int  defaultVal
 

Same as getSequenceLength(const std::string& token, std::istream& parameterStream) but takes an default value. Note that the default value can be negative. In that case the default sequence length will be set to DataInterface::undefinedLength().

size_t getSequenceLength const std::string &  region,
const std::string &  token,
std::istream &  parameterStream
 

Same as getSequenceLength(const std::string& token, std::istream& parameterStream) save it only looks within the input stream region marked by the argument 'region', i.e. within '[region]' and '[end]'.

size_t getSequenceLength const std::string &  region,
const std::string &  token,
std::istream &  parameterStream,
int  defaultVal
 

Same as getSequenceLength(const std::string& token, std::istream& parameterStream, int defaultVal) save it only looks within the input stream region marked by the argument 'region', i.e. within '[region]' and '[end]'.

template<class T>
std::ostream& printParameter const std::string &  name,
value,
std::ostream &  os
[inline]
 

This function should be used for the output of a parameter value to an output stream, e.g. simth::printParameter("channel type","WSSUS Typical Urban",os). Do not forget to put an 'endl' after that function if you want a newline.

bool isFilemaskMatched const char *  mask,
const char *  s
 

Returns 'True' if the string 's' matches the pattern 'mask'. 'mask' may contain meta characters '?', match against one character, and '*' match from 0 to n characters. (Code from http://sourceforge.net/snippet)

class void readProperties const std::string &  region,
std::istream &  parameterStream,
PropertyList &  properties
 

Helper function to fill in the values in a PropertyList from the conventional "parameter file" of simthetic.

Note: The PropertyList is completely independent from this function. The way how the PropertyList is filled with values can be chosen absolutely independently from the implementation of the PropertyList.

std::string i2string int  value  ) 
 

std::string oct2string int  value  ) 
 

int oct2int int  oct  ) 
 

std::string demangle const char *  symbol  ) 
 

Returns a string describing the (demangled) type of the given mangled type symbol.

Note: To get the demangled type name for some class, you would call simth::demangle(typeid(MyClass).name())

template<typename T>
std::string stringify const T &  x  )  [inline]
 

Converts an arbitrary type T to a std::string, provided T supports syntax like std::cout << x. (Copied from Marshall Cline's FAQ list.)

template<typename T>
T convertTo const std::string &  s,
bool  failIfLeftoverChars = true
[inline]
 

Converts a string to any type that supports iostream input. (Copied from Marshall Cline's FAQ list.)

void simth::computeSplittedSizes size_t  inSize,
size_t  inBits1,
size_t  inBits2,
size_t &  outSize1,
size_t &  outSize2
[inline]
 

template<class T>
void splitSequence const T &  in,
T *  out1,
T *  out2,
size_t  bits1,
size_t  bits2
 

Split one sequence into two sequences. The size of the sequence must be a multiple of bits1+bits2.

FIXME: This can better be moved to signals.h, doesn't it?

Then the bits with index (n $\times$ (bits1+bits)) to (n $\times$ (bits1+bits)+bits1) for n=0$\ldots$ are splitted to sequence 1 and the bits with index (n $\times$ (bits1+bits) + bits1) to (n $\times$ (bits1+bits)+ bits1+bits2) are splitted to squence 2.

template<class T>
void mergeSequences const T &  out1,
const T &  out2,
size_t  bits1,
size_t  bits2,
T *  outSeq
 

void computeSplittedSizes size_t  inSize,
size_t  inBits1,
size_t  inBits2,
size_t *  outSize1,
size_t *  outSize2
[inline]
 

double gsl_ran_gaussian const gsl_rng *  ,
double 
 

double gsl_ran_rayleigh const gsl_rng *  ,
double 
 

std::ostream& operator<< std::ostream &  os,
const PropertyList &  pl
 

Output.

Property::StringPairList to_stringpairs const char **  a  ) 
 

Helper function to create a list of string pairs from an array of const char*, terminated by a 0 (zero, NULL). The element in the given array are, alternating, the first and the second element of each pair. I.e. you can write {"1st pair->first", "1st pair->second", "2nd pair->first", "2nd pair->second", 0} and so on.

However, since C++ does not allow anonymus char* arrays, you have to store the char array in a variable. I.e. you need to write

      simth::PropertyList pl;
      const char * a[] = { "option1", "explanation of option", "option2", "explanation", 0 };
      pl.addProperty("my_mode", "enum", "option1", "description of property", simth::to_stringpairs( a ));

Note:
Watch out -- if you forget the trailing 0 (zero, NULL) then this function will crash.

SequenceType string2SequenceType const std::string &  s  ) 
 

DEPRECATED. Conversion function from string to the SequenceType type flag.

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
 


Variable Documentation

const double simth::PI = M_PI
 

Pi

const double simth::PI2 = 2.0 * PI
 

2*Pi

const long double simth::ZERO_THRESHOLD = 1.0E-10
 

The threshold below which some routines will assume values to be zero.

const unsigned int simth::MAX_BITS_PER_SYMBOL = 8
 

Upper limit on the complexity of the constellation diagram, by limiting the possible number of bits per constellation symbol.

This is used when allocating memory in the viterbi decoding, and therefore it shouldn't be set higher than necessary. (FIXME: is this correct? Also, can't we increase this to, say, 16?)

const unsigned int simth::MAX_STATES_PER_SYMBOL = 1<<MAX_BITS_PER_SYMBOL
 

Upper limit on the complexity of the constellation diagram, by limiting the possible number of constellation symbols -- which is a direct function of MAX_BITS_PER_SYMBOL.

This is used when allocating memory in the viterbi decoding, and therefore it shouldn't be set higher than necessary. (FIXME: is this correct? Also, can't we increase this to, say, 16?)

const unsigned int simth::MAX_GENERATOR_POLYNOM = 10000
 

FIXME: what is this?

const double simth::HIGH_METRIC = 1e9
 

Constant value that can be used when an incredibly good metric is needed.


Generated on Mon Apr 24 21:19:19 2006 for simthetic by  doxygen 1.4.1