SunSPOT API V5.0


com.sun.spot.peripheral.radio
Class LowPanStats

java.lang.Object
  extended by com.sun.spot.peripheral.radio.LowPanStats

public class LowPanStats
extends Object

Author:
Pete St. Pierre

Field Summary
protected  int broadcastsFragmented
          number of mesh broadcasts that required fragmentation (we don't fragment local broadcasts)
protected  int broadcastsQueueFull
          number of packets intentionally dropped because we sent them
protected  int broadcastsReceived
          broadcasts received
protected  int broadcastsSent
          number of broadcasts sent
protected  int datagramsReassembled
          number of packets reassembled
protected  int droppedBroadcasts
          number of packets intentionally dropped because they didn't meet broadcast seqNo requirements
protected  int fragmentsReceived
          number of packet fragments we received
protected  int meshBroadcastsForwarded
          number of broadcast packets forwarded
protected  int meshBroadcastsReceived
          broadcasts received
protected  int meshBroadcastsSent
          number of mesh broadcasts sent
protected  int meshPacketsReceived
          total mesh packets received
protected  int meshPacketsSent
          mesh packets sent
protected  int nonMeshPacketsReceived
          packets received without a mesh routing header (single hop);
protected  int nonMeshPacketsSent
          non-mesh packets sent
protected  int packetsForwarded
          number of packets forwarded through this node
protected  int packetsSent
          number of packets sent
protected  int protocolCount
          number of SPOT protocol handlers registered
protected  int protocolFamilyCount
          number of non-SPOT protocol family handlers registered
protected  int protocolHandlerMissing
          number of times we looked for a protocol handler, but failed
protected  int reassemblyExpired
          number of packets we couldn't reassemble
protected  int ttlExpired
          number of packets intentionally dropped because TTL expired
protected  int unicastsFragmented
          number of datagrams that required fragmentation
protected  int unicastsReceived
          full datagrams received
protected  int unicastsSent
          Number of datagrams sent
 
Constructor Summary
LowPanStats()
          Creates a new instance of LowPanStats
LowPanStats(byte[] b)
          Creates a new instance of LowPanStats
 
Method Summary
 LowPanStats clone()
           
 int getBroadcastsForwarded()
          Returns the number of broadcast datagrams forwarded by this node.
 int getBroadcastsFragmented()
          Returns the number of broadcast datagrams that were generated from this node that required fragmentation.
 int getBroadcastsReceived()
          Returns the number of broadcast datagrams received by this node.
 int getBroadcastsSent()
          Returns the number of broadcast datagrams that have been generated from this node.
 int getDatagramsReassembled()
          Returns the number of datagrams that were successfully reassembled by this node.
 int getDroppedBroadcasts()
          Returns the number of times we dropped a broadcast packet.
 int getDroppedQueuedBroadcasts()
          Returns the number of times we've dropped a broadcast packet because we did not have the resources to queue the packet.
 int getFragmentsReceived()
          Returns the number of fragments received by this node.
 int getMeshPacketsReceived()
          Returns the number of mesh packets received.
 int getMeshPacketsSent()
          Return the number of mesh packets generated from this node.
 int getNonMeshPacketsReceived()
          Return the number of non-mesh packets received by this node.
 int getNonMeshPacketsSent()
          Return the number of non-mesh packets generated by this node.
 int getPacketsForwarded()
          Returns the number of packets forwarded by the LowPan layer.
 int getPacketsReceived()
          Returns the total number of packets received.
 int getPacketsSent()
          Returns the total number of packets sent from this node.
 int getProtocolCount()
          Returns the total number of protocol handlers that have been registered with the lowpan layer.
 int getProtocolFamilyCount()
          Returns the number of protocol families that are registered with the LowPan layer.
 int getProtocolHandlerMissing()
          Returns the number of times we have received a packet for a protocol handler that is not registered.
 int getReassemblyExpired()
          Returns the number of times reassembly of a datagram failed due to not receiving a complete set of fragements within the alloted reassembly time.
 int getTTLExpired()
          Returns the number of times we dropped a packet because the Time-To-Live field of the packet was decremented to zero.
 int getUnicastsFragmented()
          Returns the number of unicast packets that required fragmentation.
 int getUnicastsReceived()
          Returns the number of Unicast Packets received.
 int getUnicastsSent()
          Return the number of unicast packets that have been sent
 byte[] toByteArray()
           
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

protocolCount

protected int protocolCount
number of SPOT protocol handlers registered


protocolFamilyCount

protected int protocolFamilyCount
number of non-SPOT protocol family handlers registered


protocolHandlerMissing

protected int protocolHandlerMissing
number of times we looked for a protocol handler, but failed


unicastsSent

protected int unicastsSent
Number of datagrams sent


unicastsFragmented

protected int unicastsFragmented
number of datagrams that required fragmentation


nonMeshPacketsSent

protected int nonMeshPacketsSent
non-mesh packets sent


meshPacketsSent

protected int meshPacketsSent
mesh packets sent


packetsSent

protected int packetsSent
number of packets sent


broadcastsSent

protected int broadcastsSent
number of broadcasts sent


broadcastsReceived

protected int broadcastsReceived
broadcasts received


meshBroadcastsSent

protected int meshBroadcastsSent
number of mesh broadcasts sent


meshBroadcastsReceived

protected int meshBroadcastsReceived
broadcasts received


broadcastsFragmented

protected int broadcastsFragmented
number of mesh broadcasts that required fragmentation (we don't fragment local broadcasts)


packetsForwarded

protected int packetsForwarded
number of packets forwarded through this node


meshBroadcastsForwarded

protected int meshBroadcastsForwarded
number of broadcast packets forwarded


ttlExpired

protected int ttlExpired
number of packets intentionally dropped because TTL expired


droppedBroadcasts

protected int droppedBroadcasts
number of packets intentionally dropped because they didn't meet broadcast seqNo requirements


broadcastsQueueFull

protected int broadcastsQueueFull
number of packets intentionally dropped because we sent them


meshPacketsReceived

protected int meshPacketsReceived
total mesh packets received


nonMeshPacketsReceived

protected int nonMeshPacketsReceived
packets received without a mesh routing header (single hop);


datagramsReassembled

protected int datagramsReassembled
number of packets reassembled


reassemblyExpired

protected int reassemblyExpired
number of packets we couldn't reassemble


fragmentsReceived

protected int fragmentsReceived
number of packet fragments we received


unicastsReceived

protected int unicastsReceived
full datagrams received

Constructor Detail

LowPanStats

public LowPanStats()
Creates a new instance of LowPanStats


LowPanStats

public LowPanStats(byte[] b)
Creates a new instance of LowPanStats

Method Detail

getUnicastsSent

public int getUnicastsSent()
Return the number of unicast packets that have been sent

Returns:
number of unicasts sent from this node

getUnicastsFragmented

public int getUnicastsFragmented()
Returns the number of unicast packets that required fragmentation.

Returns:
number of times a unicast packet was too large to be delivered as a single packet

getUnicastsReceived

public int getUnicastsReceived()
Returns the number of Unicast Packets received. This includes both single packet unicasts and the number of datagrams created from multiple fragments.

Returns:
the total number of unicast packets that have been received.

getBroadcastsSent

public int getBroadcastsSent()
Returns the number of broadcast datagrams that have been generated from this node.

Returns:
the number of broadcast datagrams we have generated

getBroadcastsFragmented

public int getBroadcastsFragmented()
Returns the number of broadcast datagrams that were generated from this node that required fragmentation.

Returns:
the number of fragemented broadcast datagrams generated

getBroadcastsReceived

public int getBroadcastsReceived()
Returns the number of broadcast datagrams received by this node. This includes both single packet broadcasts as well as broadcast datagrams successfully reassembled.

Returns:
number of broadcast datagrams received

getPacketsSent

public int getPacketsSent()
Returns the total number of packets sent from this node. This is a combination of both single packet datagrams as well as the number of fragements generated from large datagrams.

Returns:
total number of packets sent from this node

getPacketsReceived

public int getPacketsReceived()
Returns the total number of packets received. This includes both mesh and non-mesh packets. Single hop packets that include a mesh header (ie. for broadcast sequence number) are considered mesh packets.

Returns:
total number of packets received by the lowpan layer

getPacketsForwarded

public int getPacketsForwarded()
Returns the number of packets forwarded by the LowPan layer. This includes all packets forward, regarless of whether they were unicast, broadcast, full datagrams or fragments

Returns:
number of packets forwarded by this node

getBroadcastsForwarded

public int getBroadcastsForwarded()
Returns the number of broadcast datagrams forwarded by this node.

Returns:
number of broadcast datagrams forwarded by this node

getMeshPacketsReceived

public int getMeshPacketsReceived()
Returns the number of mesh packets received. Single hop packets that include a mesh header (ie. for broadcast sequence number) are considered mesh packets.

Returns:
number of mesh packets received

getMeshPacketsSent

public int getMeshPacketsSent()
Return the number of mesh packets generated from this node. Includes fragmented packets as well as mesh broadcasts.

Returns:
number of mesh packets sent

getNonMeshPacketsReceived

public int getNonMeshPacketsReceived()
Return the number of non-mesh packets received by this node. These packets had neither mesh or fragmentation headers in the packet.

Returns:
number of non-mesh packets received by this node

getNonMeshPacketsSent

public int getNonMeshPacketsSent()
Return the number of non-mesh packets generated by this node. These packets had neither mesh or fragmentation headers in the packet.

Returns:
number of non-mesh packets generated by this node

getReassemblyExpired

public int getReassemblyExpired()
Returns the number of times reassembly of a datagram failed due to not receiving a complete set of fragements within the alloted reassembly time.

Returns:
the number of times reassembly failed

getTTLExpired

public int getTTLExpired()
Returns the number of times we dropped a packet because the Time-To-Live field of the packet was decremented to zero.

Returns:
the number of times the TTL of a packet expired

getDatagramsReassembled

public int getDatagramsReassembled()
Returns the number of datagrams that were successfully reassembled by this node.

Returns:
the number of datagrams that arrived as a set of fragments

getFragmentsReceived

public int getFragmentsReceived()
Returns the number of fragments received by this node. The total reflects all fragements received, regardless of whether the fragments resulted in successful reassembly of a datagram.

Returns:
the total number of fragments received by this node

getProtocolCount

public int getProtocolCount()
Returns the total number of protocol handlers that have been registered with the lowpan layer. A normal value for this is commonly 3, indicating that radiogram, radiostream and aodv are all registered.

Returns:
the number of protocol handlers currently registered with the LowPan Layer.

getProtocolFamilyCount

public int getProtocolFamilyCount()
Returns the number of protocol families that are registered with the LowPan layer. By default, this is 1 (the SPOT protocol family). Other modules that may register a protocol family may include IPv6, IPv6 HC1, etc. RFC4944 discusses other protocol families that may register a dispatch byte with LowPan.

Returns:
the number of registered protocol families.

getProtocolHandlerMissing

public int getProtocolHandlerMissing()
Returns the number of times we have received a packet for a protocol handler that is not registered. This may occur when IP packets have been sent to us at time we do not have an IP stack active. Another example would be reception of AODV packets when an alternate routing protocol is in use by this node.

Returns:
the number of times a packet was received for an unregistered protocol

getDroppedBroadcasts

public int getDroppedBroadcasts()
Returns the number of times we dropped a broadcast packet. These are usually duplicate sequence numbers (aka broadcasts we've forwarded before.

Returns:
the number of times we refused to forward a broadcast from another node

getDroppedQueuedBroadcasts

public int getDroppedQueuedBroadcasts()
Returns the number of times we've dropped a broadcast packet because we did not have the resources to queue the packet. This applies to forwarded packets. Broadcast packets generated locally are sent immediately, not queued.

Returns:
the number of broadcast we've dropped due to insufficient resources

clone

public LowPanStats clone()

toByteArray

public byte[] toByteArray()

toString

public String toString()
Description copied from class: Object
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.