The ESP32 platform has implemented several providers that can be used with data stored in the factory or by setting fixed data.
Below are the providers that have been implemented:
More information can be found in the factory data guide.
Currently, there are two implementations for this provider:
StaticESP32DeviceInfoProvider. Utilize the Set...() APIs to set the fixed data.Set...() APIs to set the fixed data.#include <platform/ESP32/StaticESP32DeviceInfoProvider.h> using namespace chip; using namespace chip::app::Clusters::TimeFormatLocalization; DeviceLayer::StaticESP32DeviceInfoProvider deviceInfoProvider; // Define array for Supported Calendar Types CalendarTypeEnum supportedCalendarTypes[] = { CalendarTypeEnum::kGregorian, }; // Define array for Supported Locales CharSpan supportedLocales[] = { "en-US"_span, "en-GB"_span, }; // Define array for Fixed labels { EndpointId, Label, Value } struct DeviceLayer::StaticESP32DeviceInfoProvider::FixedLabelEntry fixedLabels[] = { { 0, "Orientation"_span, "North"_span }, { 0, "Direction"_span, "Up"_span }, }; Span<CalendarTypeEnum> sSupportedCalendarTypes(supportedCalendarTypes); Span<CharSpan> sSupportedLocales(supportedLocales); Span<DeviceLayer::StaticESP32DeviceInfoProvider::FixedLabelEntry> sFixedLabels(fixedLabels); { deviceInfoProvider.SetSupportedLocales(sSupportedLocales); deviceInfoProvider.SetSupportedCalendarTypes(sSupportedCalendarTypes); deviceInfoProvider.SetFixedLabels(sFixedLabels); DeviceLayer::SetDeviceInfoProvider(&deviceInfoProvider); }