Skip to content

Latest commit

 

History

History
99 lines (82 loc) · 4.99 KB

SDKBasics.md

File metadata and controls

99 lines (82 loc) · 4.99 KB

SDK Architecture Overview

Getting Started

Basic SDK Architecture

Platform Layer

Platform layer implements the connection to the network stack and the base OS. Messages flow off the wire into the platform layer, where they are routed into the platform API for processing by the Matter stack.

Platform API

The platform API defines a common layer to interact with the core.

Core

Core encompasses a huge part of the spec, including all of the the underlying communication protocols. The goal of the core code is to deliver valid messages to the ember layer indicating the cluster request and associated endpoint information.

Ember

The ember layer is a generated layer that implements the composition of ONE SPECIFIC device. It looks at each message and determines if the device has implemented the selected attribute or command on the cluster on the selected endpoint, and then blocks or routes accordingly, based on the implementation and the access control.

Valid requests are forwarded on to the cluster implementations to handle and invalid requests get sent back with an error. Ember layer is the piece that makes your device your device. Most are generated statically using zap.

Cluster implementations

The cluster implementations are the logic that back the cluster. The cluster implementation code receives messages from the ember layer to request data model operations on the cluster (reads / writes / command invokes). They are also responsible for event generation and attribute change reporting. Simple cluster logic can be written in the ember callback functions, but more complex cluster logic is handled in the run-time installed interface layers.

SDK Organization (some key bits)