SIMLIB/C++  3.07
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
simlib3::ZDelay Class Reference

#include <zdelay.h>

Inheritance diagram for simlib3::ZDelay:
Inheritance graph
[legend]
Collaboration diagram for simlib3::ZDelay:
Collaboration graph
[legend]

Public Member Functions

 ZDelay (Input i, ZDelayTimer *clock=default_clock, double initvalue=0)
 
 ZDelay (Input i, double initvalue)
 
 ~ZDelay ()
 
void Init (double iv)
 
virtual void Init ()
 
virtual double Value () override
 get block output value
this method should be defined in classes derived from aContiBlock 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 Member Functions

virtual void SampleIn ()
 
virtual void SampleOut ()
 

Protected Attributes

double new_value
 
double old_value
 
double initval
 
- Protected Attributes inherited from simlib3::aContiBlock
bool isEvaluated
 
- Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?) More...
 

Static Protected Attributes

static ZDelayTimerdefault_clock = 0
 

Private Member Functions

 ZDelay (const ZDelay &)
 
void operator= (const ZDelay &)
 

Private Attributes

double input_value
 
ZDelayTimerclock
 

Friends

class ZDelayTimer
 

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 }
 

Detailed Description

Definition at line 55 of file zdelay.h.

Constructor & Destructor Documentation

◆ ZDelay() [1/3]

simlib3::ZDelay::ZDelay ( const ZDelay )
private

◆ ZDelay() [2/3]

simlib3::ZDelay::ZDelay ( Input  i,
ZDelayTimer clock = default_clock,
double  initvalue = 0 
)
explicit

Definition at line 197 of file zdelay.cc.

References clock, Dprintf, Init(), simlib3::ZDelayTimer::Register(), and SIMLIB_internal_error.

◆ ZDelay() [3/3]

simlib3::ZDelay::ZDelay ( Input  i,
double  initvalue 
)

Definition at line 212 of file zdelay.cc.

References clock, Dprintf, Init(), simlib3::ZDelayTimer::Register(), and SIMLIB_internal_error.

◆ ~ZDelay()

simlib3::ZDelay::~ZDelay ( )

Definition at line 231 of file zdelay.cc.

References clock, Dprintf, and simlib3::ZDelayTimer::UnRegister().

Member Function Documentation

◆ Init() [1/2]

void simlib3::ZDelay::Init ( double  iv)

Definition at line 246 of file zdelay.cc.

References Init(), and initval.

◆ Init() [2/2]

void simlib3::ZDelay::Init ( )
virtual

Definition at line 241 of file zdelay.cc.

References Dprintf, initval, input_value, new_value, and old_value.

Referenced by Init(), and ZDelay().

◆ operator=()

void simlib3::ZDelay::operator= ( const ZDelay )
private

◆ SampleIn()

void simlib3::ZDelay::SampleIn ( )
protectedvirtual

Definition at line 254 of file zdelay.cc.

References Dprintf, input_value, and simlib3::aContiBlock1::InputValue().

◆ SampleOut()

void simlib3::ZDelay::SampleOut ( )
protectedvirtual

Definition at line 260 of file zdelay.cc.

References Dprintf, input_value, new_value, and old_value.

◆ Value()

double simlib3::ZDelay::Value ( )
overridevirtual

get block output value
this method should be defined in classes derived from aContiBlock

Implements simlib3::aContiBlock.

Definition at line 270 of file zdelay.cc.

References Dprintf, and old_value.

Friends And Related Function Documentation

◆ ZDelayTimer

friend class ZDelayTimer
friend

Definition at line 60 of file zdelay.h.

Member Data Documentation

◆ clock

ZDelayTimer* simlib3::ZDelay::clock
private

◆ default_clock

ZDelayTimer * simlib3::ZDelay::default_clock = 0
staticprotected

Definition at line 69 of file zdelay.h.

Referenced by simlib3::SIMLIB_ZDelayTimer::InitAll().

◆ initval

double simlib3::ZDelay::initval
protected

Definition at line 68 of file zdelay.h.

Referenced by Init().

◆ input_value

double simlib3::ZDelay::input_value
private

Definition at line 58 of file zdelay.h.

Referenced by Init(), SampleIn(), and SampleOut().

◆ new_value

double simlib3::ZDelay::new_value
protected

Definition at line 65 of file zdelay.h.

Referenced by Init(), and SampleOut().

◆ old_value

double simlib3::ZDelay::old_value
protected

Definition at line 66 of file zdelay.h.

Referenced by Init(), SampleOut(), and Value().


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