|
void | Establish (CancellationToken token=default(CancellationToken)) |
| Initiate the establishment of a connection.
This is not allowed if peripheral mode is set to PeripheralMode.Inactive. This call is blocking.
|
|
Task | EstablishAsync (CancellationToken token=default(CancellationToken)) |
| Execute the establishment of a connection.
This is not allowed if peripheral mode is set to PeripheralMode.Inactive.
|
|
void | Teardown (CancellationToken token=default(CancellationToken)) |
| Initiate the teardown of a connection.
This is not allowed if peripheral mode is set to PeripheralMode.Inactive. This call is blocking.
|
|
Task | TeardownAsync (CancellationToken token=default(CancellationToken)) |
| Execute the teardown of a connection.
This is not allowed if peripheral mode is set to PeripheralMode.Inactive.
|
|
void | Update (UpdateSetup updateSetup, CancellationToken token=default(CancellationToken)) |
| Start an update process
When the enhanced peripheral is in a stable state as PeripheralState.Idle or PeripheralState.Ready the update will be initiated immediately. In transition states the update will be initiated after completion of the state. This call is blocking.
|
|
Task | UpdateAsync (UpdateSetup updateSetup, CancellationToken token=default(CancellationToken)) |
| Execute an update process asynchronously.
When the enhanced peripheral is in a stable state as PeripheralState.Idle or PeripheralState.Ready the update will be initiated immediately. In transition states the update will be initiated after completion of the state.
|
|
override void | Dispose () |
| Dispose the peripheral. A disposed enhanced peripheral is disconnected. More...
|
|
override string | ToString () |
| Returns a string that represents the current object. More...
|
|
| 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...
|
|
|
| EnhancedPeripheral (Uuid uuid) |
| Create enhanced peripheral based on an UUID and an optional name. The resulting object represents a virtual peripheral. More...
|
|
| EnhancedPeripheral (IPeripheral peripheral) |
| Create enhanced peripheral based on an peripheral. More...
|
|
void | CheckReady () |
| Check if state of the peripheral is ready. If not in Ready state an - Exceptions
-
PeripheralNotReadyException | |
is thrown. More...
|
|
virtual Task< UpdateSetup > | InitializeAsync (CancellationToken cancellationToken=default(CancellationToken)) |
| Empty initialize method that can be overwritten in the derived class. This method is called in Initialize state after detection services of the peripheral. The method may be used to check the detected services and read/write some initial values. More...
|
|
virtual UpdateSetup | Initialize (CancellationToken cancellationToken=default(CancellationToken)) |
| Empty initialize method that can be overwritten in the derived class. This method is called in Initialize state after detection services of the peripheral. The method may be used to check the detected services and read/write some initial values. More...
|
|
virtual void | Activate () |
| This method is called after the standard peripheral object for this peripheral is set. If a constructor with the standard peripheral object is called, that method will be called in the constructor. On virtual devices (no standard peripheral object on object creation) the method may be called later, when the virtual device is converted to a real peripheral. More...
|
|
|
PeripheralState | State [get] |
|
PeripheralMode | Mode [get, set] |
|
int | ConnectTimeout [get, set] |
|
int | DiscoverServicesTimeout [get, set] |
|
int | DisconnectTimeout [get, set] |
|
int | ReconnectAfterDisconnectTimeout [get, set] |
|
int | ReconnectAfterFailedConnectTimeout [get, set] |
|
int | RssiInterval [get, set] |
|
bool | EstablishServiceDiscovery [get, set] |
|
ParameterSet | EstablishParameter [get, set] |
|
DataLengthSet | EstablishDataLength [get, set] |
|
PhySet | EstablishPhy [get, set] |
|
int | EstablishAttMtu [get, set] |
|
new bool | IsDisposed [get] |
|
IPeripheral | Peripheral [get, set] |
|
Uuid | Uuid [get] |
|
string | Name [get, set] |
|
int | Rssi [get, set] |
|
bool | IsConnectable [get, set] |
|
DateTime | LastSeen [get, set] |
|
ILog | Log [get] |
|
bool | IsDisposed [get] |
|
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...
|
|
ILog | Log [get] |
| Logger instance. More...
|
|
bool | IsDisposed [get] |
| Check if the peripheral object is already disposed. More...
|
|
int | ReconnectAfterFailedConnectTimeoutDefault [get] |
| Default timeout after a failed connect [ms]. More...
|
|
int | ReconnectAfterDisconnectTimeoutDefault [get] |
| Default timeout after a disconnect [ms]. More...
|
|
int | RssiIntervalDefault [get] |
| Get the default interval for RSSI measurements [ms]. More...
|
|
PeripheralState | State [get] |
| Get the state of the peripheral. More...
|
|
PeripheralMode | Mode [get, set] |
| Get/Set the mode the peripheral is used. More...
|
|
int | ConnectTimeout [get, set] |
| Get/Set the connect timeout [ms]. By default the value is set to Constants.ConnectTimeout. It is allowed to set this value to Timeout.Infinite to keep trying to connect to a device. More...
|
|
int | DiscoverServicesTimeout [get, set] |
| Get/Set the discover services timeout [ms]. By default the value is set to Constants.DiscoverServicesTimeout. More...
|
|
int | DisconnectTimeout [get, set] |
| Get/Set the disconnect timeout [ms]. By default the value is set to Constants.DisconnectTimeout. More...
|
|
int | ReconnectAfterDisconnectTimeout [get, set] |
| Get/Set the reconnect timeout [ms] after a disconnect. This timeout is used after a peripheral has been disconnected. This value may be set to 0 to immediately retry to establish a connection. By default the value is set to ReconnectAfterDisconnectTimeoutDefault. More...
|
|
int | ReconnectAfterFailedConnectTimeout [get, set] |
| Get/Set the reconnect timeout [ms] after a failed connect. This timeout is used after a peripheral couldn't be connected to try next time. It is not recommended, to set this duration to a value of 0. By default the value is set to ReconnectAfterFailedConnectTimeoutDefault. More...
|
|
int | RssiInterval [get, set] |
| Get/Set the interval the RSSI is measured when the peripheral is connected [ms]. A value of 0 means, that no RSSI is measured. By default the value is set to RssiIntervalDefault. More...
|
|
bool | EstablishServiceDiscovery [get, set] |
| Execute a service discovery in the establish process (Default:true). More...
|
|
ParameterSet | EstablishParameter [get, set] |
| Set the connection parameter that should be set in establish process (if supported by the adapter). If set to null (=> default) no connection parameter update is initiated in establish process. More...
|
|
DataLengthSet | EstablishDataLength [get, set] |
| Set the data length that should be set in establish process (if supported by the adapter). If set to null (=> default) no data length update is initiated in establish process. More...
|
|
PhySet | EstablishPhy [get, set] |
| Set the phy that should be set in establish process (if supported by the adapter). If set to null (=> default) no phy update is initiated in establish process. More...
|
|
int | EstablishAttMtu [get, set] |
| Set the ATT MTU value that should be exchanged in establish process (if supported by the adapter). If set to 0 (=> default) or equal or less to 23 no ATT MTU is initiated in establish process. More...
|
|
Abstract class representing an enhanced peripheral.
The enhanced peripheral class adds the ability to automatically connect disconnect a peripheral. The object will autonomously act according to the mode set for the peripheral.