BowlerKernel
|
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) |
![]() | |
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< RpcEncapsulation > | getRpcList (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 BowlerAbstractCommand | getCommand (String namespace, BowlerMethod method, String rpcString, Object[] arguments, RpcEncapsulation rpc) |
![]() | |
BowlerDatagram | fireSyncOnReceive (BowlerDatagram datagram) |
void | fireAsyncOnResponse (BowlerDatagram datagram) |
void | waitForConnectioToBeReady () |
The Class UDPBowlerConnection.
Definition at line 40 of file UDPBowlerConnection.java.
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().
com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection | ( | InetAddress | set | ) |
Instantiates a new UDP bowler connection.
set | the set |
Definition at line 71 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress().
com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection | ( | InetAddress | set, |
int | port | ||
) |
Instantiates a new UDP bowler connection.
set | the set |
port | the 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().
com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection | ( | int | port | ) |
Instantiates a new UDP bowler connection.
port | the port |
Definition at line 102 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.port.
boolean com.neuronrobotics.sdk.network.UDPBowlerConnection.connect | ( | ) |
Attempt to establish a connection. Return if the attempt was successful.
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.
Definition at line 235 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.isConnected(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.setConnected(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.udpSock.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.reconnect().
void com.neuronrobotics.sdk.network.UDPBowlerConnection.disconnect | ( | ) |
Disconnect and deactive the current connection.
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.
Definition at line 223 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.common.BowlerAbstractConnection.setConnected(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.udpSock.
Referenced by com.neuronrobotics.sdk.network.BowlerTCPClient.getAvailableSockets(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.reconnect().
ArrayList<InetAddress> com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses | ( | ) |
Gets the all addresses.
Definition at line 285 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.addrs, com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.ping(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.write().
Referenced by com.neuronrobotics.sdk.network.BowlerTCPClient.getAvailableSockets(), com.neuronrobotics.sdk.network.UDPBowlerConnection.loadPacketFromPhy(), com.neuronrobotics.sdk.ui.UDPConnectionPanel.NetworkSearchProcess.run(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress().
DataInputStream com.neuronrobotics.sdk.network.UDPBowlerConnection.getDataIns | ( | ) | throws NullPointerException |
Gets the data ins.
NullPointerException | the null pointer exception |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.
Definition at line 115 of file UDPBowlerConnection.java.
DataOutputStream com.neuronrobotics.sdk.network.UDPBowlerConnection.getDataOuts | ( | ) | throws NullPointerException |
Gets the data outs.
NullPointerException | the null pointer exception |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.
Definition at line 127 of file UDPBowlerConnection.java.
|
private |
Inits the.
Definition at line 202 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.connect(), com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.network.UDPBowlerConnection.IPAddressSet, com.neuronrobotics.sdk.common.BowlerAbstractConnection.setChunkSize(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.setSynchronusPacketTimeoutTime(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.sleepTime.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection().
BowlerDatagram com.neuronrobotics.sdk.network.UDPBowlerConnection.loadPacketFromPhy | ( | ByteList | bytesToPacketBuffer | ) | throws NullPointerException, IOException |
Load packet from phy.
bytesToPacketBuffer | the bytes to packet buffer |
NullPointerException | the null pointer exception |
IOException | Signals 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.
boolean com.neuronrobotics.sdk.network.UDPBowlerConnection.reconnect | ( | ) | throws IOException |
Reconnect.
IOException | Signals 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().
void com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress | ( | InetAddress | set | ) |
Sets the address.
set | the new address |
Definition at line 93 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.IPAddressSet.
Referenced by com.neuronrobotics.sdk.ui.UDPConnectionPanel.getConnection(), com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection().
void com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress | ( | String | address | ) |
Sets the address.
address | the new address |
Definition at line 311 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress().
boolean com.neuronrobotics.sdk.network.UDPBowlerConnection.waitingForConnection | ( | ) |
Attempt to re-establish a connection. Return if the attempt was successful.
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.
Definition at line 273 of file UDPBowlerConnection.java.
void com.neuronrobotics.sdk.network.UDPBowlerConnection.write | ( | byte[] | data | ) | throws IOException |
Write.
data | the data |
IOException | Signals that an I/O exception has occurred. |
Reimplemented from com.neuronrobotics.sdk.common.BowlerAbstractConnection.
Definition at line 139 of file UDPBowlerConnection.java.
References com.neuronrobotics.sdk.network.UDPBowlerConnection.IPAddressSet, com.neuronrobotics.sdk.network.UDPBowlerConnection.port, com.neuronrobotics.sdk.common.BowlerAbstractConnection.setLastWrite(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.udpSock.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses().
|
private |
The addrs.
Definition at line 53 of file UDPBowlerConnection.java.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.getAllAddresses(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.loadPacketFromPhy().
|
private |
The IP address set.
Definition at line 50 of file UDPBowlerConnection.java.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.init(), com.neuronrobotics.sdk.network.UDPBowlerConnection.setAddress(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.write().
|
private |
The port.
Definition at line 46 of file UDPBowlerConnection.java.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.UDPBowlerConnection(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.write().
|
private |
The sleep time.
Definition at line 43 of file UDPBowlerConnection.java.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.init().
|
private |
The udp sock.
Definition at line 57 of file UDPBowlerConnection.java.
Referenced by com.neuronrobotics.sdk.network.UDPBowlerConnection.connect(), com.neuronrobotics.sdk.network.UDPBowlerConnection.disconnect(), com.neuronrobotics.sdk.network.UDPBowlerConnection.loadPacketFromPhy(), and com.neuronrobotics.sdk.network.UDPBowlerConnection.write().