|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jSyncManager.API.Protocol.CMP_DLP
CMP_DLP class. This class provides the black-box for handling CMP and DLP packets.
| Field Summary | |
protected boolean |
connected
The connection state. |
protected CMPDLPTransferInterface |
padpHandler
The underlying CMPDLPTransferInterface object to use for packet I/O. |
protected int |
speed
The speed to use for serial synchronization. |
| Constructor Summary | |
protected |
CMP_DLP()
Construct an instance of the CMP_DLP class with no parameters. |
|
CMP_DLP(CMPDLPTransferInterface padp)
Construct an instance of the CMP_DLP class using the specified underlying CMPDLPTransferInterface protocol handler. |
| Method Summary | |
void |
connect()
Attempt to listen for a connection to the remote CMP/DLP enabled device. |
protected boolean |
determinePacketType(GenericPacket genericpacket)
A method to determine the type of incoming packet. |
void |
disconnect()
A method to cause the protocol stack issue a disconnect request. |
void |
disconnect(char c)
A method to cause the protocol stack issue a disconnect request with the specified disconnect reason code. |
(package private) DLP_Packet |
getDLPPacket()
Retreives a DLP packet from the underlying protocol in the stack. |
DLP_Packet |
getDLPPacket(DLP_Packet dlp_packet)
Retreives a DLP packet from the underlying protocol in the stack. |
int |
getSpeed()
Retreives the speed of the connection. |
boolean |
isConnected()
Returns the connection status of this protocol layer. |
byte[] |
readRawPacket()
Retreives a raw packet from the underlying protocol in the stack. |
protected void |
rxHandshake()
USB Receive Handshake. |
void |
setSpeed(int newValue)
Sets the speed that this protocol should attempt to use for serial synchronization sessions. |
void |
suspend()
Suspends the synchronization. |
void |
writeRawPacket(byte[] data,
byte srcSocket,
byte destSocket)
Write a raw packet to the underlying protocol in the stack. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected CMPDLPTransferInterface padpHandler
protected boolean connected
protected int speed
| Constructor Detail |
protected CMP_DLP()
public CMP_DLP(CMPDLPTransferInterface padp)
padp - the underlying CMPDLPTransferInterface protocol handler to use for I/O.| Method Detail |
public void connect()
throws NotConnectedException
NotConnectedException - thrown if the connection is lost during connection initialization.protected boolean determinePacketType(GenericPacket genericpacket)
public void disconnect()
public void disconnect(char c)
c - the reason code for the disconnect.
public DLP_Packet getDLPPacket(DLP_Packet dlp_packet)
throws NotConnectedException,
DLPError
dlp_packet - the packet containing the DLP request.
NotConnectedException - thrown if the connection is lost during
request/responce processing, or if this method was called prior to a connection
being initialized via connect().
DLPError - if the request resulted in an error on the remote end, a DLPError is thrown.public int getSpeed()
public boolean isConnected()
public void setSpeed(int newValue)
newValue - the speed that the synchronization should be attempted at.
public void suspend()
throws NotConnectedException
NotConnectedException - thrown if the connection to the remote end is lost.
protected void rxHandshake()
throws java.lang.Exception
java.lang.Exception
public byte[] readRawPacket()
throws NotConnectedException
NotConnectedException - thrown if the connection is lost during
request/responce processing, or if this method was called prior to a connection
being initialized via connect().
public void writeRawPacket(byte[] data,
byte srcSocket,
byte destSocket)
throws NotConnectedException
data - the byte array to be written to the handheld.srcSocket - the source socket (usually 3).destSocket - the destination socket (usually 3).
NotConnectedException - thrown if the connection is lost during
request/responce processing, or if this method was called prior to a connection
being initialized via connect().
DLP_Packet getDLPPacket()
throws NotConnectedException,
DLPError
NotConnectedException - thrown if the connection is lost during
request/responce processing, or if this method was called prior to a connection
being initialized via connect().
DLPError - if the request resulted in an error on the remote end, a DLPError is thrown.
|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||