Apollo 10.0
自动驾驶开放平台
hmi_mode.proto
浏览该文件的文档.
1syntax = "proto2";
2
3package apollo.dreamview;
4
5// This proto defines a mode showing in Dreamview, including how you will
6// display them and monitor their status.
7
9
10// For ProcessMonitor.
12 repeated string command_keywords = 1;
13}
14
15// For ModuleMonitor
17 repeated string node_name = 1;
18}
19
20// For ChannelMonitor.
22 optional string name = 1;
23 optional double delay_fatal = 2 [default = 3.0]; // In seconds.
24
25 // The fields will be checked to make sure they are existing
26 // Specify in the format of "a.b.c"
27 repeated string mandatory_fields = 3;
28
29 // Minimum and maximum frequency allowed for this channel
30 optional double min_frequency_allowed = 4 [default = 0.0];
31 optional double max_frequency_allowed = 5 [default = 1000.0];
32}
33
34// For ResourceMonitor.
36 message DiskSpace {
37 // Path to monitor space. Support wildcards like ? and *.
38 // If the path does't exist, raise UNKNWON which will be ignored.
39 optional string path = 1;
40 optional int32 insufficient_space_warning = 2; // In GB.
41 optional int32 insufficient_space_error = 3;
42 }
43
44 message CPUUsage {
45 optional float high_cpu_usage_warning = 1;
46 optional float high_cpu_usage_error = 2;
47 // The process's dag path, if not set it will check the system's overall CPU
48 // usage
49 optional string process_dag_path = 3;
50 }
51
52 message MemoryUsage {
53 optional int32 high_memory_usage_warning = 1;
54 optional int32 high_memory_usage_error = 2;
55 // The process's dag path, if not set it will check the system's overall
56 // memory usage
57 optional string process_dag_path = 3;
58 }
59
60 message DiskLoad {
61 optional int32 high_disk_load_warning = 1;
62 optional int32 high_disk_load_error = 2;
63 // Disk device name, such as sda, sdb and etc
64 optional string device_name = 3;
65 }
66
67 repeated DiskSpace disk_spaces = 1;
68 repeated CPUUsage cpu_usages = 2;
69 repeated MemoryUsage memory_usages = 3;
70 repeated DiskLoad disk_load_usages = 4;
71}
72
73// A monitored component will be listed on HMI which only shows its status but
74// user cannot operate.
75// The whole config will generate SystemStatus.components[i].summary by Monitor
76// module, which is generally the most severe one of process, channel or
77// resource status.
79 // Generate SystemStatus.components[i].process_status.
80 // OK if the process is running.
81 // FATAL if the process is down.
82 optional ProcessMonitorConfig process = 1;
83
84 // Generate SystemStatus.components[i].channel_status.
85 // OK if delay is not notable.
86 // FATAL if delay is larger than fatal_delay.
87 optional ChannelMonitorConfig channel = 2;
88
89 // Generate SystemStatus.components[i].resource_status.
90 // OK if all requirements are met.
91 // WARN/ERROR/FATAL if any requirement is below expectation.
92 optional ResourceMonitorConfig resource = 3;
93
94 // Whether to trigger safe-mode if the component is down.
95 optional bool required_for_safety = 4 [default = true];
96
97 // Generate SystemStatus.components[i].module_status.
98 // OK if the module is running.
99 // FATAL if the module is down.
100 optional ModuleMonitorConfig module = 5;
101}
102
103// A module which can be started and stopped by HMI.
104message Module {
105 optional string start_command = 1;
106 optional string stop_command = 2;
107
108 // We use the config in ProcessMonitor to check if the module is running.
109 optional ProcessMonitorConfig process_monitor_config = 3;
110 // Whether to trigger safe-mode if the module is down.
111 optional bool required_for_safety = 4 [default = true];
112}
113
114// A CyberModule will be translated to a regular Module upon loading.
115message CyberModule {
116 repeated string dag_files = 1;
117 optional bool required_for_safety = 2 [default = true];
118 optional string process_group = 3;
119}
120
121message Layout {
122 optional string type = 1;
123 optional Layout first = 2;
124 optional Layout second = 3;
125 optional string direction = 4;
126 optional double splitPercentage = 5 [default = 50.0];
127}
128
129message HMIMode {
130 map<string, CyberModule> cyber_modules = 1;
131 map<string, Module> modules = 2;
132 map<string, MonitoredComponent> monitored_components = 3;
133 map<string, ProcessMonitorConfig> other_components = 4;
134 repeated HMIModeOperation operations = 5;
135 optional HMIModeOperation default_operation = 6;
136 optional Layout layout = 7;
137 map<string, MonitoredComponent> global_components = 8;
138}
syntax
Definition hmi_mode.proto:1