| helics 3.6.1

Public Member Functions | Protected Attributes | List of all members
helics::apps::SignalGenerator Class Referenceabstract

`#include <Source.hpp>`

Inheritance diagram for helics::apps::SignalGenerator:

## Public Member Functions
| SignalGenerator (std::string_view name)
virtual void | set (std::string_view parameter, double val)
virtual void | setString (std::string_view parameter, std::string_view val)
virtual defV | generate (Time signalTime)=0
void | setTime (Time indexTime)
const std::string & | getName ()

## Protected Attributes
Time | lastTime {timeZero}
Time | keyTime {timeZero}
std::string | mName

## Detailed Description

parent class for a signal generator which generates values to feed into a helics federation

## Member Function Documentation

## ◆ generate()

virtual defV helics::apps::SignalGenerator::generate | ( | Time | signalTime | ) |
| pure virtual

generate a new value at time signalTime

Returns
  a value and a defV object

Implemented in helics::apps::PhasorGenerator, helics::apps::SineGenerator, and helics::apps::RampGenerator.

## ◆ set()

void helics::apps::SignalGenerator::set | ( | std::string_view | parameter,
|  | double | val
| ) |  |
| virtual

set a numerical parameter

Reimplemented in helics::apps::PhasorGenerator, helics::apps::SineGenerator, and helics::apps::RampGenerator.

Referenced by helics::apps::RampGenerator::set(), helics::apps::SineGenerator::set(), and helics::apps::PhasorGenerator::set().

## ◆ setString()

void helics::apps::SignalGenerator::setString | ( | std::string_view | parameter,
|  | std::string_view | val
| ) |  |
| virtual

set a string parameter

Reimplemented in helics::apps::PhasorGenerator.

Referenced by helics::apps::PhasorGenerator::setString().

## ◆ setTime()

void helics::apps::SignalGenerator::setTime | ( | Time | indexTime | ) |
| inline

set the key time

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

- Source.hpp
- Source.cpp