Direct-BT  2.3.1
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 addToWaitForDevices (final String addrOrNameSub)
 
static boolean isWaitingForAnyDevice ()
 
static int getWaitForDevicesCount ()
 
static String getWaitForDevicesString ()
 
static List< DeviceQuerygetWaitForDevices ()
 Returns the reference of the current list of DeviceQuery, not a copy. More...
 
static void clearWaitForDevices ()
 Clears internal list. More...
 
static void addToProcessedDevices (final BDAddressAndType a, final String n)
 
static boolean isDeviceProcessed (final BDAddressAndType a)
 
static int getProcessedDeviceCount ()
 
static String getProcessedDevicesString ()
 
static List< DeviceIDgetProcessedDevices ()
 Returns a copy of the current collection of processed DeviceID. More...
 
static void clearProcessedDevices ()
 Clears internal list. More...
 
static boolean isWaitingForDevice (final EUI48 address, final String name, final DeviceQueryMatch m)
 Returns. More...
 
static boolean isWaitingForDevice (final EUI48 address, final String name)
 Returns. More...
 
static boolean areAllDevicesProcessed (final DeviceQueryMatch m)
 Returns. More...
 
static boolean areAllDevicesProcessed ()
 Returns. More...
 
static void addToProcessingDevices (final BDAddressAndType a, final String n)
 
static boolean removeFromProcessingDevices (final BDAddressAndType a)
 
static boolean isDeviceProcessing (final BDAddressAndType a)
 
static int getProcessingDeviceCount ()
 
static List< DeviceIDgetProcessingDevices ()
 Returns a copy of the current collection of processing DeviceID. More...
 
static void clearProcessingDevices ()
 Clears internal list. 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 40 of file BTDeviceRegistry.java.

Member Function Documentation

◆ addToProcessedDevices()

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

Definition at line 165 of file BTDeviceRegistry.java.

◆ addToProcessingDevices()

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

Definition at line 294 of file BTDeviceRegistry.java.

◆ addToWaitForDevices()

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

Definition at line 133 of file BTDeviceRegistry.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ areAllDevicesProcessed() [1/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 287 of file BTDeviceRegistry.java.

Here is the call graph for this function:

◆ areAllDevicesProcessed() [2/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 258 of file BTDeviceRegistry.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearProcessedDevices()

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

Clears internal list.

Definition at line 186 of file BTDeviceRegistry.java.

◆ clearProcessingDevices()

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

Clears internal list.

Definition at line 315 of file BTDeviceRegistry.java.

◆ clearWaitForDevices()

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

Clears internal list.

Definition at line 161 of file BTDeviceRegistry.java.

◆ getProcessedDeviceCount()

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

Definition at line 171 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 180 of file BTDeviceRegistry.java.

◆ getProcessedDevicesString()

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

Definition at line 174 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getProcessingDeviceCount()

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

Definition at line 303 of file BTDeviceRegistry.java.

◆ getProcessingDevices()

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

Returns a copy of the current collection of processing DeviceID.

Definition at line 309 of file BTDeviceRegistry.java.

◆ 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 155 of file BTDeviceRegistry.java.

◆ getWaitForDevicesCount()

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

Definition at line 146 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ getWaitForDevicesString()

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

Definition at line 149 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ isDeviceProcessed()

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

Definition at line 168 of file BTDeviceRegistry.java.

◆ isDeviceProcessing()

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

Definition at line 300 of file BTDeviceRegistry.java.

◆ isWaitingForAnyDevice()

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

Definition at line 143 of file BTDeviceRegistry.java.

Here is the caller graph for this function:

◆ isWaitingForDevice() [1/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 243 of file BTDeviceRegistry.java.

Here is the call graph for this function:

◆ isWaitingForDevice() [2/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 219 of file BTDeviceRegistry.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFromProcessingDevices()

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

Definition at line 297 of file BTDeviceRegistry.java.


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