tuwien.auto.calimero.knxnetip
Class LostMessageEvent

java.lang.Object
  extended by java.util.EventObject
      extended by tuwien.auto.calimero.knxnetip.LostMessageEvent
All Implemented Interfaces:
java.io.Serializable

public class LostMessageEvent
extends java.util.EventObject

Event informing about an overflow with loss of messages in KNXnet/IP routing mode.

It contains lost message and device state information on overflow of the LAN-to-KNX queue in the KNXnet/IP router, which leads to loss of received KNXnet/IP messages. This event is multicasted by the KNXnet/IP router every time an increment in lost messages occurs. In the router, the number of lost messages is maintained in the PID_QUEUE_OVERFLOW_TO_KNX property value.
The lost message value states the total of lost messages in the router.

See Also:
KNXnetIPRouter, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LostMessageEvent(java.lang.Object source, short deviceState, int lostMessages)
          Creates a new lost message event.
 
Method Summary
 short getDeviceState()
          Returns the router device state.
 int getLostMessages()
          Returns the total of lost messages maintained by the KNXnet/IP router.
 boolean isKNXFault()
          Returns whether the KNX network cannot be accessed, causing the message loss.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LostMessageEvent

public LostMessageEvent(java.lang.Object source,
                        short deviceState,
                        int lostMessages)
Creates a new lost message event.

Parameters:
source - the KNXnetIPRouter on which the event occurred
deviceState - KNXnet/IP router device state, 0 <= state <= 255
lostMessages - number of lost messages, 0 <= number <= 0xFFFF
Method Detail

getDeviceState

public final short getDeviceState()
Returns the router device state.

The device state is a bit field with 8 Bits and conforms to the PID_KNXNETIP_DEVICE_STATE property value.

Returns:
device state as unsigned byte

getLostMessages

public final int getLostMessages()
Returns the total of lost messages maintained by the KNXnet/IP router.

Returns:
number of lost messages as unsigned short

isKNXFault

public final boolean isKNXFault()
Returns whether the KNX network cannot be accessed, causing the message loss.

The KNX fault mode is part of the device state.

Returns:
true on KNX access fault, false otherwise
See Also:
getDeviceState()