struct MatterCommissionableDevice
extension MatterCommissionableDevice : AutomationValue, Decodable, Encodable, Equatable, Hashable, Sendable, StructDataRepresentable
Model representing a Commissionable Matter device, corresponding to the proto used by the MatterCommissionerTrait.
-
Undocumented
Declaration
Swift
let discriminator: UInt32
-
Undocumented
Declaration
Swift
let discoveryModes: [MatterCommissionableDevice.DiscoveryMode]
-
Undocumented
Declaration
Swift
let vendorID: UInt32?
-
Undocumented
Declaration
Swift
let productID: UInt32?
-
Undocumented
Declaration
Swift
init(discriminator: UInt32, discoveryModes: [MatterCommissionableDevice.DiscoveryMode], vendorID: UInt32? = nil, productID: UInt32? = nil)
-
Creates a new Struct instance using data read from the given
TraitDecoder
.Throws
HomeError.parseError
when parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throws
Parameters
decoder
The raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder
. ThrowsHomeError.parseError
if the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws
-
Enumeration of the different ways a Matter device can be discovered.
Declaration
Swift
enum DiscoveryMode
extension MatterCommissionableDevice.DiscoveryMode : Decodable, Encodable, Equatable, Hashable, RawRepresentable, Sendable
-
Creates a new instance by decoding from the given decoder.
This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.
Declaration
Swift
init(from decoder: any Decoder) throws