|
| ModelWrapper (Devs< InternalType, T > *model) |
|
virtual void | translateInput (const Bag< ExternalType > &external_input, Bag< Event< InternalType, T > > &internal_input)=0 |
|
virtual void | translateOutput (const Bag< Event< InternalType, T > > &internal_output, Bag< ExternalType > &external_output)=0 |
|
virtual void | gc_input (Bag< Event< InternalType, T > > &g)=0 |
|
Devs< InternalType, T > * | getWrappedModel () |
| Get the model that is wrapped by this object.
|
|
void | delta_int () |
| Atomic internal transition function.
|
|
void | delta_ext (T e, const Bag< ExternalType > &xb) |
| Atomic external transition function.
|
|
void | delta_conf (const Bag< ExternalType > &xb) |
| Atomic confluent transition function.
|
|
void | output_func (Bag< ExternalType > &yb) |
| Atomic output function.
|
|
T | ta () |
| Atomic time advance function.
|
|
void | outputEvent (Event< InternalType, T > y, T t) |
| EventListener outputEvent method.
|
|
| ~ModelWrapper () |
| Destructor. This destroys the wrapped model too.
|
|
| Atomic () |
| The constructor should place the model into its initial state.
|
|
virtual void | gc_output (Bag< ExternalType > &g)=0 |
|
virtual void | beginLookahead () |
|
virtual void | endLookahead () |
|
virtual | ~Atomic () |
| Destructor.
|
|
Atomic< ExternalType, T > * | typeIsAtomic () |
| Returns a pointer to this model.
|
|
| Devs () |
| Default constructor.
|
|
virtual | ~Devs () |
| Destructor.
|
|
virtual Network< X, T > * | typeIsNetwork () |
|
const Network< X, T > * | getParent () const |
|
Network< X, T > * | getParent () |
|
void | setParent (Network< X, T > *parent) |
|
virtual bool | model_transition () |
|
virtual T | lookahead () |
|
void | setProc (int proc) |
|
int | getProc () |
|
virtual void | stateChange (Atomic< InternalType, T > *model, T t) |
|
virtual | ~EventListener () |
| Destructor.
|
|
template<typename ExternalType, typename InternalType, class T = double>
class adevs::ModelWrapper< ExternalType, InternalType, T >
This class wraps a Network or Atomic model with interface type InternalType in an Atomic model with interface type ExternalType. Input to the ModelWrapper is passed through a user provided input translation method before being handed off to the wrapped model for processing. Output from the wrapped model is passed through a user provided output translation method before emerging as output from the ModelWrapper. If the wrapped model is a Network, the input translation method can create inputs for any of its components. Similarly the output translation method is provided with every output produced by every component in the Network. If the wrapped model is Atomic then there is, of course, only one possible destination for incoming events and only one source of outgoing events.
You will need to implement the usual gc_output event for outputs produced by the ModelWrapper. You will also need to implement gcInputEvents method to clean up events that are created during the input translation process.