Difference between revisions of "NeuroDevice Class"
NateColeman (talk | contribs) (→Android) |
NateColeman (talk | contribs) (→Method Detail) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 113: | Line 113: | ||
|} | |} | ||
− | + | ==Field Detail== | |
− | + | <h3>deviceStateChanged</h3> | |
− | + | <code><span style="color:#0066FF;">'''public final'''</span> [[SubscribersNotifier Class|SubscribersNotifier]]<[[NeuroDeviceState Enumeration|NeuroDeviceState]]> deviceStateChanged</code> | |
− | + | ||
− | + | Subscribe this event to get notifications about device state | |
− | <h3> | + | |
− | < | + | ==Constructor Detail== |
− | + | ||
− | < | + | <h3>NeuroDevice</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> NeuroDevice(<span style="color:#0066FF;">'''long'''</span> nativeObjPtr)</code> | |
− | + | ||
− | + | ==Method Detail== | |
− | + | ||
− | + | <h3>finalize</h3> | |
− | + | <code><span style="color:#0066FF;">'''public void'''</span> finalize() <span style="color:#0066FF;">throws</span> java.lang.Throwable</code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | </ | ||
− | < | ||
− | |||
− | |||
− | </ | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | ||
− | |||
− | </ | ||
− | < | ||
− | < | ||
− | |||
− | </ | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
<dl> | <dl> | ||
− | <dt | + | <dt>Overrides:</dt> |
<dd><code>finalize</code> in class <code>java.lang.Object</code></dd> | <dd><code>finalize</code> in class <code>java.lang.Object</code></dd> | ||
− | <dt | + | <dt>Throws:</dt> |
<dd><code>java.lang.Throwable</code></dd> | <dd><code>java.lang.Throwable</code></dd> | ||
</dl> | </dl> | ||
− | + | ||
− | < | + | |
− | + | <h3>close</h3> | |
− | + | <code><span style="color:#0066FF;">'''public void'''</span> close()</code> | |
− | </ | + | |
− | < | + | |
− | < | + | <h3>getState</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> [[NeuroDeviceState Enumeration|NeuroDeviceState]] getState()</code> | |
− | + | ||
− | + | Returns NeuroDevice state | |
− | |||
− | < | ||
− | |||
− | |||
− | </ | ||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
<dl> | <dl> | ||
− | <dt><span | + | <dt><span>Returns:</span></dt> |
− | <dd> | + | <dd>Device state</dd> |
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>getError</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> [[NeuroDeviceError Enumeration|NeuroDeviceError]] getError()</code> | |
− | + | ||
− | </ | + | Returns error type if device is in error state |
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
<dl> | <dl> | ||
− | <dt><span | + | <dt><span>Returns:</span></dt> |
− | <dd>error | + | <dd>Error type for device error state</dd> |
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>getName</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> java.lang.String getName()</code> | |
− | + | ||
− | </ | + | <span>'''Description copied from class: '''</span>[[VisualizableDevice Class#getName|VisualizableDevice]] |
− | < | + | |
− | < | + | Returns name of BLE device |
− | |||
− | |||
− | < | ||
<dl> | <dl> | ||
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | ||
− | <dd><code> | + | <dd><code>[[VisualizableDevice Class#getName|VisualizableDevice.getName()]]</code> in class VisualizableDevice</dd> |
− | <dt><span | + | <dt><span>Returns:</span></dt> |
<dd>BLE device name</dd> | <dd>BLE device name</dd> | ||
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>getAddress</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> java.lang.String getAddress()</code> | |
− | + | ||
− | </ | + | <span>'''Description copied from class:''' [[VisualizableDevice Class|VisualizableDevice]]</span> |
− | < | + | |
− | < | + | <div class="block">Returns Bluetooth LE MAC address |
− | |||
− | |||
− | |||
− | <div class="block">Returns Bluetooth LE MAC address | ||
<dl> | <dl> | ||
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | ||
− | <dd><code> | + | <dd><code>[[VisualizableDevice Class#getDeviceAddress|VisualizableDevice.getAddress()]]</code> in class VisualizableDevice</dd> |
− | <dt><span | + | <dt><span>Returns:</span></dt> |
<dd>device unique address</dd> | <dd>device unique address</dd> | ||
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>getBatteryLevel</h3> |
− | + | <code><span style="color:#0066FF;">'''public int'''</span> getBatteryLevel()</code> | |
− | + | ||
− | </ | + | <span>'''Description copied from class:''' [[VisualizableDevice Class|VisualizableDevice]]</span> |
− | < | + | |
− | < | + | Returns battery state |
− | < | + | |
− | < | ||
− | |||
<dl> | <dl> | ||
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | ||
− | <dd><code> | + | <dd><code>[[VisualizableDevice Class#getBatteryLevel|VisualizableDevice.getBatteryLevel()]]</code> in class VisualizableDevice</dd> |
<dt><span class="returnLabel">Returns:</span></dt> | <dt><span class="returnLabel">Returns:</span></dt> | ||
<dd>battery charge level in percents</dd> | <dd>battery charge level in percents</dd> | ||
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>getNeuroDevice</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> [[NeuroDevice Class|NeuroDevice]] getNeuroDevice()</code> | |
− | + | ||
− | </ | + | <span>'''Description copied from class:''' [[VisualizableDevice Class|VisualizableDevice]]</span> |
− | < | + | Returns this object. This method is for comapatability with VisualizableDevice class interface, inherited to use NeuroDevice in scopes where VisualizableDevice is needed |
− | < | ||
− | |||
− | |||
− | |||
− | |||
<dl> | <dl> | ||
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> | ||
− | <dd><code> | + | <dd><code>[[VisualizableDevice Class#getNeuroDevice|VisualizableDevice.getNeuroDevice()]]</code> in class VisualizableDevice</dd> |
<dt><span class="returnLabel">Returns:</span></dt> | <dt><span class="returnLabel">Returns:</span></dt> | ||
− | <dd>NeuroDevice | + | <dd>This NeuroDevice object</dd> |
</dl> | </dl> | ||
− | + | ||
− | < | + | |
− | + | <h3>getSignalSubsystem</h3> | |
− | + | <code><span style="color:#0066FF;">'''public'''</span> [[SignalSubsystem Class|SignalSubsystem]] getSignalSubsystem()</code> | |
− | </ | + | |
− | < | + | Returns subsystem for SIGNAL device feature |
− | < | + | |
− | |||
− | |||
− | |||
<dl> | <dl> | ||
<dt><span class="returnLabel">Returns:</span></dt> | <dt><span class="returnLabel">Returns:</span></dt> | ||
<dd>Signal subsystem of device. Null if is not supported</dd> | <dd>Signal subsystem of device. Null if is not supported</dd> | ||
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>getStimulationSubsystem</h3> |
− | + | <code><span style="color:#0066FF;">'''public'''</span> [[StimulationSubsystem Class|StimulationSubsystem]] getStimulationSubsystem()</code> | |
− | + | ||
− | </ | + | Returns subsystem for STIMUL device feature |
− | < | + | |
− | < | + | <dl> |
− | + | <dt><span class="returnLabel">Returns:</span></dt> | |
− | + | <dd>Stimulation subsystem of device. Null if is not supported</dd> | |
− | < | + | </dl> |
− | < | + | |
− | < | + | <h3>getFeatures</h3> |
− | < | + | <code><span style="color:#0066FF;">'''public'''</span> [[DeviceFeature Enumeration|DeviceFeature]][] getFeatures()</code> |
− | </ | + | |
− | < | + | Returns supported device features |
− | < | + | |
− | < | ||
− | < | ||
− | |||
<dl> | <dl> | ||
<dt><span class="returnLabel">Returns:</span></dt> | <dt><span class="returnLabel">Returns:</span></dt> | ||
− | <dd> | + | <dd>Device features</dd> |
</dl> | </dl> | ||
− | + | ||
− | < | + | <h3>connect</h3> |
− | + | <code><span style="color:#0066FF;">'''public void'''</span> connect()</code> | |
− | + | ||
− | </ | + | Establishes connection with device services |
− | < | + | |
− | < | + | <h3>disconnect</h3> |
− | + | <code><span style="color:#0066FF;">'''public void'''</span> disconnect()</code> | |
− | + | ||
− | + | Disconnects from device | |
− | |||
− | < | ||
− | |||
− | |||
− | </ | ||
− | < | ||
− | < | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 06:23, 9 August 2017
Contents
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
- ru.neurotech.common.VisualizableDevice
- ru.neurotech.neurodevices.NeuroDevice
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 |
NeuroDeviceError | getError()
Returns device error state information |
DeviceFeature[] | getFeature()
Returns supported device features |
java.lang.String | getName()
Returns name of BLE device |
NeuroDevice | getNeuroDevice()
Returns this object |
SignalSubsystem | getSignalSubsystem()
Returns subsystem for SIGNAL device feature |
NeuroDeviceState | getState()
Returns common device state |
StimulationSubsystem | getStimulationSubsystem()
Returns subsystem for STIMUL device feature |
Field Detail
deviceStateChanged
public final SubscribersNotifier<NeuroDeviceState> deviceStateChanged
Subscribe this event to get notifications about device state
Constructor Detail
NeuroDevice
public NeuroDevice(long nativeObjPtr)
Method Detail
finalize
public void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
close
public void close()
getState
public NeuroDeviceState getState()
Returns NeuroDevice state
- Returns:
- Device state
getError
public NeuroDeviceError getError()
Returns error type if device is in error state
- Returns:
- Error type for device error state
getName
public java.lang.String getName()
Description copied from class: VisualizableDevice
Returns name of BLE device
- Specified by:
VisualizableDevice.getName()
in class VisualizableDevice- Returns:
- BLE device name
getAddress
public java.lang.String getAddress()
Description copied from class: VisualizableDevice
- Specified by:
VisualizableDevice.getAddress()
in class VisualizableDevice- Returns:
- device unique address
getBatteryLevel
public int getBatteryLevel()
Description copied from class: VisualizableDevice
Returns battery state
- Specified by:
VisualizableDevice.getBatteryLevel()
in class VisualizableDevice- Returns:
- battery charge level in percents
getNeuroDevice
public NeuroDevice getNeuroDevice()
Description copied from class: VisualizableDevice Returns this object. This method is for comapatability with VisualizableDevice class interface, inherited to use NeuroDevice in scopes where VisualizableDevice is needed
- Specified by:
VisualizableDevice.getNeuroDevice()
in class VisualizableDevice- Returns:
- This NeuroDevice object
getSignalSubsystem
public SignalSubsystem getSignalSubsystem()
Returns subsystem for SIGNAL device feature
- Returns:
- Signal subsystem of device. Null if is not supported
getStimulationSubsystem
public StimulationSubsystem getStimulationSubsystem()
Returns subsystem for STIMUL device feature
- Returns:
- Stimulation subsystem of device. Null if is not supported
getFeatures
public DeviceFeature[] getFeatures()
Returns supported device features
- Returns:
- Device features
connect
public void connect()
Establishes connection with device services
disconnect
public void disconnect()