BioRadio SDK - Java Android
1.1
|
Classes | |
enum | PulseOxDataQuality |
Public Member Functions | |
TimerTask | getDaqWatchdogTimerTask () |
void | setDaqWatchdogTimerTask (TimerTask daqWatchdogTimerTask) |
final void | processPulseOxDataFromByteArray (byte[] packet, int currentBytePos, int noninChannelCounter) |
final void | processAuxiliaryDataFromByteArray (byte[] packet, int currentBytePos, int auxiliaryChannelCounter) |
final int | getLastPacketCount () |
final void | setLastPacketCount (int value) |
final long | getDroppedPacketCount () |
final BioRadioConfiguration | getConfig () |
final void | setConfig (BioRadioConfiguration value) |
final long | getTotalPackets () |
final void | setTotalPackets (long value) |
BioRadioDevice (HardwareLinkHandler connection, String name) throws IOException | |
BioRadioDevice (HardwareLinkHandler connection, String name, BioRadioConfiguration config) | |
BioRadioDevice (HardwareLinkHandler connection, String name, Optional< Integer > signalBufferSize) throws IOException | |
void | stopAcquisition () |
boolean | waitForStatusInitialization () |
void | startAcquisition () |
DeviceTypeCode | getDeviceType () |
boolean | connect () |
void | disconnect () |
void | setDeviceTime () |
final LocalDateTime | getDeviceTime () throws InterruptedException, TimeoutException |
void | initializeSignalGroups (Optional< Integer > signalBufferSize) |
void | processPacketForStatusData (DeviceDataPacket packet) |
void | processPacketForSignalData (DeviceDataPacket packet) |
final void | addRawSampleToStream (long ticks, BioRadioSignal signal, int value) |
final void | addRawSampleToStream (long ticks, BioRadioSignal signal, long value) |
final BioRadioConfiguration | getCommonDAQParameters () throws InterruptedException, IOException, TimeoutException |
final void | setCommonDAQParameters (BioRadioConfiguration config) throws InterruptedException, IOException, TimeoutException |
final ChannelConfiguration | getChannelConfig (int channelIndex) throws InterruptedException, TimeoutException |
final void | setChannelConfig (ChannelConfiguration channelConfig) throws InterruptedException, IOException, TimeoutException |
final BioRadioConfiguration | getConfiguration () throws InterruptedException, IOException, TimeoutException |
final void | setConfiguration (String filePath) |
final void | setConfiguration (FileInputStream stream) throws Exception |
final void | setConfiguration (BioRadioConfiguration config) throws InterruptedException, IOException, TimeoutException |
final void | saveConfiguration (String filePath) |
final void | saveConfiguration (FileOutputStream stream) throws Exception |
final void | getDeviceStatus () throws InterruptedException, TimeoutException |
final BatteryInfo | getBatteryInfo () throws InterruptedException, TimeoutException |
final SignalGroup | getPulseOxSignals () |
final SignalGroup | getAuxiliarySignals () |
final SignalGroup | getBioPotentialSignals () |
final SignalGroup | getMemsSignals () |
final long | getTotalAcquisitionTime () |
Public Member Functions inherited from com.glneurotech.devices.common.DaqDevice | |
boolean | getIsConnected () |
final boolean | getIsDeviceLocked () |
final void | setIsDeviceLocked (boolean value) |
final boolean | getIsAcquiring () |
final boolean | getIsRecording () |
final void | setIsRecording (boolean value) |
boolean | connect () |
abstract void | processPacketForStatusData (DeviceDataPacket packet) |
abstract void | processPacketForSignalData (DeviceDataPacket packet) |
abstract boolean | waitForStatusInitialization () |
void | disconnect () |
final void | onSignalBufferOverflow (SignalDataEventArgs args) |
final void | onGeneralOperationError (EventArgs args) |
final void | onCommuncationError (CommunicationErrorArgs args) |
abstract void | startAcquisition () |
abstract void | stopAcquisition () |
abstract void | initializeSignalGroups (Optional< Integer > signalBufferSize) |
void | unlockDevice () throws InterruptedException, TimeoutException |
void | lockDevice () throws InterruptedException, TimeoutException |
void | setDeviceTime () throws InterruptedException, TimeoutException |
void | setDeviceTime (LocalDateTime time) throws InterruptedException, TimeoutException |
final String | getHardwareVersion () |
final void | setHardwareVersion (String value) |
final String | getFirmwareVersion () |
final void | setFirmwareVersion (String value) |
final String | getName () |
final void | setName (String value) |
abstract DeviceTypeCode | getDeviceType () |
final ArrayList< SignalGroup > | getSignalGroups () |
final HardwareLinkHandler | getConnection () |
final void | setConnection (HardwareLinkHandler value) |
DaqDevice (HardwareLinkHandler hardwareLink, String name, Optional< Integer > signalBufferSize) throws IOException | |
final void | startRecording (GlntStream outputStream) |
final void | stopRecording () |
final void | getDeviceId () throws InterruptedException, TimeoutException |
final DeviceTypeCode | getInternalDeviceType () throws InterruptedException, TimeoutException |
void | close () throws IOException |
Static Public Member Functions | |
static int | extractBioPotentialValueFromByteArray (byte[] source, int currentBytePos, int startBitPosition, int length) |
Public Attributes | |
Event< EventHandler< BioRadioButtonEventArgs > > | EventMarkerButtonPushed = new Event<EventHandler<BioRadioButtonEventArgs>>() |
Public Attributes inherited from com.glneurotech.devices.common.DaqDevice | |
Event< EventHandler< SignalDataEventArgs > > | SignalBufferOverflowed = new Event<EventHandler<SignalDataEventArgs>>() |
Event< EventHandler< CommunicationErrorArgs > > | CommunicationError = new Event<EventHandler<CommunicationErrorArgs>>() |
Event< EventHandler< EventArgs > > | GeneralOperationError = new Event<EventHandler<EventArgs>>() |
Protected Member Functions | |
BioRadioDevice () | |
Protected Member Functions inherited from com.glneurotech.devices.common.DaqDevice | |
void | setIsConnected (boolean value) |
final void | setIsAcquiring (boolean value) |
void | getInternalFirmwareVersion () throws InterruptedException, TimeoutException |
Additional Inherited Members | |
Static Public Attributes inherited from com.glneurotech.devices.common.DaqDevice | |
static final int | _NUM_OF_RETRY = 10 |
static final int | _TIMEOUT_MS = 1000 |
This class represents the BioRadio device. It provides methods to connect, Configure and acquire signal data from a BioRadio device.
|
protected |
Default constructor
com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice | ( | HardwareLinkHandler | connection, |
String | name | ||
) | throws IOException |
Constructor - Bio Radio Device
connection | Take a HardwareLinkHandler for the connection parameter. |
name | Sets the name of the device as a string. |
IOException |
com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice | ( | HardwareLinkHandler | connection, |
String | name, | ||
BioRadioConfiguration | config | ||
) |
Constructor - Bio Radio Device
connection | Take a HardwareLinkHandler for the connection parameter. |
name | Sets the name of the device - string. |
config | Take a BioRadioConfiguration for the device to use. |
com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice | ( | HardwareLinkHandler | connection, |
String | name, | ||
Optional< Integer > | signalBufferSize | ||
) | throws IOException |
Constructor - Bio Radio Device
connection | Take a HardwareLinkHandler for the connection. |
name | Sets the name of the device - string |
signalBufferSize | Take an optional integer for the signalBufferSize parameter. |
IOException |
final void com.glneurotech.devices.bioradio.BioRadioDevice.addRawSampleToStream | ( | long | ticks, |
BioRadioSignal | signal, | ||
int | value | ||
) |
Add row sample to stream.
ticks | Take a long value for the ticks parameter. |
signal | Take a BioRadioSignal for the signal parameter. |
value | Take an integer for the value parameter. |
final void com.glneurotech.devices.bioradio.BioRadioDevice.addRawSampleToStream | ( | long | ticks, |
BioRadioSignal | signal, | ||
long | value | ||
) |
Add row sample to stream.
ticks | Take a long value for the ticks parameter. |
signal | Take a BioRadioSignal for the signal parameter. |
value | Take a long value for the value parameter. |
boolean com.glneurotech.devices.bioradio.BioRadioDevice.connect | ( | ) |
Establishes a connection to the device.
Implements com.glneurotech.devices.common.IDaqDevice.
void com.glneurotech.devices.bioradio.BioRadioDevice.disconnect | ( | ) |
Disconnect the application from the device
Implements com.glneurotech.devices.common.IDaqDevice.
|
static |
Method will return an Integer32 based on the specified 4 bytes
source | Byte array with the length of 4 bytes |
currentBytePos | Current byte position - integer |
startBitPosition | 0 / 4 - Start bit position - integer |
length | 12 / 16 /24 - Length as an integer. |
RuntimeException | Method was instructed to unpack bits from invalid bit position or for invalid length. |
final SignalGroup com.glneurotech.devices.bioradio.BioRadioDevice.getAuxiliarySignals | ( | ) |
The signal group that contains signals from Auxiliary sensors, if any are configured. If no Auxiliary signals are available, this group will be null.
final BatteryInfo com.glneurotech.devices.bioradio.BioRadioDevice.getBatteryInfo | ( | ) | throws InterruptedException, TimeoutException |
Get the current battery information, including voltage, current, and charge state.
InterruptedException | |
TimeoutException |
final SignalGroup com.glneurotech.devices.bioradio.BioRadioDevice.getBioPotentialSignals | ( | ) |
The signal group that contains signals from Biopotential sensors, if any are enabled.
The signals in this group are indexed in the same order as the physical channels on the device.
final ChannelConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getChannelConfig | ( | int | channelIndex | ) | throws InterruptedException, TimeoutException |
Returns the Configuration of a particular data collection channel, and determine whether that channel is connected or enumerated.
InterruptedException | |
TimeoutException |
final BioRadioConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getCommonDAQParameters | ( | ) | throws InterruptedException, IOException, TimeoutException |
Returns the Common DAQ Parameters stored on the device
InterruptedException | |
IOException | |
TimeoutException |
final BioRadioConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getConfig | ( | ) |
Gets the current device configuration
final BioRadioConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getConfiguration | ( | ) | throws InterruptedException, IOException, TimeoutException |
Retrieves the current Configuration applied to the device.
InterruptedException | |
IOException | |
TimeoutException |
TimerTask com.glneurotech.devices.bioradio.BioRadioDevice.getDaqWatchdogTimerTask | ( | ) |
Get the current watch dog timer task
final void com.glneurotech.devices.bioradio.BioRadioDevice.getDeviceStatus | ( | ) | throws InterruptedException, TimeoutException |
Get the current device status, e.g., battery voltage
InterruptedException | |
TimeoutException |
final LocalDateTime com.glneurotech.devices.bioradio.BioRadioDevice.getDeviceTime | ( | ) | throws InterruptedException, TimeoutException |
Returns the current time stored on the device
InterruptedException | |
TimeoutException |
DeviceTypeCode com.glneurotech.devices.bioradio.BioRadioDevice.getDeviceType | ( | ) |
Needed to change the inheritance structure to public from internal to get the Embeddinator-4K to work
final long com.glneurotech.devices.bioradio.BioRadioDevice.getDroppedPacketCount | ( | ) |
Gets the number of dropped packets during streaming.
final int com.glneurotech.devices.bioradio.BioRadioDevice.getLastPacketCount | ( | ) |
Gets the zero-based index of the last packet received from the device.
final SignalGroup com.glneurotech.devices.bioradio.BioRadioDevice.getMemsSignals | ( | ) |
The signal group that contains signals from Motion sensors, if any are configured.
final SignalGroup com.glneurotech.devices.bioradio.BioRadioDevice.getPulseOxSignals | ( | ) |
The signal group that contains signals from PulseOx sensors, if any are configured. If no PulseOx sensors are available, this group is null.
final long com.glneurotech.devices.bioradio.BioRadioDevice.getTotalAcquisitionTime | ( | ) |
Represents the total time elapsed since acquisition last began. This value is derived from the amount of data received from the device, and not on the system clock.
final long com.glneurotech.devices.bioradio.BioRadioDevice.getTotalPackets | ( | ) |
The total number of packets received by the device.
void com.glneurotech.devices.bioradio.BioRadioDevice.initializeSignalGroups | ( | Optional< Integer > | signalBufferSize | ) |
Initialize the signal groups
signalBufferSize | Take an optional integer for the signal buffer size parameter. |
final void com.glneurotech.devices.bioradio.BioRadioDevice.processAuxiliaryDataFromByteArray | ( | byte [] | packet, |
int | currentBytePos, | ||
int | auxiliaryChannelCounter | ||
) |
Extract Auxiliary sensor block data
packet | Packet to parse |
currentBytePos | Take an integer for the current byte position. |
auxiliaryChannelCounter | Take an integer for the auxiliary channel counter parameter. |
RuntimeException | Method was instructed to unpack bits from invalid bit position or for invalid length. |
void com.glneurotech.devices.bioradio.BioRadioDevice.processPacketForSignalData | ( | DeviceDataPacket | packet | ) |
Process the signal packet data
packet | Take a DeviceDataPacket for the packet parameter. |
void com.glneurotech.devices.bioradio.BioRadioDevice.processPacketForStatusData | ( | DeviceDataPacket | packet | ) |
Process the status packet data.
packet | Take a DeviceDataPacket for the packet parameter. |
final void com.glneurotech.devices.bioradio.BioRadioDevice.processPulseOxDataFromByteArray | ( | byte [] | packet, |
int | currentBytePos, | ||
int | noninChannelCounter | ||
) |
Extract PulseOx sensor block data
packet | Packet to parse |
currentBytePos | Take an integer for the current byte position parameter. |
noninChannelCounter | Take an integer for noninChannelCounter parameter. |
RuntimeException | Method was instructed to unpack bits from invalid bit position or for invalid length. |
final void com.glneurotech.devices.bioradio.BioRadioDevice.saveConfiguration | ( | String | filePath | ) |
Saves the current configuration to a file as xml
filePath | The path to the file where the BioRadio configuration will be saved |
RuntimeException |
final void com.glneurotech.devices.bioradio.BioRadioDevice.saveConfiguration | ( | FileOutputStream | stream | ) | throws Exception |
Writes the current configuration to a stream as xml
stream | The stream where the BioRadio configuration will be written |
Exception |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setChannelConfig | ( | ChannelConfiguration | channelConfig | ) | throws InterruptedException, IOException, TimeoutException |
To Configure the data collection parameters of an individual channel.
InterruptedException | |
IOException | |
TimeoutException |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setCommonDAQParameters | ( | BioRadioConfiguration | config | ) | throws InterruptedException, IOException, TimeoutException |
To Configure the data acquisition parameters that apply across multiple data collection channels and cannot be set individually on a channel by channel basis.
InterruptedException | |
IOException | |
TimeoutException |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setConfig | ( | BioRadioConfiguration | value | ) |
Sets the current device configuration
value | Take a BioRadioConfiguration as parameter. |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setConfiguration | ( | String | filePath | ) |
Accepts a file path to a file which contains an xml configuration and uses this file to set the configuration for the BioRadioDevice
filePath | The path to the file that contains the BioRadio configuration |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setConfiguration | ( | FileInputStream | stream | ) | throws Exception |
Accepts a stream which contains an xml configuration and uses this stream to set the configuration for the BioRadioDevice
stream | A stream that contains the BioRadio configuration |
Exception |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setConfiguration | ( | BioRadioConfiguration | config | ) | throws InterruptedException, IOException, TimeoutException |
This will be implemented as a wrapper around the 2 lower-level commands to set global and channel Configurations.
config | Take a BioRadioConfiguration for the configuration parameter. |
InterruptedException | |
IOException | |
TimeoutException |
void com.glneurotech.devices.bioradio.BioRadioDevice.setDaqWatchdogTimerTask | ( | TimerTask | daqWatchdogTimerTask | ) |
Set the current watch dog timer task
daqWatchdogTimerTask | Take a TimerTask as parameter. |
void com.glneurotech.devices.bioradio.BioRadioDevice.setDeviceTime | ( | ) |
Sends the current time to the device to synchronize with PC system time.
The device must be unlocked for this command to have an effect.
final void com.glneurotech.devices.bioradio.BioRadioDevice.setLastPacketCount | ( | int | value | ) |
Sets the zero-based index of the last packet received from the device.
value | Take an iteger for last packet count. |
final void com.glneurotech.devices.bioradio.BioRadioDevice.setTotalPackets | ( | long | value | ) |
Sets the total number of packets received by the device
value | Take a long value for the total packets. |
void com.glneurotech.devices.bioradio.BioRadioDevice.startAcquisition | ( | ) |
Starts acquisition of signal data from the BioRadio.
Implements com.glneurotech.devices.common.IDaqDevice.
void com.glneurotech.devices.bioradio.BioRadioDevice.stopAcquisition | ( | ) |
Stops the BioRadio from streaming data to the mobile device
Implements com.glneurotech.devices.common.IDaqDevice.
boolean com.glneurotech.devices.bioradio.BioRadioDevice.waitForStatusInitialization | ( | ) |
Flag indicates whether or not the app should wait for status initialization
Event<EventHandler<BioRadioButtonEventArgs> > com.glneurotech.devices.bioradio.BioRadioDevice.EventMarkerButtonPushed = new Event<EventHandler<BioRadioButtonEventArgs>>() |
Event Handler for Event Marker Push Button