Class GattWriteRequest

java.lang.Object
com.codename1.bluetooth.le.server.GattWriteRequest

public abstract class GattWriteRequest extends Object
  • Constructor Details

  • Method Details

    • getCentral

      public BleCentral getCentral()
      The central issuing the request.
    • getCharacteristic

      public GattLocalCharacteristic getCharacteristic()
      The written characteristic, or null for a descriptor write.
    • getDescriptor

      public GattLocalDescriptor getDescriptor()
      The written descriptor, or null for a characteristic write.
    • getValue

      public byte[] getValue()
      The written bytes.
    • getOffset

      public int getOffset()
      The write offset for long writes; 0 for plain writes.
    • isResponseRequired

      public boolean isResponseRequired()
      true when the central expects an acknowledgement (respond() or reject(GattStatus)); false for write-without-response.
    • respond

      public abstract void respond()
      Acknowledges the write. May be called from any thread; call exactly once when isResponseRequired().
    • reject

      public abstract void reject(GattStatus status)
      Rejects the write with the given ATT status.