# Tracers

class pypdevs.tracer.Tracers

  Interface for all tracers

  __init__()

    Constructor

  getByID(uid)

    Gets a tracer by its UID

    Parameters

      uid – the UID of the tracer to return

    Returns

      tracer

  hasTracers()

    Checks whether or not there are any registered tracers

    Returns

      bool

  registerTracer(tracer, server, recover)

    Register a tracer, so that it will also receive all transitions.

    Parameters

      - tracer – tuple of the form (file, classname, [args])

      - server – the server object to be able to make remote calls

      - recover – whether or not this is a recovered registration (used during checkpointing)

  stopTracers()

    Stop all registered tracers

  tracesConfluent(aDEVS)

    Perform all tracing actions for a confluent transition

    Parameters

      aDEVS – the model that transitioned

  tracesExternal(aDEVS)

    Perform all tracing actions for an external transition

    Parameters

      aDEVS – the model that transitioned

  tracesInit(aDEVS, t)

    Perform all tracing actions for an initialisation

    Parameters

      - aDEVS – the model that was initialised

      - t – the time at which the initialisation should be logged

  tracesInternal(aDEVS)

    Perform all tracing actions for an internal transition

    Parameters

      aDEVS – the model that transitioned

  tracesUser(time, aDEVS, variable, value)

    Perform all tracing actions for a user imposed modification. This is NOT supported by default DEVS, so we don’t require tracers to handle this either.

    Parameters

      - time – the time at which the modification happend; this will be the termination time of the previous simulation run and not the time at which the timeAdvance was recomputed!

      - aDEVS – the atomic DEVS model that was altered

      - variable – the variable that was altered (as a string)

      - value – the new value of the variable