robot3
Interface LNPListener


public interface LNPListener

Interface that all classes interested by what is received by the IR tower should implement. When an objet is interested by the events, it calls addLNPListener to the LNPManager. When it's not longer interested, it calls removeLNPListener to the LNPManager.


Method Summary
 void addressingReceived(byte[] buffer, byte toPort, byte fromHost, byte fromPort)
          Method called by LNPManager when a new addressing packet is received, provided that the current object has subscribed to the LNPManager.
 void integrityReceived(byte[] buffer)
          Method called by LNPManager when a new integrity packet is received, provided that the current object has subscribed to the LNPManager.
 void wrongChecksumReceived()
          Method called by LNPManager when a packet with a wrong checksum is received, provided that the current object has subscribed to the LNPManager.
 

Method Detail

integrityReceived

public void integrityReceived(byte[] buffer)
Method called by LNPManager when a new integrity packet is received, provided that the current object has subscribed to the LNPManager.

Parameters:
buffer - the data received

addressingReceived

public void addressingReceived(byte[] buffer,
                               byte toPort,
                               byte fromHost,
                               byte fromPort)
Method called by LNPManager when a new addressing packet is received, provided that the current object has subscribed to the LNPManager.

Parameters:
buffer - the data received
toPort - the port to which the data was sent
fromHost - the host that sent the data
fromPort - the port from which the data was sent.

wrongChecksumReceived

public void wrongChecksumReceived()
Method called by LNPManager when a packet with a wrong checksum is received, provided that the current object has subscribed to the LNPManager.