BioRadio SDK - Java Android
1.1
|
Public Member Functions | |
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 |
Public Attributes | |
Event< EventHandler< SignalDataEventArgs > > | SignalBufferOverflowed = new Event<EventHandler<SignalDataEventArgs>>() |
Event< EventHandler< CommunicationErrorArgs > > | CommunicationError = new Event<EventHandler<CommunicationErrorArgs>>() |
Event< EventHandler< EventArgs > > | GeneralOperationError = new Event<EventHandler<EventArgs>>() |
Static Public Attributes | |
static final int | _NUM_OF_RETRY = 10 |
static final int | _TIMEOUT_MS = 1000 |
Protected Member Functions | |
void | setIsConnected (boolean value) |
final void | setIsAcquiring (boolean value) |
void | getInternalFirmwareVersion () throws InterruptedException, TimeoutException |
The base class from which Great Lakes NeuroTechnologies data acquisition devices inherit.
com.glneurotech.devices.common.DaqDevice.DaqDevice | ( | HardwareLinkHandler | hardwareLink, |
String | name, | ||
Optional< Integer > | signalBufferSize | ||
) | throws IOException |
Daq device method.
hardwareLink | Take a HardwareLinkHandler as parameter. |
name | Take a string for name parameter. |
signalBufferSize | Take an optional integer. |
IOException |
void com.glneurotech.devices.common.DaqDevice.close | ( | ) | throws IOException |
Close the connection with the bio radio device.
IOException |
boolean com.glneurotech.devices.common.DaqDevice.connect | ( | ) |
Opens a connection to the device so that commands can be issued and data can be acquired.
Implements com.glneurotech.devices.common.IDaqDevice.
void com.glneurotech.devices.common.DaqDevice.disconnect | ( | ) |
Disconnects and closes the connection.
Implements com.glneurotech.devices.common.IDaqDevice.
final HardwareLinkHandler com.glneurotech.devices.common.DaqDevice.getConnection | ( | ) |
Gets connection.
final void com.glneurotech.devices.common.DaqDevice.getDeviceId | ( | ) | throws InterruptedException, TimeoutException |
Gets device Id.
InterruptedException | |
TimeoutException |
|
abstract |
Abstract method - get device type.
final String com.glneurotech.devices.common.DaqDevice.getFirmwareVersion | ( | ) |
The current device firmware version.
Implements com.glneurotech.devices.common.IDaqDevice.
final String com.glneurotech.devices.common.DaqDevice.getHardwareVersion | ( | ) |
The current device hardware version number.
Implements com.glneurotech.devices.common.IDaqDevice.
final DeviceTypeCode com.glneurotech.devices.common.DaqDevice.getInternalDeviceType | ( | ) | throws InterruptedException, TimeoutException |
Gets internal device type.
InterruptedException | |
TimeoutException |
final boolean com.glneurotech.devices.common.DaqDevice.getIsAcquiring | ( | ) |
Indicates whether the device is currently streaming signal data to the PC.
Implements com.glneurotech.devices.common.IDaqDevice.
boolean com.glneurotech.devices.common.DaqDevice.getIsConnected | ( | ) |
Indicates whether the device is currently connected to the PC and able to receive commands.
Implements com.glneurotech.devices.common.IDaqDevice.
final boolean com.glneurotech.devices.common.DaqDevice.getIsDeviceLocked | ( | ) |
Indicates whether the device is in locked mode. When a device is locked, the only commands that can be issued are to start and stop acquisition. All other commands are disabled.
final boolean com.glneurotech.devices.common.DaqDevice.getIsRecording | ( | ) |
Indicates whether the device is currently recording the raw data stream to a file.
final String com.glneurotech.devices.common.DaqDevice.getName | ( | ) |
The name associated with this device.
Implements com.glneurotech.devices.common.IDaqDevice.
final ArrayList<SignalGroup> com.glneurotech.devices.common.DaqDevice.getSignalGroups | ( | ) |
A list of all SignalGroups defined for this device.
Implements com.glneurotech.devices.common.IDaqDevice.
void com.glneurotech.devices.common.DaqDevice.lockDevice | ( | ) | throws InterruptedException, TimeoutException |
Locks the Great Lakes NeuroTechnologies device so that no other interactive commands will be accepted.
final void com.glneurotech.devices.common.DaqDevice.onCommuncationError | ( | CommunicationErrorArgs | args | ) |
On communication error
args |
final void com.glneurotech.devices.common.DaqDevice.onGeneralOperationError | ( | EventArgs | args | ) |
On general operation error.
args |
final void com.glneurotech.devices.common.DaqDevice.setConnection | ( | HardwareLinkHandler | value | ) |
Sets connection
value | Take a HardwareLinkHandler as parameter. |
void com.glneurotech.devices.common.DaqDevice.setDeviceTime | ( | ) | throws InterruptedException, TimeoutException |
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.
void com.glneurotech.devices.common.DaqDevice.setDeviceTime | ( | LocalDateTime | time | ) | throws InterruptedException, TimeoutException |
Sets the device time to a specific date/time value
time | The DateTime value to which the device will be set. |
final void com.glneurotech.devices.common.DaqDevice.setFirmwareVersion | ( | String | value | ) |
Sets firmware version
value | Take a string asa parameter. |
final void com.glneurotech.devices.common.DaqDevice.setHardwareVersion | ( | String | value | ) |
Sets Hardware version
value | Take a string as parameter. |
Implements com.glneurotech.devices.common.IDaqDevice.
|
abstract |
Begins streaming real-time data from the connected device.
Implements com.glneurotech.devices.common.IDaqDevice.
final void com.glneurotech.devices.common.DaqDevice.startRecording | ( | GlntStream | outputStream | ) |
Starts recording raw device data stream to the specified file name.
outputStream | The stream to which the recording should be written |
Implements com.glneurotech.devices.common.IDaqDevice.
|
abstract |
Stops streaming real-time data from the connected device.
Implements com.glneurotech.devices.common.IDaqDevice.
final void com.glneurotech.devices.common.DaqDevice.stopRecording | ( | ) |
Stops recording raw device data stream and closes the file. If the device is not currently recording, an exception will be thrown.
Implements com.glneurotech.devices.common.IDaqDevice.
void com.glneurotech.devices.common.DaqDevice.unlockDevice | ( | ) | throws InterruptedException, TimeoutException |
Sends the unlock command to the device.
|
abstract |
In a derived class, performs any additional initialization required in order for all device status properties to be valid. Returns false if the method times out waiting for a packet to be received.
Event<EventHandler<CommunicationErrorArgs> > com.glneurotech.devices.common.DaqDevice.CommunicationError = new Event<EventHandler<CommunicationErrorArgs>>() |
Raised when a communication error has occurred.
Event<EventHandler<EventArgs> > com.glneurotech.devices.common.DaqDevice.GeneralOperationError = new Event<EventHandler<EventArgs>>() |
Raised as a notification of a general operational error. Typically, if this event is raised, device operation can still continue.
This event passes the originally thrown exception that can be used to decide further program execution or to notify the end user that a problem has occurred. An example of such a condition is a disk full error when recording incoming data. In this scenario, recording will stop but the device object will continue to receive packets and otherwise operate normally.
Event<EventHandler<SignalDataEventArgs> > com.glneurotech.devices.common.DaqDevice.SignalBufferOverflowed = new Event<EventHandler<SignalDataEventArgs>>() |
Indicates that one or more Signals has overflowed its internal buffer
When data is read from a device, the data is stored in Signal objects, each of which use an internal buffer. If data is not read from the signal in a timely manner, the buffer can reach its capacity and a SignalBufferOverflowed event is raised. To avoid this error, subscribe to a SignalGroup's OnDataArrived event and read data from the signal.