nl::Weave::DeviceLayer::Internal::NRF5Config

#include <src/adaptations/device-layer/include/Weave/DeviceLayer/nRF5/nRF5Config.h>

Nordic nRF5 SDK'sını temel alan platformlarda kalıcı cihaz yapılandırmasına erişim için işlevler ve tanımlar sağlar.

Özet

Bu uygulamada, temel depolama katmanı olarak Nordic Flash Data Storage (FDS) kitaplığı kullanılmaktadır.

NOT: Bu sınıf, GeneralConfigurationManagerImpl<> şablonunun somut alt sınıfıyla karıştırılmak üzere tasarlanmıştır. Bu şekilde kullanıldığında sınıf, şablon sınıfının başvuruda bulunduğu yetki verilmiş üyeler için doğal olarak uygulamalar (ör. ReadConfigValue() yöntemi) sağlar.

Devralma

Doğrudan Bilinen Alt Sınıflar:
  nl::Weave::DeviceLayer::ConfigurationManagerImpl
  nl::Weave::DeviceLayer::Internal::GroupKeyStoreImpl

Herkese açık türler

Key kullanarak
uint32_t

Korunan türler

ForEachRecordFunct kullanarak
std::function< WEAVE_ERROR(const fds_flash_record_t &rec, bool &deleteRec)>

Herkese açık statik özellikler

kConfigKey_FabricId = NRF5ConfigKey(kFileId_WeaveConfig, 0x0007)
constexpr Key
kConfigKey_FabricSecret = NRF5ConfigKey(kFileId_WeaveConfig, 0x000B)
constexpr Key
kConfigKey_FailSafeArmed = NRF5ConfigKey(kFileId_WeaveConfig, 0x000D)
constexpr Key
kConfigKey_GroupKey = NRF5ConfigKey(kFileId_WeaveConfig, 0x000E)
constexpr Key
kConfigKey_LastUsedEpochKeyId = NRF5ConfigKey(kFileId_WeaveConfig, 0x000C)
constexpr Key
kConfigKey_ManufacturingDate = NRF5ConfigKey(kFileId_WeaveFactory, 0x0005)
constexpr Key
kConfigKey_MfrDeviceCert = NRF5ConfigKey(kFileId_WeaveFactory, 0x0003)
constexpr Key
kConfigKey_MfrDeviceICACerts = NRF5ConfigKey(kFileId_WeaveFactory, 0x0010)
constexpr Key
kConfigKey_MfrDeviceId = NRF5ConfigKey(kFileId_WeaveFactory, 0x0002)
constexpr Key
kConfigKey_MfrDevicePrivateKey = NRF5ConfigKey(kFileId_WeaveFactory, 0x0004)
constexpr Key
kConfigKey_OperationalDeviceCert = NRF5ConfigKey(kFileId_WeaveConfig, 0x0012)
constexpr Key
kConfigKey_OperationalDeviceICACerts = NRF5ConfigKey(kFileId_WeaveConfig, 0x0013)
constexpr Key
kConfigKey_OperationalDeviceId = NRF5ConfigKey(kFileId_WeaveConfig, 0x0011)
constexpr Key
kConfigKey_OperationalDevicePrivateKey = NRF5ConfigKey(kFileId_WeaveConfig, 0x0014)
constexpr Key
kConfigKey_PairedAccountId = NRF5ConfigKey(kFileId_WeaveConfig, 0x0009)
constexpr Key
kConfigKey_PairingCode = NRF5ConfigKey(kFileId_WeaveFactory, 0x0006)
constexpr Key
kConfigKey_ProductRevision = NRF5ConfigKey(kFileId_WeaveFactory, 0x000F)
constexpr Key
kConfigKey_SerialNum = NRF5ConfigKey(kFileId_WeaveFactory, 0x0001)
constexpr Key
kConfigKey_ServiceConfig = NRF5ConfigKey(kFileId_WeaveConfig, 0x0008)
constexpr Key
kConfigKey_ServiceId = NRF5ConfigKey(kFileId_WeaveConfig, 0x000A)
constexpr Key
kFDSFileIdMax = 0xBFFF
constexpr uint16_t
Bir FDS dosya kimliği için kullanılabilecek maksimum değer (Nordic SDK'sına göre)
kFDSFileIdMin = 0x0000
constexpr uint16_t
Bir FDS dosya kimliği için kullanılabilecek minimum değer (Nordic SDK'sına göre)
kFDSRecordKeyMax = 0xBFFF
constexpr uint16_t
Bir FDS kayıt anahtarı için kullanılabilecek maksimum değer (Nordic SDK'sına göre)
kFDSRecordKeyMin = 0x0001
constexpr uint16_t
Bir FDS kayıt anahtarı için kullanılabilecek minimum değer (Nordic SDK'sına göre)
kFileId_WeaveConfig = 0x235B
constexpr uint16_t
Çalışma zamanında ayarlanmış dinamik yapılandırma değerlerini içeren FDS dosyası.
kFileId_WeaveCounter = 0x235C
constexpr uint16_t
Çalışma zamanında ayarlanmış dinamik sayaç değerlerini içeren FDS dosyası.
kFileId_WeaveFactory = 0x235A
constexpr uint16_t
Üretim zamanında ayarlanmış kalıcı yapılandırma değerlerini içeren FDS dosyası.
kPersistedCounterRecordKeyBase = kFDSRecordKeyMin
constexpr uint16_t
Weave kalıcı sayaç değerlerini içeren kayıtlar için temel kayıt anahtarı.
kPersistedCounterRecordKeyMax = kFDSRecordKeyMax
constexpr uint16_t
Weave kalıcı sayaç değerlerini içeren kayıtlar için maksimum kayıt anahtarı.

Korunan statik özellikler

kFDSWordSize = 4
constexpr uint16_t
sActiveAsyncOp
FDSAsyncOp *volatile
sAsyncOpCompletionSem
SemaphoreHandle_t

Herkese açık statik işlevler

ClearConfigValue(Key key)
ConfigValueExists(Key key)
bool
FactoryResetConfig(void)
Init(void)
ReadConfigValue(Key key, bool & val)
ReadConfigValue(Key key, uint32_t & val)
ReadConfigValue(Key key, uint64_t & val)
ReadConfigValueBin(Key key, uint8_t *buf, size_t bufSize, size_t & outLen)
ReadConfigValueStr(Key key, char *buf, size_t bufSize, size_t & outLen)
RunConfigUnitTest(void)
void
WriteConfigValue(Key key, bool val)
WriteConfigValue(Key key, uint32_t val)
WriteConfigValue(Key key, uint64_t val)
WriteConfigValueBin(Key key, const uint8_t *data, size_t dataLen)
WriteConfigValueStr(Key key, const char *str)
WriteConfigValueStr(Key key, const char *str, size_t strLen)

Korunan statik işlevler

DoAsyncFDSOp(FDSAsyncOp & asyncOp)
FDSWords(size_t s)
constexpr uint16_t
Belirli bir boyuttaki bir nesneyi tutmak için gereken FDS kelimelerinin sayısı.
ForEachRecord(uint16_t fileId, uint16_t recordKey, ForEachRecordFunct funct)
GetFileId(uint32_t key)
constexpr uint16_t
Bir anahtar değerinden FDS dosya kimliği çıkarın.
GetRecordKey(uint32_t key)
constexpr uint16_t
Bir anahtar değerinden bir FDS kayıt anahtarı çıkarın.
OpenRecord(NRF5Config::Key key, fds_record_desc_t & recDesc, fds_flash_record_t & rec)

Herkese açık türler

Anahtar

uint32_t Key

Korunan türler

ForEachRecordFunct

std::function< WEAVE_ERROR(const fds_flash_record_t &rec, bool &deleteRec)> ForEachRecordFunct

Herkese açık statik özellikler

kConfigKey_FabricId

constexpr Key kConfigKey_FabricId = NRF5ConfigKey(kFileId_WeaveConfig,  0x0007)

kConfigKey_FabricSecret

constexpr Key kConfigKey_FabricSecret = NRF5ConfigKey(kFileId_WeaveConfig,  0x000B)

kConfigKey_FailSafeArmed

constexpr Key kConfigKey_FailSafeArmed = NRF5ConfigKey(kFileId_WeaveConfig,  0x000D)

kConfigKey_GroupKey

constexpr Key kConfigKey_GroupKey = NRF5ConfigKey(kFileId_WeaveConfig,  0x000E)

kConfigKey_LastUsedEpochKeyId

constexpr Key kConfigKey_LastUsedEpochKeyId = NRF5ConfigKey(kFileId_WeaveConfig,  0x000C)

kConfigKey_ManufacturingDate

constexpr Key kConfigKey_ManufacturingDate = NRF5ConfigKey(kFileId_WeaveFactory, 0x0005)

kConfigKey_MfrDeviceCert

constexpr Key kConfigKey_MfrDeviceCert = NRF5ConfigKey(kFileId_WeaveFactory, 0x0003)

kConfigKey_MfrDeviceICACerts

constexpr Key kConfigKey_MfrDeviceICACerts = NRF5ConfigKey(kFileId_WeaveFactory, 0x0010)

kConfigKey_MfrDeviceId

constexpr Key kConfigKey_MfrDeviceId = NRF5ConfigKey(kFileId_WeaveFactory, 0x0002)

kConfigKey_MfrDevicePrivateKey

constexpr Key kConfigKey_MfrDevicePrivateKey = NRF5ConfigKey(kFileId_WeaveFactory, 0x0004)

kConfigKey_OperationalDeviceCert

constexpr Key kConfigKey_OperationalDeviceCert = NRF5ConfigKey(kFileId_WeaveConfig,  0x0012)

kConfigKey_OperationalDeviceICACerts

constexpr Key kConfigKey_OperationalDeviceICACerts = NRF5ConfigKey(kFileId_WeaveConfig,  0x0013)

kConfigKey_OperationalDeviceId

constexpr Key kConfigKey_OperationalDeviceId = NRF5ConfigKey(kFileId_WeaveConfig,  0x0011)

kConfigKey_OperationalDevicePrivateKey

constexpr Key kConfigKey_OperationalDevicePrivateKey = NRF5ConfigKey(kFileId_WeaveConfig,  0x0014)

kConfigKey_PairedAccountId

constexpr Key kConfigKey_PairedAccountId = NRF5ConfigKey(kFileId_WeaveConfig,  0x0009)

kConfigKey_PairingCode

constexpr Key kConfigKey_PairingCode = NRF5ConfigKey(kFileId_WeaveFactory, 0x0006)

kConfigKey_ProductRevision

constexpr Key kConfigKey_ProductRevision = NRF5ConfigKey(kFileId_WeaveFactory, 0x000F)

kConfigKey_SerialNum

constexpr Key kConfigKey_SerialNum = NRF5ConfigKey(kFileId_WeaveFactory, 0x0001)

kConfigKey_ServiceConfig

constexpr Key kConfigKey_ServiceConfig = NRF5ConfigKey(kFileId_WeaveConfig,  0x0008)

kConfigKey_ServiceId

constexpr Key kConfigKey_ServiceId = NRF5ConfigKey(kFileId_WeaveConfig,  0x000A)

kFDSFileIdMax

constexpr uint16_t kFDSFileIdMax = 0xBFFF

Bir FDS dosya kimliği için kullanılabilecek maksimum değer (Nordic SDK'sına göre)

kFDSFileIdMin

constexpr uint16_t kFDSFileIdMin = 0x0000

Bir FDS dosya kimliği için kullanılabilecek minimum değer (Nordic SDK'sına göre)

kFDSRecordKeyMax

constexpr uint16_t kFDSRecordKeyMax = 0xBFFF

Bir FDS kayıt anahtarı için kullanılabilecek maksimum değer (Nordic SDK'sına göre)

kFDSRecordKeyMin

constexpr uint16_t kFDSRecordKeyMin = 0x0001

Bir FDS kayıt anahtarı için kullanılabilecek minimum değer (Nordic SDK'sına göre)

kFileId_WeaveConfig

constexpr uint16_t kFileId_WeaveConfig = 0x235B

Çalışma zamanında ayarlanmış dinamik yapılandırma değerlerini içeren FDS dosyası.

Fabrika ayarlarına sıfırlama sırasında temizlenir.

kFileId_WeaveCounter

constexpr uint16_t kFileId_WeaveCounter = 0x235C

Çalışma zamanında ayarlanmış dinamik sayaç değerlerini içeren FDS dosyası.

Fabrika ayarlarına sıfırlama işlemi sırasında saklanır.

kFileId_WeaveFactory

constexpr uint16_t kFileId_WeaveFactory = 0x235A

Üretim zamanında ayarlanmış kalıcı yapılandırma değerlerini içeren FDS dosyası.

Fabrika ayarlarına sıfırlama işlemi sırasında saklanır.

kPersistedCounterRecordKeyBase

constexpr uint16_t kPersistedCounterRecordKeyBase = kFDSRecordKeyMin

Weave kalıcı sayaç değerlerini içeren kayıtlar için temel kayıt anahtarı.

Weave sayaç kimliği, FDS kayıt anahtarını oluşturmak için bu değere eklenir.

kPersistedCounterRecordKeyMax

constexpr uint16_t kPersistedCounterRecordKeyMax = kFDSRecordKeyMax

Weave kalıcı sayaç değerlerini içeren kayıtlar için maksimum kayıt anahtarı.

Korunan statik özellikler

kFDSWordSize

constexpr uint16_t kFDSWordSize = 4

sActiveAsyncOp

FDSAsyncOp *volatile sActiveAsyncOp

sAsyncOpCompletionSem

SemaphoreHandle_t sAsyncOpCompletionSem

Herkese açık statik işlevler

ClearConfigValue

WEAVE_ERROR ClearConfigValue(
  Key key
)

ConfigValueExists

bool ConfigValueExists(
  Key key
)

FactoryResetConfig

WEAVE_ERROR FactoryResetConfig(
  void
)

Başlat

WEAVE_ERROR Init(
  void
)

ReadConfigValue

WEAVE_ERROR ReadConfigValue(
  Key key,
  bool & val
)

ReadConfigValue

WEAVE_ERROR ReadConfigValue(
  Key key,
  uint32_t & val
)

ReadConfigValue

WEAVE_ERROR ReadConfigValue(
  Key key,
  uint64_t & val
)

ReadConfigValueBin

WEAVE_ERROR ReadConfigValueBin(
  Key key,
  uint8_t *buf,
  size_t bufSize,
  size_t & outLen
)

ReadConfigValueStr

WEAVE_ERROR ReadConfigValueStr(
  Key key,
  char *buf,
  size_t bufSize,
  size_t & outLen
)

RunConfigUnitTest

void RunConfigUnitTest(
  void
)

WriteConfigValue

WEAVE_ERROR WriteConfigValue(
  Key key,
  bool val
)

WriteConfigValue

WEAVE_ERROR WriteConfigValue(
  Key key,
  uint32_t val
)

WriteConfigValue

WEAVE_ERROR WriteConfigValue(
  Key key,
  uint64_t val
)

WriteConfigValueBin

WEAVE_ERROR WriteConfigValueBin(
  Key key,
  const uint8_t *data,
  size_t dataLen
)

WriteConfigValueStr

WEAVE_ERROR WriteConfigValueStr(
  Key key,
  const char *str
)

WriteConfigValueStr

WEAVE_ERROR WriteConfigValueStr(
  Key key,
  const char *str,
  size_t strLen
)

Korunan statik işlevler

DoAsyncFDSOp

WEAVE_ERROR DoAsyncFDSOp(
  FDSAsyncOp & asyncOp
)

FDSWords

constexpr uint16_t FDSWords(
  size_t s
)

Belirli bir boyuttaki bir nesneyi tutmak için gereken FDS kelimelerinin sayısı.

ForEachRecord

WEAVE_ERROR ForEachRecord(
  uint16_t fileId,
  uint16_t recordKey,
  ForEachRecordFunct funct
)

GetFileId

constexpr uint16_t GetFileId(
  uint32_t key
)

Bir anahtar değerinden FDS dosya kimliği çıkarın.

GetRecordKey

constexpr uint16_t GetRecordKey(
  uint32_t key
)

Bir anahtar değerinden bir FDS kayıt anahtarı çıkarın.

OpenRecord

WEAVE_ERROR OpenRecord(
  NRF5Config::Key key,
  fds_record_desc_t & recDesc,
  fds_flash_record_t & rec
)