feat: add startup info printing during initialization (#107)
Include a method to print detailed startup information about the framework, enhancing user awareness of the version and providing relevant links for support.
This commit is contained in:
parent
1f3401341a
commit
1f173fdd46
@ -25,6 +25,27 @@ AimRTCore::~AimRTCore() {
|
|||||||
hook_task_vec_array_.clear();
|
hook_task_vec_array_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AimRTCore::PrintStartupInfo() const {
|
||||||
|
constexpr const char* aimrt_info = R"(
|
||||||
|
╔═══════════════════════════════════════════════════════════╗
|
||||||
|
║ ║
|
||||||
|
║ █████╗ ██╗███╗ ███╗██████╗ ████████╗ ║
|
||||||
|
║ ██╔══██╗██║████╗ ████║██╔══██╗╚══██╔══╝ ║
|
||||||
|
║ ███████║██║██╔████╔██║██████╔╝ ██║ ║
|
||||||
|
║ ██╔══██║██║██║╚██╔╝██║██╔══██╗ ██║ ║
|
||||||
|
║ ██║ ██║██║██║ ╚═╝ ██║██║ ██║ ██║ ║
|
||||||
|
║ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ║
|
||||||
|
║ ║
|
||||||
|
║ Modern High Performance Robotics Framework ║
|
||||||
|
║ Official Website: https://aimrt.org ║
|
||||||
|
║ Documentation: https://docs.aimrt.org ║
|
||||||
|
║ Version: v{:<32}║
|
||||||
|
╚═══════════════════════════════════════════════════════════╝
|
||||||
|
)";
|
||||||
|
constexpr const auto* version_str = util::GetAimRTVersion();
|
||||||
|
AIMRT_INFO(aimrt_info, version_str);
|
||||||
|
}
|
||||||
|
|
||||||
void AimRTCore::Initialize(const Options& options) {
|
void AimRTCore::Initialize(const Options& options) {
|
||||||
EnterState(State::kPreInit);
|
EnterState(State::kPreInit);
|
||||||
|
|
||||||
@ -70,6 +91,7 @@ void AimRTCore::Initialize(const Options& options) {
|
|||||||
std::bind(&AimRTCore::GetExecutor, this, std::placeholders::_1));
|
std::bind(&AimRTCore::GetExecutor, this, std::placeholders::_1));
|
||||||
logger_manager_.Initialize(configurator_manager_.GetAimRTOptionsNode("log"));
|
logger_manager_.Initialize(configurator_manager_.GetAimRTOptionsNode("log"));
|
||||||
SetCoreLogger();
|
SetCoreLogger();
|
||||||
|
PrintStartupInfo();
|
||||||
EnterState(State::kPostInitLog);
|
EnterState(State::kPostInitLog);
|
||||||
|
|
||||||
// Init allocator
|
// Init allocator
|
||||||
|
@ -214,6 +214,7 @@ class AimRTCore {
|
|||||||
void CheckCfgFile() const;
|
void CheckCfgFile() const;
|
||||||
void StartImpl();
|
void StartImpl();
|
||||||
void ShutdownImpl();
|
void ShutdownImpl();
|
||||||
|
void PrintStartupInfo() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Options options_;
|
Options options_;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
namespace aimrt::runtime::core::util {
|
namespace aimrt::runtime::core::util {
|
||||||
|
|
||||||
inline const char* GetAimRTVersion() {
|
constexpr const char* GetAimRTVersion() {
|
||||||
return AIMRT_VERSION;
|
return AIMRT_VERSION;
|
||||||
}
|
}
|
||||||
} // namespace aimrt::runtime::core::util
|
} // namespace aimrt::runtime::core::util
|
||||||
|
Loading…
x
Reference in New Issue
Block a user