ListFaults

This is a ROS service definition.

Source

# Copyright 2025 mfaferek93
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ListFaults.srv - Query faults from the FaultManager with optional filtering.
#
# Returns faults matching the specified filter criteria. By default (empty statuses array),
# returns only CONFIRMED faults. To include other statuses, specify them explicitly
# in the statuses array (e.g., ["CONFIRMED", "PREFAILED"]).

# Request fields

# Whether to filter by severity level.
# If true, only faults with the specified severity will be returned.
# If false, faults of all severities will be returned (severity field is ignored).
bool filter_by_severity

# Severity level to filter by (only used if filter_by_severity is true).
# Values: 0=INFO, 1=WARN, 2=ERROR, 3=CRITICAL. Use Fault.SEVERITY_* constants.
uint8 severity

# List of statuses to include in results.
# Valid values: "PREFAILED", "PREPASSED", "CONFIRMED", "HEALED", "CLEARED"
# Empty array = CONFIRMED only (default behavior for active fault monitoring).
# Example: ["CONFIRMED", "PREFAILED"] to include confirmed and pre-failed faults.
# Invalid status strings are silently ignored.
string[] statuses

# Correlation-related options (only effective when correlation is enabled)

# If true, include muted faults (symptoms) in the response.
# Muted faults are correlated symptoms that were not published as events.
# Default: false (only active, non-muted faults are returned)
bool include_muted

# If true, include cluster information in the response.
# Clusters are auto-detected groups of related faults.
# Default: false
bool include_clusters
---
# Response fields
Fault[] faults           # Array of faults matching the filter criteria

# Correlation-related response fields (populated when correlation is enabled)

# Total count of muted faults (always returned when correlation is enabled)
uint32 muted_count

# Muted fault details (only populated when include_muted=true)
MutedFaultInfo[] muted_faults

# Total count of active clusters (always returned when correlation is enabled)
uint32 cluster_count

# Cluster details (only populated when include_clusters=true)
ClusterInfo[] clusters