SIMLIB/C++
3.07
|
State variables (memory) base for blocks with internal state (Relay, ...) More...
#include <simlib.h>
Public Member Functions | |
Status (Input i, double initvalue=0) | |
~Status () | |
void | Init (double initvalue) |
set initial value More... | |
void | Init () |
void | Set (double value) |
set state variable value (step change) More... | |
virtual void | Eval () override |
evaluate without loop detection More... | |
virtual double | Value () override |
value of state variable More... | |
void | Save () |
void | Restore () |
void | SetState (double s) |
double | GetState (void) |
void | SetOldState (double s) |
double | GetOldState (void) |
void | SetValid (bool flag) |
![]() | |
aContiBlock1 (Input i) | |
constructor for blocks with single input More... | |
double | InputValue () |
![]() | |
aContiBlock () | |
virtual void | _Eval () |
evaluate block (with loop detection) More... | |
![]() | |
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... | |
Public Attributes | |
double | st |
status More... | |
double | stl |
status from previous step More... | |
Protected Member Functions | |
void | CtrInit () |
Protected Attributes | |
double | initval |
initial value More... | |
bool | ValueOK |
StatusContainer::iterator | it_list |
position in list of status variables More... | |
![]() | |
bool | isEvaluated |
![]() | |
unsigned | _flags |
bool flags for internal use (TODO bitfield?) More... | |
Additional Inherited Members | |
![]() | |
enum | _Flags { _CLEAR_ALL_FLAGS = 0, _ALLOCATED_FLAG = 1<<0, _EVAL_FLAG = 1<<1, _HAS_NAME_FLAG = 1<<2 } |
State variables (memory) base for blocks with internal state (Relay, ...)
simlib3::Status::Status | ( | Input | i, |
double | initvalue = 0 |
||
) |
simlib3::Status::~Status | ( | ) |
Definition at line 408 of file intg.cc.
References simlib3::CantDestroyStatus, Dprintf, simlib3::StatusContainer::Erase(), it_list, simlib3::SIMLIB_error(), and simlib3::StatusContainer::Size().
|
protected |
Definition at line 383 of file intg.cc.
References simlib3::CantCreateStatus, Dprintf, simlib3::StatusContainer::Insert(), simlib3::Integrator::it_list, simlib3::SIMLIB_error(), and simlib3::StatusContainer::Size().
Referenced by Status().
|
overridevirtual |
evaluate without loop detection
Reimplemented from simlib3::aContiBlock.
Reimplemented in simlib3::Relay, simlib3::Blash, and simlib3::Hyst.
Definition at line 469 of file intg.cc.
References simlib3::aContiBlock1::InputValue(), simlib3::StatusContainer::ListPtr, st, and ValueOK.
void simlib3::Status::Init | ( | double | initvalue | ) |
|
inline |
void simlib3::Status::Restore | ( | void | ) |
void simlib3::Status::Set | ( | double | value | ) |
|
inline |
Definition at line 1359 of file simlib.h.
References simlib3::flag.
|
overridevirtual |
value of state variable
Implements simlib3::aContiBlock.
Definition at line 448 of file intg.cc.
References simlib3::aContiBlock::_Eval(), simlib3::SimObject::HasName(), simlib3::SimObject::Name(), simlib3::SIMLIB_create_tmp_name(), st, and ValueOK.
Referenced by Sample().
|
protected |
|
protected |
double simlib3::Status::st |
status
Definition at line 1342 of file simlib.h.
Referenced by Eval(), simlib3::Hyst::Eval(), simlib3::Blash::Eval(), simlib3::Relay::Eval(), Init(), Restore(), Set(), and Value().
double simlib3::Status::stl |
status from previous step
Definition at line 1343 of file simlib.h.
Referenced by simlib3::Hyst::Eval(), simlib3::Blash::Eval(), simlib3::Relay::Eval(), and Restore().
|
protected |
Definition at line 1338 of file simlib.h.
Referenced by Eval(), simlib3::Hyst::Eval(), simlib3::Blash::Eval(), simlib3::Relay::Eval(), Init(), Restore(), Set(), and Value().