class

Matter::FabricManager

Inherits Reference < Object

FabricManager provides high-level fabric management operations

This class wraps FabricTable and adds additional functionality needed for commissioning operations, including:

  • Fabric removal for failsafe rollback
  • NOC restoration for UpdateNOC rollback
  • Fabric lifecycle management

Matter Core Spec ยง11.17 - Operational Credentials Cluster

Constants

Log = ::Log.for("matter.fabric_manager")

Constructors

new(fabric_table : FabricTable)
Source

Instance methods

add_fabric(fabric : Fabric) : Bool

Add a new fabric

Source
all_fabrics

Get all fabrics

Source
empty?

Check if table is empty

Source
fabric_descriptors

Get fabric descriptors for Operational Credentials cluster

Source
fabric_table

Underlying fabric table

Source
fabric_table=(fabric_table : FabricTable)

Underlying fabric table

Source
full?

Check if table is full

Source
get_fabric(fabric_index : UInt8) : Fabric | Nil

Get a fabric by index

Source
mark_fabric_used(fabric_index : UInt8) : Bool

Mark a fabric as recently used

Source
remove_fabric(fabric_index : UInt8) : Bool

Remove a fabric by fabric index

This is used during failsafe rollback to remove fabrics added during the commissioning session.

@param fabric_index Fabric index to remove (1-254) @return True if fabric was removed, false if not found

Source
restore_noc(fabric_index : UInt8, operational_cert : Bytes, operational_key_bytes : Bytes) : Bool

Restore NOC (operational certificate and key) for a fabric

This is used during failsafe rollback to revert UpdateNOC changes. The method restores the previous operational certificate and private key for a fabric that was updated during commissioning.

@param fabric_index Fabric index to restore @param operational_cert Previous operational certificate (TLV-encoded) @param operational_key_bytes Previous operational private key bytes @return True if NOC was restored, false if fabric not found

Source
size

Get fabric count

Source
update_fabric(fabric : Fabric) : Bool

Update an existing fabric

Source