BioRadio SDK - Java Android
1.1
|
Classes | |
interface | ScaleFunction |
Public Member Functions | |
final SignalGroup | getOwner () |
Signal (SignalGroup owner, String name, Optional< Integer > bufferSize, ScaleFunction scaleDelegate, double scaledMaxValue, double scaledMinValue, double rawMinValue, double rawMaxValue, int sampleRate) throws IOException | |
final int | getSamplesPerSecond () |
final void | setSamplesPerSecond (int value) |
final Long | getSampleInterval () |
final void | setSampleInterval (Long value) |
final double | getMaxValue () |
final void | setMaxValue (double value) |
final double | getMinValue () |
final void | setMinValue (double value) |
final double | getRawMinValue () |
final void | setRawMinValue (double value) |
final double | getRawMaxValue () |
final void | setRawMaxValue (double value) |
final String | getName () |
final void | setName (String value) |
final String | getUnits () |
final void | setUnits (String value) |
final GlntStream | getRawDataStream () |
final void | setRawDataStream (GlntStream value) |
final int | getReadingsAvailable () |
final void | setReadingsAvailable (int value) |
final boolean | getEnabled () |
final void | setEnabled (boolean value) |
ScaleFunction | getScalingDelegate () |
void | setScalingDelegate (ScaleFunction value) |
final void | reset () |
final void | addSample (long timeStamp, long rawValue) throws InternalBufferOverflowException |
final long | getNextRawValue () |
final double [] | getScaledValueArray () |
final double [] | getScaledValueArray (int count) |
final java.lang.Iterable< Double > | getScaledValues () |
final long [] | getRawValueArray (int count) |
final java.lang.Iterable< Long > | getRawValues (int count) |
final java.lang.Iterable< Long > | getRawValues () |
final Sample | getNextSample () |
final Iterable< Sample > | getSamples () |
final void | close () throws IOException |
Static Public Member Functions | |
static double | defaultScaleFunction (long unscaledValue) |
Represents a single stream of samples from a device sensor. The sample class contains methods to read data from a device in various ways. It also contains metadata that describes the range of the signal values, the sample rate, and other pertinent details.
com.glneurotech.devices.common.Signal.Signal | ( | SignalGroup | owner, |
String | name, | ||
Optional< Integer > | bufferSize, | ||
ScaleFunction | scaleDelegate, | ||
double | scaledMaxValue, | ||
double | scaledMinValue, | ||
double | rawMinValue, | ||
double | rawMaxValue, | ||
int | sampleRate | ||
) | throws IOException |
Sets the signal parameters.
owner | Take a SignalGroup. |
name | Take a string. |
bufferSize | Take an optional integer. |
scaleDelegate | Take a ScaleFunction |
scaledMaxValue | Take a double value. |
scaledMinValue | Take a double value. |
rawMinValue | Take a double value. |
rawMaxValue | Take a double value. |
sampleRate | Take aan integer. |
IOException |
final void com.glneurotech.devices.common.Signal.addSample | ( | long | timeStamp, |
long | rawValue | ||
) | throws InternalBufferOverflowException |
Add row data sample.
timeStamp | Take a long value. |
rawValue | Take a long value. |
InternalBufferOverflowException |
final void com.glneurotech.devices.common.Signal.close | ( | ) | throws IOException |
Close the stream.
IOException |
|
static |
Default scale function.
unscaledValue | Take a long value. |
final boolean com.glneurotech.devices.common.Signal.getEnabled | ( | ) |
Indicates whether the signal is enabled. Enabled is set to true by default. When set to false, no data will be saved to the signal. This is useful when there are unused signals being sent from the device. Disabling them will save system resources and processing time.
final double com.glneurotech.devices.common.Signal.getMaxValue | ( | ) |
The maximum scaled value that this signal supports.
final double com.glneurotech.devices.common.Signal.getMinValue | ( | ) |
The minimum scaled value that this signal supports.
final String com.glneurotech.devices.common.Signal.getName | ( | ) |
The name associated with this signal.
final long com.glneurotech.devices.common.Signal.getNextRawValue | ( | ) |
Returns the next raw sensor value in the buffer.
final Sample com.glneurotech.devices.common.Signal.getNextSample | ( | ) |
final SignalGroup com.glneurotech.devices.common.Signal.getOwner | ( | ) |
The SignalGroup to which this signal belongs. All Signals belong to a SignalGroup which clusters similar signals together for convenient access.
final GlntStream com.glneurotech.devices.common.Signal.getRawDataStream | ( | ) |
Gets raw data stream.
final double com.glneurotech.devices.common.Signal.getRawMaxValue | ( | ) |
The maximum unscaled value that this signal supports.
final double com.glneurotech.devices.common.Signal.getRawMinValue | ( | ) |
The minimum unscaled value that this signal supports.
final long [] com.glneurotech.devices.common.Signal.getRawValueArray | ( | int | count | ) |
Gets an array of raw (unscaled) values from the signal.
count | The number of samples to read |
final java.lang.Iterable<Long> com.glneurotech.devices.common.Signal.getRawValues | ( | int | count | ) |
Enumerates over raw values in the signal buffer.
count | The number of values to read. Must be less than the total ReadingsAvailable |
final java.lang.Iterable<Long> com.glneurotech.devices.common.Signal.getRawValues | ( | ) |
Enumerates over raw values in the signal buffer.
final int com.glneurotech.devices.common.Signal.getReadingsAvailable | ( | ) |
The number of samples available to be read
final Long com.glneurotech.devices.common.Signal.getSampleInterval | ( | ) |
The time interval between sample readings.
final Iterable<Sample> com.glneurotech.devices.common.Signal.getSamples | ( | ) |
Iterates over all samples currently in the signal buffer.
final int com.glneurotech.devices.common.Signal.getSamplesPerSecond | ( | ) |
The number of samples transmitted by the device in one second.
final double [] com.glneurotech.devices.common.Signal.getScaledValueArray | ( | ) |
Used to retrieve an array of scaled sample values from the signal
final double [] com.glneurotech.devices.common.Signal.getScaledValueArray | ( | int | count | ) |
Creates an array of values representing the samples from the signal.
count | The number of readings to read from the device. Must be less than or equal to the number of ReadingsAvailable |
final java.lang.Iterable<Double> com.glneurotech.devices.common.Signal.getScaledValues | ( | ) |
Enumerates over all scaled values currently in the signal buffer.
ScaleFunction com.glneurotech.devices.common.Signal.getScalingDelegate | ( | ) |
Gets scaling delegate.
final String com.glneurotech.devices.common.Signal.getUnits | ( | ) |
The units of measurement in which scaled values are reported.
final void com.glneurotech.devices.common.Signal.reset | ( | ) |
Clears any data in the input buffer for this signal.
final void com.glneurotech.devices.common.Signal.setEnabled | ( | boolean | value | ) |
Sets enabled to the value passed.
value | Take a boolean. |
final void com.glneurotech.devices.common.Signal.setMaxValue | ( | double | value | ) |
Set maximum scaled value that this signal supports.
value | Take a double value. |
final void com.glneurotech.devices.common.Signal.setMinValue | ( | double | value | ) |
Sets minimum scaled value that this signal supports.
value | Take a double value. |
final void com.glneurotech.devices.common.Signal.setName | ( | String | value | ) |
Sets name associated with this signal.
value | Take an string. |
final void com.glneurotech.devices.common.Signal.setRawDataStream | ( | GlntStream | value | ) |
Sets the taw data stream.
value | Take a GlntStream. |
final void com.glneurotech.devices.common.Signal.setRawMaxValue | ( | double | value | ) |
Sets the maximum unscaled that this signal supports.
value | Take a double value. |
final void com.glneurotech.devices.common.Signal.setRawMinValue | ( | double | value | ) |
Sets minimum unscaled value that this signal supports.
value | Take a double value. |
final void com.glneurotech.devices.common.Signal.setReadingsAvailable | ( | int | value | ) |
Sets reading available.
value | Take an integer. |
void com.glneurotech.devices.common.Signal.setScalingDelegate | ( | ScaleFunction | value | ) |
Sets scaling delegate
value | Take a ScaleFunction as parameter. |
final void com.glneurotech.devices.common.Signal.setUnits | ( | String | value | ) |
Sets units of measuremnet in which scaled values are reported.
value | Take a string. |