Sun, 04 Apr 2021 16:54:03 +0200
Updated BBC micro:bit APIs for V2.
# -*- coding: utf-8 -*- # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module containing stubs for API generation of the 'bleio' module. """ adapter = object class Address(): PUBLIC = 0 RANDOM_STATIC = 0 RANDOM_PRIVATE_RESOLVABLE = 0 RANDOM_PRIVATE_NON_RESOLVABLE = 0 address_bytes = 0 type = 0 def __init__(self, address, address_type): pass class Adapter(): enabled = 0 address = 0 default_name = "" class Attribute(): NO_ACCESS = 0 OPEN = 0 ENCRYPT_NO_MITM = 0 ENCRYPT_WITH_MITM = 0 LESC_ENCRYPT_WITH_MITM = 0 SIGNED_NO_MITM = 0 SIGNED_WITH_MITM = 0 class Central(): connected = 0 def __init__(self): pass def connect(self, address, timeout, *, service_uuids_whitelist=None): pass def disconnect(self): pass def discover_remote_services(self, service_uuids_whitelist=None): pass class Characteristic(): BROADCAST = 0 INDICATE = 0 NOTIFY = 0 READ = 0 WRITE = 0 WRITE_NO_RESPONSE = 0 properties = 0 uuid = 0 value = 0 descriptors = 0 def __init__(self, uuid, *, properties=0, read_perm=Attribute.OPEN, write_perm=Attribute.OPEN, max_length=20, fixed_length=False, descriptors=None): pass def service(self, read_only): pass def set_cccd(self, *, notify=False, indicate=False): pass class CharacteristicBuffer(): in_waiting = 0 def __init__(self, characteristic, *, timeout=1, buffer_size=64): pass def read(self, nbytes=None): pass def readinto(self, buf): pass def readline(self): pass def reset_input_buffer(self): pass def deinit(self): pass class Descriptor(): uuid = 0 value = 0 def __init__(self, uuid, *, read_perm=Attribute.OPEN, write_perm=Attribute.OPEN): pass def characteristic(self, read_only): pass class Peripheral(): services = 0 name = "" def __init__(self, services=(), *, name=None): pass def connected(self, read_only): pass def start_advertising(self, data, *, scan_response=None, connectable=True, interval=1): pass def stop_advertising(self): pass def disconnect(self): pass def discover_remote_services(self, service_uuids_whitelist=None): pass def pair(self): pass class ScanEntry(): address = 0 advertisement_bytes = 0 rssi = 0 class Scanner(): def __init__(self): pass def scan(self, timeout, *, interval=0.1, window=0.1): pass class Service(): remotes = 0 secondary = 0 uuids = 0 def __init__(self, uuid, characteristics, *, secondary=False): pass class UUID(): uuid16 = 0 uuid128 = 0 size = 0 def __init__(self, value): pass