Goby3
3.1.5a
2024.05.23
log_plugin.h
Go to the documentation of this file.
1
// Copyright 2016-2022:
2
// GobySoft, LLC (2013-)
3
// Community contributors (see AUTHORS file)
4
// File authors:
5
// Toby Schneider <toby@gobysoft.org>
6
//
7
//
8
// This file is part of the Goby Underwater Autonomy Project Libraries
9
// ("The Goby Libraries").
10
//
11
// The Goby Libraries are free software: you can redistribute them and/or modify
12
// them under the terms of the GNU Lesser General Public License as published by
13
// the Free Software Foundation, either version 2.1 of the License, or
14
// (at your option) any later version.
15
//
16
// The Goby Libraries are distributed in the hope that they will be useful,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
// GNU Lesser General Public License for more details.
20
//
21
// You should have received a copy of the GNU Lesser General Public License
22
// along with Goby. If not, see <http://www.gnu.org/licenses/>.
23
24
#ifndef GOBY_MIDDLEWARE_LOG_LOG_PLUGIN_H
25
#define GOBY_MIDDLEWARE_LOG_LOG_PLUGIN_H
26
27
#include "
goby/middleware/log/log_entry.h
"
28
#include "
goby/middleware/marshalling/interface.h
"
29
#include "
goby/middleware/marshalling/json.h
"
30
#include "
goby/middleware/protobuf/log_tool_config.pb.h
"
31
32
#include "
goby/middleware/log/hdf5/hdf5_plugin.h
"
33
34
namespace
goby
35
{
36
namespace
middleware
37
{
38
namespace
log
39
{
40
class
LogPlugin
41
{
42
public
:
43
LogPlugin
() {}
44
virtual
~LogPlugin
() {}
45
46
virtual
void
register_write_hooks
(std::ofstream& out_log_file) = 0;
47
virtual
void
register_read_hooks
(
const
std::ifstream& in_log_file) = 0;
48
49
virtual
std::string
debug_text_message
(
LogEntry
& log_entry)
50
{
51
throw
(
log::LogException
(
"DEBUG_TEXT is not supported by the scheme's plugin"
));
52
}
53
54
virtual
std::vector<goby::middleware::HDF5ProtobufEntry>
hdf5_entry
(
LogEntry
& log_entry)
55
{
56
throw
(
log::LogException
(
"HDF5 is not supported by the scheme's plugin"
));
57
}
58
59
virtual
std::shared_ptr<nlohmann::json>
json_message
(
LogEntry
& log_entry)
60
{
61
throw
(
log::LogException
(
"JSON is not supported by the scheme's plugin"
));
62
}
63
};
64
65
}
// namespace log
66
}
// namespace middleware
67
}
// namespace goby
68
69
#endif
interface.h
hdf5_plugin.h
goby
The global namespace for the Goby project.
Definition:
acomms_constants.h:33
goby::middleware::log::LogPlugin::register_write_hooks
virtual void register_write_hooks(std::ofstream &out_log_file)=0
goby::middleware::log::LogEntry
Definition:
log_entry.h:99
log_tool_config.pb.h
goby::middleware::log::LogPlugin::debug_text_message
virtual std::string debug_text_message(LogEntry &log_entry)
Definition:
log_plugin.h:49
log_entry.h
goby::middleware::log::LogPlugin::LogPlugin
LogPlugin()
Definition:
log_plugin.h:43
goby::middleware::log::LogPlugin
Definition:
log_plugin.h:40
json.h
goby::middleware::log::LogPlugin::hdf5_entry
virtual std::vector< goby::middleware::HDF5ProtobufEntry > hdf5_entry(LogEntry &log_entry)
Definition:
log_plugin.h:54
goby::middleware::log::LogPlugin::json_message
virtual std::shared_ptr< nlohmann::json > json_message(LogEntry &log_entry)
Definition:
log_plugin.h:59
goby::middleware::log::LogPlugin::~LogPlugin
virtual ~LogPlugin()
Definition:
log_plugin.h:44
goby::middleware::log::LogPlugin::register_read_hooks
virtual void register_read_hooks(const std::ifstream &in_log_file)=0
goby::middleware::log::LogException
Definition:
log_entry.h:48
goby
middleware
log
log_plugin.h
Generated by
1.8.17