             return name.parameterName()
         }
 
-        // Convert HAP permission flags into comma seperated swift permission enum values
-        func permissions(_ permissions: Int) -> String {
-            var list = [String]()
-            if (permissions & 2) == 2 {
-                list.append(".read")
-            }
-            if (permissions & 4) == 4 {
-                list.append(".write")
-            }
-            if (permissions & 1) == 1 {
-                list.append(".events")
-            }
-            return list.joined(separator: ", ")
-        }
-
         // Decode plist
-
         guard let plist = NSDictionary(contentsOf: plistPath),
             let plistDict = plist["PlistDictionary"] as? NSDictionary,
             let assistantDict = plistDict["Assistant"] as? NSDictionary,

        }

        func defaultValue(_ characteristic: CharacteristicInfo) -> String {
            if characteristic.isReadable {
                if enumeratedCharacteristics.contains(characteristic.hkname) {
                    guard let defaultCase = defaultEnumCase[characteristic.hkname] else {
                        preconditionFailure("No default enum case for enum \(characteristic.hkname)")

    }
}

struct CharacteristicInfoPermission: OptionSet, CustomStringConvertible {
    let rawValue: Int

    static let read = CharacteristicInfoPermission(rawValue: 2)
    static let write = CharacteristicInfoPermission(rawValue: 4)
    static let events = CharacteristicInfoPermission(rawValue: 1)

    var description: String {
        var permissions: [String] = []
        if contains(.read) { permissions += [".read"] }
        if contains(.write) { permissions += [".write"] }
        if contains(.events) { permissions += [".events"] }
        return "[" + permissions.joined(separator: ", ") + "]"
    }
}
