Difference between revisions of "EcgDevice Class"

From Neurotech Software Development Kit
Jump to: navigation, search
(Method Detail)
(Related Classes)
 
(17 intermediate revisions by the same user not shown)
Line 12: Line 12:
  
 
ru.neurotech.neurodevices.ecg.[[RPeak Class|RPeak]]
 
ru.neurotech.neurodevices.ecg.[[RPeak Class|RPeak]]
 +
 +
ru.neurotech.neurodevices.[[NeuroDevice Class|NeuroDevice]]
  
 
==Classes hierarchy==
 
==Classes hierarchy==
Line 36: Line 38:
 
|- valign="top"
 
|- valign="top"
 
|[[SubscribersNotifier Class|SubscribersNotifier]]<java.lang.'''Boolean'''>
 
|[[SubscribersNotifier Class|SubscribersNotifier]]<java.lang.'''Boolean'''>
|[[#electrodesAttachedStateChanged|electrodesAttachedStateChanged]]
+
|[[#electrodesAttachedStateChanged|'''electrodesAttachedStateChanged''']]
 
Notifies when electrodes are attached or detached
 
Notifies when electrodes are attached or detached
 
To get electrodes state manually use getElectrodesState
 
To get electrodes state manually use getElectrodesState
Line 55: Line 57:
  
 
==Constructor Summary==
 
==Constructor Summary==
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
+
{| class="wikitable"
<tr>
+
|- style="background-color: #dee3e9;"
<th class="colOne" scope="col">Constructor and Description</th>
+
|'''Constructor and Description'''
</tr>
+
|-
<tr class="altColor">
+
|[[#EcgDevice|EcgDevice]](<span style="color:#0066FF;">'''long'''</span> nativeObjPtr)
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../ru/neurotech/neurodevices/ecg/EcgDevice.html#EcgDevice-long-">EcgDevice</a></span>(long&nbsp;nativeObjPtr)</code>&nbsp;</td>
+
|}
</tr>
 
</table>
 
 
 
  
 
==Methods Summary==
 
==Methods Summary==
Line 129: Line 128:
 
Returns name of BLE device
 
Returns name of BLE device
 
|- valign="top"
 
|- valign="top"
|style="color:#0066FF;" |[[NeuroDevice Class|NeuroDevice]]
+
|style="color:#0066FF;" |[[NeuroDevice Class#Android|NeuroDevice]]
 
|[[#getNeuroDevice|getNeuroDevice]]()
 
|[[#getNeuroDevice|getNeuroDevice]]()
 
Returns physical device object which this visual device represents
 
Returns physical device object which this visual device represents
 
|- valign="top"
 
|- valign="top"
|style="color:#0066FF;" |[[RPeak Class|RPeak]][]
+
|[[RPeak Class#Android|RPeak]][]
 
|[[#getRWavesOnInterval|getRWavesOnInterval]](<span style="color:#0066FF;">'''double'''</span> startTime, <span style="color:#0066FF;">'''double'''</span> endTime)
 
|[[#getRWavesOnInterval|getRWavesOnInterval]](<span style="color:#0066FF;">'''double'''</span> startTime, <span style="color:#0066FF;">'''double'''</span> endTime)
 
Detects R-waves in signal for specified time interval
 
Detects R-waves in signal for specified time interval
Line 179: Line 178:
  
 
<h3>finalize</h3>
 
<h3>finalize</h3>
<code>'''public void''' finalize() throws java.lang.Throwable</code>
+
<code><span style="color:#0066FF;">'''public void'''</span> finalize() <span style="color:#0066FF;">throws</span> java.lang.Throwable</code>
 
<dl>
 
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
+
<dt>Overrides:</dt>
 
<dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
 
<dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
+
<dt>Throws:</dt>
 
<dd><code>java.lang.Throwable</code></dd>
 
<dd><code>java.lang.Throwable</code></dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="close--">
+
<h3>close</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public void'''</span> close()</code>
</a>
+
 
<ul class="blockList">
+
 
<li class="blockList">
+
<h3>getName</h3>
<h4>close</h4>
+
<code><span style="color:#0066FF;">'''public'''</span> java.lang.String getName()</code>
<pre>public&nbsp;void&nbsp;close()</pre>
+
 
</li>
+
<span>'''Description copied from class: '''</span>[[VisualizableDevice Class#getName|VisualizableDevice]]
</ul>
+
 
<a name="getName--">
+
Returns name of BLE device
<!--  -->
 
</a>
 
<ul class="blockList">
 
<li class="blockList">
 
<h4>getName</h4>
 
<pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
 
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getName--">VisualizableDevice</a></code></span></div>
 
<div class="block">Returns name of BLE device</div>
 
 
<dl>
 
<dl>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getName--">getName</a></code>&nbsp;in class&nbsp;<code>[[VisualizableDevice Class|VisualizableDevice]</code></dd>
+
<dd><code>[[VisualizableDevice Class#getName|VisualizableDevice.getName()]]</code> in class VisualizableDevice</dd>
<dt><span class="returnLabel">Returns:</span></dt>
+
<dt><span>Returns:</span></dt>
 
<dd>BLE device name</dd>
 
<dd>BLE device name</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getAddress--">
+
<h3>getAddress</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public'''</span>&nbsp;java.lang.String&nbsp;getAddress()</code>
</a>
+
 
<ul class="blockList">
+
<span>'''Description copied from class:''' [[VisualizableDevice Class|VisualizableDevice]]</span>
<li class="blockList">
+
 
<h4>getAddress</h4>
+
<div class="block">Returns Bluetooth LE MAC address
<pre>public&nbsp;java.lang.String&nbsp;getAddress()</pre>
 
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getAddress--">VisualizableDevice</a></code></span></div>
 
<div class="block">Returns Bluetooth LE MAC address</div>
 
 
<dl>
 
<dl>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getAddress--">getAddress</a></code>&nbsp;in class&nbsp;<code>[[VisualizableDevice Class|VisualizableDevice]</code></dd>
+
<dd><code>[[VisualizableDevice Class#getDeviceAddress|VisualizableDevice.getAddress()]]</code> in class VisualizableDevice</dd>
<dt><span class="returnLabel">Returns:</span></dt>
+
<dt><span>Returns:</span></dt>
 
<dd>device unique address</dd>
 
<dd>device unique address</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getBatteryLevel--">
+
<h3>getBatteryLevel</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public int'''</span> getBatteryLevel()</code>
</a>
+
 
<ul class="blockList">
+
<span>'''Description copied from class:''' [[VisualizableDevice Class|VisualizableDevice]]</span>
<li class="blockList">
+
 
<h4>getBatteryLevel</h4>
+
Returns battery state
<pre>public&nbsp;int&nbsp;getBatteryLevel()</pre>
+
 
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getBatteryLevel--">VisualizableDevice</a></code></span></div>
 
<div class="block">Returns battery state</div>
 
 
<dl>
 
<dl>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getBatteryLevel--">getBatteryLevel</a></code>&nbsp;in class&nbsp;<code><a href="../../../../ru/neurotech/common/VisualizableDevice.html" title="class in ru.neurotech.common">VisualizableDevice</a></code></dd>
+
<dd><code>[[VisualizableDevice Class#getBatteryLevel|VisualizableDevice.getBatteryLevel()]]</code>&nbsp;in class&nbsp;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>
</li>
+
 
</ul>
+
 
<a name="getNeuroDevice--">
+
<h3>getNeuroDevice</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public'''</span> [[NeuroDevice Class|NeuroDevice]]&nbsp;getNeuroDevice()</code>
</a>
+
 
<ul class="blockList">
+
<span>'''Description copied from class:'''&nbsp;[[VisualizableDevice Class|VisualizableDevice]]</span>
<li class="blockList">
 
<h4>getNeuroDevice</h4>
 
<pre>public&nbsp;<a href="../../../../ru/neurotech/neurodevices/NeuroDevice.html" title="class in ru.neurotech.neurodevices">NeuroDevice</a>&nbsp;getNeuroDevice()</pre>
 
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getNeuroDevice--">VisualizableDevice</a></code></span></div>
 
 
<div class="block">Returns physical device object which this visual device represents</div>
 
<div class="block">Returns physical device object which this visual device represents</div>
 
<dl>
 
<dl>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
 
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../ru/neurotech/common/VisualizableDevice.html#getNeuroDevice--">getNeuroDevice</a></code>&nbsp;in class&nbsp;<code>[[VisualizableDevice Class|VisualizableDevice]</code></dd>
+
<dd><code>[[VisualizableDevice Class#getNeuroDevice|VisualizableDevice.getNeuroDevice()]]</code>&nbsp;in class&nbsp;VisualizableDevice</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>NeuroDevice of current visual device</dd>
 
<dd>NeuroDevice of current visual device</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="startReceive--">
+
<h3>startReceive</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public void'''</span> startReceive()</code>
</a>
+
 
<ul class="blockList">
+
 
<li class="blockList">
+
<h3>stopReceive</h3>
<h4>startReceive</h4>
+
<code><span style="color:#0066FF;">'''public void'''</span> stopReceive()</code>
<pre>public&nbsp;void&nbsp;startReceive()</pre>
+
 
</li>
+
 
</ul>
+
<h3>reset</h3>
<a name="stopReceive--">
+
<code><span style="color:#0066FF;">'''public void'''</span> reset()</code>
<!--  -->
 
</a>
 
<ul class="blockList">
 
<li class="blockList">
 
<h4>stopReceive</h4>
 
<pre>public&nbsp;void&nbsp;stopReceive()</pre>
 
</li>
 
</ul>
 
<a name="reset--">
 
<!--  -->
 
</a>
 
<ul class="blockList">
 
<li class="blockList">
 
<h4>reset</h4>
 
<pre>public&nbsp;void&nbsp;reset()</pre>
 
 
<div class="block">Clears signal buffer, sets duration to zero
 
<div class="block">Clears signal buffer, sets duration to zero
 
  and resets all parameters to default values</div>
 
  and resets all parameters to default values</div>
</li>
+
 
</ul>
+
 
<a name="getTotalSignalDuration--">
+
<h3>getTotalSignalDuration</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public double'''</span> getTotalSignalDuration()</code>
</a>
+
 
<ul class="blockList">
+
Returns total signal duration in current test.
<li class="blockList">
+
 
<h4>getTotalSignalDuration</h4>
 
<pre>public&nbsp;double&nbsp;getTotalSignalDuration()</pre>
 
<div class="block">Returns total signal duration in current test</div>
 
 
<dl>
 
<dl>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>signal duration in seconds</dd>
 
<dd>signal duration in seconds</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getEcgSignal-double-double-">
+
<h3>getEcgSignal</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public double'''</span>[] getEcgSignal(<span style="color:#0066FF;">'''double'''</span> time, <span style="color:#0066FF;">'''double'''</span> duration)</code>
</a>
+
 
<ul class="blockList">
+
Returns ECG signal stored in buffer for selected time interval.
<li class="blockList">
+
If interval exceeds maximum or minimum buffer time, signal samples
<h4>getEcgSignal</h4>
+
for these intervals will be equal to zero.
<pre>public&nbsp;double[]&nbsp;getEcgSignal(double&nbsp;time,
+
 
                            double&nbsp;duration)</pre>
 
<div class="block">Returns ECG signal stored in buffer for selected time interval
 
If interval exceeds maximum or minimum buffer time, signal samples
 
for these intervals will be equal to zero</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>time</code> - Start time of interval</dd>
+
<dd><code>time</code> - Start time of interval in seconds</dd>
<dd><code>duration</code> - Duration of interval</dd>
+
<dd><code>duration</code> - Duration of interval in seconds</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Signal samples array</dd>
 
<dd>Signal samples array</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getRWavesOnInterval-double-double-">
+
<h3>getRWavesOnInterval</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public'''</span> [[RPeak Class|RPeak]][]&nbsp;getRWavesOnInterval(<span style="color:#0066FF;">'''double'''</span> startTime, <span style="color:#0066FF;">'''double'''</span> endTime)</code>
</a>
+
 
<ul class="blockList">
+
Detects R-waves in signal for specified time interval.
<li class="blockList">
+
 
<h4>getRWavesOnInterval</h4>
 
<pre>public&nbsp;<a href="../../../../ru/neurotech/neurodevices/ecg/RPeak.html" title="class in ru.neurotech.neurodevices.ecg">RPeak</a>[]&nbsp;getRWavesOnInterval(double&nbsp;startTime,
 
                                  double&nbsp;endTime)</pre>
 
<div class="block">Detects R-waves in signal for specified time interval</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>startTime</code> - Start time of interval</dd>
+
<dd><code>startTime</code> - Start time of interval in seconds</dd>
<dd><code>endTime</code> - End time of interval</dd>
+
<dd><code>endTime</code> - End time of interval in seconds</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Array of RPeaks</dd>
 
<dd>Array of RPeaks</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getCurrentHeartRate--">
+
<h3>getCurrentHeartRate</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public int'''</span> getCurrentHeartRate()</code>
</a>
+
 
<ul class="blockList">
+
Calculates heart rate for recently received ECG samples.
<li class="blockList">
+
Use this method to monitor heart rate during signal receiving is active.
<h4>getCurrentHeartRate</h4>
+
 
<pre>public&nbsp;int&nbsp;getCurrentHeartRate()</pre>
+
It's not recommended to use this method to calculate heart rate
<div class="block">Calculates heart rate for recently received ECG samples
+
while signal receiving is stopped, use [[#getAverageHeartRateOnInterval|getAverageHeartRateOnInterval]] instead.
Use this method to monitor heart rate during signal receiving is active
+
 
It's not recommended to use this method to calculate heart rate
 
while signal receiving is stopped, use getAverageHeartRateOnInterval instead</div>
 
 
<dl>
 
<dl>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Heart rate in beats per minute</dd>
 
<dd>Heart rate in beats per minute</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getAverageHeartRateOnInterval-double-double-">
+
<h3>getAverageHeartRateOnInterval</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public int'''</span> getAverageHeartRateOnInterval(<span style="color:#0066FF;">'''double'''</span> startTime, <span style="color:#0066FF;">'''double'''</span> endTime)</code>
</a>
+
 
<ul class="blockList">
+
Returns average heart rate based on NN-interval values
<li class="blockList">
+
from specified time interval.
<h4>getAverageHeartRateOnInterval</h4>
+
 
<pre>public&nbsp;int&nbsp;getAverageHeartRateOnInterval(double&nbsp;startTime,
 
                                        double&nbsp;endTime)</pre>
 
<div class="block">Returns average heart rate based on NN-interval values
 
from specified time interval</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>startTime</code> - Start time for heart rate calculation</dd>
+
<dd><code>startTime</code> - Start time in seconds for heart rate calculation</dd>
<dd><code>endTime</code> - End time for heart rate calculation</dd>
+
<dd><code>endTime</code> - End time in seconds for heart rate calculation</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Heart rate in beats per minute</dd>
 
<dd>Heart rate in beats per minute</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getCurrentHeartRateVariability--">
+
<h3>getCurrentHeartRateVariability</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public double'''</span> getCurrentHeartRateVariability()</code>
</a>
+
Returns currently detected value of heart rate variability.
<ul class="blockList">
+
Use this method to monitor HRV during signal receiving.
<li class="blockList">
+
 
<h4>getCurrentHeartRateVariability</h4>
+
To get HRV for various intervals while signal receiving is stopped
<pre>public&nbsp;double&nbsp;getCurrentHeartRateVariability()</pre>
+
use [[#getHeartRateVariabilityForInterval|getHeartRateVariabilityForInterval]]
<div class="block">Returns currently detected value of heart rate variability
+
 
Use this method to monitor HRV during signal receiving
 
To get HRV for various intervals while signal receiving is stopped
 
use getHeartRateVariabilityForInterval</div>
 
 
<dl>
 
<dl>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>HRV value</dd>
 
<dd>HRV value</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getHeartRateVariabilityForInterval-double-double-">
+
<h3>getHeartRateVariabilityForInterval</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public double'''</span> getHeartRateVariabilityForInterval(<span style="color:#0066FF;">'''double'''</span> startTime, <span style="color:#0066FF;">'''double'''</span> endTime)</code>
</a>
+
 
<ul class="blockList">
+
Returns average value of heart rate variability on interval
<li class="blockList">
+
 
<h4>getHeartRateVariabilityForInterval</h4>
 
<pre>public&nbsp;double&nbsp;getHeartRateVariabilityForInterval(double&nbsp;startTime,
 
                                                double&nbsp;endTime)</pre>
 
<div class="block">Returns average value of heart rate variability on interval</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>startTime</code> - Start time of calculation interval</dd>
+
<dd><code>startTime</code> - Start time of calculation interval in seconds</dd>
<dd><code>endTime</code> - End time of calculation interval</dd>
+
<dd><code>endTime</code> - End time of calculation interval in seconds</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>HRV value</dd>
 
<dd>HRV value</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getCurrentStressIndex--">
+
<h3>getCurrentStressIndex</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public double'''</span> getCurrentStressIndex()</code>
</a>
+
 
<ul class="blockList">
+
Returns value of stress index for real-time monitoring.
<li class="blockList">
+
Use this method to monitor stress index while signal receiving is active.
<h4>getCurrentStressIndex</h4>
+
 
<pre>public&nbsp;double&nbsp;getCurrentStressIndex()</pre>
+
To get stress index for various intervals while signal receiving is stopped
<div class="block">Returns value of stress index for real-time monitoring
+
use [[#getStressIndexForInterval|getStressIndexForInterval]]
Use this method to monitor stress index while signal receiving is active
+
 
To get stress index for various intervals while signal receiving is stopped
 
use getStressIndexForInterval</div>
 
 
<dl>
 
<dl>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Stress index of current signal</dd>
 
<dd>Stress index of current signal</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getStressIndexForInterval-double-double-">
+
<h3>getStressIndexForInterval</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public double'''</span> getStressIndexForInterval(<span style="color:#0066FF;">'''double'''</span> startTime, <span style="color:#0066FF;">'''double'''</span> endTime)</code>
</a>
+
 
<ul class="blockList">
+
Returns average value of stress index on interval
<li class="blockList">
+
 
<h4>getStressIndexForInterval</h4>
 
<pre>public&nbsp;double&nbsp;getStressIndexForInterval(double&nbsp;startTime,
 
                                        double&nbsp;endTime)</pre>
 
<div class="block">Returns average value of stress index on interval</div>
 
 
<dl>
 
<dl>
 
<dt><span class="paramLabel">Parameters:</span></dt>
 
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>startTime</code> - Start time of calculation interval</dd>
+
<dd><code>startTime</code> - Start time of calculation interval in seconds</dd>
<dd><code>endTime</code> - End time of calculation interval</dd>
+
<dd><code>endTime</code> - End time of calculation interval in seconds</dd>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Stress index value</dd>
 
<dd>Stress index value</dd>
 
</dl>
 
</dl>
</li>
+
 
</ul>
+
 
<a name="getElectrodesState--">
+
<h3>getElectrodesState</h3>
<!--  -->
+
<code><span style="color:#0066FF;">'''public boolean'''</span> getElectrodesState()</code>
</a>
+
 
<ul class="blockListLast">
+
Returns flag indicating whether electrodes properly attached or not
<li class="blockList">
+
 
<h4>getElectrodesState</h4>
 
<pre>public&nbsp;boolean&nbsp;getElectrodesState()</pre>
 
<div class="block">Returns flag indicating whether electrodes properly attached or not</div>
 
 
<dl>
 
<dl>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dt><span class="returnLabel">Returns:</span></dt>
 
<dd>Is electrodes attached</dd>
 
<dd>Is electrodes attached</dd>

Latest revision as of 11:39, 8 August 2017

ECG Device class implemets methods for using universal sensors as cardiography system.

Android

ru.neurotech.neurodevices.ecg

Class EcgDevice

Related Classes

ru.neurotech.neurodevices.ecg.EcgDeviceConnector

ru.neurotech.neurodevices.ecg.RPeak

ru.neurotech.neurodevices.NeuroDevice

Classes hierarchy

  • java.lang.Object

Class definition

public class EcgDevice extends VisualizableDevice

Fields Summary

Modifier and Type Field and Description
SubscribersNotifier<java.lang.Boolean> electrodesAttachedStateChanged

Notifies when electrodes are attached or detached To get electrodes state manually use getElectrodesState

SubscribersNotifier<java.lang.Double> totalSignalDurationChanged

Notifies subscribers when signal duration is changed, when new samples received or data been loaded from external storage, or buffers been reset

Fields inherited from class ru.neurotech.common.VisualizableDevice
deviceStateChanged

Constructor Summary

Constructor and Description
EcgDevice(long nativeObjPtr)

Methods Summary

Modifier and Type Method and Description
void close()
void finalize()
java.lang.String getAddress()

Returns Bluetooth LE MAC address

int getAverageHeartRateOnInterval

Returns average heart rate based on NN-interval values from specified time interval

int getBatteryLevel()

Returns battery charge level in percents

int getCurrentHeartRate()

Calculates heart rate for recently received ECG samples Use this method to monitor heart rate during signal receiving is active It's not recommended to use this method to calculate heart rate while signal receiving is stopped, use getAverageHeartRateOnInterval instead

double getCurrentHeartRateVariability()

Returns currently detected value of heart rate variability Use this method to monitor HRV during signal receiving To get HRV for various intervals while signal receiving is stopped use getHeartRateVariabilityForInterval

double getCurrentStressIndex()

Returns value of stress index for real-time monitoring Use this method to monitor stress index while signal receiving is active To get stress index for various intervals while signal receiving is stopped use getStressIndexForInterval

double[] getEcgSignal(double time, double duration)

Returns ECG signal stored in buffer for selected time interval If interval exceeds maximum or minimum buffer time, signal samples for these intervals will be equal to zero

boolean getElectrodesState()

Returns flag indicating whether electrodes properly attached or not

double getHeartRateVariabilityForInterval(double startTime, double endTime)

Returns average value of heart rate variability on interval

java.lang.String getName()

Returns name of BLE device

NeuroDevice getNeuroDevice()

Returns physical device object which this visual device represents

RPeak[] getRWavesOnInterval(double startTime, double endTime)

Detects R-waves in signal for specified time interval

double getStressIndexForInterval(double startTime, double endTime)
Returns average value of stress index on interval
double getTotalSignalDuration()

Returns total signal duration in current test

void reset()

Clears signal buffer, sets duration to zero and resets all parameters to default values

void startReceive()
void stopReceive()

Field Detail

totalSignalDurationChanged

public final SubscribersNotifier<java.lang.Double> totalSignalDurationChanged

Notifies subscribers when signal duration is changed, when new samples received or data been loaded from external storage, or buffers been reset

electrodesAttachedStateChanged

public final SubscribersNotifier<java.lang.Boolean> electrodesAttachedStateChanged

Notifies when electrodes are attached or detached. To get electrodes state manually use getElectrodesState

Constructor Detail

EcgDevice

public EcgDevice(long nativeObjPtr)

Method Detail

finalize

public void finalize() throws java.lang.Throwable

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable


close

public void close()


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

Returns Bluetooth LE MAC address
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 physical device object which this visual device represents
Specified by:
VisualizableDevice.getNeuroDevice() in class VisualizableDevice
Returns:
NeuroDevice of current visual device


startReceive

public void startReceive()


stopReceive

public void stopReceive()


reset

public void reset()

Clears signal buffer, sets duration to zero and resets all parameters to default values


getTotalSignalDuration

public double getTotalSignalDuration()

Returns total signal duration in current test.

Returns:
signal duration in seconds


getEcgSignal

public double[] getEcgSignal(double time, double duration)

Returns ECG signal stored in buffer for selected time interval. If interval exceeds maximum or minimum buffer time, signal samples for these intervals will be equal to zero.

Parameters:
time - Start time of interval in seconds
duration - Duration of interval in seconds
Returns:
Signal samples array


getRWavesOnInterval

public RPeak[] getRWavesOnInterval(double startTime, double endTime)

Detects R-waves in signal for specified time interval.

Parameters:
startTime - Start time of interval in seconds
endTime - End time of interval in seconds
Returns:
Array of RPeaks


getCurrentHeartRate

public int getCurrentHeartRate()

Calculates heart rate for recently received ECG samples. Use this method to monitor heart rate during signal receiving is active.

It's not recommended to use this method to calculate heart rate while signal receiving is stopped, use getAverageHeartRateOnInterval instead.

Returns:
Heart rate in beats per minute


getAverageHeartRateOnInterval

public int getAverageHeartRateOnInterval(double startTime, double endTime)

Returns average heart rate based on NN-interval values from specified time interval.

Parameters:
startTime - Start time in seconds for heart rate calculation
endTime - End time in seconds for heart rate calculation
Returns:
Heart rate in beats per minute


getCurrentHeartRateVariability

public double getCurrentHeartRateVariability() Returns currently detected value of heart rate variability. Use this method to monitor HRV during signal receiving.

To get HRV for various intervals while signal receiving is stopped use getHeartRateVariabilityForInterval

Returns:
HRV value


getHeartRateVariabilityForInterval

public double getHeartRateVariabilityForInterval(double startTime, double endTime)

Returns average value of heart rate variability on interval

Parameters:
startTime - Start time of calculation interval in seconds
endTime - End time of calculation interval in seconds
Returns:
HRV value


getCurrentStressIndex

public double getCurrentStressIndex()

Returns value of stress index for real-time monitoring. Use this method to monitor stress index while signal receiving is active.

To get stress index for various intervals while signal receiving is stopped use getStressIndexForInterval

Returns:
Stress index of current signal


getStressIndexForInterval

public double getStressIndexForInterval(double startTime, double endTime)

Returns average value of stress index on interval

Parameters:
startTime - Start time of calculation interval in seconds
endTime - End time of calculation interval in seconds
Returns:
Stress index value


getElectrodesState

public boolean getElectrodesState()

Returns flag indicating whether electrodes properly attached or not

Returns:
Is electrodes attached