|
SIMLIB/C++
3.07
|
continuous signal delay block More...
#include <delay.h>


Classes | |
| struct | Buffer |
| abstract base class for delayed signal samples storage More... | |
Public Member Functions | |
| Delay (Input i, double dt, double initvalue=0) | |
| initialize and register delay block More... | |
| ~Delay () | |
| remove buffer and delay block from list More... | |
| void | Init () |
| initialize delay block More... | |
| void | Sample () |
| sample input (called automatically) More... | |
| double | Value () override |
| output of continuous delay block More... | |
| double | Set (double newDT) |
| change delay time (EXPERIMENTAL) More... | |
Public Member Functions inherited from simlib3::aContiBlock1 | |
| aContiBlock1 (Input i) | |
| constructor for blocks with single input More... | |
| double | InputValue () |
Public Member Functions inherited from simlib3::aContiBlock | |
| aContiBlock () | |
| virtual void | _Eval () |
| evaluate block (with loop detection) More... | |
Public Member Functions inherited from simlib3::SimObject | |
| bool | TestAndSetFlag (bool new_value, unsigned n) |
| internal method for flag manipulation is used for algebraic loop checking in continuous blocks More... | |
| SimObject () | |
| constructor More... | |
| virtual | ~SimObject () |
| virtual destructor More... | |
| void * | operator new (size_t size) |
| allocate object, set _flags More... | |
| void | operator delete (void *ptr) |
| deallocate object More... | |
| void * | operator new[] (size_t size)=delete |
| void | operator delete[] (void *ptr)=delete |
| bool | isAllocated () const |
| virtual std::string | Name () const |
| get object name More... | |
| bool | HasName () const |
| void | SetName (const std::string &name) |
| assign the name More... | |
| virtual void | Output () const |
| print object to default output More... | |
Protected Attributes | |
| double | last_time |
| memory for delayed signal samples More... | |
| double | last_value |
| last output value More... | |
| Buffer * | buffer |
| memory for past values More... | |
| double | dt |
| Parameter: delay time (should be > MaxStep) More... | |
| double | initval |
| initial value (used at start) More... | |
Protected Attributes inherited from simlib3::aContiBlock | |
| bool | isEvaluated |
Protected Attributes inherited from simlib3::SimObject | |
| unsigned | _flags |
| bool flags for internal use (TODO bitfield?) More... | |
Private Member Functions | |
| Delay (const Delay &) | |
| void | operator= (const Delay &) |
Additional Inherited Members | |
Public Types inherited from simlib3::SimObject | |
| enum | _Flags { _CLEAR_ALL_FLAGS = 0, _ALLOCATED_FLAG = 1<<0, _EVAL_FLAG = 1<<1, _HAS_NAME_FLAG = 1<<2 } |
|
private |
| simlib3::Delay::Delay | ( | Input | i, |
| double | dt, | ||
| double | initvalue = 0 |
||
| ) |
initialize and register delay block
Definition at line 178 of file delay.cc.
References Dprintf, Init(), and simlib3::SIMLIB_Delay::Register().
| simlib3::Delay::~Delay | ( | ) |
remove buffer and delay block from list
Definition at line 193 of file delay.cc.
References buffer, Dprintf, and simlib3::SIMLIB_Delay::UnRegister().
| void simlib3::Delay::Init | ( | ) |
initialize delay block
initialize delay status
called automatically by Init(....) function initialize: buffer and last output value WARNING: does not change dt ### (maybe problem for multiple experiments) TODO: evaluate input expression of delay block?
Definition at line 207 of file delay.cc.
References buffer, simlib3::Delay::Buffer::clear(), initval, last_time, last_value, simlib3::Delay::Buffer::put(), and simlib3::Time.
Referenced by Delay().
|
private |
| void simlib3::Delay::Sample | ( | ) |
sample input (called automatically)
sample input value
Definition at line 215 of file delay.cc.
References buffer, Dprintf, simlib3::aContiBlock1::InputValue(), simlib3::Delay::Buffer::put(), and simlib3::Time.
| double simlib3::Delay::Set | ( | double | newdelay | ) |
change delay time (EXPERIMENTAL)
change delay time
TODO: EXPERIMENTAL — this should be used with care
Definition at line 239 of file delay.cc.
References dt, and simlib3::Time.
|
overridevirtual |
output of continuous delay block
get delayed output value
Implements simlib3::aContiBlock.
Definition at line 223 of file delay.cc.
References buffer, Dprintf, dt, simlib3::Delay::Buffer::get(), last_time, last_value, and simlib3::Time.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.13