def bind(self, service): """Binds the characteristic to the given Service.""" bound_characteristic = super().bind(service) return _bleio.PacketBuffer(bound_characteristic, buffer_size=8)
def bind(self, service): """Bind to an LYWSD03MMCService.""" bound_characteristic = super().bind(service) bound_characteristic.set_cccd(notify=True) # Use a PacketBuffer that can store one packet to receive the data. return _bleio.PacketBuffer(bound_characteristic, buffer_size=1)
def bind(self, service): """Bind to a WeightScaleService.""" bound_characteristic = super().bind(service) bound_characteristic.set_cccd(indicate=True) # Use a PacketBuffer that can store one packet to receive the WSM data. return _bleio.PacketBuffer(bound_characteristic, buffer_size=1)
def bind(self, service): """Bind to a CyclingSpeedAndCadenceService.""" bound_characteristic = super().bind(service) bound_characteristic.set_cccd(notify=True) # Use a PacketBuffer that can store one packet to receive the SCS data. return _bleio.PacketBuffer(bound_characteristic, buffer_size=1)
def bind(self, service: "HeartRateService") -> _bleio.PacketBuffer: """Bind to a HeartRateService.""" bound_characteristic = super().bind(service) bound_characteristic.set_cccd(notify=True) # Use a PacketBuffer that can store one packet to receive the HRM data. return _bleio.PacketBuffer(bound_characteristic, buffer_size=1)