BioRadio SDK - Java Android  1.1
com.glneurotech.devices.common.transportlayer.HardwareLinkHandler Class Reference
Inheritance diagram for com.glneurotech.devices.common.transportlayer.HardwareLinkHandler:

Classes

interface  BadPacketHandler
 
interface  DataReceivedHandler
 
enum  PacketParserState
 

Public Member Functions

final IDeviceTransport getTransportLayer ()
 
final void setTransportLayer (IDeviceTransport value)
 
final boolean getUsesChecksum ()
 
final void setUsesChecksum (boolean value)
 
final boolean getUsesResponseBit ()
 
final void setUsesResponseBit (boolean value)
 
final DeviceDataPacket sendCommand (DeviceDataPacket command, int timeoutMilliseconds) throws TimeoutException
 
final DeviceDataPacket sendCommand (DeviceDataPacket command) throws TimeoutException
 
final DeviceDataPacket sendCommand (DeviceDataPacket commandPacket, int maxRetries, int timeoutMilliSeconds, boolean isLongRunning) throws InterruptedException, TimeoutException
 
final DeviceDataPacket sendCommand (DeviceDataPacket commandPacket, int maxRetries, int timeoutMilliSeconds) throws InterruptedException, TimeoutException
 
final void sendDirectCommand (DeviceDataPacket command) throws IOException
 
 HardwareLinkHandler (IDeviceTransport transport)
 
final void open ()
 
final void close ()
 
final void startListening ()
 
final void stopListenerThread () throws Exception
 
final void stopListenerThread (boolean keepLongRunning) throws Exception
 
final boolean getIsRecordingRawData ()
 
final void setIsRecordingRawData (boolean value)
 
final void recordRawData (GlntStream outputStream, RecordingHeader header)
 
void listenForData ()
 
final void processData ()
 

Public Attributes

Event< DataReceivedHandlerDataMessageReceived = new Event<DataReceivedHandler>()
 
Event< BadPacketHandlerBadPacketReceived = new Event<BadPacketHandler>()
 
Event< EventHandler< UnhandledExceptionEventArgs > > RecordingFailure = new Event<EventHandler<UnhandledExceptionEventArgs>>()
 

Static Public Attributes

static final byte PacketSyncByte = (byte) 0xF0
 

Member Function Documentation

◆ close()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.close ( )

Close method.

◆ getIsRecordingRawData()

final boolean com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.getIsRecordingRawData ( )

Get is recording raw data.

Returns

◆ getTransportLayer()

final IDeviceTransport com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.getTransportLayer ( )

Get a transport layer method.

Returns

◆ getUsesChecksum()

final boolean com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.getUsesChecksum ( )

Get uses checksum method.

Returns

◆ getUsesResponseBit()

final boolean com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.getUsesResponseBit ( )

Set to false before expecting the response to a non-complient device. It will be automatically reset

◆ listenForData()

void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.listenForData ( )

Listen for Data method.

◆ open()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.open ( )

Open method.

◆ processData()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.processData ( )

Process data method.

Stop recording data method.

Exceptions
IOException

#region IDisposable Members

#endregion

◆ recordRawData()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.recordRawData ( GlntStream  outputStream,
RecordingHeader  header 
)

Record raw data method.

Parameters
outputStreamTake a GlntStream as parameter for the output stream.
headerTake a ReacordingHeader as parameter.

◆ sendCommand() [1/4]

final DeviceDataPacket com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.sendCommand ( DeviceDataPacket  command,
int  timeoutMilliseconds 
) throws TimeoutException

Set command method for a device data packet.

Parameters
commandTake an DeviceDataPacket as parameter.
timeoutMillisecondsTake an integer for the timeout in milliseconds.
Returns
Exceptions
TimeoutException

◆ sendCommand() [2/4]

final DeviceDataPacket com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.sendCommand ( DeviceDataPacket  command) throws TimeoutException

Set command method for a device data packet.

Parameters
commandTake an DeviceDataPacket as parameter.
Returns
Exceptions
TimeoutException

◆ sendCommand() [3/4]

final DeviceDataPacket com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.sendCommand ( DeviceDataPacket  commandPacket,
int  maxRetries,
int  timeoutMilliSeconds,
boolean  isLongRunning 
) throws InterruptedException, TimeoutException

Set command method for a device data packet.

Parameters
commandPacketTake an DeviceDataPacket as parameter.
maxRetriesTake an integer for maximum retries.
timeoutMilliSecondsTake an integer for the timeout in milliseconds.
isLongRunningTake a boolean for isLongRunning parameter.
Returns
Exceptions
InterruptedException
TimeoutException

◆ sendCommand() [4/4]

final DeviceDataPacket com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.sendCommand ( DeviceDataPacket  commandPacket,
int  maxRetries,
int  timeoutMilliSeconds 
) throws InterruptedException, TimeoutException

Set command method for a device data packet.

Parameters
commandPacketTake an DeviceDataPacket as parameter.
maxRetriesTake an integer for maximum retries.
timeoutMilliSecondsTake an integer for the timeout in milliseconds.
Returns
Exceptions
InterruptedException
TimeoutException

◆ sendDirectCommand()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.sendDirectCommand ( DeviceDataPacket  command) throws IOException

Send direct command method.

Parameters
commandTake a DeviceDataPacket as parameter.
Exceptions
IOException

◆ setIsRecordingRawData()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.setIsRecordingRawData ( boolean  value)

Set is recording raw data.

Parameters
value

◆ setTransportLayer()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.setTransportLayer ( IDeviceTransport  value)

Set a transport layer method.

Parameters
valueTake an IDeviceTransport as parameter.

◆ setUsesChecksum()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.setUsesChecksum ( boolean  value)

Set Uses checksum method.

Parameters
valueTake a boolean value as parameter.

◆ setUsesResponseBit()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.setUsesResponseBit ( boolean  value)

Set the uses response bit.

Parameters
valueTake a boolean value as parameter.

◆ startListening()

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.startListening ( )

Start listening method.

◆ stopListenerThread() [1/2]

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.stopListenerThread ( ) throws Exception

Stop listener thread method.

Exceptions
Exception

◆ stopListenerThread() [2/2]

final void com.glneurotech.devices.common.transportlayer.HardwareLinkHandler.stopListenerThread ( boolean  keepLongRunning) throws Exception

Stop listener thread method.

Parameters
keepLongRunningTake a boolean as parameter for keep long running.
Exceptions
Exception

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