Easy Navigation
Toggle main menu visibility
Loading...
Searching...
No Matches
easynav_common
include
easynav_common
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
19
#include "
easynav_common/Singleton.hpp
"
20
21
#include "yaets/tracing.hpp"
22
23
namespace
easynav
24
{
25
30
class
YTSession
:
public
yaets::TraceSession,
public
Singleton
<YTSession>
31
{
32
public
:
33
explicit
YTSession
()
34
: yaets::TraceSession(
"/tmp/easynav.log"
)
35
{}
36
37
~YTSession
()
38
{
39
stop();
40
}
41
42
SINGLETON_DEFINITIONS
(
YTSession
)
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_
Singleton.hpp
SINGLETON_DEFINITIONS
#define SINGLETON_DEFINITIONS(ClassName)
Definition
Singleton.hpp:70
easynav::Singleton< YTSession >::Singleton
Singleton()=default
easynav::YTSession
A Yaets Tracing Session.
Definition
YTSession.hpp:31
easynav::YTSession::YTSession
YTSession()
Definition
YTSession.hpp:33
easynav::YTSession::~YTSession
~YTSession()
Definition
YTSession.hpp:37
easynav
Definition
CircularBuffer.hpp:23
Generated by
1.17.0