BioRadio SDK - Java Android  1.1
com.glneurotech.devices.bioradio.VirtualDeviceAdapter Class Reference
Inheritance diagram for com.glneurotech.devices.bioradio.VirtualDeviceAdapter:
com.glneurotech.devices.common.IDeviceAdapter

Public Member Functions

final IDaqDevice getBaseDevice ()
 
final void setBaseDevice (IDaqDevice value)
 
final LocalDateTime getRecordingStartTime ()
 
final RingBufferTransport getBufferTransportLayer ()
 
final void setBufferTransportLayer (RingBufferTransport value)
 
final FileInputStream getInputFile ()
 
final void setInputFile (FileInputStream value)
 
 VirtualDeviceAdapter (IDaqDevice device, RingBufferTransport bufferTransport, FileInputStream inputStream) throws IOException
 
 VirtualDeviceAdapter (IDaqDevice device, RingBufferTransport bufferTransport, FileInputStream inputStream, LocalDateTime recordingStartTime) throws IOException
 
 VirtualDeviceAdapter (IDaqDevice device, RingBufferTransport bufferTransport, String fileName) throws IOException
 
final void feedNextChunk () throws IOException
 
final void feedNextChunk (int chunkSize) throws IOException
 
final boolean getEndOfFileReached ()
 
final void close () throws IOException
 

Static Public Attributes

static final int DefaultChunkSize = 32767
 

Detailed Description

Provides access to a "virtual" device that accepts input data from a file rather than streaming from a physical device.

Constructor & Destructor Documentation

◆ VirtualDeviceAdapter() [1/3]

com.glneurotech.devices.bioradio.VirtualDeviceAdapter.VirtualDeviceAdapter ( IDaqDevice  device,
RingBufferTransport  bufferTransport,
FileInputStream  inputStream 
) throws IOException

Constructor for virtual device adapter

Parameters
deviceTake a IDaqDevice as parameter.
bufferTransportTake a RingBufferTransport for the buffer transport parameter.
inputStreamTake a FileInputStream for the input stream parameter.
Exceptions
IOException

◆ VirtualDeviceAdapter() [2/3]

com.glneurotech.devices.bioradio.VirtualDeviceAdapter.VirtualDeviceAdapter ( IDaqDevice  device,
RingBufferTransport  bufferTransport,
FileInputStream  inputStream,
LocalDateTime  recordingStartTime 
) throws IOException

Overloaded constructor also takes a recording start time parameter

Parameters
deviceTake a IDaqDevice as parameter.
bufferTransportTake a RingBufferTransport for the buffer transport parameter.
inputStreamTake a FileInputStream for the input stream parameter.
recordingStartTimeTake a LocalDateTime for the recording start time.
Exceptions
IOException

◆ VirtualDeviceAdapter() [3/3]

com.glneurotech.devices.bioradio.VirtualDeviceAdapter.VirtualDeviceAdapter ( IDaqDevice  device,
RingBufferTransport  bufferTransport,
String  fileName 
) throws IOException

Overloaded constructor takes an input file path string instead of a FileInputStream

Parameters
deviceTake a IDaqDevice as parameter.
bufferTransportTake a RingBufferTransport for the buffer transport parameter.
fileNameTake a string for the file name parameter.
Exceptions
IOException

Member Function Documentation

◆ close()

final void com.glneurotech.devices.bioradio.VirtualDeviceAdapter.close ( ) throws IOException

Closes the device and input stream

Exceptions
IOException

◆ feedNextChunk() [1/2]

final void com.glneurotech.devices.bioradio.VirtualDeviceAdapter.feedNextChunk ( ) throws IOException

Streams the next chunk of data to the virtual device.

Exceptions
IOException

◆ feedNextChunk() [2/2]

final void com.glneurotech.devices.bioradio.VirtualDeviceAdapter.feedNextChunk ( int  chunkSize) throws IOException

Streams a chunk of data of a specified length to the virtual device.

Parameters
chunkSizeThe number of bytes to stream to the device. Take a integer as parameter for the chunk size.
Exceptions
IOException

◆ getBaseDevice()

final IDaqDevice com.glneurotech.devices.bioradio.VirtualDeviceAdapter.getBaseDevice ( )

Gets the underlying DaqDevice object receiving input data from the file.

◆ getBufferTransportLayer()

final RingBufferTransport com.glneurotech.devices.bioradio.VirtualDeviceAdapter.getBufferTransportLayer ( )

Gets buffer transport layer

Returns
RingBufferTransport

◆ getEndOfFileReached()

final boolean com.glneurotech.devices.bioradio.VirtualDeviceAdapter.getEndOfFileReached ( )

Indicates when the end of the input file has been reached and there is no more data to feed to the device.

Returns
boolean

◆ getInputFile()

final FileInputStream com.glneurotech.devices.bioradio.VirtualDeviceAdapter.getInputFile ( )

Gets input file.

Returns
FileInputStream

◆ getRecordingStartTime()

final LocalDateTime com.glneurotech.devices.bioradio.VirtualDeviceAdapter.getRecordingStartTime ( )

The date and time at which the recording began.

Returns
LocalDateTime

◆ setBaseDevice()

final void com.glneurotech.devices.bioradio.VirtualDeviceAdapter.setBaseDevice ( IDaqDevice  value)

Sets the underlying DaqDevice object receiving input data from the file.

◆ setBufferTransportLayer()

final void com.glneurotech.devices.bioradio.VirtualDeviceAdapter.setBufferTransportLayer ( RingBufferTransport  value)

Sets buffer transport layer

Parameters
valueTake a RingBufferTransport as parameter.

◆ setInputFile()

final void com.glneurotech.devices.bioradio.VirtualDeviceAdapter.setInputFile ( FileInputStream  value)

Sets input file

Parameters
valueTake a FileInputStream as parameter.

Member Data Documentation

◆ DefaultChunkSize

final int com.glneurotech.devices.bioradio.VirtualDeviceAdapter.DefaultChunkSize = 32767
static

The default number of bytes that will be read from the input file and fed to the virtual device input stream. This value is 32,767.


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