unreal.MagicLeapBLEComponent

class unreal.MagicLeapBLEComponent(outer=None, name='None')

Bases: unreal.ActorComponent

Component that provides access to the BLE API functionality.

C++ Source:

  • Plugin: MagicLeapBLE

  • Module: MagicLeapBLE

  • File: MagicLeapBLEComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (Array(AssetUserData)): [Read-Write] Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.

  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation

  • component_tags (Array(Name)): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • on_adapter_state_changed_delegate (MagicLeapBLEOnAdapterStateChangedDelegateMulti): [Read-Write] On Adapter State Changed Delegate

  • on_characteristic_changed_delegate (MagicLeapBLEOnCharacteristicChangedDelegateMulti): [Read-Write] On Characteristic Changed Delegate

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated

  • on_conn_priority_changed_delegate (MagicLeapBLEOnConnPriorityChangedDelegateMulti): [Read-Write] On Conn Priority Changed Delegate

  • on_conn_state_changed_delegate (MagicLeapBLEOnConnStateChangedDelegateMulti): [Read-Write] On Conn State Changed Delegate

  • on_found_device_delegate (MagicLeapBLEOnFoundDeviceDelegateMulti): [Read-Write] On Found Device Delegate

  • on_got_adapter_name_delegate (MagicLeapBLEOnGotAdapterNameDelegateMulti): [Read-Write] On Got Adapter Name Delegate

  • on_got_adapter_state_delegate (MagicLeapBLEOnGotAdapterStateDelegateMulti): [Read-Write] On Got Adapter State Delegate

  • on_got_available_services_delegate (MagicLeapBLEOnGotAvailableServicesDelegateMulti): [Read-Write] On Got Available Services Delegate

  • on_log_delegate (MagicLeapBLEOnLogDelegateMulti): [Read-Write] On Log Delegate

  • on_mtu_changed_delegate (MagicLeapBLEOnMTUChangedDelegateMulti): [Read-Write] On MTUChanged Delegate

  • on_read_characteristic_delegate (MagicLeapBLEOnReadCharacteristicDelegateMulti): [Read-Write] On Read Characteristic Delegate

  • on_read_descriptor_delegate (MagicLeapBLEOnReadDescriptorDelegateMulti): [Read-Write] On Read Descriptor Delegate

  • on_read_remote_rssi_delegate (MagicLeapBLEOnReadRemoteRSSIDelegateMulti): [Read-Write] On Read Remote RSSIDelegate

  • on_write_characteristic_delegate (MagicLeapBLEOnWriteCharacteristicDelegateMulti): [Read-Write] On Write Characteristic Delegate

  • on_write_descriptor_delegate (MagicLeapBLEOnWriteDescriptorDelegateMulti): [Read-Write] On Write Descriptor Delegate

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

adapter_get_name_async()None

Requests the name of the local Bluetooth adapter.

adapter_get_state_async()None

Requests the state of the local Bluetooth adpater.

gatt_connect_async(address)None

Initiates a connection to a Bluetooth GATT capable device.

Parameters

address (str) – The address to connect to.

gatt_disconnect_async()None

Disconnects an established connection, or cancels a connection attempt.

gatt_get_available_services_async()None

Gets a list of GATT services offered by the remote devices.

gatt_read_characteristic_async(characteristic)None

Reads the requested characteristic from the connected remote device.

Parameters

characteristic (MagicLeapBluetoothGattCharacteristic) – The characteristic to read from the connected device.

gatt_read_descriptor_async(descriptor)None

Reads the requested descriptor from the connected remote device.

Parameters

descriptor (MagicLeapBluetoothGattDescriptor) – The descriptor to be read from the connected device.

gatt_read_remote_rssi_async()None

Reads the RSSI for a connected remote device. The on_gatt_read_remote_rssi callback will be invoked when the RSSI value has been read.

gatt_request_connection_priority_async(priority)None

Requests a connection parameter update.

Parameters

priority (MagicLeapBluetoothGattConnectionPriority) – The new connection priority for the connected device.

gatt_request_mtu_async(mtu)None

Requests to change MTU size.

Parameters

mtu (int32) – The new MTU for the connected device.

gatt_set_characteristic_notification_async(characteristic, enable)None

Enables or disables notifications/indications for a given chracteristic.

Parameters
  • characteristic (MagicLeapBluetoothGattCharacteristic) – The characteristic to receive change notifications from on the remote device.

  • enable (bool) – Enables/Disables the notifications for InCharacteristic.

gatt_write_characteristic_async(characteristic)None

Writes a given characteristic and its value to the connected remote device.

Parameters

characteristic (MagicLeapBluetoothGattCharacteristic) – The characteristic to be written to the connected device.

gatt_write_descriptor_async(descriptor)None

Writes the value of a given descriptor to the connected device.

Parameters

descriptor (MagicLeapBluetoothGattDescriptor) – The descriptor to be written to the connected device.

property on_adapter_state_changed_delegate

[Read-Write] On Adapter State Changed Delegate

Type

(MagicLeapBLEOnAdapterStateChangedDelegateMulti)

property on_characteristic_changed_delegate

[Read-Write] On Characteristic Changed Delegate

Type

(MagicLeapBLEOnCharacteristicChangedDelegateMulti)

property on_conn_priority_changed_delegate

[Read-Write] On Conn Priority Changed Delegate

Type

(MagicLeapBLEOnConnPriorityChangedDelegateMulti)

property on_conn_state_changed_delegate

[Read-Write] On Conn State Changed Delegate

Type

(MagicLeapBLEOnConnStateChangedDelegateMulti)

property on_found_device_delegate

[Read-Write] On Found Device Delegate

Type

(MagicLeapBLEOnFoundDeviceDelegateMulti)

property on_got_adapter_name_delegate

[Read-Write] On Got Adapter Name Delegate

Type

(MagicLeapBLEOnGotAdapterNameDelegateMulti)

property on_got_adapter_state_delegate

[Read-Write] On Got Adapter State Delegate

Type

(MagicLeapBLEOnGotAdapterStateDelegateMulti)

property on_got_available_services_delegate

[Read-Write] On Got Available Services Delegate

Type

(MagicLeapBLEOnGotAvailableServicesDelegateMulti)

property on_log_delegate

[Read-Write] On Log Delegate

Type

(MagicLeapBLEOnLogDelegateMulti)

property on_mtu_changed_delegate

[Read-Write] On MTUChanged Delegate

Type

(MagicLeapBLEOnMTUChangedDelegateMulti)

property on_read_characteristic_delegate

[Read-Write] On Read Characteristic Delegate

Type

(MagicLeapBLEOnReadCharacteristicDelegateMulti)

property on_read_descriptor_delegate

[Read-Write] On Read Descriptor Delegate

Type

(MagicLeapBLEOnReadDescriptorDelegateMulti)

property on_read_remote_rssi_delegate

[Read-Write] On Read Remote RSSIDelegate

Type

(MagicLeapBLEOnReadRemoteRSSIDelegateMulti)

property on_write_characteristic_delegate

[Read-Write] On Write Characteristic Delegate

Type

(MagicLeapBLEOnWriteCharacteristicDelegateMulti)

property on_write_descriptor_delegate

[Read-Write] On Write Descriptor Delegate

Type

(MagicLeapBLEOnWriteDescriptorDelegateMulti)

register_for_adapter_state_change_notifications()None

Requests adapter state changes to be relayed to the calling app.

start_scan_async()None

Starts Bluetooth LE scan. The results will be delivered through scanner callback.

stop_scan()None

Stops Bluetooth LE scan in progress.