-
Notifications
You must be signed in to change notification settings - Fork 5
/
logger.orogen
63 lines (53 loc) · 2.5 KB
/
logger.orogen
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
name "logger"
using_library "typelib"
import_types_from "base"
import_types_from "LoggerTypes.hpp"
# Can't define default deployments, as we are part of them !
self.define_default_deployments = false
task_context "Logger" do
dynamic_input_port(/\w+\.\w+/, nil).
needs_reliable_connection.
task_trigger
operation("reportComponent").
returns("bool").
argument("name", "std/string", "the name of the component whose ports should be reported")
operation("unreportComponent").
returns("bool").
argument("name", "std/string", "the name of the component whose ports should not be reported anymore")
operation("reportPort").
returns("bool").
argument("component", "std/string", "the name of the port's component").
argument("port", "std/string", "the name of the port that should be reported")
operation("unreportPort").
returns("bool").
argument("component", "std/string", "the name of the port's component").
argument("port", "std/string", "the name of the port that should not be reported anymore")
operation("createLoggingPort").
returns("bool").
argument("port_name", "std/string", "the name of the port to be created").
argument("type_name", "std/string", "the name of the type the port should handle").
argument("metadata", "std/vector</logger/StreamMetadata>", "the stream metadata").
doc("creates a port that is associated with a given log stream of the same name, with associated metadata. Any data written to that port will be logged into that stream")
operation("removeLoggingPort").
returns("bool").
argument("port_name", "std/string", "the name of the port to be removed").
doc("removes a logging port created by createLoggingPort")
operation("clear").
doc("removes all logging ports")
property("file", "std/string").
dynamic.
doc "the output file name"
# Controls whether the logger should overwrite or timestamp an existing file, if it already exists.
# The default is to fail, but one of these flags is needed, if one wants to use safe temporary files as targets.
# The flags are mutually exclusive, therefore the task will fail if both are true.
property 'overwrite_existing_files', '/bool', false
property 'auto_timestamp_files' , '/bool', false
attribute 'current_file', 'std/string'
end
typekit do
export_types '/logger/Marker',
'/logger/Annotations'
end
deployment "rock_logger" do
task("logger", "logger::Logger")
end