BioRadio SDK - Java Android  1.1
com.glneurotech.devices.bioradio.BioRadioDevice Class Reference
Inheritance diagram for com.glneurotech.devices.bioradio.BioRadioDevice:
com.glneurotech.devices.common.DaqDevice com.glneurotech.devices.common.IDaqDevice com.glneurotech.devices.bioradio.devicemocks.MockBioRadioDevice

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< SignalGroupgetSignalGroups ()
 
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
 

Detailed Description

This class represents the BioRadio device. It provides methods to connect, Configure and acquire signal data from a BioRadio device.

Constructor & Destructor Documentation

◆ BioRadioDevice() [1/4]

com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice ( )
protected

Default constructor

◆ BioRadioDevice() [2/4]

com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice ( HardwareLinkHandler  connection,
String  name 
) throws IOException

Constructor - Bio Radio Device

Parameters
connectionTake a HardwareLinkHandler for the connection parameter.
nameSets the name of the device as a string.
Exceptions
IOException

◆ BioRadioDevice() [3/4]

com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice ( HardwareLinkHandler  connection,
String  name,
BioRadioConfiguration  config 
)

Constructor - Bio Radio Device

Parameters
connectionTake a HardwareLinkHandler for the connection parameter.
nameSets the name of the device - string.
configTake a BioRadioConfiguration for the device to use.

◆ BioRadioDevice() [4/4]

com.glneurotech.devices.bioradio.BioRadioDevice.BioRadioDevice ( HardwareLinkHandler  connection,
String  name,
Optional< Integer >  signalBufferSize 
) throws IOException

Constructor - Bio Radio Device

Parameters
connectionTake a HardwareLinkHandler for the connection.
nameSets the name of the device - string
signalBufferSizeTake an optional integer for the signalBufferSize parameter.
Exceptions
IOException

Member Function Documentation

◆ addRawSampleToStream() [1/2]

final void com.glneurotech.devices.bioradio.BioRadioDevice.addRawSampleToStream ( long  ticks,
BioRadioSignal  signal,
int  value 
)

Add row sample to stream.

Parameters
ticksTake a long value for the ticks parameter.
signalTake a BioRadioSignal for the signal parameter.
valueTake an integer for the value parameter.

◆ addRawSampleToStream() [2/2]

final void com.glneurotech.devices.bioradio.BioRadioDevice.addRawSampleToStream ( long  ticks,
BioRadioSignal  signal,
long  value 
)

Add row sample to stream.

Parameters
ticksTake a long value for the ticks parameter.
signalTake a BioRadioSignal for the signal parameter.
valueTake a long value for the value parameter.

◆ connect()

boolean com.glneurotech.devices.bioradio.BioRadioDevice.connect ( )

Establishes a connection to the device.

Implements com.glneurotech.devices.common.IDaqDevice.

◆ disconnect()

void com.glneurotech.devices.bioradio.BioRadioDevice.disconnect ( )

Disconnect the application from the device

Implements com.glneurotech.devices.common.IDaqDevice.

◆ extractBioPotentialValueFromByteArray()

static int com.glneurotech.devices.bioradio.BioRadioDevice.extractBioPotentialValueFromByteArray ( byte []  source,
int  currentBytePos,
int  startBitPosition,
int  length 
)
static

Method will return an Integer32 based on the specified 4 bytes

Parameters
sourceByte array with the length of 4 bytes
currentBytePosCurrent byte position - integer
startBitPosition0 / 4 - Start bit position - integer
length12 / 16 /24 - Length as an integer.
Returns
int
Exceptions
RuntimeExceptionMethod was instructed to unpack bits from invalid bit position or for invalid length.

◆ getAuxiliarySignals()

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.

Returns
SignalGroup

◆ getBatteryInfo()

final BatteryInfo com.glneurotech.devices.bioradio.BioRadioDevice.getBatteryInfo ( ) throws InterruptedException, TimeoutException

Get the current battery information, including voltage, current, and charge state.

Returns
BatteryInfo data structure
Exceptions
InterruptedException
TimeoutException

◆ getBioPotentialSignals()

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.

Returns
SignalGroup

◆ getChannelConfig()

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.

Returns
ChannelConfiguration
Exceptions
InterruptedException
TimeoutException

◆ getCommonDAQParameters()

final BioRadioConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getCommonDAQParameters ( ) throws InterruptedException, IOException, TimeoutException

Returns the Common DAQ Parameters stored on the device

Returns
Exceptions
InterruptedException
IOException
TimeoutException

◆ getConfig()

final BioRadioConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getConfig ( )

Gets the current device configuration

Returns
BioRadioConfiguration

◆ getConfiguration()

final BioRadioConfiguration com.glneurotech.devices.bioradio.BioRadioDevice.getConfiguration ( ) throws InterruptedException, IOException, TimeoutException

Retrieves the current Configuration applied to the device.

Returns
BioRadioConfiguration
Exceptions
InterruptedException
IOException
TimeoutException

◆ getDaqWatchdogTimerTask()

TimerTask com.glneurotech.devices.bioradio.BioRadioDevice.getDaqWatchdogTimerTask ( )

Get the current watch dog timer task

Returns
TimerTask

◆ getDeviceStatus()

final void com.glneurotech.devices.bioradio.BioRadioDevice.getDeviceStatus ( ) throws InterruptedException, TimeoutException

Get the current device status, e.g., battery voltage

Exceptions
InterruptedException
TimeoutException

◆ getDeviceTime()

final LocalDateTime com.glneurotech.devices.bioradio.BioRadioDevice.getDeviceTime ( ) throws InterruptedException, TimeoutException

Returns the current time stored on the device

Returns
LocalDateTime
Exceptions
InterruptedException
TimeoutException

◆ getDeviceType()

DeviceTypeCode com.glneurotech.devices.bioradio.BioRadioDevice.getDeviceType ( )

Needed to change the inheritance structure to public from internal to get the Embeddinator-4K to work

Returns
DeviceTypeCode

◆ getDroppedPacketCount()

final long com.glneurotech.devices.bioradio.BioRadioDevice.getDroppedPacketCount ( )

Gets the number of dropped packets during streaming.

Returns
int

◆ getLastPacketCount()

final int com.glneurotech.devices.bioradio.BioRadioDevice.getLastPacketCount ( )

Gets the zero-based index of the last packet received from the device.

Returns
int

◆ getMemsSignals()

final SignalGroup com.glneurotech.devices.bioradio.BioRadioDevice.getMemsSignals ( )

The signal group that contains signals from Motion sensors, if any are configured.

Returns
SignalGroup

◆ getPulseOxSignals()

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.

Returns
SignalGroup

◆ getTotalAcquisitionTime()

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.

Returns
long ticks

◆ getTotalPackets()

final long com.glneurotech.devices.bioradio.BioRadioDevice.getTotalPackets ( )

The total number of packets received by the device.

◆ initializeSignalGroups()

void com.glneurotech.devices.bioradio.BioRadioDevice.initializeSignalGroups ( Optional< Integer >  signalBufferSize)

Initialize the signal groups

Parameters
signalBufferSizeTake an optional integer for the signal buffer size parameter.

◆ processAuxiliaryDataFromByteArray()

final void com.glneurotech.devices.bioradio.BioRadioDevice.processAuxiliaryDataFromByteArray ( byte []  packet,
int  currentBytePos,
int  auxiliaryChannelCounter 
)

Extract Auxiliary sensor block data

Parameters
packetPacket to parse
currentBytePosTake an integer for the current byte position.
auxiliaryChannelCounterTake an integer for the auxiliary channel counter parameter.
Exceptions
RuntimeExceptionMethod was instructed to unpack bits from invalid bit position or for invalid length.

◆ processPacketForSignalData()

void com.glneurotech.devices.bioradio.BioRadioDevice.processPacketForSignalData ( DeviceDataPacket  packet)

Process the signal packet data

Parameters
packetTake a DeviceDataPacket for the packet parameter.

◆ processPacketForStatusData()

void com.glneurotech.devices.bioradio.BioRadioDevice.processPacketForStatusData ( DeviceDataPacket  packet)

Process the status packet data.

Parameters
packetTake a DeviceDataPacket for the packet parameter.

◆ processPulseOxDataFromByteArray()

final void com.glneurotech.devices.bioradio.BioRadioDevice.processPulseOxDataFromByteArray ( byte []  packet,
int  currentBytePos,
int  noninChannelCounter 
)

Extract PulseOx sensor block data

Parameters
packetPacket to parse
currentBytePosTake an integer for the current byte position parameter.
noninChannelCounterTake an integer for noninChannelCounter parameter.
Exceptions
RuntimeExceptionMethod was instructed to unpack bits from invalid bit position or for invalid length.

◆ saveConfiguration() [1/2]

final void com.glneurotech.devices.bioradio.BioRadioDevice.saveConfiguration ( String  filePath)

Saves the current configuration to a file as xml

Parameters
filePathThe path to the file where the BioRadio configuration will be saved
Exceptions
RuntimeException

◆ saveConfiguration() [2/2]

final void com.glneurotech.devices.bioradio.BioRadioDevice.saveConfiguration ( FileOutputStream  stream) throws Exception

Writes the current configuration to a stream as xml

Parameters
streamThe stream where the BioRadio configuration will be written
Exceptions
Exception

◆ setChannelConfig()

final void com.glneurotech.devices.bioradio.BioRadioDevice.setChannelConfig ( ChannelConfiguration  channelConfig) throws InterruptedException, IOException, TimeoutException

To Configure the data collection parameters of an individual channel.

Returns
Exceptions
InterruptedException
IOException
TimeoutException

◆ setCommonDAQParameters()

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.

Returns
Exceptions
InterruptedException
IOException
TimeoutException

◆ setConfig()

final void com.glneurotech.devices.bioradio.BioRadioDevice.setConfig ( BioRadioConfiguration  value)

Sets the current device configuration

Parameters
valueTake a BioRadioConfiguration as parameter.

◆ setConfiguration() [1/3]

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

Parameters
filePathThe path to the file that contains the BioRadio configuration

◆ setConfiguration() [2/3]

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

Parameters
streamA stream that contains the BioRadio configuration
Exceptions
Exception

◆ setConfiguration() [3/3]

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.

Parameters
configTake a BioRadioConfiguration for the configuration parameter.
Exceptions
InterruptedException
IOException
TimeoutException

◆ setDaqWatchdogTimerTask()

void com.glneurotech.devices.bioradio.BioRadioDevice.setDaqWatchdogTimerTask ( TimerTask  daqWatchdogTimerTask)

Set the current watch dog timer task

Parameters
daqWatchdogTimerTaskTake a TimerTask as parameter.

◆ setDeviceTime()

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.

◆ setLastPacketCount()

final void com.glneurotech.devices.bioradio.BioRadioDevice.setLastPacketCount ( int  value)

Sets the zero-based index of the last packet received from the device.

Parameters
valueTake an iteger for last packet count.

◆ setTotalPackets()

final void com.glneurotech.devices.bioradio.BioRadioDevice.setTotalPackets ( long  value)

Sets the total number of packets received by the device

Parameters
valueTake a long value for the total packets.

◆ startAcquisition()

void com.glneurotech.devices.bioradio.BioRadioDevice.startAcquisition ( )

Starts acquisition of signal data from the BioRadio.

Implements com.glneurotech.devices.common.IDaqDevice.

◆ stopAcquisition()

void com.glneurotech.devices.bioradio.BioRadioDevice.stopAcquisition ( )

Stops the BioRadio from streaming data to the mobile device

Implements com.glneurotech.devices.common.IDaqDevice.

◆ waitForStatusInitialization()

boolean com.glneurotech.devices.bioradio.BioRadioDevice.waitForStatusInitialization ( )

Flag indicates whether or not the app should wait for status initialization

Returns

Member Data Documentation

◆ EventMarkerButtonPushed

Event<EventHandler<BioRadioButtonEventArgs> > com.glneurotech.devices.bioradio.BioRadioDevice.EventMarkerButtonPushed = new Event<EventHandler<BioRadioButtonEventArgs>>()

Event Handler for Event Marker Push Button


The documentation for this class was generated from the following file: