Difference between revisions of "BfbDeviceConnector Class"

From Neurotech Software Development Kit
Jump to: navigation, search
(Android)
(Method Detail)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Android=
 
=Android=
<!-- ======== START OF CLASS DATA ======== -->
+
 
<div class="header">
+
ru.neurotech.neurodevices.bfb
<div class="subTitle">ru.neurotech.neurodevices.bfb</div>
+
 
<h2 title="Class BfbDeviceConnector" class="title">Class BfbDeviceConnector</h2>
+
<span style="font-size:150%;">'''Class BfbDeviceConnector'''</span>
</div>
+
 
<div class="contentContainer">
+
==Related Classes==
<ul class="inheritance">
+
 
 +
ru.neurotech.neurodevices.bfb.[[BfbDevice Class|BfbDevice]]
 +
 
 +
ru.neurotech.neurodevices.bfb.[[BfbIndex Class|BfbIndex]]
 +
 
 +
==Classes hierarchy==
 +
<ul>
 
<li>java.lang.Object</li>
 
<li>java.lang.Object</li>
<li>
+
 
<ul class="inheritance">
+
<ul>
<li>ru.neurotech.neurodevices.bfb.BfbDeviceConnector</li>
+
<li>ru.neurotech.neurodevices.bfb.'''BfbDeviceConnector'''</li>
 
</ul>
 
</ul>
</li>
 
 
</ul>
 
</ul>
<div class="description">
+
 
<ul class="blockList">
+
==Class definition==
<li class="blockList">
+
<code><span style="color:#0066FF;">'''public class'''</span> BfbDeviceConnector <span style="color:#0066FF;">'''extends'''</span> java.lang.Object</code>
<hr>
+
 
<br>
+
==Fields Summary==
<pre>public class <span class="typeNameLabel">BfbDeviceConnector</span>
+
{| class="wikitable"
extends java.lang.Object</pre>
+
|- style="background-color: #dee3e9;"
</li>
+
|'''Modifier and Type'''
</ul>
+
|'''Field and Description'''
</div>
+
|- valign="top"
<div class="summary">
+
|[[SubscribersNotifier Class|SubscribersNotifier]]&lt;[[BfbDevice Class|BfbDevice]]&gt;
<ul class="blockList">
+
|[[#deviceFound|deviceFound]]
<li class="blockList">
+
Notifies when proper Callibri BFB device been found and initialized
<!-- =========== FIELD SUMMARY =========== -->
+
|-  valign="top"
<ul class="blockList">
+
|[[SubscribersNotifier Class|SubscribersNotifier]]&lt;java.lang.Boolean&gt;
<li class="blockList"><a name="field.summary">
+
|[[#scanStateChanged|scanStateChanged]]
<!--  -->
+
Notifies about changing device scanning state
</a>
+
|}
<h3>Field Summary</h3>
+
 
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
+
==Constructor Summary==
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
+
{| class="wikitable"
<tr>
+
|- style="background-color: #dee3e9;"
<th class="colFirst" scope="col">Modifier and Type</th>
+
|'''Constructor and Description'''
<th class="colLast" scope="col">Field and Description</th>
+
|-
</tr>
+
|[[#BfbDeviceConnector|BfbDeviceConnector]](android.content.Context context)
<tr class="altColor">
+
Creates new instance of BfbDeviceConnector class with current application context
<td class="colFirst"><code>ru.neurotech.common.SubscribersNotifier&lt;<a href="../../../../ru/neurotech/neurodevices/bfb/BfbDevice.html" title="class in ru.neurotech.neurodevices.bfb">BfbDevice</a>&gt;</code></td>
+
|}
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#deviceFound">deviceFound</a></span></code>
+
 
<div class="block">Notifies when proper Callibri BFB device been found and initialized</div>
+
==Methods Summary==
</td>
+
{| class="wikitable"
</tr>
+
|- style="background-color: #dee3e9;"
<tr class="rowColor">
+
|'''Modifier and Type'''
<td class="colFirst"><code>ru.neurotech.common.SubscribersNotifier&lt;java.lang.Boolean&gt;</code></td>
+
|'''Method and Description'''
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#scanStateChanged">scanStateChanged</a></span></code>
+
|- valign="top"
<div class="block">Notifies about changing device scanning state</div>
+
|[[BfbDevice Class|BfbDevice]]
</td>
+
|[[#getDeviceByAddress|getDeviceByAddress]](java.lang.String address)
</tr>
+
Returns object, representing device with specified address
</table>
+
It is not guaranteed, that this device is currently available
</li>
+
|- valign="top"
</ul>
+
|style="color:#0066FF;" |'''void'''
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
+
|[[#shutdown|shutdown]]()
<ul class="blockList">
+
Ends all operations with device searching and frees all resources.
<li class="blockList"><a name="constructor.summary">
+
|- valign="top"
<!--  -->
+
|style="color:#0066FF;" |'''void'''
</a>
+
|[[#startScan|startScan]](<span style="color:#0066FF;">'''int'''</span> timeout)
<h3>Constructor Summary</h3>
+
Starts searching for Callibri devices suitable for Biofeedback trainings
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
+
|- valign="top"
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
+
|style="color:#0066FF;" |'''void'''
<tr>
+
|[[#stopScan|stopScan]]
<th class="colOne" scope="col">Constructor and Description</th>
+
Stops device searching
</tr>
+
|}
<tr class="altColor">
+
 
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#BfbDeviceConnector-android.content.Context-">BfbDeviceConnector</a></span>(android.content.Context&nbsp;context)</code>
+
==Field Detail==
<div class="block">Creates new instance of BfbDeviceConnector class with current application context</div>
+
<h3>deviceFound</h3>
</td>
+
<code><span style="color:#0066FF;">'''public final'''</span> [[SubscribersNotifier Class|SubscribersNotifier]]&lt;[[BfbDevice Class|BfbDevice]]&gt; deviceFound</code>
</tr>
+
 
</table>
+
Notifies when proper Callibri Bfb device been found and initialized
</li>
+
 
</ul>
+
<h3>scanStateChanged</h3>
<!-- ========== METHOD SUMMARY =========== -->
+
<code><span style="color:#0066FF;">'''public final'''</span> [[SubscribersNotifier Class|SubscribersNotifier]]&lt;java.lang.Boolean&gt; scanStateChanged</code>
<ul class="blockList">
+
 
<li class="blockList"><a name="method.summary">
+
Notifies about changing device scanning state
<!--  -->
+
 
</a>
+
==Constructor Detail==
<h3>Method Summary</h3>
+
 
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
+
<h3>BfbDeviceConnector</h3>
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
+
<code><span style="color:#0066FF;">'''public'''</span> BfbDeviceConnector(android.content.Context&nbsp;context)</code>
<tr>
+
 
<th class="colFirst" scope="col">Modifier and Type</th>
+
Creates new instance of BfbDeviceConnector class with current application context
<th class="colLast" scope="col">Method and Description</th>
+
 
</tr>
+
==Method Detail==
<tr id="i0" class="altColor">
+
 
<td class="colFirst"><code><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDevice.html" title="class in ru.neurotech.neurodevices.bfb">BfbDevice</a></code></td>
+
<h3>startScan</h3>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#getDeviceByAddress-java.lang.String-">getDeviceByAddress</a></span>(java.lang.String&nbsp;address)</code>
+
<code><span style="color:#0066FF;">'''public void'''</span> startScan(int&nbsp;timeout)</code>
<div class="block">Returns object, representing device with specified address
+
 
It is not guaranteed, that this device is currently available</div>
+
Starts searching for Callibri devices suitable for biofeedback trainings
</td>
 
</tr>
 
<tr id="i1" class="rowColor">
 
<td class="colFirst"><code>void</code></td>
 
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#shutdown--">shutdown</a></span>()</code>
 
<div class="block">Ends all operations with device searching and frees all resources</div>
 
</td>
 
</tr>
 
<tr id="i2" class="altColor">
 
<td class="colFirst"><code>void</code></td>
 
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#startScan-int-">startScan</a></span>(int&nbsp;timeout)</code>
 
<div class="block">Starts searching for Callibri devices suitable for BFB trainings</div>
 
</td>
 
</tr>
 
<tr id="i3" class="rowColor">
 
<td class="colFirst"><code>void</code></td>
 
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/bfb/BfbDeviceConnector.html#stopScan--">stopScan</a></span>()</code>
 
<div class="block">Stops device searching</div>
 
</td>
 
</tr>
 
</table>
 
<ul class="blockList">
 
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
 
<!--  -->
 
</a>
 
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
 
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
 
</ul>
 
</li>
 
</ul>
 
</li>
 
</ul>
 
</div>
 
<div class="details">
 
<ul class="blockList">
 
<li class="blockList">
 
<!-- ============ FIELD DETAIL =========== -->
 
<ul class="blockList">
 
<li class="blockList"><a name="field.detail">
 
<!--  -->
 
</a>
 
<h3>Field Detail</h3>
 
<a name="deviceFound">
 
<!--  -->
 
</a>
 
<ul class="blockList">
 
<li class="blockList">
 
<h4>deviceFound</h4>
 
<pre>public final&nbsp;ru.neurotech.common.SubscribersNotifier&lt;<a href="../../../../ru/neurotech/neurodevices/bfb/BfbDevice.html" title="class in ru.neurotech.neurodevices.bfb">BfbDevice</a>&gt; deviceFound</pre>
 
<div class="block">Notifies when proper Callibri BFB device been found and initialized</div>
 
</li>
 
</ul>
 
<a name="scanStateChanged">
 
<!--  -->
 
</a>
 
<ul class="blockListLast">
 
<li class="blockList">
 
<h4>scanStateChanged</h4>
 
<pre>public final&nbsp;ru.neurotech.common.SubscribersNotifier&lt;java.lang.Boolean&gt; scanStateChanged</pre>
 
<div class="block">Notifies about changing device scanning state</div>
 
</li>
 
</ul>
 
</li>
 
</ul>
 
<!-- ========= CONSTRUCTOR DETAIL ======== -->
 
<ul class="blockList">
 
<li class="blockList"><a name="constructor.detail">
 
<!--  -->
 
</a>
 
<h3>Constructor Detail</h3>
 
<a name="BfbDeviceConnector-android.content.Context-">
 
<!--  -->
 
</a>
 
<ul class="blockListLast">
 
<li class="blockList">
 
<h4>BfbDeviceConnector</h4>
 
<pre>public&nbsp;BfbDeviceConnector(android.content.Context&nbsp;context)</pre>
 
<div class="block">Creates new instance of BfbDeviceConnector class with current application context</div>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dd><code>context</code> - Application context</dd>
 
</dl>
 
</li>
 
</ul>
 
</li>
 
</ul>
 
<!-- ============ METHOD DETAIL ========== -->
 
<ul class="blockList">
 
<li class="blockList"><a name="method.detail">
 
<!--  -->
 
</a>
 
<h3>Method Detail</h3>
 
<a name="startScan-int-">
 
<!--  -->
 
</a>
 
<ul class="blockList">
 
<li class="blockList">
 
<h4>startScan</h4>
 
<pre>public&nbsp;void&nbsp;startScan(int&nbsp;timeout)</pre>
 
<div class="block">Starts searching for Callibri devices suitable for BFB trainings</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dd><code>timeout</code> - Scan time. Zero for infinity</dd>
 
<dd><code>timeout</code> - Scan time. Zero for infinity</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
<h3>stopScan</h3>
<a name="stopScan--">
+
<code><span style="color:#0066FF;">'''public void'''</span> stopScan()</code>
<!--  -->
+
 
</a>
+
Stops device searching
<ul class="blockList">
+
 
<li class="blockList">
+
<h3>shutdown</h3>
<h4>stopScan</h4>
+
<code><span style="color:#0066FF;">'''public void'''</span> shutdown()</code>
<pre>public&nbsp;void&nbsp;stopScan()</pre>
+
 
<div class="block">Stops device searching</div>
+
Ends all operations with device searching and frees all resources
</li>
+
 
</ul>
+
<h3>getDeviceByAddress</h3>
<a name="shutdown--">
+
<code><span style="color:#0066FF;">'''public'''</span> [[BfbDevice Class|BfbDevice]] getDeviceByAddress(java.lang.String address)</code>
<!--  -->
+
 
</a>
+
Returns object, representing device with specified address
<ul class="blockList">
+
It is not guaranteed, that this device is currently available
<li class="blockList">
 
<h4>shutdown</h4>
 
<pre>public&nbsp;void&nbsp;shutdown()</pre>
 
<div class="block">Ends all operations with device searching and frees all resources</div>
 
</li>
 
</ul>
 
<a name="getDeviceByAddress-java.lang.String-">
 
<!--  -->
 
</a>
 
<ul class="blockListLast">
 
<li class="blockList">
 
<h4>getDeviceByAddress</h4>
 
<pre>public&nbsp;<a href="../../../../ru/neurotech/neurodevices/bfb/BfbDevice.html" title="class in ru.neurotech.neurodevices.bfb">BfbDevice</a>&nbsp;getDeviceByAddress(java.lang.String&nbsp;address)</pre>
 
<div class="block">Returns object, representing device with specified address
 
It is not guaranteed, that this device is currently available</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dd><code>address</code> - BTLE device address</dd>
 
<dd><code>address</code> - BTLE device address</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
<dd>BfbDevice object</dd>
+
<dd>[[BfbDevice Class|BfbDevice]] object</dd>
 
</dl>
 
</dl>
</li>
 
</ul>
 
</li>
 
</ul>
 
</li>
 
</ul>
 
</div>
 
</div>
 
<!-- ========= END OF CLASS DATA ========= -->
 

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