Expand description
This module provides combined track capabilities for the GWR project.
Track means the combination of log and trace where:
- log are text-based human-readable messages emitted at various levels
of verbosity (from
Tracethrough toError). - trace provides a standard set of modelling events that can be emitted.
For example, object creation/destruction or objects entering/exitting
simulation
Entities.
The track events can be emitted using:
- a textual output based on the log crate.
- a packed binary output based on Cap’n Proto.
- a packed binary output based output based on Perfetto TrackEvents
Protobufs (only avaliable with the
perfettofeature enabled).
Re-exports§
Modules§
- builder
- Library functions to build trackers as defined by the user.
- entity
- A simulation entity.
- gwr_
track_ capnp - Auto-generated Cap’n Proto module
- id
- Id
- perfetto_
trace_ builder - Support for generating Perfetto traces.
- test_
helpers - This module provides helper functions for testing logging output
- trace_
visitor - This module provides helper functions for dealing with Cap’n Proto binary data.
- tracker
- Include the trackers.
Define the
Tracktrait a number ofTrackers.
Macros§
- build_
aka - Helper function for creating local Aka derived from incoming Aka
- connect
- Connect two entities
- create_
id - Create a unique ID for tracking.
- debug
- The
debugmacro provides a wrapper for thelogmacro at levellog::Level::Debug - destroy
- Add an entity destroy event
- destroy_
id - Destroy an ID
- error
- the
errormacro provides a wrapper for thelogmacro at levellog::Level::Error - info
- The
infomacro provides a wrapper for thelogmacro at levellog::Level::Info - log_
base - Base macro for log messages of all level.
- set_
time - Update the current time.
- test_
init - Initialise the logging system for tests
- trace
- The
tracemacro provides a wrapper for thelogmacro at levellog::Level::Trace - track_
create_ object - Add an object creation event.
- warn
- The
warnmacro provides a wrapper for thelogmacro at levellog::Level::Info
Constants§
- NO_ID
- ID value which indicates where there is no valid ID
- ROOT
- The root ID from which all other IDs are derived
Functions§
- str_
to_ level - Take the command-line string and convert it to a Level
Type Aliases§
- Writer
- A type alias for objects that receive log / trace events.