SimulationChain
 All Classes Functions Variables Pages
CNoiseGen Class Reference

#include <NoiseGen.h>

Inheritance diagram for CNoiseGen:
Collaboration diagram for CNoiseGen:

Public Member Functions

 CNoiseGen (std::string sName="Noise")
 
double GenerateNext () override
 Used to generate next signal sample. More...
 
void Reset () override
 Resets the generator to the enter state. More...
 
void LoadState (boost::property_tree::ptree::value_type const &vParams) override
 Sets generator parameters. More...
 
void SetVariance (double dVar)
 Sets variance of the noise. More...
 
void SetAmplitude (double dA)
 Sets amplitude. More...
 
void SaveState (boost::property_tree::ptree &pt) const override
 
- Public Member Functions inherited from CGenerator
 CGenerator (std::string &sName, GenType type)
 Abstract class constructor to initialize common components. More...
 
GenType GetType () const override
 Gets type of the generator. More...
 
const std::string & GetName () const override
 Gets name. More...
 
void SetName (std::string &sName) override
 Sets name. More...
 
void SetDelay (int nD) override
 Sets the delay in samples. More...
 
void SaveHistory () override
 Internally saves a current state in relation with the output signal generation. More...
 
void LoadHistory () override
 Restores an internal state saved with SaveHistory() method. More...
 

Additional Inherited Members

- Protected Attributes inherited from CGenerator
const GenType m_Type
 generator type
 
std::string m_sName
 generator name
 
int m_nI
 number of sample in a sequence
 
int m_nIBack
 saved state of the m_nI variable
 
int m_nDelay
 delay of the output in samples
 

Detailed Description

Responsible for generating white noise with given variance.

Member Function Documentation

double CNoiseGen::GenerateNext ( )
inlineoverridevirtual

Used to generate next signal sample.

Returns
Next generated sample of the output.

Implements IGenerator.

void CNoiseGen::LoadState ( boost::property_tree::ptree::value_type const &  vParams)
inlineoverridevirtual

Sets generator parameters.

Parameters
[in]vParamsProperty tree containing data to deserialize the object.

Implements CGenerator.

void CNoiseGen::Reset ( )
inlineoverridevirtual

Resets the generator to the enter state.

Implements IGenerator.

void CNoiseGen::SaveState ( boost::property_tree::ptree &  pt) const
inlineoverridevirtual

saving all the properties to the tree

Implements CGenerator.

void CNoiseGen::SetAmplitude ( double  dA)
inline

Sets amplitude.

Parameters
[in]dAAmplitude of the output.
void CNoiseGen::SetVariance ( double  dVar)
inline

Sets variance of the noise.

Parameters
[in]dVarVariance of the output.

The documentation for this class was generated from the following file: