adevs
Public Member Functions | List of all members
adevs::Network< DataType, TimeType > Class Template Referenceabstract

This is a Parallel DEVS network model. More...

#include <adevs_pdevs.h>

Inheritance diagram for adevs::Network< DataType, TimeType >:
adevs::Devs< DataType, TimeType > adevs::Model< DataType, TimeType > adevs::SimpleDigraph< DataType, TimeType >

Public Member Functions

void assign_parent (Devs< DataType, TimeType > *model)
 Set the parent of a model to be this Network. More...
 
virtual void route (Model< DataType, TimeType > *src, DataType data, std::vector< std::pair< Model< DataType, TimeType > *, DataType > > &msgs)=0
 Provide a destination list for a message. More...
 
virtual ~Network ()
 Destructor.
 
TimeType update (SimEnv< DataType, TimeType > *)
 No op update.
 
TimeType update (SimEnv< DataType, TimeType > *, std::vector< DataType > &)
 No op update.
 
TimeType init (SimEnv< DataType, TimeType > *)
 No op init.
 
void fini (TimeType)
 No op fini.
 
std::pair< Model< DataType, TimeType > *, DataType > relay (Model< DataType, TimeType > *src, DataType x)
 Relay uses the route method to redirect messages. Do not override.
 
- Public Member Functions inherited from adevs::Devs< DataType, TimeType >
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 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...
 

Detailed Description

template<typename DataType, typename TimeType = Time>
class adevs::Network< DataType, TimeType >

This is a Parallel DEVS network model.

A network structure is realized by implementing the route method. A Network may exhibit its own behavior if you supply update() methods different from the noop defaults.

Member Function Documentation

◆ assign_parent()

template<typename DataType, typename TimeType = Time>
void adevs::Network< DataType, TimeType >::assign_parent ( Devs< DataType, TimeType > *  model)
inline

Set the parent of a model to be this Network.

Parameters
modelThe model that is to become this object's child.

◆ route()

template<typename DataType, typename TimeType = Time>
virtual void adevs::Network< DataType, TimeType >::route ( Model< DataType, TimeType > *  src,
DataType  data,
std::vector< std::pair< Model< DataType, TimeType > *, DataType > > &  msgs 
)
pure virtual

Provide a destination list for a message.

If the route list contains this model, then the message is an output from the network. If the source argument is this model, then the message is an input to the network.

Parameters
srcThe origin of the message
dataThe message itself
msgsA list to be filled with (model,data) pairs indicating which models will receive what data.

Implemented in adevs::SimpleDigraph< DataType, TimeType >, and adevs::Digraph< DataType, TimeType >.


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