|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--nl.tbdev.IR.LmpConnection
This class implements an IR connection.
| Field Summary | |
static int |
ACTIVE
Active connection. |
private ConnectionCallbackInterface |
client
|
static int |
CSETUP
Outgoing call being setup |
static int |
INCOMING
Incoming call received |
private byte |
localLsap
|
static int |
NOT_READY
Connection not ready. |
static int |
READY
Ready for incomming/outgoing connection |
private byte |
remoteLsap
|
private int |
state
|
private LmpStation |
station
|
| Constructor Summary | |
LmpConnection(ConnectionCallbackInterface client)
Deprecated. Use LmpConnection(LmpStation,ConnectionCallbackInterface) |
|
LmpConnection(LmpStation station,
ConnectionCallbackInterface client)
Constructor for the connection |
|
| Method Summary | |
private void |
activeData(LmpFrame frame)
Handle incomming data while connected. |
void |
connectConfirm(byte[] data)
Confirm the requested connection. |
void |
connectionRequest(byte rLsap)
Request a connection to the remote lsap. |
void |
connectionRequest(byte rLsap,
byte[] data)
Request a connection to the remote lsap. |
private void |
csetupData(LmpFrame frame)
Handle incomming data during connection setup. |
boolean |
dataRequest(byte[] data)
Queue data for tranmission to remote station. |
void |
dataRequest(byte lLsap,
byte rLsap,
byte[] data)
Deprecated. This method has been replaced by dataRequest(byte[]) |
boolean |
discoveryRequest(DiscoveryCallbackInterface dCb)
start discovery of devices. |
byte |
getLocalLsap()
Get the local lsap for this connection. |
int |
getMaxDataSize()
get max size of payload |
int |
getPacketSize()
get size of packet remote allows us to send |
byte |
getRemoteLsap()
Get the remote lsap for this connection. |
int |
getState()
Method to get the current state of the connection |
void |
linkConnectRequest(int address)
create a LAP session to the given address. |
void |
linkDisconnectRequest()
Request a Link disconnection (disconnects all IR connections) |
void |
lmpCallbackConnectConfirm()
Called when an LAP connect is confirmed. |
void |
lmpCallbackConnectIndication()
Called when an LAP connect occurs. |
void |
lmpCallbackData(LmpStation station,
LmpFrame frame)
Whenever data is received by the IrDA stack and the LMP session target matches the local lsap this method is called. |
void |
lmpCallbackDisconnect()
This method is called whenever a disconnect occurs. |
void |
lmpSetLocalLsap(byte lsap)
Set local lsap for this connection. |
private void |
readyData(LmpFrame frame)
Handle data while waiting for a connection |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int NOT_READY
public static final int READY
public static final int CSETUP
public static final int INCOMING
public static final int ACTIVE
private int state
private ConnectionCallbackInterface client
private LmpStation station
private byte localLsap
private byte remoteLsap
| Constructor Detail |
public LmpConnection(ConnectionCallbackInterface client)
LmpConnection(LmpStation,ConnectionCallbackInterface)
client - Instance of a class implementing the
ConnectionCallbackInterface
public LmpConnection(LmpStation station,
ConnectionCallbackInterface client)
client - Instance of a class implementing the
ConnectionCallbackInterfacestation - Instance of LmpStation, the link to lower levels of IR| Method Detail |
public void lmpCallbackConnectIndication()
lmpCallbackConnectIndication in interface LmpCallbackInterfacepublic void lmpCallbackConnectConfirm()
lmpCallbackConnectConfirm in interface LmpCallbackInterface
public void lmpCallbackData(LmpStation station,
LmpFrame frame)
lmpCallbackData in interface LmpCallbackInterfacestation - reference to the lower levelframe - LmpFrame received.public void lmpCallbackDisconnect()
lmpCallbackDisconnect in interface LmpCallbackInterfaceprivate void readyData(LmpFrame frame)
private void csetupData(LmpFrame frame)
private void activeData(LmpFrame frame)
public boolean dataRequest(byte[] data)
dataRequest in interface IrConnectiondata - Byte array of data to be tranmitted
public void dataRequest(byte lLsap,
byte rLsap,
byte[] data)
dataRequest(byte[])
public int getState()
public byte getLocalLsap()
public void lmpSetLocalLsap(byte lsap)
lmpSetLocalLsap in interface LmpCallbackInterfacelLsap - byte local lsappublic byte getRemoteLsap()
public boolean discoveryRequest(DiscoveryCallbackInterface dCb)
discoveryRequest in interface IrConnectiondCb - DiscoveryCallbackInterface instance to report back to.public void linkConnectRequest(int address)
linkConnectRequest in interface IrConnectionaddress - The address of the remote devicepublic void linkDisconnectRequest()
linkDisconnectRequest in interface IrConnectionpublic void connectionRequest(byte rLsap)
connectionRequest in interface IrConnectionlsap - Remote lsap to connect to.
public void connectionRequest(byte rLsap,
byte[] data)
connectionRequest in interface IrConnectionlsap - Remote lsap to connect to.data - Data to be send to remote in this requestpublic void connectConfirm(byte[] data)
connectConfirm in interface IrConnectiondata - Data to be transferred in confirmation message, null
in case no additional data is neededpublic int getPacketSize()
getPacketSize in interface IrConnectionpublic int getMaxDataSize()
getMaxDataSize in interface IrConnection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||