44 lines
1.4 KiB
Swift
44 lines
1.4 KiB
Swift
import Foundation
|
|
|
|
public struct ThreadCredential {
|
|
public init(
|
|
networkName: String,
|
|
networkKey: String,
|
|
extendedPANID: String,
|
|
borderAgentID: String,
|
|
// Apple uses it when referencing border agent ID
|
|
macExtendedAddress: String,
|
|
activeOperationalDataSet: String,
|
|
pskc: String,
|
|
channel: UInt8,
|
|
panID: String,
|
|
creationDate: Date? = nil,
|
|
lastModificationDate: Date? = nil
|
|
) {
|
|
self.networkName = networkName
|
|
self.networkKey = networkKey
|
|
self.extendedPANID = extendedPANID
|
|
self.borderAgentID = borderAgentID
|
|
self.macExtendedAddress = macExtendedAddress
|
|
self.activeOperationalDataSet = activeOperationalDataSet
|
|
self.pskc = pskc
|
|
self.channel = channel
|
|
self.panID = panID
|
|
self.creationDate = creationDate
|
|
self.lastModificationDate = lastModificationDate
|
|
}
|
|
|
|
public var autogeneratedId = UUID().uuidString
|
|
public let networkName: String
|
|
public let networkKey: String
|
|
public let extendedPANID: String
|
|
public let borderAgentID: String
|
|
public let macExtendedAddress: String
|
|
public let activeOperationalDataSet: String
|
|
public let pskc: String
|
|
public let channel: UInt8
|
|
public let panID: String
|
|
public let creationDate: Date?
|
|
public let lastModificationDate: Date?
|
|
}
|