# Classic DEVS Wrapper

A wrapper for AtomicDEVS models that are to be interpreted as Classic DEVS models

class pypdevs.classicDEVSWrapper.ClassicDEVSWrapper(model)

  Wraps around a normal AtomicDEVS model and intercepts the DEVS specific functions. All attribute read/writes need to be redirected to the model itself.

  __getattr__(attr)

    Fetches the attributes of the model. This is a ‘magic’ function.

    Parameters

      attr – the attribute to fetch

    Returns

      the fetched attributed

  __init__(model)

    Constructor

    Parameters

      model – the model to wrap around

  __setattr__(attr, val)

    Sets the attribute of the model. This is a ‘magic’ function. Only the ‘model’ attribute is not proxied!

    Parameters

      - attr – the attribute to set

      - val – the value to set it to

  __weakref__

    list of weak references to the object (if defined)

  extTransition(inputs)

    Wrap around the extTransition function by changing the input dictionary

    Parameters

      inputs – the input dictionary with lists as values

    Returns

      the new state, as the normal extTransition method would do

  outputFnc()

    Wrap around the outputFnc function by changing the returned dictionary

    Returns

      the changed dictionary