Tracers

class tracer.Tracers[source]

Interface for all tracers

__init__()[source]

Constructor

getByID(uid)[source]

Gets a tracer by its UID

Parameters:uid – the UID of the tracer to return
Returns:tracer
hasTracers()[source]

Checks whether or not there are any registered tracers

Returns:bool
registerTracer(tracer, server, recover)[source]

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()[source]

Stop all registered tracers

tracesConfluent(aDEVS)[source]

Perform all tracing actions for a confluent transition

Parameters:aDEVS – the model that transitioned
tracesExternal(aDEVS)[source]

Perform all tracing actions for an external transition

Parameters:aDEVS – the model that transitioned
tracesInit(aDEVS, t)[source]

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)[source]

Perform all tracing actions for an internal transition

Parameters:aDEVS – the model that transitioned
tracesUser(time, aDEVS, variable, value)[source]

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