-
Notifications
You must be signed in to change notification settings - Fork 5
/
LoggerTypes.hpp
64 lines (57 loc) · 1.96 KB
/
LoggerTypes.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef LOGGER_TYPES_HPP
#define LOGGER_TYPES_HPP
#include <base/Time.hpp>
namespace logger {
/** DEPRECATED. This predated the annotation / metadata system */
enum MarkerType{
SingleEvent=0,
Stop,
Start
};
/** DEPRECATED. This predated the annotation / metadata system */
struct Marker {
int id;
logger::MarkerType type;
std::string comment;
base::Time time;
};
/** Structure used to store metadata information / events in log files. It
* is used by creating a new log port, usually called "annotations", with
* the metadata rock_stream_type=annotations and this type
*
* When metadata is associated with a particular stream, this scheme assumes
* that stream names are unique in a single file after discussion, we
* decided that it is a sane constraint, as most of the tooling would be
* made a lot more complex otherwise. Moreover, the stream index is not
* stable if you extract data out of a file.
*/
struct Annotations
{
/** The time of this annotation. Assign to a null type (base::Time()) if
* no specific time is associated
*/
base::Time time;
/** If the annotation applies to a particular stream, the name of the
* stream. Can be left empty for general information
*/
std::string stream_name;
/** The application-specific key. See
* http://rock.opendfki.de/wiki/WikiStart/OngoingWork/LogMetadata for
* some standard annotations
*/
std::string key;
/** The application-specific value. See
* http://rock.opendfki.de/wiki/WikiStart/OngoingWork/LogMetadata for
* some standard annotations
*/
std::string value;
};
/** Structure passed to createLoggingPort to add metadata to streams
*/
struct StreamMetadata
{
std::string key;
std::string value;
};
};
#endif