class Delegate
Defined at line 52 of file ../../src/connectivity/weave/adaptation/configuration_manager_impl.h
Delegate class to handle platform-specific implementations of the
ConfigurationManager API surface. This enables tests to swap out the
implementation of the static ConfigurationManager instance.
Protected Members
ConfigurationManagerImpl * impl_
Public Methods
WEAVE_ERROR Init ()
Performs any required initialization for the delegate. This method must
be called before other methods.
WEAVE_ERROR GetDeviceId (uint64_t & device_id)
Populates |device_id| with the weave device ID.
WEAVE_ERROR GetFirmwareRevision (char * buf, size_t buf_size, size_t & out_len)
Populates |buf| with the firmware revision, where |buf_size| is the
length of |buf| in bytes. If |buf| does not have enough capacity to hold
the firmware revision, |out_len| is not modified. Otherwise, |out_len|
contains the size of the data.
WEAVE_ERROR GetManufacturerDeviceCertificate (uint8_t * buf, size_t buf_size, size_t & out_len)
Populates |buf| with the manufacturer device certificate, where
|buf_size| is the length of |buf| in bytes. If |buf| does not have
enough capacity to hold the firmware revision, |out_len| is not modified.
Otherwise, |out_len| contains the size of the data.
WEAVE_ERROR GetProductId (uint16_t & product_id)
Populates |product_id| with the weave product ID.
WEAVE_ERROR GetProductIdDescription (char * buf, size_t buf_size, size_t & out_len)
Populates |product_id_description| with the weave product ID.
WEAVE_ERROR GetVendorId (uint16_t & vendor_id)
Populates |vendor_id| with the weave vendor ID.
WEAVE_ERROR GetVendorIdDescription (char * buf, size_t buf_size, size_t & out_len)
Populates |vendor_id_description| with the weave vendor ID.
GroupKeyStoreBase * GetGroupKeyStore ()
Gets the instance of group key store used by this ConfigurationManager.
bool CanFactoryReset ()
Returns whether factory reset is supported.
void InitiateFactoryReset ()
Erases all mutable configuration held by the delegate.
WEAVE_ERROR ReadPersistedStorageValue (Key key, uint32_t & value)
Reads stored K/V int pairs and writes them to |value|. If the key is not
found or is not of 'uint32_t' type, |value| is unmodified.
WEAVE_ERROR WritePersistedStorageValue (Key key, uint32_t value)
Writes K/V int pair to store.
WEAVE_ERROR GetBleDeviceNamePrefix (char * device_name_prefix, size_t device_name_prefix_size, size_t * out_len)
Acquires the BLE device name prefix and populates it in
|device_name_prefix|, with the length in |out_len|. If the provided
|buf_size| is not sufficient, |out_len| will not be modified.
bool IsFullyProvisioned ()
Returns whether Weave is fully provisioned as configured.
bool IsPairedToAccount ()
Returns whether Weave is paired to an account.
bool IsMemberOfFabric ()
Returns whether this device is a member of a fabric.
bool IsThreadEnabled ()
Returns whether Thread is enabled.
When enabled, ThreadStackManager will attempt to support Thread
operations and fail if it is unable to provide such support.
bool IsIPv6ForwardingEnabled ()
Returns whether IPv6 Forwarding is enabled.
When true, weavestack will enable IPv6 forwarding.
bool IsWoBLEEnabled ()
Returns whether WoBLE is enabled.
When enabled, weavestack will publish GATT service for WoBLE.
bool IsWoBLEAdvertisementEnabled ()
Returns whether WoBLE advertisement enabled.
When enabled, weavestack will do WoBLE advertisement on startup.
WEAVE_ERROR GetDeviceDescriptorTLV (uint8_t * buf, size_t buf_size, size_t & encoded_len)
Acquires the device descriptor in Weave TLV format and populates it in
|buf|, with the length in |encoded_len|. If the provided |buf_size| is
not sufficient, |encoded_len| will not be modified.
WEAVE_ERROR GetPrimaryWiFiMACAddress (uint8_t * mac_address)
Get the primary WiFi MAC address. Supplied buffer must be 6 bytes long.
zx_status_t GetPrivateKeyForSigning (std::vector<uint8_t> * signing_key)
Retrieves test private key for signing test cert in |signing_key|,
returns ZX_OK on success.
zx_status_t GetAppletPathList (std::vector<std::string> & out)
Reads the list of applets from the config file and populates |out| with the same.
WEAVE_ERROR GetThreadJoinableDuration (uint32_t * duration)
Gets the configured duration for Thread to remain joinable when asked to
enter joinable mode (in seconds).
WEAVE_ERROR GetFailSafeArmed (bool & fail_safe_armed)
Gets the fail safe armed state of the device.
void SetConfigurationManagerImpl (ConfigurationManagerImpl * impl)
Provides a handle to ConfigurationManagerImpl object that this delegate
was attached to. This allows the delegate to invoke functions on
GenericConfigurationManagerImpl if required.
Defined at line 62 of file ../../src/connectivity/weave/adaptation/configuration_manager_impl.h
WEAVE_ERROR SetFailSafeArmed (bool fail_safe_armed)
Sets the fail safe armed state of the device.
WEAVE_ERROR StoreFabricId (uint64_t fabric_id)
Sets the weave fabric ID the device.
WEAVE_ERROR StoreServiceProvisioningData (uint64_t service_id, const uint8_t * service_config, size_t service_config_len, const char * account_id, size_t account_id_len)
Store service provisioning data.
WEAVE_ERROR StoreServiceConfig (const uint8_t * service_config, size_t service_config_len)
Store service config.
WEAVE_ERROR StorePairedAccountId (const char * accountId, size_t accountIdLen)
Store paired account ID.
void ~Delegate ()
Defined at line 57 of file ../../src/connectivity/weave/adaptation/configuration_manager_impl.h