Arendi.BleLibrary
4.5.1.999
Core-Library (PCL)
|
Interface defining the functionality of a manager for peripheral objects. The standard implementation is the PeripheralManager<TPeripheral> class. More...
Public Member Functions | |
Task | ClearAsync () |
Clear the list with all peripherals. More... | |
Task | AddAsync (TPeripheral peripheral) |
Add peripheral to the list of known peripherals. More... | |
Task | RemoveAsync (TPeripheral peripheral) |
Remove peripheral from the list of known peripherals. More... | |
Task | RemoveAsync (IEnumerable< TPeripheral > peripheralsToRemove) |
Remove peripherals from the list of known peripherals. More... | |
TPeripheral | Find (Uuid uuid) |
Find peripheral according to it's UUID. More... | |
void | StartScan () |
Start scan for peripherals. More... | |
void | StopScan () |
Stop scan for peripherals. More... | |
Properties | |
bool | IsScanning [get] |
Check if the peripheral manager is scanning for peripherals or not. More... | |
Uuid [] | UuidFilter [get, set] |
Array with service UUID's to check in advertise data. Only peripherals advertising one of the UUID's are added to the peripheral list. If set to null or an empty array all visible peripherals are added to the list. More... | |
int | PeripheralInvisibleTimeout [get, set] |
Duration in seconds a device must be invisible (no advertising and not connected) until it gets removed from the peripheral manger. If the value is set to 0 the peripherals are not removed from the list automatically. More... | |
bool | DisposePeripheralOnRemove [get, set] |
Enable/Disable the call of the dispose method on removed peripherals. By default this is enabled but if the removed peripherals should be disposed later the automatic Dispose may be disabled. More... | |
bool | UpdateNameByAdvertisedData [get, set] |
Enable/Disable that advertised name information is used to update the peripheral name. If disabled the assigned name given by the bluetooth stack is always used. More... | |
bool | IsBluetoothDisabled [get] |
Check if the bluetooth interface is disabled. Because there are more state of the bluetooth adapter than disabled and enabled, IsBluetoothDisabled is not equal to !IsBluetoothEnabled at any time More... | |
bool | IsBluetoothEnabled [get] |
Check if the bluetooth interface is enabled. Because there are more state of the bluetooth adapter than disabled and enabled, IsBluetoothDisabled is not equal to !IsBluetoothEnabled at any time More... | |
IEnumerable< TPeripheral > | Peripherals [get] |
Get a list with all managed peripherals. The returned list is a copy of the internal peripheral list. More... | |
bool | IsDisposed [get] |
Check if the peripheral manager is already disposed. More... | |
Events | |
EventHandler< PeripheralAddedEventArgs< TPeripheral > > | PeripheralAdded |
Occurs when a new peripheral was added to the peripherals list More... | |
EventHandler< PeripheralRemovedEventArgs< TPeripheral > > | PeripheralRemoved |
Occurs when a peripheral removed from the peripherals list More... | |
EventHandler | BluetoothDisabled |
Event triggered, when the bluetooth interface gets disabled More... | |
EventHandler | BluetoothEnabled |
Event triggered, when the bluetooth interface gets enabled On iOS, the bluetooth interface needs some time until it is ready. At this time, his state is not enabled and neither disabled. Wait for the BluetoothEnabled event before accessing the stack. More... | |
Interface defining the functionality of a manager for peripheral objects. The standard implementation is the PeripheralManager<TPeripheral> class.
TPeripheral | Type the peripheral manager manages. If multiple class types are handled the type can be set to IManagedPeripheral. |
TPeripheral | : | IManagedPeripheral |
Task Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.AddAsync | ( | TPeripheral | peripheral | ) |
Add peripheral to the list of known peripherals.
peripheral | Peripheral to add. |
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
Task Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.ClearAsync | ( | ) |
Clear the list with all peripherals.
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
TPeripheral Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.Find | ( | Uuid | uuid | ) |
Find peripheral according to it's UUID.
The UUID is a unique number for each discovered device.
uuid | UUID to search. |
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
Task Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.RemoveAsync | ( | TPeripheral | peripheral | ) |
Remove peripheral from the list of known peripherals.
peripheral | Peripheral to remove. |
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
Task Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.RemoveAsync | ( | IEnumerable< TPeripheral > | peripheralsToRemove | ) |
Remove peripherals from the list of known peripherals.
peripheralsToRemove | List with peripherals to remove. |
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
void Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.StartScan | ( | ) |
Start scan for peripherals.
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
void Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.StopScan | ( | ) |
Stop scan for peripherals.
Implemented in Arendi.BleLibrary.Extention.PeripheralManager< TPeripheral >.
|
getset |
Enable/Disable the call of the dispose method on removed peripherals. By default this is enabled but if the removed peripherals should be disposed later the automatic Dispose may be disabled.
Default: true
|
get |
Check if the bluetooth interface is disabled. Because there are more state of the bluetooth adapter than disabled and enabled, IsBluetoothDisabled is not equal to !IsBluetoothEnabled at any time
|
get |
Check if the bluetooth interface is enabled. Because there are more state of the bluetooth adapter than disabled and enabled, IsBluetoothDisabled is not equal to !IsBluetoothEnabled at any time
|
get |
Check if the peripheral manager is already disposed.
|
get |
Check if the peripheral manager is scanning for peripherals or not.
|
getset |
Duration in seconds a device must be invisible (no advertising and not connected) until it gets removed from the peripheral manger. If the value is set to 0 the peripherals are not removed from the list automatically.
Default: 10
|
get |
Get a list with all managed peripherals. The returned list is a copy of the internal peripheral list.
|
getset |
Enable/Disable that advertised name information is used to update the peripheral name. If disabled the assigned name given by the bluetooth stack is always used.
Default: true
|
getset |
Array with service UUID's to check in advertise data. Only peripherals advertising one of the UUID's are added to the peripheral list. If set to null or an empty array all visible peripherals are added to the list.
Default: null
EventHandler Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.BluetoothDisabled |
Event triggered, when the bluetooth interface gets disabled
EventHandler Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.BluetoothEnabled |
Event triggered, when the bluetooth interface gets enabled On iOS, the bluetooth interface needs some time until it is ready. At this time, his state is not enabled and neither disabled. Wait for the BluetoothEnabled event before accessing the stack.
EventHandler<PeripheralAddedEventArgs<TPeripheral> > Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.PeripheralAdded |
Occurs when a new peripheral was added to the peripherals list
EventHandler<PeripheralRemovedEventArgs<TPeripheral> > Arendi.BleLibrary.Extention.IPeripheralManager< TPeripheral >.PeripheralRemoved |
Occurs when a peripheral removed from the peripherals list