# XML Tracer

class pypdevs.tracers.tracerXML.TracerXML(uid, server, filename)

  A tracer for XML tracing output

  __init__(uid, server, filename)

    Constructor

    Parameters

      - uid – the UID of this tracer

      - server – the server to make remote calls on

      - filename – file to save the trace to

  startTracer(recover)

    Starts up the tracer

    Parameters

      recover – whether or not this is a recovery call (so whether or not the file should be appended to)

  stopTracer()

    Stop the tracer

  trace(model_name, timestamp, event_kind, port_info, xml_state, str_state)

    Save an XML entry for the provided parameters, basically wraps it in the necessary tags

    Parameters

      - model_name – name of the model

      - timestamp – timestamp of the transition

      - event_kind – kind of event that happened, e.g. internal, external, …

      - port_info – actual information about the port

      - xml_state – XML representation of the state

      - str_state – normal string representation of the state

  traceConfluent(aDEVS)

    The trace functionality for XML output at a confluent transition

    Parameters

      aDEVS – the model that transitioned

  traceExternal(aDEVS)

    The trace functionality for XML output at an external transition

    Parameters

      aDEVS – the model that transitioned

  traceInit(aDEVS, t)

    The trace functionality for XML output at initialization

    Parameters

      - aDEVS – the model that transitioned

      - t – time at which it should be traced

  traceInternal(aDEVS)

    The trace functionality for XML output at an internal transition

    Parameters

      aDEVS – the model that transitioned