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

Public Member Functions

 UDPBowlerConnection ()
 
 UDPBowlerConnection (InetAddress set)
 
 UDPBowlerConnection (InetAddress set, int port)
 
void setAddress (InetAddress set)
 
 UDPBowlerConnection (int port)
 
DataInputStream getDataIns () throws NullPointerException
 
DataOutputStream getDataOuts () throws NullPointerException
 
void write (byte[] data) throws IOException
 
BowlerDatagram loadPacketFromPhy (ByteList bytesToPacketBuffer) throws NullPointerException, IOException
 
void disconnect ()
 
boolean connect ()
 
boolean reconnect () throws IOException
 
boolean waitingForConnection ()
 
ArrayList< InetAddress > getAllAddresses ()
 
void setAddress (String address)
 
- 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)
 
void setDataOuts (DataOutputStream dataOuts)
 
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)
 

Private Member Functions

void init ()
 

Private Attributes

int sleepTime = 5000
 
int port = 1865
 
InetAddress IPAddressSet =null
 
ArrayList< InetAddress > addrs =null
 
DatagramSocket udpSock = null
 

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 UDPBowlerConnection.

Definition at line 40 of file UDPBowlerConnection.java.

Constructor & Destructor Documentation

◆ UDPBowlerConnection() [1/4]

com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection ( )

Instantiates a new UDP bowler connection.

Definition at line 62 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.init().

Here is the call graph for this function:

◆ UDPBowlerConnection() [2/4]

com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection ( InetAddress  set)

Instantiates a new UDP bowler connection.

Parameters
setthe set

Definition at line 71 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress().

Here is the call graph for this function:

◆ UDPBowlerConnection() [3/4]

com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection ( InetAddress  set,
int  port 
)

Instantiates a new UDP bowler connection.

Parameters
setthe set
portthe port

Definition at line 82 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), com.neuronrobotics.sdk.network.UDPBowlerConnection.port, and com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress().

Here is the call graph for this function:

◆ UDPBowlerConnection() [4/4]

com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection ( int  port)

Instantiates a new UDP bowler connection.

Parameters
portthe port

Definition at line 102 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.port.

Here is the call graph for this function:

Member Function Documentation

◆ connect()

boolean com.neuronrobotics.sdk.network.UDPBowlerConnection.connect ( )

◆ disconnect()

void com.neuronrobotics.sdk.network.UDPBowlerConnection.disconnect ( )

◆ getAllAddresses()

ArrayList<InetAddress> com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses ( )

◆ getDataIns()

DataInputStream com.neuronrobotics.sdk.network.UDPBowlerConnection.getDataIns ( ) throws NullPointerException

Gets the data ins.

Returns
the data ins
Exceptions
NullPointerExceptionthe null pointer exception

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

Definition at line 115 of file UDPBowlerConnection.java.

◆ getDataOuts()

DataOutputStream com.neuronrobotics.sdk.network.UDPBowlerConnection.getDataOuts ( ) throws NullPointerException

Gets the data outs.

Returns
the data outs
Exceptions
NullPointerExceptionthe null pointer exception

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

Definition at line 127 of file UDPBowlerConnection.java.

◆ init()

void com.neuronrobotics.sdk.network.UDPBowlerConnection.init ( )
private

◆ loadPacketFromPhy()

BowlerDatagram com.neuronrobotics.sdk.network.UDPBowlerConnection.loadPacketFromPhy ( ByteList  bytesToPacketBuffer) throws NullPointerException, IOException

Load packet from phy.

Parameters
bytesToPacketBufferthe bytes to packet buffer
Returns
the bowler datagram
Exceptions
NullPointerExceptionthe null pointer exception
IOExceptionSignals that an I/O exception has occurred.

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

Definition at line 159 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.addrs, com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses(), com.neuronrobotics.sdk.common.Log.info(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.udpSock.

Here is the call graph for this function:

◆ reconnect()

boolean com.neuronrobotics.sdk.network.UDPBowlerConnection.reconnect ( ) throws IOException

Reconnect.

Returns
true, if successful
Exceptions
IOExceptionSignals that an I/O exception has occurred.

Definition at line 263 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.connect(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.disconnect().

Here is the call graph for this function:

◆ setAddress() [1/2]

void com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress ( InetAddress  set)

◆ setAddress() [2/2]

void com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress ( String  address)

Sets the address.

Parameters
addressthe new address

Definition at line 311 of file UDPBowlerConnection.java.

References com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress().

Here is the call graph for this function:

◆ waitingForConnection()

boolean com.neuronrobotics.sdk.network.UDPBowlerConnection.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 273 of file UDPBowlerConnection.java.

◆ write()

void com.neuronrobotics.sdk.network.UDPBowlerConnection.write ( byte[]  data) throws IOException

Member Data Documentation

◆ addrs

ArrayList<InetAddress> com.neuronrobotics.sdk.network.UDPBowlerConnection.addrs =null
private

◆ IPAddressSet

InetAddress com.neuronrobotics.sdk.network.UDPBowlerConnection.IPAddressSet =null
private

◆ port

int com.neuronrobotics.sdk.network.UDPBowlerConnection.port = 1865
private

◆ sleepTime

int com.neuronrobotics.sdk.network.UDPBowlerConnection.sleepTime = 5000
private

The sleep time.

Definition at line 43 of file UDPBowlerConnection.java.

Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.init().

◆ udpSock

DatagramSocket com.neuronrobotics.sdk.network.UDPBowlerConnection.udpSock = null
private

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