-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for building nRF5 platform #104
Changes from all commits
0df92e8
c651f29
250a97a
a30f563
e26cd7a
b9b31bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,6 @@ | |
#define CONFIGURATION_MANAGER_H | ||
|
||
#include <platform/PersistedStorage.h> | ||
#include <profiles/device-description/DeviceDescription.h> | ||
#include <profiles/network-provisioning/NetworkProvisioning.h> | ||
|
||
namespace chip { | ||
namespace Ble { | ||
|
@@ -38,29 +36,24 @@ namespace DeviceLayer { | |
|
||
class PlatformManagerImpl; | ||
class ConfigurationManagerImpl; | ||
class TraitManager; | ||
namespace Internal { | ||
template<class> class GenericPlatformManagerImpl; | ||
class DeviceControlServer; | ||
class NetworkProvisioningServer; | ||
} | ||
|
||
/** | ||
* Provides access to runtime and build-time configuration information for a chip device. | ||
*/ | ||
class ConfigurationManager | ||
{ | ||
using ChipDeviceDescriptor = ::chip::Profiles::DeviceDescription::ChipDeviceDescriptor; | ||
|
||
public: | ||
|
||
// ===== Members that define the public interface of the ConfigurationManager | ||
|
||
enum | ||
{ | ||
kMaxPairingCodeLength = 15, | ||
kMaxSerialNumberLength = ChipDeviceDescriptor::kMaxSerialNumberLength, | ||
kMaxFirmwareRevisionLength = ChipDeviceDescriptor::kMaxSoftwareVersionLength, | ||
kMaxSerialNumberLength = 32, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tag these with an XXX or some such for follow-up? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ToDo: File issue to track this |
||
kMaxFirmwareRevisionLength = 32, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tag these with an XXX or some such for follow-up? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gerickson I am going to submit GitHub issues to track these. |
||
}; | ||
|
||
CHIP_ERROR GetVendorId(uint16_t & vendorId); | ||
|
@@ -109,8 +102,6 @@ class ConfigurationManager | |
CHIP_ERROR StoreServiceConfig(const uint8_t * serviceConfig, size_t serviceConfigLen); | ||
CHIP_ERROR StorePairedAccountId(const char * accountId, size_t accountIdLen); | ||
|
||
CHIP_ERROR GetDeviceDescriptor(ChipDeviceDescriptor & deviceDesc); | ||
CHIP_ERROR GetDeviceDescriptorTLV(uint8_t * buf, size_t bufSize, size_t & encodedLen); | ||
CHIP_ERROR GetQRCodeString(char * buf, size_t bufSize); | ||
|
||
CHIP_ERROR GetWiFiAPSSID(char * buf, size_t bufSize); | ||
|
@@ -135,17 +126,14 @@ class ConfigurationManager | |
|
||
friend class ::chip::DeviceLayer::PlatformManagerImpl; | ||
template<class> friend class ::chip::DeviceLayer::Internal::GenericPlatformManagerImpl; | ||
friend class ::chip::DeviceLayer::TraitManager; | ||
friend class ::chip::DeviceLayer::Internal::DeviceControlServer; | ||
// Parentheses used to fix clang parsing issue with these declarations | ||
friend CHIP_ERROR (::chip::Platform::PersistedStorage::Read(::chip::Platform::PersistedStorage::Key key, uint32_t & value)); | ||
friend CHIP_ERROR (::chip::Platform::PersistedStorage::Write(::chip::Platform::PersistedStorage::Key key, uint32_t value)); | ||
friend CHIP_ERROR ::chip::Platform::PersistedStorage::Read(::chip::Platform::PersistedStorage::Key key, uint32_t & value); | ||
friend CHIP_ERROR ::chip::Platform::PersistedStorage::Write(::chip::Platform::PersistedStorage::Key key, uint32_t value); | ||
|
||
using ImplClass = ConfigurationManagerImpl; | ||
|
||
CHIP_ERROR Init(); | ||
CHIP_ERROR ConfigureChipStack(); | ||
::chip::Profiles::Security::AppKeys::GroupKeyStoreBase * GetGroupKeyStore(); | ||
bool CanFactoryReset(); | ||
CHIP_ERROR GetFailSafeArmed(bool & val); | ||
CHIP_ERROR SetFailSafeArmed(bool val); | ||
|
@@ -429,16 +417,6 @@ inline CHIP_ERROR ConfigurationManager::WritePersistedStorageValue(::chip::Platf | |
return static_cast<ImplClass*>(this)->_WritePersistedStorageValue(key, value); | ||
} | ||
|
||
inline CHIP_ERROR ConfigurationManager::GetDeviceDescriptor(chipDeviceDescriptor & deviceDesc) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ToDo: File issue to track this |
||
{ | ||
return static_cast<ImplClass*>(this)->_GetDeviceDescriptor(deviceDesc); | ||
} | ||
|
||
inline CHIP_ERROR ConfigurationManager::GetDeviceDescriptorTLV(uint8_t * buf, size_t bufSize, size_t & encodedLen) | ||
{ | ||
return static_cast<ImplClass*>(this)->_GetDeviceDescriptorTLV(buf, bufSize, encodedLen); | ||
} | ||
|
||
inline CHIP_ERROR ConfigurationManager::GetQRCodeString(char * buf, size_t bufSize) | ||
{ | ||
return static_cast<ImplClass*>(this)->_GetQRCodeString(buf, bufSize); | ||
|
@@ -449,7 +427,7 @@ inline CHIP_ERROR ConfigurationManager::GetWiFiAPSSID(char * buf, size_t bufSize | |
return static_cast<ImplClass*>(this)->_GetWiFiAPSSID(buf, bufSize); | ||
} | ||
|
||
inline CHIP_ERROR ConfigurationManager::GetBLEDeviceIdentificationInfo(Ble::chipBLEDeviceIdentificationInfo & deviceIdInfo) | ||
inline CHIP_ERROR ConfigurationManager::GetBLEDeviceIdentificationInfo(Ble::ChipBLEDeviceIdentificationInfo & deviceIdInfo) | ||
{ | ||
return static_cast<ImplClass*>(this)->_GetBLEDeviceIdentificationInfo(deviceIdInfo); | ||
} | ||
|
@@ -489,14 +467,9 @@ inline CHIP_ERROR ConfigurationManager::Init() | |
return static_cast<ImplClass*>(this)->_Init(); | ||
} | ||
|
||
inline CHIP_ERROR ConfigurationManager::ConfigurechipStack() | ||
{ | ||
return static_cast<ImplClass*>(this)->_ConfigurechipStack(); | ||
} | ||
|
||
inline ::chip::Profiles::Security::AppKeys::GroupKeyStoreBase * ConfigurationManager::GetGroupKeyStore() | ||
inline CHIP_ERROR ConfigurationManager::ConfigureChipStack() | ||
{ | ||
return static_cast<ImplClass*>(this)->_GetGroupKeyStore(); | ||
return static_cast<ImplClass*>(this)->_ConfigureChipStack(); | ||
} | ||
|
||
inline bool ConfigurationManager::CanFactoryReset() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToDo: File issue to track this