|
adevs
|
This is the base class for all components in a Parallel DEVS model. More...
#include <adevs_pdevs.h>
Public Member Functions | |
| Network< DataType, TimeType > * | parent () const |
| Get the parent of this model. More... | |
| virtual void | add (SimEnv< DataType, TimeType > *env)=0 |
| Add this model and any submodels to the simulation. | |
Public Member Functions inherited from adevs::Model< DataType, TimeType > | |
| virtual TimeType | init (SimEnv< DataType, TimeType > *env)=0 |
| Called when the model is added to the simulation. More... | |
| virtual void | fini (TimeType now)=0 |
| Called after the model has been removed from the simulation. More... | |
| virtual TimeType | update (SimEnv< DataType, TimeType > *env, std::vector< DataType > &x)=0 |
| Called to assign a new state to the model at now() when input is present. More... | |
| virtual TimeType | update (SimEnv< DataType, TimeType > *env)=0 |
| Called to assign a new state to the model at now(). More... | |
| virtual std::pair< Model< DataType, TimeType > *, DataType > | relay (Model< DataType, TimeType > *src, DataType x) |
| Relay a message to another model. More... | |
| virtual std::string | name () |
| Return a name for this model. More... | |
| virtual | ~Model () |
| Destructor. | |
| void | reset () |
| Reset simulation support to reuse the model in a new simulation context. More... | |
Friends | |
| class | Network< DataType, TimeType > |
This is the base class for all components in a Parallel DEVS model.
You can use this to implement basic behavior by implementing the update methods or use the Atomic class instead. If using the update methods, then sending a message to the parent is the way to generate input for other components belonging to that parent.
|
inline |
Get the parent of this model.
Messages sent to the parent will be redirected redirected via its route method.
Referenced by adevs::Network< port_value< DataType >, TimeType >::relay(), and adevs::Atomic< DataType, TimeType >::update().
1.8.13