     }
     
     deinit {
-        print("[Release: ] __BaseParser deinit")
+        print("[Release: ] __BaseParser release")
     }
 }
    }
    
    func writeData(data: NSData, characterUuidStr: String, withResponse: Bool) {
        for characteristic in containCharacteristics {
            if characteristic.UUID.UUIDString.lowercaseString == characterUuidStr.lowercaseString {
                let type: CBCharacteristicWriteType = withResponse ? .WithResponse : .WithoutResponse
                curPeripheral!.writeValue(data, forCharacteristic: characteristic, type: type)
            }
        }
    }
    
    func readCharacteristic(charaStr: String) {
        if let _characteristic = self.characteristicFromStr(charaStr) {
            curPeripheral!.readValueForCharacteristic(_characteristic)
        }
    }
    
    //MARK: - CBPeripheralDelegate
    func peripheral(peripheral: CBPeripheral, didDiscoverServices error: NSError?) {
        let services = peripheral.services
        if let _services = services {
            for service in _services {
                peripheral.discoverCharacteristics(nil, forService: service)
            }
        }
    }
    
    func peripheral(peripheral: CBPeripheral, didDiscoverCharacteristicsForService service: CBService, error: NSError?)  {
        let characteristics = service.characteristics
        if let _characteristics = characteristics {
            for characteristic in _characteristics {
                containCharacteristics.append(characteristic)
                if characteristic.properties.contains(CBCharacteristicProperties.Notify) {
                    peripheral.setNotifyValue(true, forCharacteristic: characteristic)
                }
            }
        }
        retriveServiceIndex += 1
        if retriveServiceIndex == peripheral.services!.count {
            self.isFree = true

    }
    
    func peripheral(peripheral: CBPeripheral, didUpdateValueForCharacteristic characteristic: CBCharacteristic, error: NSError?) {
        delegate?.receiveData(characteristic.value!, peripheral: peripheral, characteristic: characteristic)
    }
    
    func peripheral(peripheral: CBPeripheral, didWriteValueForCharacteristic characteristic: CBCharacteristic, error: NSError?) {
        delegate?.didWriteData(peripheral, characteristic: characteristic, error: error)
    }
    
    func peripheral(peripheral: CBPeripheral, didUpdateNotificationStateForCharacteristic characteristic: CBCharacteristic, error: NSError?) {
