Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
qlibs::transportDelay< numberOfDelays > Class Template Reference

Delays the input by a specified amount of time. You can use this class to simulate a time delay. More...

#include <ltisys.hpp>

Inheritance diagram for qlibs::transportDelay< numberOfDelays >:

Public Member Functions

virtual ~transportDelay ()
 
 transportDelay (const real_t initValue=0.0_re)
 Constructor for the transportDelay class.
 
real_t delay (const real_t xInput) noexcept override
 Delays the input by a specified amount of time.
 
real_t operator() (const real_t xInput) noexcept override
 Delays the input by a specified amount of time.
 
size_t getNumberOfDelays () const noexcept
 Returns the number of delay steps configured for this instance.
 

Detailed Description

template<size_t numberOfDelays>
class qlibs::transportDelay< numberOfDelays >

Delays the input by a specified amount of time. You can use this class to simulate a time delay.

See also
delayFromTime
Template Parameters
numberOfDelayThe number of discrete delays to be used. Use the timeDelay facility or delayFromTime() function to determine the number of discrete delays required for a specified amount of time. Example :
constexpr real_t dt = 0.1_re;
transportDelay< 2.5_td(dt) )> myDelay1;
transportDelay< delayFromTime(5.2, dt) )> myDelay2;
transportDelay< 4.3_td[dt] )> myDelay2;
transportDelay(const real_t initValue=0.0_re)
Constructor for the transportDelay class.
Definition ltisys.hpp:223
constexpr size_t delayFromTime(const real_t Time, const real_t dt)
Computes the number of discrete delays required for a specified amount of time using a defined time-s...
Definition ltisys.hpp:167
float real_t
A type to instantiate a real variable double-precision of 64-bits IEEE 754.
Definition qlibs_types.hpp:43

Constructor & Destructor Documentation

◆ ~transportDelay()

template<size_t numberOfDelays>
virtual qlibs::transportDelay< numberOfDelays >::~transportDelay ( )
inlinevirtual

◆ transportDelay()

template<size_t numberOfDelays>
qlibs::transportDelay< numberOfDelays >::transportDelay ( const real_t initValue = 0.0_re)
inline

Constructor for the transportDelay class.

Parameters
[in]initValueThe output generated by the block between the start of the simulation and the Time delay.

Member Function Documentation

◆ delay()

template<size_t numberOfDelays>
real_t qlibs::transportDelay< numberOfDelays >::delay ( const real_t xInput)
inlineoverridenoexcept

Delays the input by a specified amount of time.

Parameters
[in]xInputThe signal to be delayed.
Returns
The delayed input signal

◆ getNumberOfDelays()

template<size_t numberOfDelays>
size_t qlibs::transportDelay< numberOfDelays >::getNumberOfDelays ( ) const
inlinenoexcept

Returns the number of delay steps configured for this instance.

Returns
The number of delays (equal to the template parameter).

◆ operator()()

template<size_t numberOfDelays>
real_t qlibs::transportDelay< numberOfDelays >::operator() ( const real_t xInput)
inlineoverridenoexcept

Delays the input by a specified amount of time.

Parameters
[in]xInputThe signal to be delayed.
Returns
The delayed input signal