advancedrelay.laygo
Class StatisticsTable

java.lang.Object
  |
  +--advancedrelay.laygo.StatisticsTable

public class StatisticsTable
extends java.lang.Object

Statistics table object to be returned by ProtocolService.getStatistics().

Encapsulates the statistics table structure defined in laygodef.h.


Constructor Summary
StatisticsTable(byte[] data, int size, int protocol)
          Constructs a StatisticsTable from the data returned by the protocol stack.
 
Method Summary
 int getProtocol()
          Returns the id of the protocol the statistis are for.
 long getRxCount()
          Returns the number of bytes received.
 long getStatistic(int i)
          Returns the value of the ith statistic if i < length(), 0 otherwise.
 long getTxCount()
          Returns the number of bytes transmitted.
 int length()
          Returns the number of statistics in the table excluding receive and transmit counts.
 java.lang.String toString()
          Returns a string representing the complete table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatisticsTable

public StatisticsTable(byte[] data,
                       int size,
                       int protocol)
Constructs a StatisticsTable from the data returned by the protocol stack.

Parameters:
data - The data returned by the protocol stack.
protocol - The protocol id of the ProtocolService from which the statistics data came.
Method Detail

getProtocol

public int getProtocol()
Returns the id of the protocol the statistis are for.


getRxCount

public long getRxCount()
Returns the number of bytes received.


getStatistic

public long getStatistic(int i)
Returns the value of the ith statistic if i < length(), 0 otherwise.


getTxCount

public long getTxCount()
Returns the number of bytes transmitted.


length

public int length()
Returns the number of statistics in the table excluding receive and transmit counts.


toString

public java.lang.String toString()
Returns a string representing the complete table.

Overrides:
toString in class java.lang.Object