Difference between revisions of "BfbDeviceConnector Class"

From Neurotech Software Development Kit
Jump to: navigation, search
(Created page with "=Android=")
 
(Method Detail)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Android=
 
=Android=
 +
 +
ru.neurotech.neurodevices.bfb
 +
 +
<span style="font-size:150%;">'''Class BfbDeviceConnector'''</span>
 +
 +
==Related Classes==
 +
 +
ru.neurotech.neurodevices.bfb.[[BfbDevice Class|BfbDevice]]
 +
 +
ru.neurotech.neurodevices.bfb.[[BfbIndex Class|BfbIndex]]
 +
 +
==Classes hierarchy==
 +
<ul>
 +
<li>java.lang.Object</li>
 +
 +
<ul>
 +
<li>ru.neurotech.neurodevices.bfb.'''BfbDeviceConnector'''</li>
 +
</ul>
 +
</ul>
 +
 +
==Class definition==
 +
<code><span style="color:#0066FF;">'''public class'''</span> BfbDeviceConnector <span style="color:#0066FF;">'''extends'''</span> java.lang.Object</code>
 +
 +
==Fields Summary==
 +
{| class="wikitable"
 +
|- style="background-color: #dee3e9;"
 +
|'''Modifier and Type'''
 +
|'''Field and Description'''
 +
|- valign="top"
 +
|[[SubscribersNotifier Class|SubscribersNotifier]]&lt;[[BfbDevice Class|BfbDevice]]&gt;
 +
|[[#deviceFound|deviceFound]]
 +
Notifies when proper Callibri BFB device been found and initialized
 +
|-  valign="top"
 +
|[[SubscribersNotifier Class|SubscribersNotifier]]&lt;java.lang.Boolean&gt;
 +
|[[#scanStateChanged|scanStateChanged]]
 +
Notifies about changing device scanning state
 +
|}
 +
 +
==Constructor Summary==
 +
{| class="wikitable"
 +
|- style="background-color: #dee3e9;"
 +
|'''Constructor and Description'''
 +
|-
 +
|[[#BfbDeviceConnector|BfbDeviceConnector]](android.content.Context context)
 +
Creates new instance of BfbDeviceConnector class with current application context
 +
|}
 +
 +
==Methods Summary==
 +
{| class="wikitable"
 +
|- style="background-color: #dee3e9;"
 +
|'''Modifier and Type'''
 +
|'''Method and Description'''
 +
|- valign="top"
 +
|[[BfbDevice Class|BfbDevice]]
 +
|[[#getDeviceByAddress|getDeviceByAddress]](java.lang.String address)
 +
Returns object, representing device with specified address
 +
It is not guaranteed, that this device is currently available
 +
|- valign="top"
 +
|style="color:#0066FF;" |'''void'''
 +
|[[#shutdown|shutdown]]()
 +
Ends all operations with device searching and frees all resources.
 +
|- valign="top"
 +
|style="color:#0066FF;" |'''void'''
 +
|[[#startScan|startScan]](<span style="color:#0066FF;">'''int'''</span> timeout)
 +
Starts searching for Callibri devices suitable for Biofeedback trainings
 +
|- valign="top"
 +
|style="color:#0066FF;" |'''void'''
 +
|[[#stopScan|stopScan]]
 +
Stops device searching
 +
|}
 +
 +
==Field Detail==
 +
<h3>deviceFound</h3>
 +
<code><span style="color:#0066FF;">'''public final'''</span> [[SubscribersNotifier Class|SubscribersNotifier]]&lt;[[BfbDevice Class|BfbDevice]]&gt; deviceFound</code>
 +
 +
Notifies when proper Callibri Bfb device been found and initialized
 +
 +
<h3>scanStateChanged</h3>
 +
<code><span style="color:#0066FF;">'''public final'''</span> [[SubscribersNotifier Class|SubscribersNotifier]]&lt;java.lang.Boolean&gt; scanStateChanged</code>
 +
 +
Notifies about changing device scanning state
 +
 +
==Constructor Detail==
 +
 +
<h3>BfbDeviceConnector</h3>
 +
<code><span style="color:#0066FF;">'''public'''</span> BfbDeviceConnector(android.content.Context&nbsp;context)</code>
 +
 +
Creates new instance of BfbDeviceConnector class with current application context
 +
 +
==Method Detail==
 +
 +
<h3>startScan</h3>
 +
<code><span style="color:#0066FF;">'''public void'''</span> startScan(int&nbsp;timeout)</code>
 +
 +
Starts searching for Callibri devices suitable for biofeedback trainings
 +
<dl>
 +
<dt><span class="paramLabel">Parameters:</span></dt>
 +
<dd><code>timeout</code> - Scan time. Zero for infinity</dd>
 +
</dl>
 +
 +
<h3>stopScan</h3>
 +
<code><span style="color:#0066FF;">'''public void'''</span> stopScan()</code>
 +
 +
Stops device searching
 +
 +
<h3>shutdown</h3>
 +
<code><span style="color:#0066FF;">'''public void'''</span> shutdown()</code>
 +
 +
Ends all operations with device searching and frees all resources
 +
 +
<h3>getDeviceByAddress</h3>
 +
<code><span style="color:#0066FF;">'''public'''</span> [[BfbDevice Class|BfbDevice]] getDeviceByAddress(java.lang.String address)</code>
 +
 +
Returns object, representing device with specified address
 +
It is not guaranteed, that this device is currently available
 +
<dl>
 +
<dt><span class="paramLabel">Parameters:</span></dt>
 +
<dd><code>address</code> - BTLE device address</dd>
 +
<dt><span class="returnLabel">Returns:</span></dt>
 +
<dd>[[BfbDevice Class|BfbDevice]] object</dd>
 +
</dl>

Latest revision as of 04:27, 9 August 2017

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