mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
feat: rotate frame timestamp CSV files
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@@ -139,18 +140,22 @@ class FrameTimestampCsvLogger {
|
||||
static std::string csvHeader();
|
||||
|
||||
void writerThreadMain();
|
||||
void openCsvIfNeeded();
|
||||
std::string csvFilePathForIndex(uint64_t file_index) const;
|
||||
bool openCsvFile(uint64_t file_index);
|
||||
bool rotateCsvFile();
|
||||
|
||||
rclcpp::Logger logger_;
|
||||
bool enabled_ = false;
|
||||
bool csv_enabled_ = false;
|
||||
bool drop_log_enabled_ = false;
|
||||
std::atomic_bool shutdown_requested_{false};
|
||||
bool csv_writer_failed_ = false;
|
||||
std::atomic_bool csv_writer_failed_{false};
|
||||
bool queue_warning_active_ = false;
|
||||
std::string csv_file_path_;
|
||||
std::ofstream csv_stream_;
|
||||
std::thread writer_thread_;
|
||||
uint64_t csv_file_index_ = 0;
|
||||
uint64_t csv_rows_written_ = 0;
|
||||
|
||||
uint64_t next_row_id_ = 1;
|
||||
std::unordered_map<uint64_t, PendingRow> pending_rows_;
|
||||
|
||||
Reference in New Issue
Block a user