Skip to content

Commit

Permalink
[platform] Move more product attributes to DeviceInstanceInfoProvider (
Browse files Browse the repository at this point in the history
…project-chip#23385)

* [platform] Move more product attributes to DeviceInstanceInfoProvider

Vendor and product identifiers were already moved from
ConfigurationManager to DeviceInstanceInfoProvider to allow
for easier integration with platform factory data providers
as they may differ across devices running the same firmware.

Somehow PartNumber, ProductURL and ProductLabel slipped
unnoticed. Move accessors of these attributes to
DeviceInstanceInfoProvider and update all implementations
to preserve the existing behavior.

Signed-off-by: Damian Krolik <[email protected]>

* [nrfconnect] Read PartNumber, URL and Label from factory data

Signed-off-by: Damian Krolik <[email protected]>

* Code review

* Remove obsolete definitions to fix the build

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored Nov 4, 2022
1 parent 6c43175 commit 48860e2
Show file tree
Hide file tree
Showing 31 changed files with 248 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def generate_json(self):
self._add_entry("vendor_name", self._args.vendor_name)
self._add_entry("product_name", self._args.product_name)
self._add_entry("product_label", self._args.product_label)
self._add_entry("product_url", self._args.product_url)
self._add_entry("part_number", self._args.part_number)
self._add_entry("date", self._args.date)
self._add_entry("hw_ver", self._args.hw_ver)
Expand Down Expand Up @@ -434,6 +435,8 @@ def base64_str(s): return base64.b64decode(s)
the setup code. Discriminator is used during a discovery process.")

# optional keys
optional_arguments.add_argument("--product_url", type=str,
help="[string] provide link to product-specific web page")
optional_arguments.add_argument("--product_label", type=str,
help="[string] provide human-readable product label")
optional_arguments.add_argument("--part_number", type=str,
Expand Down
5 changes: 5 additions & 0 deletions scripts/tools/nrfconnect/nrfconnect_factory_data.schema
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
"type": "string",
"maxLength": 64
},
"product_url": {
"description": "link to product-specific web page",
"type": "string",
"maxLength": 256
},
"part_number": {
"description": "human-readable vendor assigned part number",
"type": "string",
Expand Down
6 changes: 4 additions & 2 deletions scripts/tools/nrfconnect/tests/test_generate_factory_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def test_generate_factory_data_all_specified(self):
'--product_id', '0xABCD',
'--vendor_name', 'Nordic Semiconductor ASA',
'--product_name', 'Lock Gen2',
'--product_label', 'Lock',
'--part_number', 'PCA10056',
'--product_url', 'https://example.com/lock',
'--product_label', 'Lock',
'--date', '2022-07-20',
'--hw_ver', '101',
'--hw_ver_str', 'v1.1',
Expand All @@ -181,8 +182,9 @@ def test_generate_factory_data_all_specified(self):
self.assertEqual(factory_data.get('product_id'), 0xABCD)
self.assertEqual(factory_data.get('vendor_name'), 'Nordic Semiconductor ASA')
self.assertEqual(factory_data.get('product_name'), 'Lock Gen2')
self.assertEqual(factory_data.get('product_label'), 'Lock')
self.assertEqual(factory_data.get('part_number'), 'PCA10056')
self.assertEqual(factory_data.get('product_url'), 'https://example.com/lock')
self.assertEqual(factory_data.get('product_label'), 'Lock')
self.assertEqual(factory_data.get('date'), '2022-07-20')
self.assertEqual(factory_data.get('hw_ver'), 101)
self.assertEqual(factory_data.get('hw_ver_str'), 'v1.1')
Expand Down
6 changes: 3 additions & 3 deletions src/app/clusters/basic/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ CHIP_ERROR BasicAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attrib
case PartNumber::Id: {
constexpr size_t kMaxLen = DeviceLayer::ConfigurationManager::kMaxPartNumberLength;
char partNumber[kMaxLen + 1] = { 0 };
status = ConfigurationMgr().GetPartNumber(partNumber, sizeof(partNumber));
status = GetDeviceInstanceInfoProvider()->GetPartNumber(partNumber, sizeof(partNumber));

// TODO: Remove defaulting once proper runtime defaulting of unimplemented factory data is done
if (status == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || status == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE)
Expand All @@ -207,7 +207,7 @@ CHIP_ERROR BasicAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attrib
case ProductURL::Id: {
constexpr size_t kMaxLen = DeviceLayer::ConfigurationManager::kMaxProductURLLength;
char productUrl[kMaxLen + 1] = { 0 };
status = ConfigurationMgr().GetProductURL(productUrl, sizeof(productUrl));
status = GetDeviceInstanceInfoProvider()->GetProductURL(productUrl, sizeof(productUrl));

// TODO: Remove defaulting once proper runtime defaulting of unimplemented factory data is done
if (status == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || status == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE)
Expand All @@ -223,7 +223,7 @@ CHIP_ERROR BasicAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attrib
case ProductLabel::Id: {
constexpr size_t kMaxLen = DeviceLayer::ConfigurationManager::kMaxProductLabelLength;
char productLabel[kMaxLen + 1] = { 0 };
status = ConfigurationMgr().GetProductLabel(productLabel, sizeof(productLabel));
status = GetDeviceInstanceInfoProvider()->GetProductLabel(productLabel, sizeof(productLabel));

// TODO: Remove defaulting once proper runtime defaulting of unimplemented factory data is done
if (status == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || status == CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE)
Expand Down
3 changes: 0 additions & 3 deletions src/include/platform/ConfigurationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ class ConfigurationManager
virtual CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours) = 0;
virtual CHIP_ERROR GetBootReason(uint32_t & bootReason) = 0;
virtual CHIP_ERROR StoreBootReason(uint32_t bootReason) = 0;
virtual CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) = 0;
virtual CHIP_ERROR GetProductURL(char * buf, size_t bufSize) = 0;
virtual CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) = 0;
virtual CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) = 0;
virtual CHIP_ERROR StoreUniqueId(const char * uniqueId, size_t uniqueIdLen) = 0;
virtual CHIP_ERROR GenerateUniqueId(char * buf, size_t bufSize) = 0;
Expand Down
29 changes: 28 additions & 1 deletion src/include/platform/DeviceInstanceInfoProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DeviceInstanceInfoProvider
/**
* @brief Obtain the Vendor Name from the device's factory data.
*
* @param[in, out] buf Buffer to copy string.
* @param[out] buf Buffer to copy string.
* On CHIP_NO_ERROR return from this function this buffer will be null-terminated.
* On error CHIP_ERROR_BUFFER_TOO_SMALL there is no guarantee that buffer will be null-terminated.
* @param[in] bufSize Size of data, including the null terminator, that can be written to buf.
Expand Down Expand Up @@ -72,6 +72,33 @@ class DeviceInstanceInfoProvider
*/
virtual CHIP_ERROR GetProductId(uint16_t & productId) = 0;

/**
* @brief Obtain Part Number from the device factory data.
*
* @param[out] buf Buffer to store the null-terminated result string.
* @param[in] bufSize Size of the buffer. The buffer should allow for fitting in Part Number
* (max 32 characters) and the null terminator.
**/
virtual CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) = 0;

/**
* @brief Obtain Product URL from the device factory data.
*
* @param[out] buf Buffer to store the null-terminated result string.
* @param[in] bufSize Size of the buffer. The buffer should allow for fitting in Product URL
* (max 256 characters) and the null terminator.
**/
virtual CHIP_ERROR GetProductURL(char * buf, size_t bufSize) = 0;

/**
* @brief Obtain Product Label from the device factory data.
*
* @param[out] buf Buffer to store the null-terminated result string.
* @param[in] bufSize Size of the buffer. The buffer should allow for fitting in Product Label
* (max 64 characters) and the null terminator.
**/
virtual CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) = 0;

/**
* @brief Obtain the Serial Number from the device's factory data.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ class GenericConfigurationManagerImpl : public ConfigurationManager
CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours) override;
CHIP_ERROR GetBootReason(uint32_t & bootReason) override;
CHIP_ERROR StoreBootReason(uint32_t bootReason) override;
CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override;
CHIP_ERROR StoreUniqueId(const char * uniqueId, size_t uniqueIdLen) override;
CHIP_ERROR GenerateUniqueId(char * buf, size_t bufSize) override;
Expand Down
18 changes: 0 additions & 18 deletions src/include/platform/internal/GenericConfigurationManagerImpl.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -481,24 +481,6 @@ CHIP_ERROR GenericConfigurationManagerImpl<ImplClass>::StoreBootReason(uint32_t
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ConfigClass>
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::GetPartNumber(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ConfigClass>
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::GetProductURL(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ConfigClass>
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::GetProductLabel(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ConfigClass>
CHIP_ERROR GenericConfigurationManagerImpl<ConfigClass>::GetUniqueId(char * buf, size_t bufSize)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class GenericDeviceInstanceInfoProvider : public DeviceInstanceInfoProvider
CHIP_ERROR GetVendorId(uint16_t & vendorId) override;
CHIP_ERROR GetProductName(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductId(uint16_t & productId) override;
CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetSerialNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) override;
CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,42 @@ CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetProductName(char *
return CHIP_NO_ERROR;
}

template <class ConfigClass>
CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetPartNumber(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ConfigClass>
CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetProductURL(char * buf, size_t bufSize)
{
#if CHIP_DEVICE_LAYER_TARGET_ESP32
CHIP_ERROR err = mGenericConfigManager.ReadConfigValueStr(ConfigClass::kConfigKey_ProductURL, buf, bufSize, bufSize);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
}
return err;
#else
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
#endif
}

template <class ConfigClass>
CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetProductLabel(char * buf, size_t bufSize)
{
#if CHIP_DEVICE_LAYER_TARGET_ESP32
CHIP_ERROR err = mGenericConfigManager.ReadConfigValueStr(ConfigClass::kConfigKey_ProductLabel, buf, bufSize, bufSize);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
}
return err;
#else
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
#endif
}

template <class ConfigClass>
CHIP_ERROR GenericDeviceInstanceInfoProvider<ConfigClass>::GetSerialNumber(char * buf, size_t bufSize)
{
Expand Down
15 changes: 15 additions & 0 deletions src/platform/Ameba/FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,21 @@ CHIP_ERROR FactoryDataProvider::GetProductId(uint16_t & productId)
return CHIP_NO_ERROR;
}

CHIP_ERROR FactoryDataProvider::GetPartNumber(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR FactoryDataProvider::GetProductURL(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

CHIP_ERROR FactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize)
{
ChipError err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
Expand Down
3 changes: 3 additions & 0 deletions src/platform/Ameba/FactoryDataProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class FactoryDataProvider : public chip::Credentials::DeviceAttestationCredentia
CHIP_ERROR GetVendorId(uint16_t & vendorId) override;
CHIP_ERROR GetProductName(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductId(uint16_t & productId) override;
CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetSerialNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) override;
CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override;
Expand Down
20 changes: 0 additions & 20 deletions src/platform/ESP32/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,26 +185,6 @@ CHIP_ERROR ConfigurationManagerImpl::StoreTotalOperationalHours(uint32_t totalOp
return WriteConfigValue(ESP32Config::kCounterKey_TotalOperationalHours, totalOperationalHours);
}

CHIP_ERROR ConfigurationManagerImpl::GetProductURL(char * buf, size_t bufSize)
{
CHIP_ERROR err = ReadConfigValueStr(ESP32Config::kConfigKey_ProductURL, buf, bufSize, bufSize);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
}
return err;
}

CHIP_ERROR ConfigurationManagerImpl::GetProductLabel(char * buf, size_t bufSize)
{
CHIP_ERROR err = ReadConfigValueStr(ESP32Config::kConfigKey_ProductLabel, buf, bufSize, bufSize);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
}
return err;
}

CHIP_ERROR ConfigurationManagerImpl::GetSoftwareVersionString(char * buf, size_t bufSize)
{
memset(buf, 0, bufSize);
Expand Down
2 changes: 0 additions & 2 deletions src/platform/ESP32/ConfigurationManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp
CHIP_ERROR StoreRebootCount(uint32_t rebootCount) override;
CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override;
CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetSoftwareVersionString(char * buf, size_t bufSize);
CHIP_ERROR GetSoftwareVersion(uint32_t & softwareVer) override;
static ConfigurationManagerImpl & GetDefaultInstance();
Expand Down
20 changes: 20 additions & 0 deletions src/platform/ESP32/ESP32FactoryDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,26 @@ CHIP_ERROR ESP32FactoryDataProvider::GetProductId(uint16_t & productId)
return err;
}

CHIP_ERROR ESP32FactoryDataProvider::GetProductURL(char * buf, size_t bufSize)
{
CHIP_ERROR err = ESP32Config::ReadConfigValueStr(ESP32Config::kConfigKey_ProductURL, buf, bufSize, bufSize);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
}
return err;
}

CHIP_ERROR ESP32FactoryDataProvider::GetProductLabel(char * buf, size_t bufSize)
{
CHIP_ERROR err = ESP32Config::ReadConfigValueStr(ESP32Config::kConfigKey_ProductLabel, buf, bufSize, bufSize);
if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND)
{
return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND;
}
return err;
}

CHIP_ERROR ESP32FactoryDataProvider::GetHardwareVersionString(char * buf, size_t bufSize)
{
size_t hardwareVersionStringLen = 0; // without counting null-terminator
Expand Down
2 changes: 2 additions & 0 deletions src/platform/ESP32/ESP32FactoryDataProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class ESP32FactoryDataProvider : public CommissionableDataProvider,
CHIP_ERROR GetVendorId(uint16_t & vendorId) override;
CHIP_ERROR GetProductName(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductId(uint16_t & productId) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override;
CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override;
#endif // CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER
Expand Down
18 changes: 0 additions & 18 deletions src/platform/android/ConfigurationManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,6 @@ CHIP_ERROR ConfigurationManagerImpl::GetSoftwareVersionString(char * buf, size_t
return CHIP_NO_ERROR;
}

CHIP_ERROR ConfigurationManagerImpl::GetPartNumber(char * buf, size_t bufSize)
{
size_t dateLen;
return ReadConfigValueStr(AndroidConfig::kConfigKey_PartNumber, buf, bufSize, dateLen);
}

CHIP_ERROR ConfigurationManagerImpl::GetProductURL(char * buf, size_t bufSize)
{
size_t dateLen;
return ReadConfigValueStr(AndroidConfig::kConfigKey_ProductURL, buf, bufSize, dateLen);
}

CHIP_ERROR ConfigurationManagerImpl::GetProductLabel(char * buf, size_t bufSize)
{
size_t dateLen;
return ReadConfigValueStr(AndroidConfig::kConfigKey_ProductLabel, buf, bufSize, dateLen);
}

CHIP_ERROR ConfigurationManagerImpl::GetUniqueId(char * buf, size_t bufSize)
{
size_t dateLen;
Expand Down
3 changes: 0 additions & 3 deletions src/platform/android/ConfigurationManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp
static ConfigurationManagerImpl & GetDefaultInstance();
CHIP_ERROR GetSoftwareVersionString(char * buf, size_t bufSize) override;
CHIP_ERROR GetSoftwareVersion(uint32_t & softwareVer) override;
CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override;

private:
Expand Down
18 changes: 18 additions & 0 deletions src/platform/android/DeviceInstanceInfoProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@ CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductId(uint16_t & productId)
return CHIP_NO_ERROR;
}

CHIP_ERROR DeviceInstanceInfoProviderImpl::GetPartNumber(char * buf, size_t bufSize)
{
size_t dateLen;
return Internal::AndroidConfig::ReadConfigValueStr(Internal::AndroidConfig::kConfigKey_PartNumber, buf, bufSize, dateLen);
}

CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductURL(char * buf, size_t bufSize)
{
size_t dateLen;
return Internal::AndroidConfig::ReadConfigValueStr(Internal::AndroidConfig::kConfigKey_ProductURL, buf, bufSize, dateLen);
}

CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductLabel(char * buf, size_t bufSize)
{
size_t dateLen;
return Internal::AndroidConfig::ReadConfigValueStr(Internal::AndroidConfig::kConfigKey_ProductLabel, buf, bufSize, dateLen);
}

CHIP_ERROR DeviceInstanceInfoProviderImpl::GetProductName(char * buf, size_t bufSize)
{
CHIP_ERROR err;
Expand Down
3 changes: 3 additions & 0 deletions src/platform/android/DeviceInstanceInfoProviderImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class DeviceInstanceInfoProviderImpl : public Internal::GenericDeviceInstanceInf
public:
CHIP_ERROR GetProductName(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductId(uint16_t & productId) override;
CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override;
CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override;
CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override;

DeviceInstanceInfoProviderImpl(ConfigurationManagerImpl & configManager) :
Expand Down
Loading

0 comments on commit 48860e2

Please sign in to comment.