Class SnapshotCapture

Class Documentation

class SnapshotCapture

Captures topic snapshots when faults are confirmed

Supports two modes:

  • On-demand: Creates temporary subscriptions when fault is confirmed, waits for data

  • Background: Maintains subscriptions to configured topics, caches latest messages

Public Functions

SnapshotCapture(rclcpp::Node *node, FaultStorage *storage, const SnapshotConfig &config)

Create snapshot capture

Parameters:
  • node – ROS 2 node for creating subscriptions

  • storage – Fault storage for persisting snapshots

  • config – Snapshot configuration

~SnapshotCapture()
SnapshotCapture(const SnapshotCapture&) = delete
SnapshotCapture &operator=(const SnapshotCapture&) = delete
SnapshotCapture(SnapshotCapture&&) = delete
SnapshotCapture &operator=(SnapshotCapture&&) = delete
void capture(const std::string &fault_code)

Capture snapshots for a fault that was just confirmed

Parameters:

fault_code – The fault code that was confirmed

inline const SnapshotConfig &config() const

Get current configuration.

inline bool is_enabled() const

Check if snapshot capture is enabled.