group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PhaseDiagnostic.cpp File Reference

Implementation of the per-tick player physics telemetry. More...

#include "ecs/physics/PhaseDiagnostic.hpp"
#include <atomic>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <mutex>
#include <string>
#include <unordered_map>
Include dependency graph for PhaseDiagnostic.cpp:

Namespaces

namespace  physics
 Pure physics math — no ECS types, no registry.
namespace  physics::diag

Functions

void physics::diag::setFilePrefix (std::string_view prefix)
 Set the filename prefix used for this process's diagnostic CSVs.
void physics::diag::startRecording ()
 Start a fresh telemetry session.
void physics::diag::stopRecording ()
 Stop telemetry and close every open CSV file.
void physics::diag::setEnabled (bool on)
 Enable / disable telemetry.
bool physics::diag::isEnabled () noexcept
void physics::diag::annotate (entt::entity entity, std::string_view label) noexcept
 Attach a text annotation to the NEXT frame recorded for the given entity.
void physics::diag::consumeAnnotation (entt::entity entity, char(&out)[48]) noexcept
 Drain any queued annotation for entity into out, then clear it.
void physics::diag::recordFrame (const PlayerFrame &frame) noexcept
 Append a player's per-tick frame to the open CSV log.
void physics::diag::recordMovementFrame (const MovementFrame &frame) noexcept
 Append a MovementSystem telemetry row to movement-diag-<timestamp>.csv.
void physics::diag::recordKccTimingFrame (const KccTimingFrame &frame) noexcept
 Append KCC timing telemetry to kcc-timing-<timestamp>.csv.
void physics::diag::recordDepenContact (const DepenContact &contact) noexcept
 Append one depen-contact row to its own CSV log (depen-trace-<timestamp>.csv in the working dir).

Detailed Description

Implementation of the per-tick player physics telemetry.