43 const std::string& elementId,
44 const std::string& componentName,
52 void stopRecording(
const std::string& elementId,
const std::string& componentName);
69 const std::string& elementId,
70 const std::string& componentName,
74 bool isRecording(
const std::string& elementId,
const std::string& componentName)
const;
82 std::string elementId;
83 std::string componentName;
90 std::vector<Session> sessions;
94 static void writeHeader(std::ofstream& file,
size_t componentSize,
95 int sizeX = 1,
int sizeY = 1);
96 static void writeRow(std::ofstream& file,
int ticks,
double ms,
97 const std::vector<double>& component);
Manages ongoing time-series recordings and snapshot exports of element component data for a simulatio...
Definition simulation_recorder.h:32
void stopRecording(const std::string &elementId, const std::string &componentName)
Stop the recording for a specific element/component pair. The CSV file is closed and the session is r...
Definition simulation_recorder.cpp:95
void stopAll()
Stop all active recordings and close all open files.
Definition simulation_recorder.cpp:115
bool hasActiveRecordings() const
Return true if at least one recording session is active.
Definition simulation_recorder.cpp:236
bool isRecording(const std::string &elementId, const std::string &componentName) const
Return true if a recording is currently active for the given pair.
Definition simulation_recorder.cpp:227
void startRecording(const std::string &simName, const std::string &elementId, const std::string &componentName, int sampleInterval, RecordingIntervalUnit unit)
Start a new continuous recording for the given element/component pair. Creates data/<simName>/recordi...
Definition simulation_recorder.cpp:55
void takeSnapshot(const std::string &simName, const std::string &elementId, const std::string &componentName, const Simulation &sim)
Write a single-row snapshot CSV for the given element/component. Output path: data/<simName>/exports/...
Definition simulation_recorder.cpp:181
void update(const Simulation &sim)
Called each simulation step to append rows to active recordings. Ticks are derived from sim....
Definition simulation_recorder.cpp:123
Manages the element registry and drives the simulation loop.
Definition simulation.h:39
RecordingIntervalUnit
Unit for the recording sample interval.
Definition simulation_recorder.h:17
Definition application.h:20