Bio Radio SDK - Xamarin Android
GLNeuroTech.Devices.Common.DaqDevice Class Referenceabstract

The base class from which Great Lakes NeuroTechnologies data acquisition devices inherit. More...

Inheritance diagram for GLNeuroTech.Devices.Common.DaqDevice:
GLNeuroTech.Devices.Common.IDaqDevice

Public Member Functions

virtual bool Connect ()
 Opens a connection to the device so that commands can be issued and data can be acquired. More...
 
virtual void Disconnect ()
 Disconnects and closes the connection. More...
 
abstract void StartAcquisition ()
 Begins streaming real-time data from the connected device. More...
 
abstract void StopAcquisition ()
 Stops streaming real-time data from the connected device. More...
 
virtual void UnlockDevice ()
 Sends the unlock command to the device. More...
 
virtual void LockDevice ()
 Locks the Great Lakes NeuroTechnologies device so that no other interactive commands will be accepted. More...
 
virtual void SetDeviceTime ()
 Sends the current time to the device to synchronize with PC system time. More...
 
virtual void SetDeviceTime (DateTime time)
 Sets the device time to a specific date/time value More...
 
void StartRecording (Stream outputStream)
 Starts recording raw device data stream to the specified file name. More...
 
void StopRecording ()
 Stops recording raw device data stream and closes the file. If the device is not currently recording, an exception will be thrown. More...
 
virtual void Dispose ()
 Dispose a Daq device. More...
 

Protected Member Functions

 DaqDevice ()
 

Properties

virtual bool IsConnected [get, protected set]
 Indicates whether the device is currently connected to the PC and able to receive commands. More...
 
bool IsDeviceLocked [get, set]
 Indicates whether the device is in locked mode. More...
 
bool IsAcquiring [get, protected set]
 Indicates whether the device is currently streaming signal data to the PC. More...
 
bool IsRecording [get, set]
 Indicates whether the device is currently recording the raw data stream to a file. More...
 
string HardwareVersion [get, set]
 The current device hardware version number. More...
 
string FirmwareVersion [get, set]
 The current device firmware version. More...
 
string Name [get, set]
 The name associated with this device. More...
 
List< SignalGroupSignalGroups [get]
 A list of all SignalGroups defined for this device. More...
 
- Properties inherited from GLNeuroTech.Devices.Common.IDaqDevice
bool IsConnected [get]
 True if device is connected. Otherwise, False. More...
 
string Name [get]
 The name of the device. Typically this is the ID that is printed on the device's label. More...
 
string FirmwareVersion [get]
 The firmware version of the connected device. More...
 
string HardwareVersion [get, set]
 The hardware version of the connected device. More...
 
List< SignalGroupSignalGroups [get]
 Returns a list of all signal groups supported by the device. More...
 
bool IsAcquiring [get]
 Returns whether the device is currently acquiring data More...
 

Events

EventHandler< SignalDataEventArgsSignalBufferOverflowed
 Indicates that one or more Signals has overflowed its internal buffer More...
 
EventHandler< CommunicationErrorArgsCommunicationError
 Raised when a communication error has occurred. More...
 
EventHandler< EventArgs > GeneralOperationError
 Raised as a notification of a general operational error. Typically, if this event is raised, device operation can still continue. More...
 
- Events inherited from GLNeuroTech.Devices.Common.IDaqDevice
EventHandler< CommunicationErrorArgsCommunicationError
 Raised when a communication error occurs. Refer to the GLNeuroTech.Devices.Common.CommunicationErrorArgs object for additional information"/> More...
 

Detailed Description

The base class from which Great Lakes NeuroTechnologies data acquisition devices inherit.

Constructor & Destructor Documentation

◆ DaqDevice()

GLNeuroTech.Devices.Common.DaqDevice.DaqDevice ( )
protected

Member Function Documentation

◆ Connect()

virtual bool GLNeuroTech.Devices.Common.DaqDevice.Connect ( )
virtual

Opens a connection to the device so that commands can be issued and data can be acquired.

Implements GLNeuroTech.Devices.Common.IDaqDevice.

◆ Disconnect()

virtual void GLNeuroTech.Devices.Common.DaqDevice.Disconnect ( )
virtual

Disconnects and closes the connection.

Implements GLNeuroTech.Devices.Common.IDaqDevice.

◆ Dispose()

virtual void GLNeuroTech.Devices.Common.DaqDevice.Dispose ( )
virtual

Dispose a Daq device.

◆ LockDevice()

virtual void GLNeuroTech.Devices.Common.DaqDevice.LockDevice ( )
virtual

Locks the Great Lakes NeuroTechnologies device so that no other interactive commands will be accepted.

Returns
Boolean value indicating whether the lock command was successful.

◆ SetDeviceTime() [1/2]

virtual void GLNeuroTech.Devices.Common.DaqDevice.SetDeviceTime ( )
virtual

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.

◆ SetDeviceTime() [2/2]

virtual void GLNeuroTech.Devices.Common.DaqDevice.SetDeviceTime ( DateTime  time)
virtual

Sets the device time to a specific date/time value

Parameters
timeThe DateTime value to which the device will be set.

◆ StartAcquisition()

abstract void GLNeuroTech.Devices.Common.DaqDevice.StartAcquisition ( )
pure virtual

Begins streaming real-time data from the connected device.

Implements GLNeuroTech.Devices.Common.IDaqDevice.

◆ StartRecording()

void GLNeuroTech.Devices.Common.DaqDevice.StartRecording ( Stream  outputStream)

Starts recording raw device data stream to the specified file name.

Parameters
outputStreamThe stream to which the recording should be written

Implements GLNeuroTech.Devices.Common.IDaqDevice.

◆ StopAcquisition()

abstract void GLNeuroTech.Devices.Common.DaqDevice.StopAcquisition ( )
pure virtual

Stops streaming real-time data from the connected device.

Implements GLNeuroTech.Devices.Common.IDaqDevice.

◆ StopRecording()

void 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 GLNeuroTech.Devices.Common.IDaqDevice.

◆ UnlockDevice()

virtual void GLNeuroTech.Devices.Common.DaqDevice.UnlockDevice ( )
virtual

Sends the unlock command to the device.

Returns
Boolean value indicating whether the unlock command was successful.

Property Documentation

◆ FirmwareVersion

string GLNeuroTech.Devices.Common.DaqDevice.FirmwareVersion
getset

The current device firmware version.

◆ HardwareVersion

string GLNeuroTech.Devices.Common.DaqDevice.HardwareVersion
getset

The current device hardware version number.

◆ IsAcquiring

bool GLNeuroTech.Devices.Common.DaqDevice.IsAcquiring
getprotected set

Indicates whether the device is currently streaming signal data to the PC.

◆ IsConnected

virtual bool GLNeuroTech.Devices.Common.DaqDevice.IsConnected
getprotected set

Indicates whether the device is currently connected to the PC and able to receive commands.

◆ IsDeviceLocked

bool GLNeuroTech.Devices.Common.DaqDevice.IsDeviceLocked
getset

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.

◆ IsRecording

bool GLNeuroTech.Devices.Common.DaqDevice.IsRecording
getset

Indicates whether the device is currently recording the raw data stream to a file.

◆ Name

string GLNeuroTech.Devices.Common.DaqDevice.Name
getset

The name associated with this device.

◆ SignalGroups

List<SignalGroup> GLNeuroTech.Devices.Common.DaqDevice.SignalGroups
get

A list of all SignalGroups defined for this device.

Event Documentation

◆ CommunicationError

EventHandler<CommunicationErrorArgs> GLNeuroTech.Devices.Common.DaqDevice.CommunicationError

Raised when a communication error has occurred.

◆ GeneralOperationError

EventHandler<EventArgs> GLNeuroTech.Devices.Common.DaqDevice.GeneralOperationError

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.

◆ SignalBufferOverflowed

EventHandler<SignalDataEventArgs> GLNeuroTech.Devices.Common.DaqDevice.SignalBufferOverflowed

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.