Project v1

This commit is contained in:
Ádám Kovács
2023-11-02 16:02:16 +01:00
parent 70e8d2d79a
commit db76621806
171 changed files with 23617 additions and 0 deletions

15
.vscode/Pico-W-Stub/aioble/__init__.pyi vendored Normal file
View File

@@ -0,0 +1,15 @@
from .central import scan as scan
from .core import GattError as GattError, config as config, log_error as log_error, log_warn as log_warn, stop as stop
from .device import Device as Device, DeviceDisconnectedError as DeviceDisconnectedError
from .peripheral import advertise as advertise
from .server import (
BufferedCharacteristic as BufferedCharacteristic,
Characteristic as Characteristic,
Descriptor as Descriptor,
Service as Service,
register_services as register_services,
)
from _typeshed import Incomplete
ADDR_PUBLIC: Incomplete
ADDR_RANDOM: Incomplete

71
.vscode/Pico-W-Stub/aioble/central.pyi vendored Normal file
View File

@@ -0,0 +1,71 @@
from .core import (
ble as ble,
ensure_active as ensure_active,
log_error as log_error,
log_info as log_info,
log_warn as log_warn,
register_irq_handler as register_irq_handler,
)
from .device import Device as Device, DeviceConnection as DeviceConnection, DeviceTimeout as DeviceTimeout
from _typeshed import Incomplete
from collections.abc import Generator
_IRQ_SCAN_RESULT: Incomplete
_IRQ_SCAN_DONE: Incomplete
_IRQ_PERIPHERAL_CONNECT: Incomplete
_IRQ_PERIPHERAL_DISCONNECT: Incomplete
_ADV_IND: Incomplete
_ADV_DIRECT_IND: Incomplete
_ADV_SCAN_IND: Incomplete
_ADV_NONCONN_IND: Incomplete
_SCAN_RSP: Incomplete
_ADV_TYPE_FLAGS: Incomplete
_ADV_TYPE_NAME: Incomplete
_ADV_TYPE_SHORT_NAME: Incomplete
_ADV_TYPE_UUID16_INCOMPLETE: Incomplete
_ADV_TYPE_UUID16_COMPLETE: Incomplete
_ADV_TYPE_UUID32_INCOMPLETE: Incomplete
_ADV_TYPE_UUID32_COMPLETE: Incomplete
_ADV_TYPE_UUID128_INCOMPLETE: Incomplete
_ADV_TYPE_UUID128_COMPLETE: Incomplete
_ADV_TYPE_APPEARANCE: Incomplete
_ADV_TYPE_MANUFACTURER: Incomplete
_active_scanner: Incomplete
_connecting: Incomplete
def _central_irq(event, data) -> None: ...
def _central_shutdown() -> None: ...
async def _cancel_pending() -> None: ...
async def _connect(connection, timeout_ms) -> None: ...
class ScanResult:
device: Incomplete
adv_data: Incomplete
resp_data: Incomplete
rssi: Incomplete
connectable: bool
def __init__(self, device) -> None: ...
def _update(self, adv_type, rssi, adv_data): ...
def __str__(self): ...
def _decode_field(self, *adv_type) -> Generator[Incomplete, None, None]: ...
def name(self): ...
def services(self) -> Generator[Incomplete, None, None]: ...
def manufacturer(self, filter: Incomplete | None = ...) -> Generator[Incomplete, None, None]: ...
class scan:
_queue: Incomplete
_event: Incomplete
_done: bool
_results: Incomplete
_duration_ms: Incomplete
_interval_us: Incomplete
_window_us: Incomplete
_active: Incomplete
def __init__(
self, duration_ms, interval_us: Incomplete | None = ..., window_us: Incomplete | None = ..., active: bool = ...
) -> None: ...
async def __aenter__(self): ...
async def __aexit__(self, exc_type, exc_val, exc_traceback) -> None: ...
def __aiter__(self): ...
async def __anext__(self): ...
async def cancel(self) -> None: ...

100
.vscode/Pico-W-Stub/aioble/client.pyi vendored Normal file
View File

@@ -0,0 +1,100 @@
from .core import GattError as GattError, ble as ble, register_irq_handler as register_irq_handler
from .device import DeviceConnection as DeviceConnection
from _typeshed import Incomplete
_IRQ_GATTC_SERVICE_RESULT: Incomplete
_IRQ_GATTC_SERVICE_DONE: Incomplete
_IRQ_GATTC_CHARACTERISTIC_RESULT: Incomplete
_IRQ_GATTC_CHARACTERISTIC_DONE: Incomplete
_IRQ_GATTC_DESCRIPTOR_RESULT: Incomplete
_IRQ_GATTC_DESCRIPTOR_DONE: Incomplete
_IRQ_GATTC_READ_RESULT: Incomplete
_IRQ_GATTC_READ_DONE: Incomplete
_IRQ_GATTC_WRITE_DONE: Incomplete
_IRQ_GATTC_NOTIFY: Incomplete
_IRQ_GATTC_INDICATE: Incomplete
_CCCD_UUID: Incomplete
_CCCD_NOTIFY: Incomplete
_CCCD_INDICATE: Incomplete
_FLAG_READ: Incomplete
_FLAG_WRITE_NO_RESPONSE: Incomplete
_FLAG_WRITE: Incomplete
_FLAG_NOTIFY: Incomplete
_FLAG_INDICATE: Incomplete
def _client_irq(event, data) -> None: ...
class ClientDiscover:
_connection: Incomplete
_queue: Incomplete
_status: Incomplete
_event: Incomplete
_disc_type: Incomplete
_parent: Incomplete
_timeout_ms: Incomplete
_args: Incomplete
def __init__(self, connection, disc_type, parent, timeout_ms, *args) -> None: ...
async def _start(self) -> None: ...
def __aiter__(self): ...
async def __anext__(self): ...
def _discover_result(conn_handle, *args) -> None: ...
def _discover_done(conn_handle, status) -> None: ...
class ClientService:
connection: Incomplete
_start_handle: Incomplete
_end_handle: Incomplete
uuid: Incomplete
def __init__(self, connection, start_handle, end_handle, uuid) -> None: ...
def __str__(self): ...
async def characteristic(self, uuid, timeout_ms: int = ...): ...
def characteristics(self, uuid: Incomplete | None = ..., timeout_ms: int = ...): ...
def _start_discovery(connection, uuid: Incomplete | None = ...) -> None: ...
class BaseClientCharacteristic:
_value_handle: Incomplete
properties: Incomplete
uuid: Incomplete
_read_event: Incomplete
_read_data: Incomplete
_read_status: Incomplete
_write_event: Incomplete
_write_status: Incomplete
def __init__(self, value_handle, properties, uuid) -> None: ...
def _register_with_connection(self) -> None: ...
def _find(conn_handle, value_handle): ...
def _check(self, flag) -> None: ...
async def read(self, timeout_ms: int = ...): ...
def _read_result(conn_handle, value_handle, data) -> None: ...
def _read_done(conn_handle, value_handle, status) -> None: ...
async def write(self, data, response: Incomplete | None = ..., timeout_ms: int = ...) -> None: ...
def _write_done(conn_handle, value_handle, status) -> None: ...
class ClientCharacteristic(BaseClientCharacteristic):
service: Incomplete
connection: Incomplete
_end_handle: Incomplete
_notify_event: Incomplete
_notify_queue: Incomplete
_indicate_event: Incomplete
_indicate_queue: Incomplete
def __init__(self, service, end_handle, value_handle, properties, uuid) -> None: ...
def __str__(self): ...
def _connection(self): ...
async def descriptor(self, uuid, timeout_ms: int = ...): ...
def descriptors(self, timeout_ms: int = ...): ...
def _start_discovery(service, uuid: Incomplete | None = ...) -> None: ...
async def _notified_indicated(self, queue, event, timeout_ms): ...
async def notified(self, timeout_ms: Incomplete | None = ...): ...
def _on_notify_indicate(self, queue, event, data) -> None: ...
def _on_notify(conn_handle, value_handle, notify_data) -> None: ...
async def indicated(self, timeout_ms: Incomplete | None = ...): ...
def _on_indicate(conn_handle, value_handle, indicate_data) -> None: ...
async def subscribe(self, notify: bool = ..., indicate: bool = ...) -> None: ...
class ClientDescriptor(BaseClientCharacteristic):
characteristic: Incomplete
def __init__(self, characteristic, dsc_handle, uuid) -> None: ...
def __str__(self): ...
def _connection(self): ...
def _start_discovery(characteristic, uuid: Incomplete | None = ...) -> None: ...

23
.vscode/Pico-W-Stub/aioble/core.pyi vendored Normal file
View File

@@ -0,0 +1,23 @@
from _typeshed import Incomplete
log_level: int
def log_error(*args) -> None: ...
def log_warn(*args) -> None: ...
def log_info(*args) -> None: ...
class GattError(Exception):
_status: Incomplete
def __init__(self, status) -> None: ...
def ensure_active() -> None: ...
def config(*args, **kwargs): ...
_irq_handlers: Incomplete
_shutdown_handlers: Incomplete
def register_irq_handler(irq, shutdown) -> None: ...
def stop() -> None: ...
def ble_irq(event, data): ...
ble: Incomplete

62
.vscode/Pico-W-Stub/aioble/device.pyi vendored Normal file
View File

@@ -0,0 +1,62 @@
from .core import ble as ble, log_error as log_error, register_irq_handler as register_irq_handler
from _typeshed import Incomplete
_IRQ_MTU_EXCHANGED: Incomplete
class DeviceDisconnectedError(Exception): ...
def _device_irq(event, data) -> None: ...
class DeviceTimeout:
_connection: Incomplete
_timeout_ms: Incomplete
_timeout_task: Incomplete
_task: Incomplete
def __init__(self, connection, timeout_ms) -> None: ...
async def _timeout_sleep(self) -> None: ...
def __enter__(self) -> None: ...
def __exit__(self, exc_type, exc_val, exc_traceback) -> None: ...
class Device:
addr_type: Incomplete
addr: Incomplete
_connection: Incomplete
def __init__(self, addr_type, addr) -> None: ...
def __eq__(self, rhs): ...
def __hash__(self): ...
def __str__(self): ...
def addr_hex(self): ...
async def connect(self, timeout_ms: int = ...): ...
class DeviceConnection:
_connected: Incomplete
device: Incomplete
encrypted: bool
authenticated: bool
bonded: bool
key_size: bool
mtu: Incomplete
_conn_handle: Incomplete
_event: Incomplete
_mtu_event: Incomplete
_discover: Incomplete
_characteristics: Incomplete
_task: Incomplete
_timeouts: Incomplete
_pair_event: Incomplete
_l2cap_channel: Incomplete
def __init__(self, device) -> None: ...
async def device_task(self) -> None: ...
def _run_task(self) -> None: ...
async def disconnect(self, timeout_ms: int = ...) -> None: ...
async def disconnected(self, timeout_ms: int = ..., disconnect: bool = ...) -> None: ...
async def service(self, uuid, timeout_ms: int = ...): ...
def services(self, uuid: Incomplete | None = ..., timeout_ms: int = ...): ...
async def pair(self, *args, **kwargs) -> None: ...
def is_connected(self): ...
def timeout(self, timeout_ms): ...
async def exchange_mtu(self, mtu: Incomplete | None = ..., timeout_ms: int = ...): ...
async def l2cap_accept(self, psm, mtu, timeout_ms: Incomplete | None = ...): ...
async def l2cap_connect(self, psm, mtu, timeout_ms: int = ...): ...
async def __aenter__(self): ...
async def __aexit__(self, exc_type, exc_val, exc_traceback) -> None: ...

39
.vscode/Pico-W-Stub/aioble/l2cap.pyi vendored Normal file
View File

@@ -0,0 +1,39 @@
from .core import ble as ble, log_error as log_error, register_irq_handler as register_irq_handler
from .device import DeviceConnection as DeviceConnection
from _typeshed import Incomplete
_IRQ_L2CAP_ACCEPT: Incomplete
_IRQ_L2CAP_CONNECT: Incomplete
_IRQ_L2CAP_DISCONNECT: Incomplete
_IRQ_L2CAP_RECV: Incomplete
_IRQ_L2CAP_SEND_READY: Incomplete
_listening: bool
def _l2cap_irq(event, data) -> None: ...
def _l2cap_shutdown() -> None: ...
class L2CAPDisconnectedError(Exception): ...
class L2CAPConnectionError(Exception): ...
class L2CAPChannel:
_connection: Incomplete
our_mtu: int
peer_mtu: int
_cid: Incomplete
_status: int
_stalled: bool
_data_ready: bool
_event: Incomplete
def __init__(self, connection) -> None: ...
def _assert_connected(self) -> None: ...
async def recvinto(self, buf, timeout_ms: Incomplete | None = ...): ...
def available(self): ...
async def send(self, buf, timeout_ms: Incomplete | None = ..., chunk_size: Incomplete | None = ...) -> None: ...
async def flush(self, timeout_ms: Incomplete | None = ...) -> None: ...
async def disconnect(self, timeout_ms: int = ...) -> None: ...
async def disconnected(self, timeout_ms: int = ...) -> None: ...
async def __aenter__(self): ...
async def __aexit__(self, exc_type, exc_val, exc_traceback) -> None: ...
async def accept(connection, psm, mtu, timeout_ms): ...
async def connect(connection, psm, mtu, timeout_ms): ...

View File

@@ -0,0 +1,43 @@
from .core import (
ble as ble,
ensure_active as ensure_active,
log_error as log_error,
log_info as log_info,
log_warn as log_warn,
register_irq_handler as register_irq_handler,
)
from .device import Device as Device, DeviceConnection as DeviceConnection, DeviceTimeout as DeviceTimeout
from _typeshed import Incomplete
_IRQ_CENTRAL_CONNECT: Incomplete
_IRQ_CENTRAL_DISCONNECT: Incomplete
_ADV_TYPE_FLAGS: Incomplete
_ADV_TYPE_NAME: Incomplete
_ADV_TYPE_UUID16_COMPLETE: Incomplete
_ADV_TYPE_UUID32_COMPLETE: Incomplete
_ADV_TYPE_UUID128_COMPLETE: Incomplete
_ADV_TYPE_UUID16_MORE: Incomplete
_ADV_TYPE_UUID32_MORE: Incomplete
_ADV_TYPE_UUID128_MORE: Incomplete
_ADV_TYPE_APPEARANCE: Incomplete
_ADV_TYPE_MANUFACTURER: Incomplete
_ADV_PAYLOAD_MAX_LEN: Incomplete
_incoming_connection: Incomplete
_connect_event: Incomplete
def _peripheral_irq(event, data) -> None: ...
def _peripheral_shutdown() -> None: ...
def _append(adv_data, resp_data, adv_type, value): ...
async def advertise(
interval_us,
adv_data: Incomplete | None = ...,
resp_data: Incomplete | None = ...,
connectable: bool = ...,
limited_disc: bool = ...,
br_edr: bool = ...,
name: Incomplete | None = ...,
services: Incomplete | None = ...,
appearance: int = ...,
manufacturer: Incomplete | None = ...,
timeout_ms: Incomplete | None = ...,
): ...

26
.vscode/Pico-W-Stub/aioble/security.pyi vendored Normal file
View File

@@ -0,0 +1,26 @@
from .core import ble as ble, log_info as log_info, log_warn as log_warn, register_irq_handler as register_irq_handler
from .device import DeviceConnection as DeviceConnection
from _typeshed import Incomplete
_IRQ_ENCRYPTION_UPDATE: Incomplete
_IRQ_GET_SECRET: Incomplete
_IRQ_SET_SECRET: Incomplete
_IRQ_PASSKEY_ACTION: Incomplete
_IO_CAPABILITY_DISPLAY_ONLY: Incomplete
_IO_CAPABILITY_DISPLAY_YESNO: Incomplete
_IO_CAPABILITY_KEYBOARD_ONLY: Incomplete
_IO_CAPABILITY_NO_INPUT_OUTPUT: Incomplete
_IO_CAPABILITY_KEYBOARD_DISPLAY: Incomplete
_PASSKEY_ACTION_INPUT: Incomplete
_PASSKEY_ACTION_DISP: Incomplete
_PASSKEY_ACTION_NUMCMP: Incomplete
_DEFAULT_PATH: str
_secrets: Incomplete
_modified: bool
_path: Incomplete
def load_secrets(path: Incomplete | None = ...) -> None: ...
def _save_secrets(arg: Incomplete | None = ...) -> None: ...
def _security_irq(event, data): ...
def _security_shutdown() -> None: ...
async def pair(connection, bond: bool = ..., le_secure: bool = ..., mitm: bool = ..., io=..., timeout_ms: int = ...) -> None: ...

100
.vscode/Pico-W-Stub/aioble/server.pyi vendored Normal file
View File

@@ -0,0 +1,100 @@
from .core import (
GattError as GattError,
ble as ble,
ensure_active as ensure_active,
log_error as log_error,
log_info as log_info,
log_warn as log_warn,
register_irq_handler as register_irq_handler,
)
from .device import DeviceConnection as DeviceConnection, DeviceTimeout as DeviceTimeout
from _typeshed import Incomplete
_registered_characteristics: Incomplete
_IRQ_GATTS_WRITE: Incomplete
_IRQ_GATTS_READ_REQUEST: Incomplete
_IRQ_GATTS_INDICATE_DONE: Incomplete
_FLAG_READ: Incomplete
_FLAG_WRITE_NO_RESPONSE: Incomplete
_FLAG_WRITE: Incomplete
_FLAG_NOTIFY: Incomplete
_FLAG_INDICATE: Incomplete
_FLAG_READ_ENCRYPTED: Incomplete
_FLAG_READ_AUTHENTICATED: Incomplete
_FLAG_READ_AUTHORIZED: Incomplete
_FLAG_WRITE_ENCRYPTED: Incomplete
_FLAG_WRITE_AUTHENTICATED: Incomplete
_FLAG_WRITE_AUTHORIZED: Incomplete
_FLAG_WRITE_CAPTURE: Incomplete
_WRITE_CAPTURE_QUEUE_LIMIT: Incomplete
def _server_irq(event, data): ...
def _server_shutdown() -> None: ...
class Service:
uuid: Incomplete
characteristics: Incomplete
def __init__(self, uuid) -> None: ...
def _tuple(self): ...
class BaseCharacteristic:
_value_handle: Incomplete
_initial: Incomplete
def _register(self, value_handle) -> None: ...
def read(self): ...
def write(self, data, send_update: bool = ...) -> None: ...
@staticmethod
def _init_capture() -> None: ...
@staticmethod
async def _run_capture_task() -> None: ...
_write_data: Incomplete
async def written(self, timeout_ms: Incomplete | None = ...): ...
def on_read(self, connection): ...
def _remote_write(conn_handle, value_handle) -> None: ...
def _remote_read(conn_handle, value_handle): ...
class Characteristic(BaseCharacteristic):
descriptors: Incomplete
_write_event: Incomplete
_write_data: Incomplete
_indicate_connection: Incomplete
_indicate_event: Incomplete
_indicate_status: Incomplete
uuid: Incomplete
flags: Incomplete
_value_handle: Incomplete
_initial: Incomplete
def __init__(
self,
service,
uuid,
read: bool = ...,
write: bool = ...,
write_no_response: bool = ...,
notify: bool = ...,
indicate: bool = ...,
initial: Incomplete | None = ...,
capture: bool = ...,
) -> None: ...
def _tuple(self): ...
def notify(self, connection, data: Incomplete | None = ...) -> None: ...
async def indicate(self, connection, data: Incomplete | None = ..., timeout_ms: int = ...) -> None: ...
def _indicate_done(conn_handle, value_handle, status) -> None: ...
class BufferedCharacteristic(Characteristic):
_max_len: Incomplete
_append: Incomplete
def __init__(self, *args, max_len: int = ..., append: bool = ..., **kwargs) -> None: ...
def _register(self, value_handle) -> None: ...
class Descriptor(BaseCharacteristic):
_write_event: Incomplete
_write_data: Incomplete
uuid: Incomplete
flags: Incomplete
_value_handle: Incomplete
_initial: Incomplete
def __init__(self, characteristic, uuid, read: bool = ..., write: bool = ..., initial: Incomplete | None = ...) -> None: ...
def _tuple(self): ...
def register_services(*services) -> None: ...