The devs class provides basic operations for all devs models
Note that models are derived from the object class.
Inheritance:
Public Fields
-
basic_sim_support_t bsim_support
-
Simulator support data.
Public Methods
-
devs()
- Default constructor
-
devs(const devs& src)
- Copy constructor
-
void operator=(const devs& src)
- Assignment operator
-
virtual void initialize(ADEVS_TIME_TYPE t0) = 0
-
The init function should place the model into its initial state
The time t0 is the initial simulation time
-
virtual ~devs()
- Destructor
-
virtual devsn* typeIsNetwork()
-
Returns NULL if this is not a network model and returns a pointer to
itself otherwise.
-
virtual atomic* typeIsAtomic()
- Returns NULL if this is not a atomic model; returns itself otherwise
-
virtual netExec* typeIsNetExec()
- Returns NULL if this is not a network executive; returns itself otherwise
-
const devsn* getParent() const
-
Get the model that contains this model as a component.
-
devsn* getParent()
-
void setParent(devsn* parent)
-
Assign a new parent to this model.
-
static void prefer_thread(int thread_id)
-
Set the preferred thread assignment for model constructed subsequent to this call.
Inherited from object:
Public Methods
-
virtual object* clone() const
Documentation
The devs class provides basic operations for all devs models
Note that models are derived from the object class. Therefore
(if using the default configuration) models can, themselves,
be passed as I/O between models (this can be useful when building
some types of dynamic structure models).
devs()
- Default constructor
devs(const devs& src)
- Copy constructor
void operator=(const devs& src)
- Assignment operator
virtual void initialize(ADEVS_TIME_TYPE t0) = 0
-
The init function should place the model into its initial state
The time t0 is the initial simulation time
virtual ~devs()
- Destructor
virtual devsn* typeIsNetwork()
-
Returns NULL if this is not a network model and returns a pointer to
itself otherwise. This method is used to avoid a relatively expensive
dynamic cast.
virtual atomic* typeIsAtomic()
- Returns NULL if this is not a atomic model; returns itself otherwise
virtual netExec* typeIsNetExec()
- Returns NULL if this is not a network executive; returns itself otherwise
const devsn* getParent() const
-
Get the model that contains this model as a component. Returns
NULL if this model is at the top of the hierarchy.
devsn* getParent()
void setParent(devsn* parent)
-
Assign a new parent to this model. This method is intended to
support copy constructors and assignment operators for end user
network models.
static void prefer_thread(int thread_id)
-
Set the preferred thread assignment for model constructed subsequent to this call.
Calling this method forces subsequent memory allocations to occur in the
memory block associated with the specified thread.
Atomic models created after this call will be assigned
to that same thread. This method assumes that all thread creation is done serially!
The method is not thread safe and should only be used when model creation is done
serially, but simulator execution will be done in parallel. Moreover, the method
only has an effect on NUMA machines and only if ADEVS_USE_LINUX_NUMA is defined
in the adevs_config file.
basic_sim_support_t bsim_support
-
Simulator support data. This should not be used in any way for
system modeling.
- Direct child classes:
- devsn
atomic
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.