Get time remaining on primary timer (nil if expired)
Matter::FailsafeTimer
Inherits Reference < Object
FailsafeTimer manages dual timers for commissioning safety
The failsafe mechanism uses two timers:
- Primary timer: Can be re-armed/extended on subsequent ArmFailSafe calls
- Cumulative timer: Started once, never extended, provides hard limit
Either timer expiring triggers the expiry callback, which performs rollback.
Matter Core Spec ยง11.10.7.2 - ArmFailSafe Command & Fail Safe Context
Constants
Constructors
Create a new failsafe timer with dual timer architecture
@param fabric_index Fabric index associated with this failsafe context (or nil for PASE) @param expiry_length Primary timer duration in seconds @param max_cumulative Maximum cumulative duration in seconds @param expiry_callback Callback invoked when either timer expires
Instance methods
Close and cleanup the failsafe timer
Should be called when the context is destroyed to ensure clean shutdown.
Mark the failsafe as completed successfully
Stops both timers and prevents expiration callback from firing. Called when CommissioningComplete succeeds.
Trigger failsafe expiration and invoke rollback callback
Called automatically when either timer expires, or manually via re_arm(0).
Re-arm the primary timer with a new expiry duration
The cumulative timer is NOT extended - it continues counting from the original start. This prevents unbounded commissioning by repeated re-arming.
@param fabric_index Must match the associated fabric (or both nil) @param expiry_length New primary timer duration (0 = immediate expiration)