| 1 |
import cython |
| 2 |
|
| 3 |
|
| 4 |
cdef str BLE_UUID |
| 5 |
|
| 6 |
cdef dict _EMPTY_MANUFACTURER_DATA |
| 7 |
cdef dict _EMPTY_SERVICE_DATA |
| 8 |
cdef list _EMPTY_SERVICE_UUIDS |
| 9 |
|
| 10 |
cdef object _cached_uint16_int_as_uuid |
| 11 |
cdef object _cached_uint32_int_as_uuid |
| 12 |
cdef object _cached_uint128_bytes_as_uuid |
| 13 |
cdef object _cached_parse_advertisement_data |
| 14 |
cdef object _cached_parse_advertisement_data_from_tuple |
| 15 |
|
| 16 |
cdef object _LOGGER |
| 17 |
|
| 18 |
cdef class BLEGAPAdvertisement: |
| 19 |
|
| 20 |
cdef readonly object local_name |
| 21 |
cdef readonly object service_uuids |
| 22 |
cdef readonly object service_data |
| 23 |
cdef readonly object manufacturer_data |
| 24 |
cdef readonly object tx_power |
| 25 |
|
| 26 |
cdef cython.uint TYPE_FLAGS |
| 27 |
cdef cython.uint TYPE_SHORT_LOCAL_NAME |
| 28 |
cdef cython.uint TYPE_COMPLETE_LOCAL_NAME |
| 29 |
cdef cython.uint TYPE_MANUFACTURER_SPECIFIC_DATA |
| 30 |
cdef cython.uint TYPE_16BIT_SERVICE_UUID_COMPLETE |
| 31 |
cdef cython.uint TYPE_16BIT_SERVICE_UUID_MORE_AVAILABLE |
| 32 |
cdef cython.uint TYPE_32BIT_SERVICE_UUID_COMPLETE |
| 33 |
cdef cython.uint TYPE_32BIT_SERVICE_UUID_MORE_AVAILABLE |
| 34 |
cdef cython.uint TYPE_128BIT_SERVICE_UUID_COMPLETE |
| 35 |
cdef cython.uint TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE |
| 36 |
cdef cython.uint TYPE_SERVICE_DATA |
| 37 |
cdef cython.uint TYPE_SERVICE_DATA_32BIT_UUID |
| 38 |
cdef cython.uint TYPE_SERVICE_DATA_128BIT_UUID |
| 39 |
cdef cython.uint TYPE_TX_POWER_LEVEL |
| 40 |
|
| 41 |
cdef unsigned char _INT8_SIGN_THRESHOLD |
| 42 |
cdef cython.int _INT8_RANGE |
| 43 |
|
| 44 |
cpdef parse_advertisement_data(object data) |
| 45 |
|
| 46 |
@cython.locals( |
| 47 |
gap_data="const unsigned char *", |
| 48 |
gap_type_num="unsigned char", |
| 49 |
total_length=cython.uint, |
| 50 |
length="unsigned char", |
| 51 |
offset=cython.uint, |
| 52 |
start=cython.uint, |
| 53 |
end=cython.uint, |
| 54 |
i=cython.uint, |
| 55 |
tx_power_byte="unsigned char", |
| 56 |
uuid32_int=cython.uint, |
| 57 |
) |
| 58 |
cpdef _uncached_parse_advertisement_bytes(bytes gap_bytes) |
| 59 |
|
| 60 |
cpdef _uncached_parse_advertisement_data(bytes data) |
| 61 |
|
| 62 |
cpdef _uncached_parse_advertisement_tuple(tuple[bytes, ...] data) |