Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Static Public Member Functions | List of all members
org.direct_bt.BTDeviceRegistry Class Reference

Application toolkit providing BT device registration of processed and awaited devices. More...

Collaboration diagram for org.direct_bt.BTDeviceRegistry:

Classes

class  DeviceID
 Specifies unique device identities, using BDAddressAndType as key. More...
 
class  DeviceQuery
 Specifies devices queries to act upon. More...
 
interface  DeviceQueryMatch
 Interface for user defined DeviceQuery matching criteria and algorithm. More...
 

Static Public Member Functions

static void addToProcessedDevices (final BDAddressAndType a, final String n)
 
static void addToWaitForDevices (final String addrOrNameSub)
 
static boolean areAllDevicesProcessed ()
 Returns true if all awaited devices have been processed. More...
 
static boolean areAllDevicesProcessed (final DeviceQueryMatch m)
 Returns true if all awaited devices have been processed. More...
 
static void clearProcessedDevices ()
 Clears internal list. More...
 
static void clearWaitForDevices ()
 Clears internal list. More...
 
static int getProcessedDeviceCount ()
 
static List< DeviceIDgetProcessedDevices ()
 Returns a copy of the current collection of processed DeviceID. More...
 
static String getProcessedDevicesString ()
 
static List< DeviceQuerygetWaitForDevices ()
 Returns the reference of the current list of DeviceQuery, not a copy. More...
 
static int getWaitForDevicesCount ()
 
static String getWaitForDevicesString ()
 
static boolean isDeviceProcessed (final BDAddressAndType a)
 
static boolean isWaitingForAnyDevice ()
 
static boolean isWaitingForDevice (final EUI48 address, final String name)
 Returns true if the given address and/or name matches any of the awaited devices. More...
 
static boolean isWaitingForDevice (final EUI48 address, final String name, final DeviceQueryMatch m)
 Returns true if the given address and/or name matches any of the awaited devices. More...
 

Detailed Description

Application toolkit providing BT device registration of processed and awaited devices.

The latter on a pattern matching basis, i.e. EUI48Sub or name-sub.

Definition at line 43 of file BTDeviceRegistry.java.

Member Function Documentation

◆ addToWaitForDevices()

static void org.direct_bt.BTDeviceRegistry.addToWaitForDevices ( final String  addrOrNameSub)
static

Definition at line 135 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ isWaitingForAnyDevice()

static boolean org.direct_bt.BTDeviceRegistry.isWaitingForAnyDevice ( )
static

Definition at line 145 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getWaitForDevicesCount()

static int org.direct_bt.BTDeviceRegistry.getWaitForDevicesCount ( )
static

Definition at line 148 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getWaitForDevicesString()

static String org.direct_bt.BTDeviceRegistry.getWaitForDevicesString ( )
static

Definition at line 151 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getWaitForDevices()

static List< DeviceQuery > org.direct_bt.BTDeviceRegistry.getWaitForDevices ( )
static

Returns the reference of the current list of DeviceQuery, not a copy.

Definition at line 157 of file BTDeviceRegistry.java.

◆ clearWaitForDevices()

static void org.direct_bt.BTDeviceRegistry.clearWaitForDevices ( )
static

Clears internal list.

Definition at line 163 of file BTDeviceRegistry.java.

◆ addToProcessedDevices()

static void org.direct_bt.BTDeviceRegistry.addToProcessedDevices ( final BDAddressAndType  a,
final String  n 
)
static

Definition at line 167 of file BTDeviceRegistry.java.

◆ isDeviceProcessed()

static boolean org.direct_bt.BTDeviceRegistry.isDeviceProcessed ( final BDAddressAndType  a)
static

Definition at line 170 of file BTDeviceRegistry.java.

◆ getProcessedDeviceCount()

static int org.direct_bt.BTDeviceRegistry.getProcessedDeviceCount ( )
static

Definition at line 173 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getProcessedDevicesString()

static String org.direct_bt.BTDeviceRegistry.getProcessedDevicesString ( )
static

Definition at line 176 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getProcessedDevices()

static List< DeviceID > org.direct_bt.BTDeviceRegistry.getProcessedDevices ( )
static

Returns a copy of the current collection of processed DeviceID.

Definition at line 182 of file BTDeviceRegistry.java.

◆ clearProcessedDevices()

static void org.direct_bt.BTDeviceRegistry.clearProcessedDevices ( )
static

Clears internal list.

Definition at line 188 of file BTDeviceRegistry.java.

◆ isWaitingForDevice() [1/2]

static boolean org.direct_bt.BTDeviceRegistry.isWaitingForDevice ( final EUI48  address,
final String  name,
final DeviceQueryMatch  m 
)
static

Returns true if the given address and/or name matches any of the awaited devices.

Matching criteria and algorithm is defined by the given DeviceQueryMatch.

See also
isWaitingForDevice(EUI48, String)

Definition at line 221 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ isWaitingForDevice() [2/2]

static boolean org.direct_bt.BTDeviceRegistry.isWaitingForDevice ( final EUI48  address,
final String  name 
)
static

Returns true if the given address and/or name matches any of the awaited devices.

Matching criteria is either the awaited device's DeviceQuery#addressSub or DeviceQuery#nameSub, whichever is set.

Matching algorithm is a simple contains pattern match, i.e. the given address or name contains the corresponding DeviceQuery element.

See also
isWaitingForDevice(EUI48, String, DeviceQueryMatch)

Definition at line 245 of file BTDeviceRegistry.java.

◆ areAllDevicesProcessed() [1/2]

static boolean org.direct_bt.BTDeviceRegistry.areAllDevicesProcessed ( final DeviceQueryMatch  m)
static

Returns true if all awaited devices have been processed.

Matching criteria and algorithm is defined by the given DeviceQueryMatch.

See also
areAllDevicesProcessed()

Definition at line 260 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ areAllDevicesProcessed() [2/2]

static boolean org.direct_bt.BTDeviceRegistry.areAllDevicesProcessed ( )
static

Returns true if all awaited devices have been processed.

Matching criteria is either the awaited device's DeviceQuery#addressSub or DeviceQuery#nameSub, whichever is set.

Matching algorithm is a simple contains pattern match, i.e. the processed DeviceID contains one element of DeviceQuery.

See also
areAllDevicesProcessed(DeviceQueryMatch)

Definition at line 289 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: