Difference between revisions of "NeuroDevice Class"

From Neurotech Software Development Kit
Jump to: navigation, search
(Related Classes)
(Android)
Line 55: Line 55:
 
|}
 
|}
  
<!-- ========== METHOD SUMMARY =========== -->
+
==Methods Summary==
<ul class="blockList">
+
{| class="wikitable"
<li class="blockList"><a name="method.summary">
+
|- style="background-color: #dee3e9;"
<!--  -->
+
|'''Modifier and Type'''
</a>
+
|'''Method and Description'''
<h3>Method Summary</h3>
+
|- valign="top"
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
+
|style="color:#0066FF;" |'''void'''
<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>
+
|[[#close|close]]()
<tr>
+
Close device and free all resources
<th class="colFirst" scope="col">Modifier and Type</th>
+
|- valign="top"
<th class="colLast" scope="col">Method and Description</th>
+
|style="color:#0066FF;" |'''void'''
</tr>
+
|[[#connect|connect]]()
<tr id="i0" class="altColor">
+
Establishes connection with device services
<td class="colFirst"><code>void</code></td>
+
|- valign="top"
<td class="colLast"><code><span class="memberNameLink"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#close--">close</a></span>()</code>
+
|style="color:#0066FF;" |'''void'''
<div class="block">Close device and free all resources</div>
+
|[[#disconnect|disconnect]]()
</td>
+
Disconnects from device
</tr>
+
|- valign="top"
<tr id="i1" class="rowColor">
+
|style="color:#0066FF;" |'''void'''
<td class="colFirst"><code>void</code></td>
+
|[[#finalize|finalize]]()
<td class="colLast"><code><span class="memberNameLink"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#connect--">connect</a></span>()</code>
+
|- valign="top"
<div class="block">Establishes connection with device services</div>
+
|java.lang.String
</td>
+
|[[#getAddress|getAddress]]()
</tr>
+
Returns Bluetooth LE MAC address
<tr id="i2" class="altColor">
+
|- valign="top"
<td class="colFirst"><code>void</code></td>
+
|style="color:#0066FF;" |'''int'''
<td class="colLast"><code><span class="memberNameLink"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#disconnect--">disconnect</a></span>()</code>
+
|[[#getBatteryLevel|getBatteryLevel]]()
<div class="block">Disconnect from device</div>
+
Returns battery charge level in percents
</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/NeuroDevice.html#finalize--">finalize</a></span>()</code>&nbsp;</td>
 
</tr>
 
<tr id="i4" class="altColor">
 
<td class="colFirst"><code>java.lang.String</code></td>
 
<td class="colLast"><code><span class="memberNameLink"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getAddress--">getAddress</a></span>()</code>
 
<div class="block">Returns Bluetooth LE MAC address</div>
 
</td>
 
</tr>
 
<tr id="i5" class="rowColor">
 
<td class="colFirst"><code>int</code></td>
 
<td class="colLast"><code><span class="memberNameLink"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getBatteryLevel--">getBatteryLevel</a></span>()</code>
 
<div class="block">Returns battery state</div>
 
</td>
 
</tr>
 
 
<tr id="i6" class="altColor">
 
<tr id="i6" class="altColor">
 
<td class="colFirst"><code><a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceError.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceError</a></code></td>
 
<td class="colFirst"><code><a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceError.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceError</a></code></td>

Revision as of 10:46, 8 August 2017

Android

ru.neurotech.neurodevices

Class NeuroDevice

Related Classes

ru.neurotech.neurodevices.NeuroConnection

ru.neurotech.neurodevices.DeviceFeature

ru.neurotech.neurodevices.state.NeuroDeviceError

ru.neurotech.neurodevices.state.NeuroDeviceState

Classes hierarchy

  • java.lang.Object

Class definition

public class NeuroDevice extends VisualizableDevice

Represents Neurotech™ device on a layer of algorithmic functionality

Provides signal and misc channels and methods for signal processing and viewing</div>


Fields Summary

Modifier and Type Field and Description
SubscribersNotifier<NeuroDeviceState> deviceStateChanged

Subscribe this event to get notifications about device state

Constructor Summary

Constructor and Description
NeuroDevice(long nativeObjPtr)

Methods Summary

Modifier and Type Method and Description
void close()

Close device and free all resources

void connect()

Establishes connection with device services

void disconnect()

Disconnects from device

void finalize()
java.lang.String getAddress()

Returns Bluetooth LE MAC address

int getBatteryLevel()

Returns battery charge level in percents <tr id="i6" class="altColor"> <td class="colFirst"><a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceError.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceError</a></td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getError--">getError</a>()

Returns device error state information

</td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><a href="../../../ru/neurotech/neurodevices/DeviceFeature.html" title="enum in ru.neurotech.neurodevices">DeviceFeature</a>[]</td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getFeatures--">getFeatures</a>()

Returns supported device features

</td> </tr> <tr id="i8" class="altColor"> <td class="colFirst">java.lang.String</td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getName--">getName</a>()

Returns name of BLE device

</td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html" title="class in ru.neurotech.neurodevices">NeuroDevice</a></td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getNeuroDevice--">getNeuroDevice</a>()

Returns physical device object which this visual device represents

</td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><a href="../../../ru/neurotech/neurodevices/features/SignalSubsystem.html" title="class in ru.neurotech.neurodevices.features">SignalSubsystem</a></td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getSignalSubsystem--">getSignalSubsystem</a>()

Returns subsystem for SIGNAL device feature

</td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceState.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceState</a></td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getState--">getState</a>()

Returns common device state.

</td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><a href="../../../ru/neurotech/neurodevices/features/StimulationSubsystem.html" title="class in ru.neurotech.neurodevices.features">StimulationSubsystem</a></td> <td class="colLast"><a href="../../../ru/neurotech/neurodevices/NeuroDevice.html#getStimulationSubsystem--">getStimulationSubsystem</a>() </td> </tr> </table>

  • <a name="methods.inherited.from.class.java.lang.Object"> </a>

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

</li> </ul> </li> </ul> </div>

    • <a name="field.detail"> </a>

      Field Detail

      <a name="deviceStateChanged"> </a>

      • deviceStateChanged

        public <a href="../../../ru/neurotech/common/SubscribersNotifier.html" title="class in ru.neurotech.common">SubscribersNotifier</a><<a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceState.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceState</a>> deviceStateChanged
        Subscribe this event to get notifications about device state
    • <a name="constructor.detail"> </a>

      Constructor Detail

      <a name="NeuroDevice-long-"> </a>

      • NeuroDevice

        public NeuroDevice(long nativeObjPtr)
    • <a name="method.detail"> </a>

      Method Detail

      <a name="finalize--"> </a>

      • finalize

        public void finalize()
                      throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable

      <a name="close--"> </a>

      • close

        public void close()
        Close device and free all resources

      <a name="getState--"> </a>

      • getState

        public <a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceState.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceState</a> getState()
        Returns common device state. To get error info call getError method
        Returns:
        device state

      <a name="getError--"> </a>

      • getError

        public <a href="../../../ru/neurotech/neurodevices/state/NeuroDeviceError.html" title="enum in ru.neurotech.neurodevices.state">NeuroDeviceError</a> getError()
        Returns device error state information
        Returns:
        error type

      <a name="getName--"> </a>

      • getName

        public java.lang.String getName()
        Returns name of BLE device
        Specified by:
        <a href="../../../ru/neurotech/common/VisualizableDevice.html#getName--">getName</a> in class <a href="../../../ru/neurotech/common/VisualizableDevice.html" title="class in ru.neurotech.common">VisualizableDevice</a>
        Returns:
        BLE device name

      <a name="getAddress--"> </a>

      • getAddress

        public java.lang.String getAddress()
        Description copied from class: <a href="../../../ru/neurotech/common/VisualizableDevice.html#getAddress--">VisualizableDevice</a>
        Returns Bluetooth LE MAC address
        Specified by:
        <a href="../../../ru/neurotech/common/VisualizableDevice.html#getAddress--">getAddress</a> in class <a href="../../../ru/neurotech/common/VisualizableDevice.html" title="class in ru.neurotech.common">VisualizableDevice</a>
        Returns:
        device unique address

      <a name="getBatteryLevel--"> </a>

      • getBatteryLevel

        public int getBatteryLevel()
        Returns battery state
        Specified by:
        <a href="../../../ru/neurotech/common/VisualizableDevice.html#getBatteryLevel--">getBatteryLevel</a> in class <a href="../../../ru/neurotech/common/VisualizableDevice.html" title="class in ru.neurotech.common">VisualizableDevice</a>
        Returns:
        battery charge level in percents

      <a name="getNeuroDevice--"> </a>

      • getNeuroDevice

        public <a href="../../../ru/neurotech/neurodevices/NeuroDevice.html" title="class in ru.neurotech.neurodevices">NeuroDevice</a> getNeuroDevice()
        Description copied from class: <a href="../../../ru/neurotech/common/VisualizableDevice.html#getNeuroDevice--">VisualizableDevice</a>
        Returns physical device object which this visual device represents
        Specified by:
        <a href="../../../ru/neurotech/common/VisualizableDevice.html#getNeuroDevice--">getNeuroDevice</a> in class <a href="../../../ru/neurotech/common/VisualizableDevice.html" title="class in ru.neurotech.common">VisualizableDevice</a>
        Returns:
        NeuroDevice of current visual device

      <a name="getSignalSubsystem--"> </a>

      • getSignalSubsystem

        public <a href="../../../ru/neurotech/neurodevices/features/SignalSubsystem.html" title="class in ru.neurotech.neurodevices.features">SignalSubsystem</a> getSignalSubsystem()
        Returns subsystem for SIGNAL device feature
        Returns:
        Signal subsystem of device. Null if is not supported

      <a name="getStimulationSubsystem--"> </a>

      • getStimulationSubsystem

        public <a href="../../../ru/neurotech/neurodevices/features/StimulationSubsystem.html" title="class in ru.neurotech.neurodevices.features">StimulationSubsystem</a> getStimulationSubsystem()

      <a name="getFeatures--"> </a>

      • getFeatures

        public <a href="../../../ru/neurotech/neurodevices/DeviceFeature.html" title="enum in ru.neurotech.neurodevices">DeviceFeature</a>[] getFeatures()
        Returns supported device features
        Returns:
        device feature

      <a name="connect--"> </a>

      • connect

        public void connect()
        Establishes connection with device services

      <a name="disconnect--"> </a>

      • disconnect

        public void disconnect()
        Disconnect from device

</div>