SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
TestProcess Class Reference
Inheritance diagram for TestProcess:
Collaboration diagram for TestProcess:

Public Member Functions

void Behavior () override
 behavior description
Public Member Functions inherited from simlib3::Process
 Process (Priority_t p=DEFAULT_PRIORITY)
 Process constructor sets state to PREPARED.
virtual ~Process ()
 Process destructor Sets state to TERMINATED and removes process from queue/calendar/waituntil list.
virtual void Output () const override
 print object to default output
virtual std::string Name () const override
 name of object
virtual void Activate (double t) override
 activate at time t (schedule)
virtual void Passivate () override
 process deactivation (sleep)
virtual void Wait (double dtime)
 wait for dtime interval
bool _WaitUntil (bool test)
 wait for condition (slow!)
void Interrupt ()
 test of WaitUntil list, allow running others
virtual void Terminate () override
 kill process
void Seize (Facility &f, ServicePriority_t sp=0)
 seize facility
void Release (Facility &f)
 release facility
void Enter (Store &s, unsigned long ReqCap=1)
 acquire some capacity
void Leave (Store &s, unsigned long ReqCap=1)
 return some capacity
virtual void Into (Queue &q)
 insert process into queue
void Activate ()
 activate now
Public Member Functions inherited from simlib3::Entity
unsigned long id () const
 Entity (Priority_t p=DEFAULT_PRIORITY)
 constructor
virtual ~Entity ()
 destructor
 operator Entity * ()
double ActivationTime ()
 get activation time of entity - iff scheduled
it is here, because Entity has no knowledge of calendar activation record structure
void Activate ()
 activate now
bool Idle ()
 entity activation is not scheduled in calendar
void Cancel ()
 end Behavior() and remove entity
virtual void Out () override
 remove entity from queue
EventNotice * GetEventNotice ()
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
bool HasName () const
void SetName (const std::string &name)
 assign the name

Additional Inherited Members

Public Types inherited from simlib3::Entity
typedef EntityPriority_t Priority_t
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 }
Public Attributes inherited from simlib3::Entity
Priority_t Priority
 priority of the entity (scheduling,queues)
Protected Attributes inherited from simlib3::Entity
unsigned long _Ident
 unique identification number of entity
double _MarkTime
union simlib3::Entity:: { ... }  
ServicePriority_t _SPrio
 priority of service in Facility
Protected Attributes inherited from simlib3::SimObject
unsigned _flags
 bool flags for internal use (TODO bitfield?)
Static Protected Attributes inherited from simlib3::Entity
static unsigned long _Number = 0L
 current number of entities

Detailed Description

Examples
_test_.cc.

Definition at line 20 of file _test_.cc.

Member Function Documentation

◆ Behavior()

void TestProcess::Behavior ( )
inlineoverridevirtual

behavior description

Implements simlib3::Process.

Examples
_test_.cc.

Definition at line 22 of file _test_.cc.

References simlib3::Time, and simlib3::Process::Wait().


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