Difference between revisions of "BfbDeviceConnector Class"
NateColeman (talk | contribs) (→Android) |
NateColeman (talk | contribs) (→Android) |
||
Line 38: | Line 38: | ||
|} | |} | ||
− | + | ==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]]<[[BfbDevice Class|BfbDevice]]> 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]]<java.lang.Boolean> scanStateChanged</code> | |
− | + | ||
− | + | Notifies about changing device scanning state | |
− | + | ||
− | + | ==Constructor Detail== | |
− | + | ||
− | + | <h3>BfbDeviceConnector</h3> | |
− | + | <code><span style="color:#0066FF;">'''public'''</span> BfbDeviceConnector(android.content.Context 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 timeout)</code> | |
− | + | ||
− | + | Starts searching for Callibri devices suitable for biofeedback trainings | |
− | |||
− | |||
− | |||
− | |||
− | <h3> | ||
− | <code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | </ | ||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <h3> | ||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <h3> | ||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<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> | ||
− | + | ||
− | < | + | <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> [[EcgDevice Class|EcgDevice]] getDeviceByAddress(java.lang.String address)</code> | |
− | + | ||
− | </ | + | Returns object, representing device with specified address |
− | < | + | It is not guaranteed, that this device is currently available |
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | |||
− | </ | ||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
<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> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 04:26, 9 August 2017
Contents
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 EcgDevice 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