Apollo
11.0
自动驾驶开放平台
safety_manager.proto
浏览该文件的文档.
1
syntax
=
"proto2"
;
2
3
package
apollo.safety_manager;
4
5
import
"
modules/common_msgs/basic_msgs/header.proto
";
6
7
message
Filter
{
8
required uint32 required_cycles = 1;
9
required uint32 total_cycles = 2;
10
}
11
12
message
SafetyRule
{
13
// If no message received during the timeout seconds, status will be set to
14
// OK.
15
optional
double
timeout = 1;
16
// Duration seconds required for the status from PENDING to real,
17
// include WARN_PENDING to WARN, ERROR_PENDING to ERROR, FATAL_PENDING to
18
// FATAL, it takes at least two cycles to caculate.
19
optional
double
duration = 2;
20
// Filter conditions, such as 1/2, 3/3, PENDING status will be set before
21
// unsatisfied.
22
optional
Filter
filter = 3;
23
// Note: at most one rule can be configured at the same time,
24
// if multi rules are configured, the result may not be what you expected.
25
26
// fault removal time in seconds, set -1 if never removed.
27
optional int32 fault_removed_secs = 4 [
default
= 5];
28
}
29
30
message
Matcher
{
31
// Full name match, ["CPU Usage", "CPU Temp"] means name equal "CPU Usage" or
32
// "CPU Temp".
33
repeated
string
name = 1;
34
// Name contains match, ["CPU", "MEM"] means name contain CPU or MEM.
35
repeated
string
contains = 2;
36
// Name prefix match.
37
repeated
string
prefix = 3;
38
// Name regex match.
39
repeated
string
regex = 4;
40
// Tags contains at least one, ["resource", "net"] means contain resource or
41
// net tag.
42
repeated
string
tags_contains_one = 5;
43
// Tags contain many, e.g. ["resource", "net"] means contain both resource and
44
// net tag.
45
repeated
string
tags_contains_many = 6;
46
}
47
48
message
RuleMatcher
{
49
required
Matcher
matcher = 1;
50
required
SafetyRule
rule = 2;
51
}
52
53
message
RuleMatcherList
{
54
repeated
RuleMatcher
rule_matcher = 1;
55
}
56
57
message
SafetyStatus
{
58
enum
Status
{
59
// Normal status.
60
OK = 1;
61
// Pending status will be set util the rule conditions are satisfied.
62
WARN_PENDING = 2;
63
ERROR_PENDING = 3;
64
FATAL_PENDING = 4;
65
// Warn status only send an alert notice.
66
WARN = 5;
67
// Error status trigger comfortable braking normally.
68
ERROR = 6;
69
// Fatal status trigger emergency braking normally.
70
FATAL = 7;
71
// wait removed status.
72
WAIT_REMOVED = 8;
73
}
74
message
Item
{
75
// item basic info
76
required
string
name = 1;
77
optional uint64 code = 2;
78
optional
string
type = 3;
79
optional
string
level = 4;
80
optional
string
conditions = 5;
81
optional
string
description = 6;
82
// item status info
83
optional
Status
status = 7;
84
optional
string
value = 8;
85
optional
string
message = 9;
86
}
87
optional
apollo
.
common
.
Header
header = 1;
88
// Name as the unique identifier.
89
required
string
name = 2;
90
required
Status
status = 3;
91
optional
string
message = 4;
92
// Used for status detailed desciption.
93
map<string, string> values = 5;
94
repeated
string
tags = 6;
95
optional
SafetyRule
rule = 7;
96
repeated
Item
items = 8;
97
}
98
99
message
SafetyStatusAggr
{
100
optional
apollo
.
common
.
Header
header = 1;
101
repeated
SafetyStatus
status_array = 2;
102
}
103
104
message
SafetyDecision
{
105
optional
apollo
.
common
.
Header
header = 1;
106
// If we have this field, safety_mode should be triggered.
107
// We'll check the system action and driver action continuously. If no proper
108
// action was taken in a specified period of time (such as 10 seconds), EStop
109
// will be sent to bring the vehicle into emergency full stop.
110
optional
double
safety_mode_trigger_time = 2;
111
optional
bool
require_emergency_stop = 3;
112
}
113
114
message
SafetyFaultRemoveRequest
{
115
required
double
timestamp = 1;
// in seconds
116
repeated
string
names = 2;
117
}
118
119
message
SafetyFaultRemoveResponse
{
120
required
bool
success = 1;
121
optional
string
message = 2;
122
}
header.proto
apollo::common
apollo::common
apollo
class register implement
Definition
arena_queue.h:37
syntax
syntax
Definition
safety_manager.proto:1
apollo::common::Header
Definition
header.proto:7
apollo::safety_manager::Filter
Definition
safety_manager.proto:7
apollo::safety_manager::Matcher
Definition
safety_manager.proto:30
apollo::safety_manager::RuleMatcherList
Definition
safety_manager.proto:53
apollo::safety_manager::RuleMatcher
Definition
safety_manager.proto:48
apollo::safety_manager::SafetyDecision
Definition
safety_manager.proto:104
apollo::safety_manager::SafetyFaultRemoveRequest
Definition
safety_manager.proto:114
apollo::safety_manager::SafetyFaultRemoveResponse
Definition
safety_manager.proto:119
apollo::safety_manager::SafetyRule
Definition
safety_manager.proto:12
apollo::safety_manager::SafetyStatusAggr
Definition
safety_manager.proto:99
apollo::safety_manager::SafetyStatus::Item
Definition
safety_manager.proto:74
apollo::safety_manager::SafetyStatus
Definition
safety_manager.proto:57
apollo::safety_manager::SafetyStatus::Status
Status
Definition
safety_manager.proto:58
modules
safety_manager_msgs
safety_manager.proto