MatterEx.IM.EventStore (matter_ex v0.3.1)

Copy Markdown View Source

In-memory ring buffer for Matter events.

Each device gets one EventStore GenServer. Events have a monotonically increasing event number (global across all clusters) and a priority (debug/info/critical). When the buffer is full, lowest-priority events are evicted first.

Summary

Types

event()

@type event() :: %{
  number: non_neg_integer(),
  endpoint: non_neg_integer(),
  cluster: non_neg_integer(),
  event: non_neg_integer(),
  priority: non_neg_integer(),
  system_timestamp: integer(),
  data: map()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

emit(name, endpoint, cluster_id, event_id, priority, data)

read(name, event_paths, event_min \\ 0)

@spec read(GenServer.name(), [map()], non_neg_integer()) :: [event()]

start_link(opts \\ [])