     private var readPromise : Promise<Characteristic>
     private var writePromises = [Promise<Characteristic>]()
     private var notificationUpdatePromise : StreamPromise<Characteristic>?
+    
+    private var writeParameters = [WriteParameters]()
+    
     private weak var _service : Service?
     
     private let profile : CharacteristicProfile

        let promise = Promise<Characteristic>(queue:self.futureQueue)
        if self.canWrite {
            self.ioQueue.async() {
                Logger.debug("write characteristic value=\(value.hexStringValue()), uuid=\(self.uuid.UUIDString)")
                self.writePromises.append(promise)
                self.writeValue(value, type:type)
                self.writing = true
                ++self.writeSequence
                self.timeoutWrite(self.writeSequence, timeout:timeout)
            }
        } else {
            promise.failure(BCError.characteristicWriteNotSupported)

    }
    
    internal func didWrite(error:NSError?) {
        self.ioQueue.async() {
            self.writing = false
            if let error = error {
                Logger.debug("failed:  uuid=\(self.uuid.UUIDString), name=\(self.name)")
                if !self.writePromise.completed {
                    self.writePromise.failure(error)
                }
            } else {
                Logger.debug("success:  uuid=\(self.uuid.UUIDString), name=\(self.name)")
                if !self.writePromise.completed {
                    self.writePromise.success(self)
                }
            }
        }
    }
