class mola::DiagnosticsProvider

Overview

Virtual interface for MOLA modules that provide structured diagnostics.

Modules implementing this interface will have their diagnostics automatically collected and published on the standard ROS 2 /diagnostics topic by BridgeROS2.

The hardware_id field will be auto-filled with the module instance name if left empty.

#include <DiagnosticsProvider.h>

class DiagnosticsProvider
{
public:
    // methods

    virtual void getDiagnostics(std::vector<DiagnosticStatusMsg>& status) = 0;
};

// direct descendants

class MockDiagModule;

Methods

virtual void getDiagnostics(std::vector<DiagnosticStatusMsg>& status) = 0

Populate the diagnostic status. Called at ~1 Hz by the diagnostics collection loop. Implementations should append one or more DiagnosticStatusMsg entries to status.