blatann.event_args module
- class blatann.event_args.GattOperationCompleteReason(value)
Bases:
EnumThe reason why a GATT operation completed
- SUCCESS = 0
- QUEUE_CLEARED = 1
- CLIENT_DISCONNECTED = 2
- SERVER_DISCONNECTED = 3
- CLIENT_UNSUBSCRIBED = 4
- FAILED = 5
- TIMED_OUT = 6
- class blatann.event_args.DisconnectionEventArgs(reason)
Bases:
EventArgsEvent arguments sent when a peer disconnects
- class blatann.event_args.MtuSizeUpdatedEventArgs(previous_mtu_size, current_mtu_size)
Bases:
EventArgsEvent arguments for when the effective MTU size on a connection is updated
- class blatann.event_args.DataLengthUpdatedEventArgs(tx_bytes, rx_bytes, tx_time_us, rx_time_us)
Bases:
EventArgsEvent arguments for when the Data Length of the link layer has been changed
- class blatann.event_args.PhyUpdatedEventArgs(status, phy_channel)
Bases:
EventArgsEvent arguments for when the phy channel is updated
- class blatann.event_args.ConnectionParametersUpdatedEventArgs(active_connection_params)
Bases:
EventArgsEvent arguments for when connection parameters between peers are updated
- class blatann.event_args.SecurityProcess(value)
Bases:
EnumAn enumeration.
- ENCRYPTION = 0
- PAIRING = 1
- BONDING = 1
- class blatann.event_args.PairingCompleteEventArgs(status, security_level, security_process)
Bases:
EventArgsEvent arguments when pairing completes, whether it failed or was successful
- class blatann.event_args.PasskeyEntryEventArgs(key_type, resolve)
Bases:
EventArgsEvent arguments when a passkey needs to be entered by the user
- class blatann.event_args.PasskeyDisplayEventArgs(passkey, match_request, match_confirm_callback)
Bases:
EventArgsEvent arguments when a passkey needs to be displayed to the user. If match_request is set, the user must confirm that the passkeys match on both devices then send back the confirmation
- match_confirm(keys_match)
If key matching was requested, this function responds with whether or not the keys matched correctly :type keys_match: :param keys_match: True if the keys matched, False if not
- class blatann.event_args.PeripheralSecurityRequestEventArgs(bond, mitm, lesc, keypress, is_bonded_device, resolver)
Bases:
EventArgsEvent arguments for when a peripheral requests security to be enabled on the connection. The application must choose how to handle the request: accept, reject, or force re-pairing (if device is bonded).
- accept()
Accepts the security request. If device is already bonded will initiate encryption, otherwise will start the pairing process
- reject()
Rejects the security request
- force_repair()
Accepts the security request and initiates the pairing process, even if the device is already bonded
- class blatann.event_args.PairingRejectedReason(value)
Bases:
EnumReason why pairing was rejected
- non_bonded_central_request = 1
- non_bonded_peripheral_request = 2
- bonded_peripheral_request = 3
- bonded_device_repairing = 4
- user_rejected = 5
- class blatann.event_args.PairingRejectedEventArgs(reason)
Bases:
EventArgsEvent arguments for when a pairing request was rejected locally
- class blatann.event_args.WriteEventArgs(value)
Bases:
EventArgsEvent arguments for when a client has written to a characteristic on the local database
- class blatann.event_args.DecodedWriteEventArgs(value, raw_value)
Bases:
EventArgs,Generic[TDecodedValue]Event arguments for when a client has written to a characteristic on the local database and the value has been decoded into a data type
- class blatann.event_args.SubscriptionStateChangeEventArgs(subscription_state)
Bases:
EventArgsEvent arguments for when a client’s subscription state has changed
- class blatann.event_args.NotificationCompleteEventArgs(notification_id, data, reason)
Bases:
EventArgsEvent arguments for when a notification has been sent to the client from the notification queue
- Reason
alias of
GattOperationCompleteReason
- class blatann.event_args.ReadCompleteEventArgs(read_id, value, status, reason)
Bases:
EventArgsEvent arguments for when a read has completed of a peripheral’s characteristic
- class blatann.event_args.WriteCompleteEventArgs(write_id, value, status, reason)
Bases:
EventArgsEvent arguments for when a write has completed on a peripheral’s characteristic
- class blatann.event_args.SubscriptionWriteCompleteEventArgs(write_id, value, status, reason)
Bases:
EventArgsEvent arguments for when changing the subscription state of a characteristic completes
- class blatann.event_args.NotificationReceivedEventArgs(value, is_indication)
Bases:
EventArgsEvent Arguments for when a notification or indication is received from the peripheral
- class blatann.event_args.DatabaseDiscoveryCompleteEventArgs(status)
Bases:
EventArgsEvent Arguments for when database discovery completes
- class blatann.event_args.DecodedReadCompleteEventArgs(read_id, value, status, reason, decoded_stream=None)
Bases:
ReadCompleteEventArgs,Generic[TDecodedValue]Event Arguments for when a read on a peripheral’s characteristic completes and the data stream returned is decoded. If unable to decode the value, the bytes read are still returned
- static from_notification_complete_event_args(noti_complete_event_args, decoded_stream=None)
- static from_read_complete_event_args(read_complete_event_args, decoded_stream=None)