Easy Navigation
Loading...
Searching...
No Matches
YTSession.hpp
Go to the documentation of this file.
1// Copyright 2025 Intelligent Robotics Lab
2//
3// This file is part of the project Easy Navigation (EasyNav in short)
4// licensed under the GNU General Public License v3.0.
5// See <http://www.gnu.org/licenses/> for details.
6//
7// Easy Navigation program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
21#ifndef EASYNAV_COMMON_TYPES__YTSESSION_HPP_
22#define EASYNAV_COMMON_TYPES__YTSESSION_HPP_
23
25
26#include "yaets/tracing.hpp"
27
28namespace easynav
29{
30
35class YTSession : public yaets::TraceSession, public Singleton<YTSession>
36{
37public:
38 explicit YTSession()
39 : yaets::TraceSession("/tmp/easynav.log")
40 {}
41
43 {
44 stop();
45 }
46
48};
49
50#ifdef EASYNAV_DEBUG_WITH_YAETS
51 #define EASYNAV_TRACE_EVENT TRACE_EVENT(YTSession::get())
52 #define EASYNAV_TRACE_NAMED_EVENT(name) yaets::TraceGuard guard(YTSession::get(), name);
53#else
54 #define EASYNAV_TRACE_EVENT ((void)0)
55 #define EASYNAV_TRACE_NAMED_EVENT(name) ((void)0)
56#endif
57
58} // namespace easynav
59
60
61#endif // EASYNAV_COMMON_TYPES__YTSESSION_HPP_
#define SINGLETON_DEFINITIONS(ClassName)
Definition Singleton.hpp:75
A Yaets Tracing Session.
Definition YTSession.hpp:36
YTSession()
Definition YTSession.hpp:38
~YTSession()
Definition YTSession.hpp:42
Definition RTTFBuffer.hpp:30