@@ -26,31 +26,34 @@ service EventsService {
2626 rpc GetHealthAndArmingChecksReport (GetHealthAndArmingChecksReportRequest ) returns (GetHealthAndArmingChecksReportResponse ) { option (mavsdk.options.async_type ) = SYNC ; }
2727}
2828
29+ // Log level type
2930enum LogLevel {
30- LOG_LEVEL_EMERGENCY = 0 ;
31- LOG_LEVEL_ALERT = 1 ;
32- LOG_LEVEL_CRITICAL = 2 ;
33- LOG_LEVEL_ERROR = 3 ;
34- LOG_LEVEL_WARNING = 4 ;
35- LOG_LEVEL_NOTICE = 5 ;
36- LOG_LEVEL_INFO = 6 ;
37- LOG_LEVEL_DEBUG = 7 ;
31+ LOG_LEVEL_EMERGENCY = 0 ; // Emergency
32+ LOG_LEVEL_ALERT = 1 ; // Alert
33+ LOG_LEVEL_CRITICAL = 2 ; // Critical
34+ LOG_LEVEL_ERROR = 3 ; // Error
35+ LOG_LEVEL_WARNING = 4 ; // Warning
36+ LOG_LEVEL_NOTICE = 5 ; // Notice
37+ LOG_LEVEL_INFO = 6 ; // Info
38+ LOG_LEVEL_DEBUG = 7 ; // Debug
3839}
3940
41+ // Event type
4042message Event {
4143 uint32 compid = 1 ; // The source component ID of the event
4244 string message = 2 ; // Short, single-line message
4345 string description = 3 ; // Detailed description (optional, might be multiple lines)
44- LogLevel log_level = 4 ;
46+ LogLevel log_level = 4 ; // Log level of message
4547
4648 string event_namespace = 5 ; // Namespace, e.g. "px4"
4749 string event_name = 6 ; // Event name (unique within the namespace)
4850}
4951
52+ // Health and arming check problem type
5053message HealthAndArmingCheckProblem {
5154 string message = 1 ; // Short, single-line message
5255 string description = 2 ; // Detailed description (optional, might be multiple lines)
53- LogLevel log_level = 3 ;
56+ LogLevel log_level = 3 ; // Log level of message
5457 string health_component = 4 ; // Associated health component, e.g. "gps"
5558}
5659
@@ -61,6 +64,7 @@ message HealthAndArmingCheckMode {
6164 repeated HealthAndArmingCheckProblem problems = 3 ; // List of reported problems for the mode
6265}
6366
67+ // Health component report type
6468message HealthComponentReport {
6569 string name = 1 ; // Unique component name, e.g. "gps"
6670 string label = 2 ; // Human readable label of the component, e.g. "GPS" or "Accelerometer"
@@ -69,6 +73,7 @@ message HealthComponentReport {
6973 bool has_warning = 5 ; // If the component has warnings
7074}
7175
76+ // Health and arming check report type
7277message HealthAndArmingCheckReport {
7378 HealthAndArmingCheckMode current_mode_intention = 1 ; // Report for currently intended mode
7479 // TODO: we can add reports for different modes here too (e.g. Takeoff or Mission)
@@ -79,15 +84,17 @@ message HealthAndArmingCheckReport {
7984
8085// Result type.
8186message EventsResult {
87+ // Possible results returned
8288 enum Result {
83- RESULT_SUCCESS = 0 ;
84- RESULT_NOT_AVAILABLE = 1 ;
85- RESULT_CONNECTION_ERROR = 2 ;
86- RESULT_UNSUPPORTED = 3 ;
87- RESULT_DENIED = 4 ;
88- RESULT_FAILED = 5 ;
89- RESULT_TIMEOUT = 6 ;
90- RESULT_NO_SYSTEM = 7 ;
89+ RESULT_SUCCESS = 0 ; // Successful result
90+ RESULT_NOT_AVAILABLE = 1 ; // Not available
91+ RESULT_CONNECTION_ERROR = 2 ; // Connection error
92+ RESULT_UNSUPPORTED = 3 ; // Unsupported
93+ RESULT_DENIED = 4 ; // Denied
94+ RESULT_FAILED = 5 ; // Failed
95+ RESULT_TIMEOUT = 6 ; // Timeout
96+ RESULT_NO_SYSTEM = 7 ; // No system available
97+ RESULT_UNKNOWN = 8 ; // Unknown result
9198 }
9299
93100 Result result = 1 ; // Result enum value
@@ -98,17 +105,17 @@ message EventsResult {
98105message SubscribeEventsRequest {}
99106
100107message EventsResponse {
101- Event event = 1 ;
108+ Event event = 1 ; // The event
102109}
103110
104111message SubscribeHealthAndArmingChecksRequest {}
105112
106113message HealthAndArmingChecksResponse {
107- HealthAndArmingCheckReport report = 1 ;
114+ HealthAndArmingCheckReport report = 1 ; // The report
108115}
109116
110117message GetHealthAndArmingChecksReportRequest {}
111118message GetHealthAndArmingChecksReportResponse {
112- EventsResult events_result = 1 ;
113- HealthAndArmingCheckReport report = 2 ;
119+ EventsResult events_result = 1 ; // The events result
120+ HealthAndArmingCheckReport report = 2 ; // The report
114121}
0 commit comments