|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jSyncManager.API.Protocol.USB
USB packet handler class. This class handles the sending and receiving of USB packets to and from the connected USB device.
| Field Summary | |
protected boolean |
connected
The connection state. |
protected boolean |
debugMode
A field to enable or disable debugging output. |
static byte |
INITIAL_TRANSACTION_ID
The initial transaction ID for packets. |
protected byte |
transactionID
The transaction ID of this packet. |
protected USBTransportInterface |
transport
The transport to use for data I/O. |
| Constructor Summary | |
USB(USBTransportInterface usbTransport)
USB protocol handler constructor. |
|
| Method Summary | |
void |
connect()
Method to be called to initialize the connection. |
void |
disconnect()
Disconnects the connection to the underlying communication subsystem. |
boolean |
isConnected()
Tests the state of the protocol connection. |
GenericPacket |
readPacket()
Reads a packet from the underlying communication subsystem. |
void |
suspendConnection()
Suspends access to the underlying communication subsystem. |
void |
transmitPacket(byte[] data,
byte srcSocket,
byte destSocket)
Transmits a packet to the underlying communication subsystem. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte INITIAL_TRANSACTION_ID
protected byte transactionID
protected USBTransportInterface transport
protected boolean connected
protected boolean debugMode
| Constructor Detail |
public USB(USBTransportInterface usbTransport)
| Method Detail |
public void connect()
connect in interface CMPDLPTransferInterface
public GenericPacket readPacket()
throws NotConnectedException
readPacket in interface CMPDLPTransferInterfaceNotConnectedException
public void transmitPacket(byte[] data,
byte srcSocket,
byte destSocket)
throws NotConnectedException,
PADP_PacketTooBigException
transmitPacket in interface CMPDLPTransferInterfacedata - the data to transmit.srcSocket - the socket that was the source of this data (may be ignored).destSocket - the socket that is the intended destination of this data (may be ignored).
NotConnectedException
PADP_PacketTooBigExceptionpublic void disconnect()
disconnect in interface CMPDLPTransferInterfacepublic void suspendConnection()
suspendConnection in interface CMPDLPTransferInterfacepublic boolean isConnected()
isConnected in interface CMPDLPTransferInterface
|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||