Skip to content

Commit cfc477f

Browse files
chaitanya jandhyalacjandhyala
chaitanya jandhyala
authored andcommitted
defined vendor_name, product_name, hardware_version_string and software_version_string config variables in all platforms
1 parent 05f392a commit cfc477f

27 files changed

+135
-75
lines changed

examples/platform/linux/CommissionableInit.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <lib/support/CodeUtils.h>
2121
#include <lib/support/logging/CHIPLogging.h>
2222
#include <platform/TestOnlyCommissionableDataProvider.h>
23-
#include <stdio.h>
2423

2524
#include "CommissionableInit.h"
2625

@@ -102,30 +101,30 @@ CHIP_ERROR InitConfigurationManager(ConfigurationManagerImpl & configManager, Li
102101

103102
if (options.vendorName.HasValue())
104103
{
105-
chip::Span<const char> vendor_name(options.vendorName.Value().c_str(), options.vendorName.Value().size());
104+
CharSpan vendor_name(options.vendorName.Value().c_str(), options.vendorName.Value().size());
106105
VerifyOrDie(configManager.StoreVendorName(vendor_name) == CHIP_NO_ERROR);
107106
}
108107
if (options.productName.HasValue())
109108
{
110-
chip::Span<const char> product_name(options.productName.Value().c_str(), options.productName.Value().size());
109+
CharSpan product_name(options.productName.Value().c_str(), options.productName.Value().size());
111110
VerifyOrDie(configManager.StoreProductName(product_name) == CHIP_NO_ERROR);
112111
}
113112
if (options.hardwareVersionString.HasValue())
114113
{
115-
chip::Span<const char> hardware_version_string(options.hardwareVersionString.Value().c_str(),
116-
options.hardwareVersionString.Value().size());
114+
CharSpan hardware_version_string(options.hardwareVersionString.Value().c_str(),
115+
options.hardwareVersionString.Value().size());
117116
VerifyOrDie(configManager.StoreHardwareVersionString(hardware_version_string) == CHIP_NO_ERROR);
118117
}
119118
if (options.softwareVersionString.HasValue())
120119
{
121-
chip::Span<const char> software_version_string(options.softwareVersionString.Value().c_str(),
122-
options.softwareVersionString.Value().size());
120+
CharSpan software_version_string(options.softwareVersionString.Value().c_str(),
121+
options.softwareVersionString.Value().size());
123122
VerifyOrDie(configManager.StoreSoftwareVersionString(software_version_string) == CHIP_NO_ERROR);
124123
}
125124

126125
if (options.serialNumber.HasValue())
127126
{
128-
chip::Span<const char> serial_number(options.serialNumber.Value().c_str(), options.serialNumber.Value().size());
127+
CharSpan serial_number(options.serialNumber.Value().c_str(), options.serialNumber.Value().size());
129128
VerifyOrDie(configManager.StoreSerialNumber(serial_number) == CHIP_NO_ERROR);
130129
}
131130

examples/platform/linux/Options.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ const char * sDeviceOptionHelp =
222222
" The product name specified by vendor.\n"
223223
"\n"
224224
" --hardware-version-string <string>\n"
225-
" The hardware version string specified by vendor.\n"
225+
" The HardwareVersionString to use in the basic information cluster.\n"
226226
"\n"
227227
" --software-version-string <string>\n"
228-
" The software version string specified by vendor.\n"
228+
" The SoftwareVersionString to use in the basic information cluster.\n"
229229
"\n"
230230
" --serial-number <serial_number>\n"
231231
" The serial number specified by vendor.\n"

examples/platform/linux/Options.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ struct LinuxDeviceOptions
8282
chip::Optional<std::string> productName;
8383
chip::Optional<std::string> hardwareVersionString;
8484
chip::Optional<std::string> softwareVersionString;
85-
#if defined(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER)
8685
chip::Optional<std::string> serialNumber;
87-
#endif
86+
8887
static LinuxDeviceOptions & GetInstance();
8988
};
9089

src/include/platform/ConfigurationManager.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ class ConfigurationManager
132132
virtual CHIP_ERROR SetFailSafeArmed(bool val) = 0;
133133

134134
virtual CHIP_ERROR GetBLEDeviceIdentificationInfo(Ble::ChipBLEDeviceIdentificationInfo & deviceIdInfo) = 0;
135-
virtual CHIP_ERROR StoreSerialNumber(chip::Span<const char> serialNumber) = 0;
136-
virtual CHIP_ERROR StoreVendorName(chip::Span<const char> vendorName) = 0;
137-
virtual CHIP_ERROR StoreProductName(chip::Span<const char> productName) = 0;
138-
virtual CHIP_ERROR StoreHardwareVersionString(chip::Span<const char> hardwareVersionString) = 0;
139-
virtual CHIP_ERROR StoreSoftwareVersionString(chip::Span<const char> softwareVersionString) = 0;
135+
virtual CHIP_ERROR StoreSerialNumber(CharSpan serialNumber) = 0;
136+
virtual CHIP_ERROR StoreVendorName(CharSpan vendorName) = 0;
137+
virtual CHIP_ERROR StoreProductName(CharSpan productName) = 0;
138+
virtual CHIP_ERROR StoreHardwareVersionString(CharSpan hardwareVersionString) = 0;
139+
virtual CHIP_ERROR StoreSoftwareVersionString(CharSpan softwareVersionString) = 0;
140140

141141
#if CHIP_CONFIG_TEST
142142
virtual void RunUnitTests() = 0;

src/include/platform/internal/GenericConfigurationManagerImpl.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class GenericConfigurationManagerImpl : public ConfigurationManager
6868
CHIP_ERROR StoreSoftwareVersion(uint32_t softwareVer) override;
6969
CHIP_ERROR GetFirmwareBuildChipEpochTime(System::Clock::Seconds32 & buildTime) override;
7070
CHIP_ERROR SetFirmwareBuildChipEpochTime(System::Clock::Seconds32 buildTime) override;
71-
CHIP_ERROR StoreSerialNumber(chip::Span<const char> serialNumber) override;
71+
CHIP_ERROR StoreSerialNumber(CharSpan serialNumber) override;
7272
CHIP_ERROR GetPrimaryMACAddress(MutableByteSpan buf) override;
7373
CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override;
7474
CHIP_ERROR GetPrimary802154MACAddress(uint8_t * buf) override;
@@ -104,10 +104,10 @@ class GenericConfigurationManagerImpl : public ConfigurationManager
104104
CHIP_ERROR StoreUniqueId(const char * uniqueId, size_t uniqueIdLen) override;
105105
CHIP_ERROR GenerateUniqueId(char * buf, size_t bufSize) override;
106106

107-
CHIP_ERROR StoreVendorName(chip::Span<const char> vendorName) override;
108-
CHIP_ERROR StoreProductName(chip::Span<const char> productName) override;
109-
CHIP_ERROR StoreHardwareVersionString(chip::Span<const char> hardwareVersionString) override;
110-
CHIP_ERROR StoreSoftwareVersionString(chip::Span<const char> softwareVersionString) override;
107+
CHIP_ERROR StoreVendorName(CharSpan vendorName) override;
108+
CHIP_ERROR StoreProductName(CharSpan productName) override;
109+
CHIP_ERROR StoreHardwareVersionString(CharSpan hardwareVersionString) override;
110+
CHIP_ERROR StoreSoftwareVersionString(CharSpan softwareVersionString) override;
111111
#if CHIP_CONFIG_TEST
112112
void RunUnitTests() override;
113113
#endif

src/include/platform/internal/GenericConfigurationManagerImpl.ipp

+9-13
Original file line numberDiff line numberDiff line change
@@ -351,51 +351,47 @@ CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::GetSecondaryPairingHint
351351
template <class ConfigClass>
352352
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::GetSoftwareVersionString(char * buf, size_t bufSize)
353353
{
354-
ChipError err = CHIP_NO_ERROR;
354+
CHIP_ERROR err = CHIP_NO_ERROR;
355355
size_t softwareVersionStringLen = 0; // without counting null-terminator
356356

357357
err = ReadConfigValueStr(ConfigClass::kConfigKey_SoftwareVersionString, buf, bufSize, softwareVersionStringLen);
358358

359-
if (CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING[0] != 0 && err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
359+
if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
360360
{
361361
ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL);
362362
memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING, sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING));
363-
softwareVersionStringLen = sizeof(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING) - 1;
364-
err = CHIP_NO_ERROR;
363+
364+
return CHIP_NO_ERROR;
365365
}
366366

367367
VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
368-
369-
ReturnErrorCodeIf(softwareVersionStringLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
370-
ReturnErrorCodeIf(buf[softwareVersionStringLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH);
371-
372368
return err;
373369
}
374370

375371
template <class ConfigClass>
376-
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreSerialNumber(chip::Span<const char> serialNumber)
372+
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreSerialNumber(CharSpan serialNumber)
377373
{
378374
return WriteConfigValueStr(ConfigClass::kConfigKey_SerialNum, serialNumber.data(), serialNumber.size());
379375
}
380376
template <class ConfigClass>
381-
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreVendorName(chip::Span<const char> vendorName)
377+
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreVendorName(CharSpan vendorName)
382378
{
383379

384380
return WriteConfigValueStr(ConfigClass::kConfigKey_VendorName, vendorName.data(), vendorName.size());
385381
}
386382
template <class ConfigClass>
387-
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreProductName(chip::Span<const char> productName)
383+
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreProductName(CharSpan productName)
388384
{
389385
return WriteConfigValueStr(ConfigClass::kConfigKey_ProductName, productName.data(), productName.size());
390386
}
391387
template <class ConfigClass>
392-
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreHardwareVersionString(chip::Span<const char> hardwareVersionString)
388+
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreHardwareVersionString(CharSpan hardwareVersionString)
393389
{
394390
return WriteConfigValueStr(ConfigClass::kConfigKey_HardwareVersionString, hardwareVersionString.data(),
395391
hardwareVersionString.size());
396392
}
397393
template <class ConfigClass>
398-
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreSoftwareVersionString(chip::Span<const char> softwareVersionString)
394+
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::StoreSoftwareVersionString(CharSpan softwareVersionString)
399395
{
400396
return WriteConfigValueStr(ConfigClass::kConfigKey_SoftwareVersionString, softwareVersionString.data(),
401397
softwareVersionString.size());

src/include/platform/internal/GenericDeviceInstanceInfoProvider.ipp

+14-32
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,15 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetVendorName(char *
4242
size_t vendorNameLen = 0; // without counting null-terminator
4343

4444
err = mGenericConfigManager.ReadConfigValueStr(ConfigClass::kConfigKey_VendorName, buf, bufSize, vendorNameLen);
45-
#ifdef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME
46-
if (CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME[0] != 0 && err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
45+
46+
if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
4747
{
4848
ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL);
4949
memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME, sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME));
50-
vendorNameLen = sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME) - 1;
51-
err = CHIP_NO_ERROR;
50+
err = CHIP_NO_ERROR;
5251
}
53-
#endif
54-
ReturnErrorOnFailure(err);
5552

56-
ReturnErrorCodeIf(vendorNameLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
57-
ReturnErrorCodeIf(buf[vendorNameLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH);
53+
VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
5854

5955
return err;
6056
}
@@ -67,19 +63,14 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetProductName(char *
6763

6864
err = mGenericConfigManager.ReadConfigValueStr(ConfigClass::kConfigKey_ProductName, buf, bufSize, productNameLen);
6965

70-
#ifdef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME
71-
if (CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME[0] != 0 && err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
66+
if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
7267
{
7368
ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL);
7469
memcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME, sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME));
75-
productNameLen = sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME) - 1;
76-
err = CHIP_NO_ERROR;
70+
err = CHIP_NO_ERROR;
7771
}
78-
#endif
79-
ReturnErrorOnFailure(err);
8072

81-
ReturnErrorCodeIf(productNameLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
82-
ReturnErrorCodeIf(buf[productNameLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH);
73+
VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
8374

8475
return err;
8576
}
@@ -128,19 +119,15 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetSerialNumber(char
128119

129120
err = mGenericConfigManager.ReadConfigValueStr(ConfigClass::kConfigKey_SerialNum, buf, bufSize, serialNumLen);
130121

131-
#ifdef CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
132-
if (CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER[0] != 0 && err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
122+
if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
133123
{
134124
ReturnErrorCodeIf(sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) > bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
135125
memcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER, sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER));
136-
serialNumLen = sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER) - 1;
137-
err = CHIP_NO_ERROR;
126+
127+
err = CHIP_NO_ERROR;
138128
}
139-
#endif // CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
140-
ReturnErrorOnFailure(err);
141129

142-
ReturnErrorCodeIf(serialNumLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
143-
ReturnErrorCodeIf(buf[serialNumLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH);
130+
VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
144131

145132
return err;
146133
}
@@ -214,20 +201,15 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetHardwareVersionStr
214201
err = mGenericConfigManager.ReadConfigValueStr(ConfigClass::kConfigKey_HardwareVersionString, buf, bufSize,
215202
hardwareVersionStringLen);
216203

217-
#ifdef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING
218-
if (CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING[0] != 0 && err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
204+
if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND)
219205
{
220206
ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL);
221207
memcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING,
222208
sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING));
223-
hardwareVersionStringLen = sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING) - 1;
224-
err = CHIP_NO_ERROR;
209+
err = CHIP_NO_ERROR;
225210
}
226-
#endif
227-
ReturnErrorOnFailure(err);
228211

229-
ReturnErrorCodeIf(hardwareVersionStringLen >= bufSize, CHIP_ERROR_BUFFER_TOO_SMALL);
230-
ReturnErrorCodeIf(buf[hardwareVersionStringLen] != 0, CHIP_ERROR_INVALID_STRING_LENGTH);
212+
VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_INTERNAL);
231213

232214
return err;
233215
}

src/platform/ASR/ASRConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ class ASRConfig
9191
static const Key kCounterKey_UpTime;
9292
static const Key kCounterKey_TotalOperationalHours;
9393

94+
static const Key kConfigKey_VendorName;
95+
static const Key kConfigKey_ProductName;
96+
static const Key kConfigKey_HardwareVersionString;
97+
static const Key kConfigKey_SoftwareVersionString;
98+
9499
// Config value accessors.
95100
static CHIP_ERROR ReadConfigValue(Key key, bool & val);
96101
static CHIP_ERROR ReadConfigValue(Key key, uint32_t & val);

src/platform/Ameba/AmebaConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ class AmebaConfig
7474
static const Key kCounterKey_TotalOperationalHours;
7575
static const Key kCounterKey_BootReason;
7676

77+
static const Key kConfigKey_VendorName;
78+
static const Key kConfigKey_ProductName;
79+
static const Key kConfigKey_HardwareVersionString;
80+
static const Key kConfigKey_SoftwareVersionString;
81+
7782
// Config value accessors.
7883
static CHIP_ERROR ReadConfigValue(Key key, bool & val);
7984
static CHIP_ERROR ReadConfigValue(Key key, uint32_t & val);

src/platform/Beken/BekenConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ class BekenConfig
7474
static const Key kCounterKey_TotalOperationalHours;
7575
static const Key kCounterKey_BootReason;
7676

77+
static const Key kConfigKey_VendorName;
78+
static const Key kConfigKey_ProductName;
79+
static const Key kConfigKey_HardwareVersionString;
80+
static const Key kConfigKey_SoftwareVersionString;
81+
7782
static const char kGroupKeyNamePrefix[];
7883

7984
// Config value accessors.

src/platform/Infineon/PSOC6/P6Config.h

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ class P6Config
8989
static const Key kConfigKey_YearDaySchedules;
9090
static const Key kConfigKey_HolidaySchedules;
9191

92+
static const Key kConfigKey_VendorName;
93+
static const Key kConfigKey_ProductName;
94+
static const Key kConfigKey_HardwareVersionString;
95+
static const Key kConfigKey_SoftwareVersionString;
96+
9297
// CHIP Counter keys
9398
static const Key kCounterKey_RebootCount;
9499
static const Key kCounterKey_UpTime;

src/platform/Zephyr/ZephyrConfig.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ const ZephyrConfig::Key ZephyrConfig::kConfigKey_RegulatoryLocation = CONFIG_KEY
7373
const ZephyrConfig::Key ZephyrConfig::kConfigKey_CountryCode = CONFIG_KEY(NAMESPACE_CONFIG "country-code");
7474
const ZephyrConfig::Key ZephyrConfig::kConfigKey_UniqueId = CONFIG_KEY(NAMESPACE_CONFIG "unique-id");
7575

76+
const ZephyrConfig::Key ZephyrConfig::kConfigKey_VendorName = CONFIG_KEY(NAMESPACE_CONFIG "vendor-name");
77+
const ZephyrConfig::Key ZephyrConfig::kConfigKey_ProductName = CONFIG_KEY(NAMESPACE_CONFIG "product-name");
78+
const ZephyrConfig::Key ZephyrConfig::kConfigKey_HardwareVersionString = CONFIG_KEY(NAMESPACE_CONFIG "hardware-version-string");
79+
const ZephyrConfig::Key ZephyrConfig::kConfigKey_SoftwareVersionString = CONFIG_KEY(NAMESPACE_CONFIG "software-version-string");
80+
7681
// Keys stored in the counters namespace
7782
const ZephyrConfig::Key ZephyrConfig::kCounterKey_RebootCount = CONFIG_KEY(NAMESPACE_COUNTERS "reboot-count");
7883
const ZephyrConfig::Key ZephyrConfig::kCounterKey_BootReason = CONFIG_KEY(NAMESPACE_COUNTERS "boot-reason");

src/platform/Zephyr/ZephyrConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ class ZephyrConfig
6666
static const Key kConfigKey_Spake2pVerifier;
6767
static const Key kConfigKey_CertificationDeclaration;
6868

69+
static const Key kConfigKey_VendorName;
70+
static const Key kConfigKey_ProductName;
71+
static const Key kConfigKey_HardwareVersionString;
72+
static const Key kConfigKey_SoftwareVersionString;
73+
6974
static const Key kCounterKey_RebootCount;
7075
static const Key kCounterKey_BootReason;
7176
static const Key kCounterKey_TotalOperationalHours;

src/platform/bouffalolab/common/BLConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ class BLConfig
7777

7878
static constexpr char kBLKey_factoryResetFlag[] = ("__factory_reset_pending");
7979

80+
static const Key kConfigKey_VendorName;
81+
static const Key kConfigKey_ProductName;
82+
static const Key kConfigKey_HardwareVersionString;
83+
static const Key kConfigKey_SoftwareVersionString;
84+
8085
static void Init(void);
8186

8287
// Config value accessors.

src/platform/cc13xx_26xx/CC13XX_26XXConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ class CC13XX_26XXConfig
8282
static const Key kConfigKey_TotalOperationalHours;
8383
static const Key kConfigKey_LifeTimeCounter;
8484

85+
static const Key kConfigKey_VendorName;
86+
static const Key kConfigKey_ProductName;
87+
static const Key kConfigKey_HardwareVersionString;
88+
static const Key kConfigKey_SoftwareVersionString;
89+
8590
static CHIP_ERROR Init(void);
8691

8792
// Config value accessors.

src/platform/cc32xx/CC32XXConfig.h

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ class CC32XXConfig
5757
static const Key kConfigKey_Breadcrumb;
5858
static const Key kConfigKey_UniqueId;
5959

60+
static const Key kConfigKey_VendorName;
61+
static const Key kConfigKey_ProductName;
62+
static const Key kConfigKey_HardwareVersionString;
63+
static const Key kConfigKey_SoftwareVersionString;
64+
6065
static const Key kConfigKey_Spake2pIterationCount;
6166
static const Key kConfigKey_Spake2pSalt;
6267
static const Key kConfigKey_Spake2pVerifier;

src/platform/fake/ConfigurationManagerImpl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ConfigurationManagerImpl : public ConfigurationManager
4949
}
5050
CHIP_ERROR GetSoftwareVersion(uint32_t & softwareVer) override { return CHIP_ERROR_NOT_IMPLEMENTED; }
5151
CHIP_ERROR StoreSoftwareVersion(uint32_t softwareVer) override { return CHIP_ERROR_NOT_IMPLEMENTED; }
52-
CHIP_ERROR StoreSerialNumber(chip::Span<const char> serialNumber) override { return CHIP_ERROR_NOT_IMPLEMENTED; }
52+
CHIP_ERROR StoreSerialNumber(CharSpan serialNumber) override { return CHIP_ERROR_NOT_IMPLEMENTED; }
5353
CHIP_ERROR GetPrimaryMACAddress(MutableByteSpan buf) override { return CHIP_ERROR_NOT_IMPLEMENTED; }
5454
CHIP_ERROR GetPrimaryWiFiMACAddress(uint8_t * buf) override { return CHIP_ERROR_NOT_IMPLEMENTED; }
5555
CHIP_ERROR GetPrimary802154MACAddress(uint8_t * buf) override { return CHIP_ERROR_NOT_IMPLEMENTED; }

0 commit comments

Comments
 (0)