Interface StateTransitionLogger

All Known Implementing Classes:
LocalizationFusion

public interface StateTransitionLogger
Interface for logging state transitions in the localization system.

This interface provides a standardized way to record and monitor state machine transitions within the localization system. It enables:

- Real-time monitoring of system behavior - Post-match analysis of state changes - Debugging of unexpected transitions - Performance tracking and optimization - System health monitoring

Implementations should consider: - Logging to NetworkTables for real-time monitoring - Persistent storage for post-match analysis - Timestamp recording for timing analysis - Context preservation for debugging - Rate limiting for high-frequency transitions

  • Method Details

    • logTransition

      void logTransition(LocalizationState.State from, LocalizationState.State to)
      Records a state transition in the localization system.

      This method is called whenever the system transitions between states. Implementations should: - Record the timestamp of the transition - Log both the previous and new states - Include relevant context if available - Handle rapid transitions appropriately - Ensure thread safety

      Common transitions to monitor: - UNINITIALIZED → RESETTING (Initial pose acquisition) - RESETTING → QUEST_PRIMARY (Successful initialization) - QUEST_PRIMARY → TAG_BACKUP (Quest failure or validation error) - TAG_BACKUP → QUEST_PRIMARY (Quest recovery) - Any → EMERGENCY (System failure)

      Parameters:
      from - The state transitioning from
      to - The state transitioning to