BowlerKernel
Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection Class Reference
Inheritance diagram for com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection:
Inheritance graph
[legend]
Collaboration diagram for com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection:
Collaboration graph
[legend]

Public Member Functions

 BluetoothSerialConnection (BlueCoveManager blue, String deviceAddress)
 
String getPort ()
 
synchronized boolean connect ()
 
synchronized void disconnect ()
 
String toString ()
 
int getBaud ()
 
BlueCoveManager getBlueManager ()
 
boolean reconnect ()
 
boolean waitingForConnection ()
 
- Public Member Functions inherited from com.neuronrobotics.sdk.common.BowlerAbstractConnection
void setThreadedUpstreamPackets (boolean up)
 
BowlerDatagram sendSynchronusly (BowlerDatagram sendable)
 
synchronized BowlerDatagram sendSynchronusly (BowlerDatagram sendable, boolean switchParser)
 
void sendAsync (BowlerDatagram sendable) throws IOException
 
void setSynchronusPacketTimeoutTime (int sleepTime)
 
int getSleepTime ()
 
long msSinceLastSend ()
 
synchronized void setConnected (boolean c)
 
boolean isConnected ()
 
void clearLastSyncronousResponse ()
 
BowlerDatagram getLastSyncronousResponse ()
 
void onDataReceived (BowlerDatagram data)
 
void addDatagramListener (IBowlerDatagramListener listener)
 
void removeDatagramListener (IBowlerDatagramListener listener)
 
void setDataIns (DataInputStream dataIns)
 
DataInputStream getDataIns () throws NullPointerException
 
void setDataOuts (DataOutputStream dataOuts)
 
DataOutputStream getDataOuts () throws NullPointerException
 
void setChunkSize (int chunkSize)
 
int getChunkSize ()
 
void setAsyncQueue (QueueManager asyncQueue)
 
void setSyncQueue (QueueManager syncQueue)
 
QueueManager getAsyncQueue ()
 
QueueManager getSyncQueue ()
 
void addConnectionEventListener (IConnectionEventListener l)
 
void removeConnectionEventListener (IConnectionEventListener l)
 
void setSynchronousDatagramListener (ISynchronousDatagramListener l)
 
void removeSynchronousDatagramListener (ISynchronousDatagramListener l)
 
RpcEncapsulation locateRpc (String namespace, BowlerMethod method, String rpcString)
 
Object[] parseResponse (String namespace, BowlerMethod method, String rpcString, BowlerDatagram dg)
 
Object[] send (MACAddress addr, String namespace, BowlerMethod method, String rpcString, Object[] arguments, int retry) throws DeviceConnectionException
 
boolean isInitializedNamespaces ()
 
ArrayList< String > getNamespaces (MACAddress addr)
 
boolean hasNamespace (String string, MACAddress addr)
 
ArrayList< RpcEncapsulationgetRpcList (String namespace, MACAddress addr)
 
BowlerDatagram send (BowlerAbstractCommand command, MACAddress addr, int retry) throws NoConnectionAvailableException, InvalidResponseException
 
BowlerDatagram send (BowlerAbstractCommand command, MACAddress addr, int retry, boolean switchParser) throws NoConnectionAvailableException, InvalidResponseException
 
BowlerDatagram send (BowlerAbstractCommand command, MACAddress addr) throws NoConnectionAvailableException, InvalidResponseException
 
BowlerDatagram send (BowlerAbstractCommand command, MACAddress addr, boolean switchParser) throws NoConnectionAvailableException, InvalidResponseException
 
boolean ping (MACAddress mac)
 
boolean ping (MACAddress mac, boolean switchParser)
 
void startHeartBeat ()
 
void startHeartBeat (long msHeartBeatTime)
 
void stopHeartBeat ()
 
double getPercentagePrint ()
 
void setPercentagePrint (double percentagePrint)
 
long getLastWrite ()
 
void setLastWrite (long lastWrite)
 
boolean isUseThreadedStack ()
 
void setUseThreadedStack (boolean useThreadedStack)
 
boolean isBeater ()
 
void setBeater (boolean beater)
 
BowlerDatagram loadPacketFromPhy (ByteList bytesToPacketBuffer) throws NullPointerException, IOException
 
void write (byte[] data) throws IOException
 

Private Member Functions

void init ()
 
synchronized boolean recon ()
 

Private Attributes

int sleepTime = 800
 
int pollTimeoutTime = 5
 
String bluetoothAddress =null
 
final int baud = 115200
 
BlueCoveManager blue = null
 
boolean connecting =false
 
boolean reconOk = false
 

Additional Inherited Members

- Static Public Member Functions inherited from com.neuronrobotics.sdk.common.BowlerAbstractConnection
static BowlerAbstractCommand getCommand (String namespace, BowlerMethod method, String rpcString, Object[] arguments, RpcEncapsulation rpc)
 
- Protected Member Functions inherited from com.neuronrobotics.sdk.common.BowlerAbstractConnection
BowlerDatagram fireSyncOnReceive (BowlerDatagram datagram)
 
void fireAsyncOnResponse (BowlerDatagram datagram)
 
void waitForConnectioToBeReady ()
 

Detailed Description

The Class BluetoothSerialConnection.

Definition at line 29 of file BluetoothSerialConnection.java.

Constructor & Destructor Documentation

◆ BluetoothSerialConnection()

com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.BluetoothSerialConnection ( BlueCoveManager  blue,
String  deviceAddress 
)

Default Constructor.

Using this constructor will require that at least the port be set later on.

The baudrate will default to 115200bps.

Parameters
bluethe blue
deviceAddressthe device address

Definition at line 64 of file BluetoothSerialConnection.java.

References com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.blue, com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.bluetoothAddress, com.neuronrobotics.sdk.wireless.bluetooth.BlueCoveManager.getDevice(), com.neuronrobotics.sdk.common.Log.info(), and com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.init().

Here is the call graph for this function:

Member Function Documentation

◆ connect()

synchronized boolean com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.connect ( )

◆ disconnect()

synchronized void com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.disconnect ( )

◆ getBaud()

int com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.getBaud ( )

Gets the baud.

Returns
the baud

Definition at line 160 of file BluetoothSerialConnection.java.

References com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.baud.

◆ getBlueManager()

BlueCoveManager com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.getBlueManager ( )

◆ getPort()

String com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.getPort ( )

◆ init()

void com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.init ( )
private

◆ recon()

synchronized boolean com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.recon ( )
private

◆ reconnect()

boolean com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.reconnect ( )

Reconnect.

Returns
true, if successful

Definition at line 182 of file BluetoothSerialConnection.java.

References com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.recon(), and com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.reconOk.

Here is the call graph for this function:

◆ toString()

String com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.toString ( )

◆ waitingForConnection()

boolean com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.waitingForConnection ( )

Attempt to re-establish a connection. Return if the attempt was successful.

Returns
true, if successful Attempt to re-establish a connection. Return if the attempt was successful.
true, if successful

Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.

Definition at line 209 of file BluetoothSerialConnection.java.

References com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.connecting.

Member Data Documentation

◆ baud

final int com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.baud = 115200
private

◆ blue

BlueCoveManager com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.blue = null
private

◆ bluetoothAddress

String com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.bluetoothAddress =null
private

◆ connecting

boolean com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.connecting =false
private

◆ pollTimeoutTime

int com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.pollTimeoutTime = 5
private

The poll timeout time.

Definition at line 35 of file BluetoothSerialConnection.java.

◆ reconOk

boolean com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.reconOk = false
private

◆ sleepTime

int com.neuronrobotics.sdk.wireless.bluetooth.BluetoothSerialConnection.sleepTime = 800
private

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