BfbDeviceConnector Class

From Neurotech Software Development Kit
Jump to: navigation, search

Android

ru.neurotech.neurodevices.bfb

Class BfbDeviceConnector

Related Classes

ru.neurotech.neurodevices.bfb.BfbDevice

ru.neurotech.neurodevices.bfb.BfbIndex

Classes hierarchy

  • java.lang.Object
    • ru.neurotech.neurodevices.bfb.BfbDeviceConnector

Class definition

public class BfbDeviceConnector extends java.lang.Object

Fields Summary

Modifier and Type Field and Description
SubscribersNotifier<BfbDevice> deviceFound

Notifies when proper Callibri BFB device been found and initialized

SubscribersNotifier<java.lang.Boolean> scanStateChanged

Notifies about changing device scanning state

Constructor Summary

Constructor and Description
BfbDeviceConnector(android.content.Context context)

Creates new instance of BfbDeviceConnector class with current application context

Methods Summary

Modifier and Type Method and Description
BfbDevice getDeviceByAddress(java.lang.String address)

Returns object, representing device with specified address It is not guaranteed, that this device is currently available

void shutdown()

Ends all operations with device searching and frees all resources.

void startScan(int timeout)

Starts searching for Callibri devices suitable for Biofeedback trainings

void stopScan

Stops device searching

Field Detail

deviceFound

public final SubscribersNotifier<BfbDevice> deviceFound

Notifies when proper Callibri Bfb device been found and initialized

scanStateChanged

public final SubscribersNotifier<java.lang.Boolean> scanStateChanged

Notifies about changing device scanning state

Constructor Detail

BfbDeviceConnector

public BfbDeviceConnector(android.content.Context context)

Creates new instance of BfbDeviceConnector class with current application context

Method Detail

startScan

public void startScan(int timeout)

Starts searching for Callibri devices suitable for biofeedback trainings

Parameters:
timeout - Scan time. Zero for infinity

stopScan

public void stopScan()

Stops device searching

shutdown

public void shutdown()

Ends all operations with device searching and frees all resources

getDeviceByAddress

public BfbDevice getDeviceByAddress(java.lang.String address)

Returns object, representing device with specified address It is not guaranteed, that this device is currently available

Parameters:
address - BTLE device address
Returns:
BfbDevice object