SimulationChain
 All Classes Functions Variables Pages
CSineGen Class Reference

#include <SinGen.h>

Inheritance diagram for CSineGen:
Collaboration diagram for CSineGen:

Public Member Functions

 CSineGen (std::string sName="Sine")
 
double GenerateNext () override
 Used to generate next signal sample. More...
 
void Reset () override
 Resets the generator to the enter state. More...
 
void SetAmplitude (double dA)
 Sets amplitude. More...
 
void SetPeriod (int nT)
 Sets period in samples. More...
 
void LoadState (boost::property_tree::ptree::value_type const &vParams) override
 Sets generator parameters. 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 sinus signal.

Member Function Documentation

double CSineGen::GenerateNext ( )
inlineoverridevirtual

Used to generate next signal sample.

Returns
Next generated sample of the output.

calculating delay

Implements IGenerator.

void CSineGen::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 CSineGen::Reset ( )
inlineoverridevirtual

Resets the generator to the enter state.

Implements IGenerator.

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

saving all the properties to the tree

Implements CGenerator.

void CSineGen::SetAmplitude ( double  dA)
inline

Sets amplitude.

Parameters
[in]dAAmplitude of the output.
void CSineGen::SetPeriod ( int  nT)
inline

Sets period in samples.

Parameters
[in]nTPeriod of the output in samples.

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