Arendi.BleLibrary  4.5.1.999
Core-Library (PCL)
Arendi.BleLibrary.Extention.ManagedPeripheral Class Reference

Simple class representing a manageable peripheral. More...

Inheritance diagram for Arendi.BleLibrary.Extention.ManagedPeripheral:
Arendi.BleLibrary.Extention.IManagedPeripheral Arendi.BleLibrary.Extention.EnhancedPeripheral

Public Member Functions

 ManagedPeripheral (Uuid uuid)
 Create a virtual managed peripheral with a specific UUID if the real peripheral is not known. A connection to this peripheral can not be established until the peripheral is found by the PeripheralManager<TPeripheral> More...
 
 ManagedPeripheral (IPeripheral peripheral)
 Create a managed peripheral with a peripheral object More...
 
virtual void Dispose ()
 Disposes the peripheral object More...
 

Public Attributes

const int RssiNotAvailable = int.MinValue
 RSSI value that indicates, that no value is known. More...
 

Protected Attributes

const string PeripheralDisposedExceptionText = "The peripheral was already disposed by the peripheral manager. \nOverride the method \"bool CheckRemove()\" to prevent that a peripheral in use is removed by the peripheral manager"
 This text is used as object disposed exception message More...
 

Properties

IPeripheral Peripheral [get, set]
 
Uuid Uuid [get]
 
string Name [get, set]
 
int Rssi [get, set]
 
bool IsConnectable [get, set]
 
DateTime LastSeen [get, set]
 
bool IsDisposed [get]
 
- Properties inherited from Arendi.BleLibrary.Extention.IManagedPeripheral
IPeripheral Peripheral [get, set]
 Get/Set the used standard peripheral object. More...
 
Uuid Uuid [get]
 Get the UUID uniquely identifying an peripheral. More...
 
string Name [get, set]
 Get the name of the enhanced peripheral. More...
 
int Rssi [get, set]
 Get the last set RSSI value. The returned value was update when the peripheral was last seen (see Rssi). More...
 
bool IsConnectable [get, set]
 Is the device is connectable or not. More...
 
DateTime LastSeen [get, set]
 Time the peripheral was last seen. More...
 
bool IsDisposed [get]
 Check if the peripheral object is already disposed. More...
 

Events

EventHandler PeripheralUpdated = delegate { }
 Standard peripheral object of the peripheral has been set. More...
 
EventHandler< NameUpdatedEventArgsNameUpdated = delegate { }
 Name of the peripheral has changed. More...
 
EventHandler< RssiUpdatedEventArgsRssiUpdated = delegate { }
 RSSI level of the peripheral has changed. More...
 
EventHandler< IsConnectableUpdatedEventArgsIsConnectableUpdated = delegate { }
 Property if the peripheral may be connected has been updated. More...
 

Detailed Description

Simple class representing a manageable peripheral.

It's a simple implementation for the IManagedPeripheral interface with no extra logic in it. It may be used directly or in a derived form as in EnhancedPeripheral.

Constructor & Destructor Documentation

§ ManagedPeripheral() [1/2]

Arendi.BleLibrary.Extention.ManagedPeripheral.ManagedPeripheral ( Uuid  uuid)

Create a virtual managed peripheral with a specific UUID if the real peripheral is not known. A connection to this peripheral can not be established until the peripheral is found by the PeripheralManager<TPeripheral>

Parameters
uuidThe UUID of the virtual peripheral

§ ManagedPeripheral() [2/2]

Arendi.BleLibrary.Extention.ManagedPeripheral.ManagedPeripheral ( IPeripheral  peripheral)

Create a managed peripheral with a peripheral object

Parameters
peripheralAn instance to a real peripheral

Member Function Documentation

§ Dispose()

virtual void Arendi.BleLibrary.Extention.ManagedPeripheral.Dispose ( )
virtual

Disposes the peripheral object

Reimplemented in Arendi.BleLibrary.Extention.EnhancedPeripheral.

Member Data Documentation

§ PeripheralDisposedExceptionText

const string Arendi.BleLibrary.Extention.ManagedPeripheral.PeripheralDisposedExceptionText = "The peripheral was already disposed by the peripheral manager. \nOverride the method \"bool CheckRemove()\" to prevent that a peripheral in use is removed by the peripheral manager"
protected

This text is used as object disposed exception message

§ RssiNotAvailable

const int Arendi.BleLibrary.Extention.ManagedPeripheral.RssiNotAvailable = int.MinValue

RSSI value that indicates, that no value is known.

Event Documentation

§ IsConnectableUpdated

EventHandler<IsConnectableUpdatedEventArgs> Arendi.BleLibrary.Extention.ManagedPeripheral.IsConnectableUpdated = delegate { }

Property if the peripheral may be connected has been updated.

§ NameUpdated

EventHandler<NameUpdatedEventArgs> Arendi.BleLibrary.Extention.ManagedPeripheral.NameUpdated = delegate { }

Name of the peripheral has changed.

§ PeripheralUpdated

EventHandler Arendi.BleLibrary.Extention.ManagedPeripheral.PeripheralUpdated = delegate { }

Standard peripheral object of the peripheral has been set.

This may only occur if the peripheral was created as virtual peripheral. This event is triggered, when the peripheral is set later and the peripheral becomes a real peripheral behind.

This event will only be triggered once as the standard peripheral may only be set once.

§ RssiUpdated

EventHandler<RssiUpdatedEventArgs> Arendi.BleLibrary.Extention.ManagedPeripheral.RssiUpdated = delegate { }

RSSI level of the peripheral has changed.