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