初始化项目,包含fast_lio_ws和unitree_sdk2

This commit is contained in:
2026-10-12 15:01:52 +08:00
commit 8e16ecceba
1490 changed files with 232338 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
#ifndef __UT_LOG_FILE_KEEPER_H__
#define __UT_LOG_FILE_KEEPER_H__
#include <unitree/common/log/log_policy.hpp>
namespace unitree
{
namespace common
{
class LogKeeper
{
public:
LogKeeper(LogStorePolicyPtr storePolicyPtr);
~LogKeeper();
LogStorePolicyPtr GetStorePolicy() const;
bool Append(const std::string& s, bool rotate);
private:
void Rotate();
void AppendFile(const std::string& s);
void OpenFile();
void CloseFile();
void CheckFileSize();
std::string MakeRegexExpress();
private:
volatile int64_t mFileSize;
std::string mFileName;
std::string mDirectory;
FilePtr mFilePtr;
LogStorePolicyPtr mStorePolicyPtr;
};
typedef std::shared_ptr<LogKeeper> LogKeeperPtr;
}
}
#endif//__UT_LOG_FILE_KEEPER_H__