|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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. |
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 |
---|
|
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 CMPDLPTransferInterface
public void transmitPacket(byte[] data, byte srcSocket, byte destSocket) throws NotConnectedException, PADP_PacketTooBigException
transmitPacket
in interface CMPDLPTransferInterface
data
- 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).public void disconnect()
disconnect
in interface CMPDLPTransferInterface
public void suspendConnection()
suspendConnection
in interface CMPDLPTransferInterface
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |