Class square_waveform

Inheritance Relationships

Base Type

Class Documentation

class square_waveform : public rcppsw::control::base_waveform

Given the current time, outputs the current value of a square wave according to configured parameters:

value = amplitude * signof(sin(2pi* frequency * time + phase)) + offset.

Can be used to create step functions as well.

Public Functions

inline explicit square_waveform(const struct config::waveform_config *const config)
inline virtual double value(double time) override

Get the current value of the waveform at time t.