Easy Navigation
Loading...
Searching...
No Matches
YTSession.hpp
Go to the documentation of this file.
1// Copyright 2025 Intelligent Robotics Lab
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15
16#ifndef EASYNAV_COMMON_TYPES__YTSESSION_HPP_
17#define EASYNAV_COMMON_TYPES__YTSESSION_HPP_
18
20
21#include "yaets/tracing.hpp"
22
23namespace easynav
24{
25
30class YTSession : public yaets::TraceSession, public Singleton<YTSession>
31{
32public:
33 explicit YTSession()
34 : yaets::TraceSession("/tmp/easynav.log")
35 {}
36
38 {
39 stop();
40 }
41
43};
44
45} // namespace easynav
46
47#ifdef EASYNAV_DEBUG_WITH_YAETS
48 #define EASYNAV_TRACE_EVENT TRACE_EVENT(easynav::YTSession::get())
49 #define EASYNAV_TRACE_NAMED_EVENT(name) yaets::TraceGuard guard(easynav::YTSession::get(), name);
50#else
51 #define EASYNAV_TRACE_EVENT ((void)0)
52 #define EASYNAV_TRACE_NAMED_EVENT(name) ((void)0)
53#endif
54
55
56#endif // EASYNAV_COMMON_TYPES__YTSESSION_HPP_
#define SINGLETON_DEFINITIONS(ClassName)
Definition Singleton.hpp:70
A Yaets Tracing Session.
Definition YTSession.hpp:31
YTSession()
Definition YTSession.hpp:33
~YTSession()
Definition YTSession.hpp:37
Definition CircularBuffer.hpp:23