Documentation ¶
Index ¶
- Constants
- Variables
- func DeviceFlags(cmd *cobra.Command)
- func MatterFlags(cmd *cobra.Command)
- func SetDeviceOptions(c *cobra.Command)
- type ConfigurationManager
- type ConfigurationManagerImpl
- func (c *ConfigurationManagerImpl) GenerateUniqueId() error
- func (c *ConfigurationManagerImpl) GetBLEDeviceIdentificationInfo() (ble.DeviceIdentificationInfo, error)
- func (c *ConfigurationManagerImpl) GetBootReason() (uint32, error)
- func (c *ConfigurationManagerImpl) GetCommissionableDeviceName() (string, error)
- func (c *ConfigurationManagerImpl) GetCountryCode() (string, error)
- func (c *ConfigurationManagerImpl) GetDeviceTypeId() (uint32, error)
- func (c *ConfigurationManagerImpl) GetFailSafeArmed() bool
- func (c *ConfigurationManagerImpl) GetFirmwareBuildChipEpochTime() (time.Duration, error)
- func (c *ConfigurationManagerImpl) GetInitialPairingHint() (uint16, error)
- func (c *ConfigurationManagerImpl) GetInitialPairingInstruction() (string, error)
- func (c *ConfigurationManagerImpl) GetLifetimeCounter() (uint16, error)
- func (c *ConfigurationManagerImpl) GetLocationCapability() (uint8, error)
- func (c *ConfigurationManagerImpl) GetPartNumber() (string, error)
- func (c *ConfigurationManagerImpl) GetPrimary802154MACAddress() ([]byte, error)
- func (c *ConfigurationManagerImpl) GetPrimaryMACAddress() (string, error)
- func (c *ConfigurationManagerImpl) GetPrimaryWiFiMACAddress() ([]byte, error)
- func (c *ConfigurationManagerImpl) GetProductId() (uint16, error)
- func (c *ConfigurationManagerImpl) GetProductLabel() (string, error)
- func (c *ConfigurationManagerImpl) GetProductName() string
- func (c *ConfigurationManagerImpl) GetProductURL() (string, error)
- func (c *ConfigurationManagerImpl) GetRebootCount() (uint32, error)
- func (c *ConfigurationManagerImpl) GetRegulatoryLocation() (location uint8, err error)
- func (c *ConfigurationManagerImpl) GetSecondaryPairingHint() (uint16, error)
- func (c *ConfigurationManagerImpl) GetSecondaryPairingInstruction() (string, error)
- func (c *ConfigurationManagerImpl) GetSetupDiscriminator() (uint16, error)
- func (c *ConfigurationManagerImpl) GetSoftwareVersion() (uint32, error)
- func (c *ConfigurationManagerImpl) GetSoftwareVersionString()
- func (c *ConfigurationManagerImpl) GetTotalOperationalHours(totalOperationalHours uint32) error
- func (c *ConfigurationManagerImpl) GetUniqueId() (string, error)
- func (c *ConfigurationManagerImpl) GetVendorId() (uint16, error)
- func (c *ConfigurationManagerImpl) GetVendorName() (string, error)
- func (c *ConfigurationManagerImpl) Init(configProvider Provider, options *DeviceOptions) error
- func (c *ConfigurationManagerImpl) InitiateFactoryReset()
- func (c *ConfigurationManagerImpl) IsCommissionableDeviceNameEnabled() bool
- func (c *ConfigurationManagerImpl) IsCommissionableDeviceTypeEnabled() bool
- func (c *ConfigurationManagerImpl) IsFullyProvisioned() bool
- func (c *ConfigurationManagerImpl) LogDeviceConfig()
- func (c *ConfigurationManagerImpl) RunUnitTests() error
- func (c *ConfigurationManagerImpl) SetDeviceTypeId(t uint32)
- func (c *ConfigurationManagerImpl) SetFailSafeArmed(val bool) error
- func (c *ConfigurationManagerImpl) SetFirmwareBuildChipEpochTime() (time.Duration, error)
- func (c *ConfigurationManagerImpl) StoreBootReason(bootReason uint32) error
- func (c *ConfigurationManagerImpl) StoreCountryCode(code string) error
- func (c *ConfigurationManagerImpl) StoreHardwareVersion(hardwareVer uint16) error
- func (c *ConfigurationManagerImpl) StoreManufacturingDate(mfgDate string) error
- func (c *ConfigurationManagerImpl) StoreProductId(productId uint16) error
- func (c *ConfigurationManagerImpl) StoreRebootCount(rebootCount uint32) error
- func (c *ConfigurationManagerImpl) StoreRegulatoryLocation(location uint8) error
- func (c *ConfigurationManagerImpl) StoreSerialNumber(serialNum string) error
- func (c *ConfigurationManagerImpl) StoreSoftwareVersion(softwareVer uint32) error
- func (c *ConfigurationManagerImpl) StoreTotalOperationalHours(totalOperationalHours uint32) error
- func (c *ConfigurationManagerImpl) StoreUniqueId(uniqueId string) error
- func (c *ConfigurationManagerImpl) StoreVendorId(vendorId uint16) error
- type DeviceOptions
- type Flag
- type Key
- type PayloadContents
- type Provider
- type ProviderImpl
- func (conf *ProviderImpl) ClearConfigValue(k Key) error
- func (conf *ProviderImpl) ConfigValueExists(k Key) bool
- func (conf *ProviderImpl) EnsureNamespace(k string) error
- func (conf *ProviderImpl) FactoryResetConfig() error
- func (conf *ProviderImpl) FactoryResetCounters() error
- func (conf *ProviderImpl) GetStorageForNamespace(k Key) store.KvsStorage
- func (conf *ProviderImpl) ReadConfigValueBin(k Key) ([]byte, error)
- func (conf *ProviderImpl) ReadConfigValueBool(k Key) (bool, error)
- func (conf *ProviderImpl) ReadConfigValueStr(k Key) (string, error)
- func (conf *ProviderImpl) ReadConfigValueUint16(k Key) (uint16, error)
- func (conf *ProviderImpl) ReadConfigValueUint32(k Key) (uint32, error)
- func (conf *ProviderImpl) ReadConfigValueUint64(k Key) (uint64, error)
- func (conf *ProviderImpl) RunConfigUnitTest()
- func (conf *ProviderImpl) WriteConfigValueBin(k Key, val []byte) error
- func (conf *ProviderImpl) WriteConfigValueBool(k Key, val bool) error
- func (conf *ProviderImpl) WriteConfigValueStr(k Key, val string) error
- func (conf *ProviderImpl) WriteConfigValueUint16(k Key, val uint16) error
- func (conf *ProviderImpl) WriteConfigValueUint32(k Key, val uint32) error
- func (conf *ProviderImpl) WriteConfigValueUint64(k Key, val uint64) error
- type SetupDiscriminator
- type StorageDelegate
Constants ¶
View Source
const ( MaxUnsolicitedMessageHandlers = 8 MaxFabrics int = 16 MessageCounterWindowSize uint = 32 UnauthenticatedConnectionPoolSize int = 4 SecureSessionPoolSize = MaxFabrics*3 + 2 MaxExchangeContexts = 16 RMPRetransTableSize = 16 Sha256ContextSize = (4 * (8 + 2 + 16 + 2)) + 8 DeviceMaxActiveCASEClients = 2 )
View Source
const ( RendezvousInformationFlagNone uint8 = 0 RendezvousInformationFlagSoftAP uint8 = 1 << 0 RendezvousInformationFlagBLE uint8 = 1 << 1 RendezvousInformationFlagOnNetwork uint8 = 1 << 2 CommissioningFlowStandard = iota CommissioningFlowUserActionRequired CommissioningFlowCustom )
View Source
const KConfigNamespaceChipConfig = "chip-config"
View Source
const KConfigNamespaceChipCounters = "chip-counters"
View Source
const KConfigNamespaceChipFactory = "chip-factory"
Variables ¶
View Source
var ( KConfigKey_SerialNum = Key{KConfigNamespaceChipFactory, "serial-num"} KConfigKey_HardwareVersion = Key{KConfigNamespaceChipFactory, "hardware-ver"} KConfigKey_ManufacturingDate = Key{KConfigNamespaceChipFactory, "mfg-date"} KConfigKey_VendorId = Key{KConfigNamespaceChipFactory, "vendor-id"} KConfigKey_ProductId = Key{KConfigNamespaceChipFactory, "product-id"} KConfigKey_RegulatoryLocation = Key{KConfigNamespaceChipConfig, "regulatory-location"} KConfigKey_LocationCapability = Key{KConfigNamespaceChipConfig, "location-capability"} KCounterKey_RebootCount = Key{KConfigNamespaceChipCounters, "reboot-count"} KCounterKey_TotalOperationalHours = Key{KConfigNamespaceChipCounters, "total-operational-hours"} KCounterKey_BootReason = Key{KConfigNamespaceChipCounters, "boot-reason"} )
View Source
var ( PairingAutostart = false PairingAutostartName = "pairing-autostart" PairingAutostartUsage = "Matter Device Config Enable Pairing Autostart" CommissionerDiscovery = 1 CommissionerDiscoveryName = "enable-commissioner-discover" CommissionerDiscoveryUsage = "Matter Device Config Enable Commissioner Discovery" ExtendedDiscovery = false ExtendedDiscoveryName = "enable-extended-discovery" ExtendedDiscoveryUsage = "ExtendedDiscovery" ExtendedDiscoveryTimeoutSecs uint64 = 15 * 60 ExtendedDiscoveryTimeoutSecsName = "extended-discovery-timeout" ExtendedDiscoveryTimeoutSecsUsage = "Matter Device Config Extended Discovery TimeoutSecs" DiscoveryDisabled uint8 = 0 DiscoveryDisabledName = "discovery-disabled" DiscoveryDisabledUsage = "Matter Device Config Discovery Disabled ProtocolName" DiscoveryNoTimeout int8 = -1 DiscoveryNoTimeoutName = "discover-no-timeout" DiscoveryNoTimeoutUsage = "Matter Device Config Discovery NoTimeout" )
View Source
var ( DeviceOptionVersion = Flag{ Key: "version", DefaultValue: 0, Usage: "The version indication provides versioning of the setup payload.\n", } DeviceOptionVendorID = Flag{ "vendor-id", 0, "The Vendor ID is assigned by the Connectivity Standards Alliance.\n", } DeviceOptionProductID = Flag{ "product-id", 0, "The Product ID is specified by vendor.\n", } DeviceOptionCustomFlow = Flag{ "custom-flow", 0, "A 2-bit unsigned enumeration specifying manufacturer-specific custom flow options.\n", } DeviceOptionCapabilities = Flag{ "capabilities", 0, "Discovery Capabilities Bitmask which contains information about Device’s available technologies for device discovery.\n", } DeviceOptionDiscriminator = Flag{ "discriminator", 0, "A 12-bit unsigned integer match the value which a device advertises during commissioning.\n", } DeviceOptionPasscode = Flag{ "passcode", 0xFFFFFFF, "A 27-bit unsigned integer, which serves as proof of possession during commissioning. If not provided to compute a verifier, the --spake2p-verifier-base64 must be provided. \n", } DeviceOptionSpake2pVerifierBase64 = Flag{ "spake2p-verifier-base64", 0xFFFFF, "A raw concatenation of 'W0' and 'L' (67 bytes) as base64 to override the verifier auto-computed from the passcode, if provided.\n", } DeviceOptionSpake2pSaltBase64 = Flag{ "spake2p-salt-base64", 0, "16-32 bytes of salt to use for the PASE verifier, as base64. If omitted, will be generated randomly. If a --spake2p-verifier-base64 is passed, it must match against the salt otherwise failure will arise.\n", } DeviceOptionSpake2pIterations = Flag{ "spake2p-iterations", 0, "tagNumber of PB DF iterations to use. If omitted, will be 1000. If a --spake2p-verifier-base64 is passed, the iteration counts must match that used to generate the verifier otherwise failure will arise.\n", } DeviceOptionSecuredDevicePort = Flag{ "secured-device-port", 5540, "A 16-bit unsigned integer specifying the listen port to use for secure device messages (default is 5540).\n", } DeviceOptionSecuredCommissionerPort = Flag{ "secured-commissioner-port", 5542, "A 16-bit unsigned integer specifying the listen port to use for secure commissioner messages (default is 5542). Only valid when app is both device and commissioner.\n", } DeviceOptionUnsecuredCommissionerPort = Flag{ "unsecured-commissioner-port", 5550, "A 16-bit unsigned integer specifying the port to use for unsecured commissioner messages (default is 5550).\n", } DeviceOptionCommand = Flag{ "command", "command", "A name for a command to execute during startup.\n"} DeviceOptionPics = Flag{ "PICS", "", "A file containing PICS items.\n"} DeviceOptionKvs = Flag{ "KVS", path.ConfigKvsPath, "A file to store Key Raw Store items.\n"} DeviceOptionInterfaceId = Flag{ "interface-id", "interface-id", "A interface id to advertise on.\n"} )
View Source
var ( EnableSessionResumption = false DeviceVendorId uint16 = 0xFFF1 DeviceProductName = "TEST_PRODUCT" DeviceProductId uint16 = 0x8001 DeviceVendorName = "TEST_VENDOR" TestSerialNumber = "TEST_SN" DefaultDeviceHardwareVersion uint16 = 0 DefaultDeviceHardwareVersionString = "TEST_VERSION" PairingInitialInstruction = "" PairingSecondaryInstruction = "" DeviceName = "Test Kitchen" EnableCommissionableDeviceName = 0 UseTestSetupPinCode uint32 = 20202021 RotatingDeviceIdUniqueId = []byte{0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff} )
View Source
var ( ChipDefaultFactoryPath = path.DefaultFactoryPath ChipDefaultConfigPath = path.DefaultConfigPath ChipDefaultDataPath = path.DefaultDataPath )
View Source
var ( NetworkLayerBle = false NetworkLayerBleName = "ble" NetworkLayerBleUsage = "Chip Config Network Layer Ble" RendezvousMode = false InetConfigEnableTcpEndpoint int8 = 0 InetConfigEnableTcpEndpointName = "enable-tcp" InetConfigEnableTcpEndpointUsage = "Inet Config Enable Tcp Endpoint 0/1(able/disable)" )
Functions ¶
func DeviceFlags ¶
func MatterFlags ¶
func SetDeviceOptions ¶
Types ¶
type ConfigurationManager ¶
type ConfigurationManager interface { StorageDelegate StoreVendorId(vendorId uint16) error StoreProductId(productId uint16) error GetPrimaryMACAddress() (string, error) GetPrimaryWiFiMACAddress() ([]byte, error) GetPrimary802154MACAddress() ([]byte, error) GetSoftwareVersionString() GetSoftwareVersion() (uint32, error) GetFirmwareBuildChipEpochTime() (time.Duration, error) SetFirmwareBuildChipEpochTime() (time.Duration, error) GetLifetimeCounter() (uint16, error) GetRegulatoryLocation() (location uint8, err error) GetCountryCode() (string, error) StoreSerialNumber(serialNum string) error StoreManufacturingDate(mfgDate string) error StoreSoftwareVersion(softwareVer uint32) error StoreHardwareVersion(hardwareVer uint16) error StoreRegulatoryLocation(location uint8) error StoreCountryCode(code string) error GetRebootCount() (uint32, error) StoreRebootCount(rebootCount uint32) error GetTotalOperationalHours(totalOperationalHours uint32) error StoreTotalOperationalHours(totalOperationalHours uint32) error GetBootReason() (uint32, error) StoreBootReason(bootReason uint32) error GetPartNumber() (string, error) GetProductURL() (string, error) GetProductLabel() (string, error) GetUniqueId() (string, error) StoreUniqueId(uniqueId string) error GenerateUniqueId() error GetFailSafeArmed() bool SetFailSafeArmed(val bool) error GetBLEDeviceIdentificationInfo() (ble.DeviceIdentificationInfo, error) IsFullyProvisioned() bool InitiateFactoryReset() RunUnitTests() error LogDeviceConfig() IsCommissionableDeviceTypeEnabled() bool GetDeviceTypeId() (deviceType uint32, err error) IsCommissionableDeviceNameEnabled() bool GetCommissionableDeviceName() (string, error) GetInitialPairingHint() (uint16, error) GetInitialPairingInstruction() (string, error) GetSecondaryPairingHint() (uint16, error) GetSecondaryPairingInstruction() (string, error) GetLocationCapability() (uint8, error) }
ConfigurationManager Defines the public interface for the Device Layer ConfigurationManager object.
type ConfigurationManagerImpl ¶
type ConfigurationManagerImpl struct { Provider // contains filtered or unexported fields }
func DefaultManager ¶
func DefaultManager() *ConfigurationManagerImpl
func NewConfigurationManagerImpl ¶
func NewConfigurationManagerImpl() *ConfigurationManagerImpl
func (*ConfigurationManagerImpl) GenerateUniqueId ¶
func (c *ConfigurationManagerImpl) GenerateUniqueId() error
func (*ConfigurationManagerImpl) GetBLEDeviceIdentificationInfo ¶
func (c *ConfigurationManagerImpl) GetBLEDeviceIdentificationInfo() (ble.DeviceIdentificationInfo, error)
func (*ConfigurationManagerImpl) GetBootReason ¶
func (c *ConfigurationManagerImpl) GetBootReason() (uint32, error)
func (*ConfigurationManagerImpl) GetCommissionableDeviceName ¶
func (c *ConfigurationManagerImpl) GetCommissionableDeviceName() (string, error)
func (*ConfigurationManagerImpl) GetCountryCode ¶
func (c *ConfigurationManagerImpl) GetCountryCode() (string, error)
func (*ConfigurationManagerImpl) GetDeviceTypeId ¶
func (c *ConfigurationManagerImpl) GetDeviceTypeId() (uint32, error)
func (*ConfigurationManagerImpl) GetFailSafeArmed ¶
func (c *ConfigurationManagerImpl) GetFailSafeArmed() bool
func (*ConfigurationManagerImpl) GetFirmwareBuildChipEpochTime ¶
func (c *ConfigurationManagerImpl) GetFirmwareBuildChipEpochTime() (time.Duration, error)
func (*ConfigurationManagerImpl) GetInitialPairingHint ¶
func (c *ConfigurationManagerImpl) GetInitialPairingHint() (uint16, error)
func (*ConfigurationManagerImpl) GetInitialPairingInstruction ¶
func (c *ConfigurationManagerImpl) GetInitialPairingInstruction() (string, error)
func (*ConfigurationManagerImpl) GetLifetimeCounter ¶
func (c *ConfigurationManagerImpl) GetLifetimeCounter() (uint16, error)
func (*ConfigurationManagerImpl) GetLocationCapability ¶
func (c *ConfigurationManagerImpl) GetLocationCapability() (uint8, error)
func (*ConfigurationManagerImpl) GetPartNumber ¶
func (c *ConfigurationManagerImpl) GetPartNumber() (string, error)
func (*ConfigurationManagerImpl) GetPrimary802154MACAddress ¶
func (c *ConfigurationManagerImpl) GetPrimary802154MACAddress() ([]byte, error)
func (*ConfigurationManagerImpl) GetPrimaryMACAddress ¶
func (c *ConfigurationManagerImpl) GetPrimaryMACAddress() (string, error)
func (*ConfigurationManagerImpl) GetPrimaryWiFiMACAddress ¶
func (c *ConfigurationManagerImpl) GetPrimaryWiFiMACAddress() ([]byte, error)
func (*ConfigurationManagerImpl) GetProductId ¶
func (c *ConfigurationManagerImpl) GetProductId() (uint16, error)
func (*ConfigurationManagerImpl) GetProductLabel ¶
func (c *ConfigurationManagerImpl) GetProductLabel() (string, error)
func (*ConfigurationManagerImpl) GetProductName ¶
func (c *ConfigurationManagerImpl) GetProductName() string
func (*ConfigurationManagerImpl) GetProductURL ¶
func (c *ConfigurationManagerImpl) GetProductURL() (string, error)
func (*ConfigurationManagerImpl) GetRebootCount ¶
func (c *ConfigurationManagerImpl) GetRebootCount() (uint32, error)
func (*ConfigurationManagerImpl) GetRegulatoryLocation ¶
func (c *ConfigurationManagerImpl) GetRegulatoryLocation() (location uint8, err error)
func (*ConfigurationManagerImpl) GetSecondaryPairingHint ¶
func (c *ConfigurationManagerImpl) GetSecondaryPairingHint() (uint16, error)
func (*ConfigurationManagerImpl) GetSecondaryPairingInstruction ¶
func (c *ConfigurationManagerImpl) GetSecondaryPairingInstruction() (string, error)
func (*ConfigurationManagerImpl) GetSetupDiscriminator ¶
func (c *ConfigurationManagerImpl) GetSetupDiscriminator() (uint16, error)
func (*ConfigurationManagerImpl) GetSoftwareVersion ¶
func (c *ConfigurationManagerImpl) GetSoftwareVersion() (uint32, error)
func (*ConfigurationManagerImpl) GetSoftwareVersionString ¶
func (c *ConfigurationManagerImpl) GetSoftwareVersionString()
func (*ConfigurationManagerImpl) GetTotalOperationalHours ¶
func (c *ConfigurationManagerImpl) GetTotalOperationalHours(totalOperationalHours uint32) error
func (*ConfigurationManagerImpl) GetUniqueId ¶
func (c *ConfigurationManagerImpl) GetUniqueId() (string, error)
func (*ConfigurationManagerImpl) GetVendorId ¶
func (c *ConfigurationManagerImpl) GetVendorId() (uint16, error)
func (*ConfigurationManagerImpl) GetVendorName ¶
func (c *ConfigurationManagerImpl) GetVendorName() (string, error)
func (*ConfigurationManagerImpl) Init ¶
func (c *ConfigurationManagerImpl) Init(configProvider Provider, options *DeviceOptions) error
func (*ConfigurationManagerImpl) InitiateFactoryReset ¶
func (c *ConfigurationManagerImpl) InitiateFactoryReset()
func (*ConfigurationManagerImpl) IsCommissionableDeviceNameEnabled ¶
func (c *ConfigurationManagerImpl) IsCommissionableDeviceNameEnabled() bool
func (*ConfigurationManagerImpl) IsCommissionableDeviceTypeEnabled ¶
func (c *ConfigurationManagerImpl) IsCommissionableDeviceTypeEnabled() bool
func (*ConfigurationManagerImpl) IsFullyProvisioned ¶
func (c *ConfigurationManagerImpl) IsFullyProvisioned() bool
func (*ConfigurationManagerImpl) LogDeviceConfig ¶
func (c *ConfigurationManagerImpl) LogDeviceConfig()
func (*ConfigurationManagerImpl) RunUnitTests ¶
func (c *ConfigurationManagerImpl) RunUnitTests() error
func (*ConfigurationManagerImpl) SetDeviceTypeId ¶
func (c *ConfigurationManagerImpl) SetDeviceTypeId(t uint32)
func (*ConfigurationManagerImpl) SetFailSafeArmed ¶
func (c *ConfigurationManagerImpl) SetFailSafeArmed(val bool) error
func (*ConfigurationManagerImpl) SetFirmwareBuildChipEpochTime ¶
func (c *ConfigurationManagerImpl) SetFirmwareBuildChipEpochTime() (time.Duration, error)
func (*ConfigurationManagerImpl) StoreBootReason ¶
func (c *ConfigurationManagerImpl) StoreBootReason(bootReason uint32) error
func (*ConfigurationManagerImpl) StoreCountryCode ¶
func (c *ConfigurationManagerImpl) StoreCountryCode(code string) error
func (*ConfigurationManagerImpl) StoreHardwareVersion ¶
func (c *ConfigurationManagerImpl) StoreHardwareVersion(hardwareVer uint16) error
func (*ConfigurationManagerImpl) StoreManufacturingDate ¶
func (c *ConfigurationManagerImpl) StoreManufacturingDate(mfgDate string) error
func (*ConfigurationManagerImpl) StoreProductId ¶
func (c *ConfigurationManagerImpl) StoreProductId(productId uint16) error
func (*ConfigurationManagerImpl) StoreRebootCount ¶
func (c *ConfigurationManagerImpl) StoreRebootCount(rebootCount uint32) error
func (*ConfigurationManagerImpl) StoreRegulatoryLocation ¶
func (c *ConfigurationManagerImpl) StoreRegulatoryLocation(location uint8) error
func (*ConfigurationManagerImpl) StoreSerialNumber ¶
func (c *ConfigurationManagerImpl) StoreSerialNumber(serialNum string) error
func (*ConfigurationManagerImpl) StoreSoftwareVersion ¶
func (c *ConfigurationManagerImpl) StoreSoftwareVersion(softwareVer uint32) error
func (*ConfigurationManagerImpl) StoreTotalOperationalHours ¶
func (c *ConfigurationManagerImpl) StoreTotalOperationalHours(totalOperationalHours uint32) error
func (*ConfigurationManagerImpl) StoreUniqueId ¶
func (c *ConfigurationManagerImpl) StoreUniqueId(uniqueId string) error
func (*ConfigurationManagerImpl) StoreVendorId ¶
func (c *ConfigurationManagerImpl) StoreVendorId(vendorId uint16) error
type DeviceOptions ¶
type DeviceOptions struct { Spake2pIterations uint32 Spake2pVerifier []byte Spake2pSalt []byte Discriminator uint16 Payload PayloadContents BleDevice uint32 WiFi bool Thread bool SecuredDevicePort uint16 SecuredCommissionerPort uint16 UnsecuredCommissionerPort uint16 Command string PICS string KVS string InterfaceId net.Interface TraceStreamDecodeEnabled bool TraceStreamToLogEnabled bool TraceStreamFilename string TestEventTriggerEnableKey []byte DacProvider any }
func GetDeviceOptionsInstance ¶
func GetDeviceOptionsInstance() *DeviceOptions
func NewDeviceOptions ¶
func NewDeviceOptions() *DeviceOptions
func (*DeviceOptions) Init ¶
func (d *DeviceOptions) Init(config *viper.Viper) (*DeviceOptions, error)
type PayloadContents ¶
type PayloadContents struct { Version uint8 VendorID uint16 ProductID uint16 CommissioningFlow uint8 RendezvousInformation uint8 Discriminator SetupDiscriminator SetUpPINCode uint32 IsValidQRCodePayload bool IsValidManualCode bool IsShortDiscriminator bool }
func (PayloadContents) CheckPayloadCommonConstraints ¶
func (p PayloadContents) CheckPayloadCommonConstraints() bool
type ProviderImpl ¶
type ProviderImpl struct {
// contains filtered or unexported fields
}
func DefaultProvider ¶
func DefaultProvider() *ProviderImpl
func NewProviderImpl ¶
func NewProviderImpl() *ProviderImpl
func (*ProviderImpl) ClearConfigValue ¶
func (conf *ProviderImpl) ClearConfigValue(k Key) error
func (*ProviderImpl) ConfigValueExists ¶
func (conf *ProviderImpl) ConfigValueExists(k Key) bool
func (*ProviderImpl) EnsureNamespace ¶
func (conf *ProviderImpl) EnsureNamespace(k string) error
func (*ProviderImpl) FactoryResetConfig ¶
func (conf *ProviderImpl) FactoryResetConfig() error
func (*ProviderImpl) FactoryResetCounters ¶
func (conf *ProviderImpl) FactoryResetCounters() error
func (*ProviderImpl) GetStorageForNamespace ¶
func (conf *ProviderImpl) GetStorageForNamespace(k Key) store.KvsStorage
func (*ProviderImpl) ReadConfigValueBin ¶
func (conf *ProviderImpl) ReadConfigValueBin(k Key) ([]byte, error)
func (*ProviderImpl) ReadConfigValueBool ¶
func (conf *ProviderImpl) ReadConfigValueBool(k Key) (bool, error)
func (*ProviderImpl) ReadConfigValueStr ¶
func (conf *ProviderImpl) ReadConfigValueStr(k Key) (string, error)
func (*ProviderImpl) ReadConfigValueUint16 ¶
func (conf *ProviderImpl) ReadConfigValueUint16(k Key) (uint16, error)
func (*ProviderImpl) ReadConfigValueUint32 ¶
func (conf *ProviderImpl) ReadConfigValueUint32(k Key) (uint32, error)
func (*ProviderImpl) ReadConfigValueUint64 ¶
func (conf *ProviderImpl) ReadConfigValueUint64(k Key) (uint64, error)
func (*ProviderImpl) RunConfigUnitTest ¶
func (conf *ProviderImpl) RunConfigUnitTest()
func (*ProviderImpl) WriteConfigValueBin ¶
func (conf *ProviderImpl) WriteConfigValueBin(k Key, val []byte) error
func (*ProviderImpl) WriteConfigValueBool ¶
func (conf *ProviderImpl) WriteConfigValueBool(k Key, val bool) error
func (*ProviderImpl) WriteConfigValueStr ¶
func (conf *ProviderImpl) WriteConfigValueStr(k Key, val string) error
func (*ProviderImpl) WriteConfigValueUint16 ¶
func (conf *ProviderImpl) WriteConfigValueUint16(k Key, val uint16) error
func (*ProviderImpl) WriteConfigValueUint32 ¶
func (conf *ProviderImpl) WriteConfigValueUint32(k Key, val uint32) error
func (*ProviderImpl) WriteConfigValueUint64 ¶
func (conf *ProviderImpl) WriteConfigValueUint64(k Key, val uint64) error
type SetupDiscriminator ¶
type SetupDiscriminator struct {
// contains filtered or unexported fields
}
func (*SetupDiscriminator) SetLongValue ¶
func (m *SetupDiscriminator) SetLongValue(discriminator uint16)
func (*SetupDiscriminator) SetShorValue ¶
func (m *SetupDiscriminator) SetShorValue(discriminator uint8)
type StorageDelegate ¶
type StorageDelegate interface { ReadConfigValueBool(k Key) (bool, error) ReadConfigValueUint16(k Key) (uint16, error) ReadConfigValueUint32(k Key) (uint32, error) ReadConfigValueUint64(k Key) (uint64, error) ReadConfigValueStr(k Key) (string, error) ReadConfigValueBin(k Key) ([]byte, error) WriteConfigValueBool(k Key, val bool) error WriteConfigValueUint16(k Key, val uint16) error WriteConfigValueUint32(k Key, val uint32) error WriteConfigValueUint64(k Key, val uint64) error WriteConfigValueStr(k Key, val string) error WriteConfigValueBin(k Key, data []byte) error }
Click to show internal directories.
Click to hide internal directories.