Class Hyphos

java.lang.Object
   |
   +----Hyphos

public class Hyphos
extends Object
Hyphos allows Java applications to talk to a Hyphos network. It generates all the low level Hyphos headers, but requires the application to generate the full Hyphos payload.


Method Index

 o setAverageLatency(double)
A time in milliseconds for the average round trip latency.
 o setLatencyRange(double)
The range of variation in the latency.
 o setReliability(double)
A fraction between 0 and 1 representing the two-way probability that a packet is successfully transmitted.
 o setRepeatProbability(double)
A fraction between 0 and 1 representing the probability that a packet will be unintentionally repeated on the return trip.
 o setSimulated(boolean)
The Hyphos class can operate in simulated mode or real mode.
 o transmit(byte[], byte[], int, byte)
Transmit a packet over the Hyphos network.

Methods

 o setSimulated
 public void setSimulated(boolean s)
The Hyphos class can operate in simulated mode or real mode. In simulated mode, unreliable amulets are implemented in software.

Parameters:
s - true if simulated mode, false if real
 o setReliability
 public void setReliability(double r)
A fraction between 0 and 1 representing the two-way probability that a packet is successfully transmitted.

Parameters:
r - Probability of successful packet round trip
 o setRepeatProbability
 public void setRepeatProbability(double r)
A fraction between 0 and 1 representing the probability that a packet will be unintentionally repeated on the return trip.

Parameters:
r - Probability of an unintentional repeat.
 o setAverageLatency
 public void setAverageLatency(double a)
A time in milliseconds for the average round trip latency.

Parameters:
a - The average latency in milliseconds
 o setLatencyRange
 public void setLatencyRange(double l)
The range of variation in the latency. The actual latency will be a vlue between the average minus half l and the average plust half l.

If the minimum latency is below zero, it is considered to be zero.

Parameters:
l - The total variation of the latency
 o transmit
 public void transmit(byte a[],
                      byte msg[],
                      int len,
                      byte uniqid)
Transmit a packet over the Hyphos network.

Parameters:
a - The address of the target node
msg - The Hyphos packet payload
len - The length of msg