adevs
Public Member Functions | Protected Member Functions | Friends | List of all members
adevs::Atomic< X, T > Class Template Referenceabstract

#include <adevs_models.h>

Inheritance diagram for adevs::Atomic< X, T >:
adevs::Devs< X, T > adevs::Hybrid< X, T > adevs::MealyAtomic< X, T >

Public Member Functions

 Atomic ()
 The constructor should place the model into its initial state.
 
virtual void delta_int ()=0
 Internal transition function.
 
virtual void delta_ext (T e, const Bag< X > &xb)=0
 
virtual void delta_conf (const Bag< X > &xb)=0
 
virtual void output_func (Bag< X > &yb)=0
 
virtual T ta ()=0
 
virtual void gc_output (Bag< X > &g)=0
 
virtual ~Atomic ()
 Destructor.
 
Atomic< X, T > * typeIsAtomic ()
 Returns a pointer to this model.
 
- Public Member Functions inherited from adevs::Devs< X, T >
 Devs ()
 Default constructor.
 
virtual ~Devs ()
 Destructor.
 
virtual Network< X, T > * typeIsNetwork ()
 
virtual MealyAtomic< X, T > * typeIsMealyAtomic ()
 Returns NULL if this is not a mealy atomic model; returns itself otherwise.
 
const Network< X, T > * getParent () const
 
Network< X, T > * getParent ()
 
void setParent (Network< X, T > *parent)
 
virtual bool model_transition ()
 

Protected Member Functions

getLastEventTime () const
 

Friends

class Simulator< X, T >
 
class Schedule< X, T >
 

Detailed Description

template<typename X, typename T = double>
class adevs::Atomic< X, T >

Base type for all atomic DEVS models.

Member Function Documentation

template<typename X, typename T = double>
virtual void adevs::Atomic< X, T >::delta_conf ( const Bag< X > &  xb)
pure virtual

Confluent transition function.

Parameters
xbInput for the model.

Implemented in adevs::Hybrid< X, T >, adevs::QemuComputer< X >, and adevs::ModelWrapper< ExternalType, InternalType, T >.

Referenced by adevs::Simulator< X, T >::computeNextState().

template<typename X, typename T = double>
virtual void adevs::Atomic< X, T >::delta_ext ( e,
const Bag< X > &  xb 
)
pure virtual

External transition function.

Parameters
eTime elapsed since the last change of state
xbInput for the model.

Implemented in adevs::Hybrid< X, T >, adevs::QemuComputer< X >, and adevs::ModelWrapper< ExternalType, InternalType, T >.

Referenced by adevs::Simulator< X, T >::computeNextState().

template<typename X, typename T = double>
virtual void adevs::Atomic< X, T >::gc_output ( Bag< X > &  g)
pure virtual

Garbage collection function. The objects in g are no longer in use by the simulation engine and should be disposed of. ` * Note that the elements in g are only those objects produced as output by this model.

Implemented in adevs::Hybrid< X, T >.

Referenced by adevs::Simulator< X, T >::computeNextState().

template<typename X, typename T = double>
T adevs::Atomic< X, T >::getLastEventTime ( ) const
inlineprotected

Get the last event time for this model. This is provided primarily for use with the backwards compatibility module and should not be relied on. It is likely to be removed in later versions of the code.

template<typename X, typename T = double>
virtual void adevs::Atomic< X, T >::output_func ( Bag< X > &  yb)
pure virtual

Output function. Output values should be added to the bag yb.

Parameters
ybEmpty bag to be filled with the model's output

Implemented in adevs::Hybrid< X, T >, adevs::QemuComputer< X >, and adevs::ModelWrapper< ExternalType, InternalType, T >.

Referenced by adevs::Simulator< InternalType, T >::addModel().

template<typename X, typename T = double>
virtual T adevs::Atomic< X, T >::ta ( )
pure virtual

Time advance function. adevs_inf<T>() is used for infinity.

Returns
The time to the next internal event

Implemented in adevs::Hybrid< X, T >, adevs::QemuComputer< X >, and adevs::ModelWrapper< ExternalType, InternalType, T >.

Referenced by adevs::Simulator< X, T >::computeNextState().


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