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

A typical digraph network model with port value pairs for input and output. More...

#include <adevs_pdevs.h>

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

Public Member Functions

void add (SimEnv< port_value< DataType >, TimeType > *env)
 Add this model and its submodels to the simulation context. You must couple your models first, then add them to the simulator.
 
void couple (Devs< port_value< DataType >, TimeType > *src, int src_port, Devs< port_value< DataType >, TimeType > *dst, int dst_port)
 Create a link in the network. More...
 
void route (Model< port_value< DataType >, TimeType > *src, port_value< DataType > data, std::vector< std::pair< Model< port_value< DataType >, TimeType > *, port_value< DataType > > > &msgs)
 The network's route method. Do not override.
 
- Public Member Functions inherited from adevs::Network< port_value< DataType >, TimeType >
void assign_parent (Devs< port_value< DataType >, TimeType > *model)
 Set the parent of a model to be this Network. More...
 
virtual ~Network ()
 Destructor.
 
TimeType update (SimEnv< port_value< DataType >, TimeType > *)
 No op update.
 
TimeType update (SimEnv< port_value< DataType >, TimeType > *, std::vector< port_value< DataType > > &)
 No op update.
 
TimeType init (SimEnv< port_value< DataType >, TimeType > *)
 No op init.
 
void fini (TimeType)
 No op fini.
 
std::pair< Model< port_value< DataType >, TimeType > *, port_value< DataType > > relay (Model< port_value< DataType >, TimeType > *src, port_value< DataType > x)
 Relay uses the route method to redirect messages. Do not override.
 
- Public Member Functions inherited from adevs::Devs< port_value< DataType >, TimeType >
Network< port_value< DataType >, TimeType > * parent () const
 Get the parent of this model. More...
 
- Public Member Functions inherited from adevs::Model< port_value< 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::Digraph< DataType, TimeType >

A typical digraph network model with port value pairs for input and output.

Member Function Documentation

◆ couple()

template<typename DataType , typename TimeType >
void adevs::Digraph< DataType, TimeType >::couple ( Devs< port_value< DataType >, TimeType > *  src,
int  src_port,
Devs< port_value< DataType >, TimeType > *  dst,
int  dst_port 
)

Create a link in the network.

Connect the src_port of the src model to the dst_port of the dst model. Output produced by the source on the source port will be delivered destination on its destination port.


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