SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
simlib3::ZDelay Class Reference

#include <zdelay.h>

Inheritance diagram for simlib3::ZDelay:
Collaboration diagram for simlib3::ZDelay:

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
Public Member Functions inherited from simlib3::aContiBlock1
 aContiBlock1 (Input i)
 constructor for blocks with single input
double InputValue ()
Public Member Functions inherited from simlib3::aContiBlock
 aContiBlock ()
virtual void _Eval ()
 evaluation with algebraic loop detection
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
 SimObject ()
 constructor
virtual ~SimObject ()
 virtual destructor
void * operator new (size_t size)
 allocate object, set _flags
void operator delete (void *ptr)
 deallocate object
void * operator new[] (size_t size)=delete
void operator delete[] (void *ptr)=delete
bool isAllocated () const
virtual std::string Name () const
 get object name
bool HasName () const
void SetName (const std::string &name)
 assign the name
virtual void Output () const
 print object to default output

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?)

Static Protected Attributes

static ZDelayTimer * default_clock = 0

Private Member Functions

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

Private Attributes

double input_value
ZDelayTimer * clock

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

References ZDelay().

Referenced by operator=(), and ZDelay().

◆ ZDelay() [2/3]

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

◆ ZDelay() [3/3]

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

◆ ~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 ( )
virtual

Definition at line 241 of file zdelay.cc.

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

◆ Init() [2/2]

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

Definition at line 246 of file zdelay.cc.

References Init(), and initval.

Referenced by Init(), ZDelay(), and ZDelay().

◆ operator=()

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

References ZDelay().

◆ SampleIn()

void simlib3::ZDelay::SampleIn ( )
protectedvirtual

Definition at line 254 of file zdelay.cc.

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

Referenced by ZDelayTimer.

◆ SampleOut()

void simlib3::ZDelay::SampleOut ( )
protectedvirtual

Definition at line 260 of file zdelay.cc.

References Dprintf, input_value, new_value, and old_value.

Referenced by ZDelayTimer.

◆ 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.

◆ ZDelayTimer

friend class ZDelayTimer
friend

Definition at line 60 of file zdelay.h.

References SampleIn(), SampleOut(), and ZDelayTimer.

Referenced by ZDelay(), and ZDelayTimer.

Member Data Documentation

◆ clock

ZDelayTimer* simlib3::ZDelay::clock
private

◆ default_clock

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

◆ initval

double simlib3::ZDelay::initval
protected

Definition at line 68 of file zdelay.h.

Referenced by Init(), Init(), ZDelay(), and ZDelay().

◆ input_value

double simlib3::ZDelay::input_value
private

Definition at line 58 of file zdelay.h.

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

◆ new_value

double simlib3::ZDelay::new_value
protected

Definition at line 65 of file zdelay.h.

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

◆ old_value

double simlib3::ZDelay::old_value
protected

Definition at line 66 of file zdelay.h.

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


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