inria.net.lrmp
Class LrmpSender

java.lang.Object
  |
  +--inria.util.Entity
        |
        +--inria.net.lrmp.LrmpEntity
              |
              +--inria.net.lrmp.LrmpSender

public final class LrmpSender
extends LrmpEntity

An LRMP sender is an LRMP entity that sends data packets. It is created and managed internally by Lrmp.


Field Summary
protected  int bytes
           
protected  inria.net.lrmp.LrmpPacketCache cache
           
protected  int cacheSize
           
protected  int drops
           
protected  int duplicates
           
protected  long expected
           
protected  int interval
           
protected  int jitter
           
protected  long lastError
           
protected  long lastseq
           
protected  long lastTimeForData
           
protected  boolean lost
           
protected  long maxseq
           
protected  long nextRRTime
           
protected  long nextSRTime
           
protected  int packets
           
protected  int rate
           
protected  int repairs
           
protected  int rrAbsLost
           
protected  int rrInterval
           
protected  long rrMaxSeqno
           
protected  int rrProb
           
protected  int rrReplies
           
protected  long rrSelectTime
           
protected  int rrTimestamp
           
protected  int srBytes
           
protected  int srPackets
           
protected  long srSeqno
           
protected  int srTimestamp
           
protected  long startseq
           
protected  int transit
           
 
Fields inherited from class inria.net.lrmp.LrmpEntity
distance, rtt, SequenceModulo
 
Fields inherited from class inria.util.Entity
id
 
Constructor Summary
protected LrmpSender(int id, java.net.InetAddress netaddr, long start)
           
 
Method Summary
protected  void appendPacket(LrmpPacket pack)
          appends the packet at the end of cache.
protected  void clearCache(long initialSeqno)
           
 long expected()
          Returns the next sequence number that will be used in transmission or reception.
 int getBadPacketCount()
          Returns the number of bad packets received.
 int getByteCount()
          Returns the number of bytes sent or received.
 int getDataRate()
          Returns the current date rate.
 int getDuplicateCount()
          Returns the number of duplicate packets received.
 int getJitter()
          Returns the packet interarrival jitter in milliseconds.
protected  LrmpPacket getPacket(long seqno)
           
 int getPacketCount()
          Returns the number of packets sent or received.
 int getRepairCount()
          Returns the number of repair packets sent or received.
 long getTimeSentData()
          Returns the last time sent data.
 long highestSeqnoGot()
          Returns the highest sequence number seen from the sender.
protected  void highestSeqnoGot(long n)
           
protected  void incBytes(int n)
           
protected  void incDrops()
           
protected  void incDuplicate()
           
protected  void incExpected()
           
protected  void incPackets()
           
protected  void incRepairs()
           
protected  void initCache(int cacheSize)
           
protected  boolean isCached(long seqno)
           
 boolean isLost()
          Returns true if the sender is lost.
protected  void putPacket(LrmpPacket pack)
          puts the packet into cache.
protected  void removePacket(LrmpPacket pack)
           
protected  void reset(long initialSeqno)
           
protected  void setInterval(int i)
          sets the actual packet interval.
protected  void setRate(int r)
          sets the actual data rate in bytes/sec.
protected  void updateJitter(int timestamp)
           
 
Methods inherited from class inria.net.lrmp.LrmpEntity
equals, getAddress, getLastTimeHeard, getNackCount, getRTT, incNack, reset, setAddress, setID, setLastTimeHeard, toString
 
Methods inherited from class inria.util.Entity
equals, getID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

startseq

protected long startseq

maxseq

protected long maxseq

expected

protected long expected

lastseq

protected long lastseq

lastError

protected long lastError

cache

protected inria.net.lrmp.LrmpPacketCache cache

cacheSize

protected int cacheSize

lost

protected boolean lost

lastTimeForData

protected long lastTimeForData

srPackets

protected int srPackets

srBytes

protected int srBytes

srSeqno

protected long srSeqno

srTimestamp

protected int srTimestamp

nextSRTime

protected long nextSRTime

rrProb

protected int rrProb

rrInterval

protected int rrInterval

rrTimestamp

protected int rrTimestamp

rrSelectTime

protected long rrSelectTime

rrReplies

protected int rrReplies

nextRRTime

protected long nextRRTime

rrAbsLost

protected int rrAbsLost

rrMaxSeqno

protected long rrMaxSeqno

packets

protected int packets

bytes

protected int bytes

duplicates

protected int duplicates

repairs

protected int repairs

drops

protected int drops

rate

protected int rate

interval

protected int interval

transit

protected int transit

jitter

protected int jitter
Constructor Detail

LrmpSender

protected LrmpSender(int id,
                     java.net.InetAddress netaddr,
                     long start)
Method Detail

reset

protected void reset(long initialSeqno)

initCache

protected void initCache(int cacheSize)

getPacketCount

public int getPacketCount()
Returns the number of packets sent or received.

getDuplicateCount

public int getDuplicateCount()
Returns the number of duplicate packets received.

getRepairCount

public int getRepairCount()
Returns the number of repair packets sent or received.

getBadPacketCount

public int getBadPacketCount()
Returns the number of bad packets received.

getByteCount

public int getByteCount()
Returns the number of bytes sent or received.

getDataRate

public int getDataRate()
Returns the current date rate.

getTimeSentData

public long getTimeSentData()
Returns the last time sent data.

getJitter

public int getJitter()
Returns the packet interarrival jitter in milliseconds.

isLost

public boolean isLost()
Returns true if the sender is lost.

clearCache

protected void clearCache(long initialSeqno)

highestSeqnoGot

public long highestSeqnoGot()
Returns the highest sequence number seen from the sender.

expected

public long expected()
Returns the next sequence number that will be used in transmission or reception.

highestSeqnoGot

protected void highestSeqnoGot(long n)

incPackets

protected void incPackets()

incDuplicate

protected void incDuplicate()

incRepairs

protected void incRepairs()

incDrops

protected void incDrops()

incBytes

protected void incBytes(int n)

incExpected

protected void incExpected()

setRate

protected void setRate(int r)
sets the actual data rate in bytes/sec.
Parameters:
r - the data rate.

setInterval

protected void setInterval(int i)
sets the actual packet interval.
Parameters:
i - the interval.

appendPacket

protected void appendPacket(LrmpPacket pack)
appends the packet at the end of cache.
Parameters:
pack - the packet to cache.

putPacket

protected void putPacket(LrmpPacket pack)
puts the packet into cache. XXXX must take into account the 32 bit round off.
Parameters:
pack - packet to cache.

removePacket

protected void removePacket(LrmpPacket pack)

getPacket

protected LrmpPacket getPacket(long seqno)

isCached

protected boolean isCached(long seqno)

updateJitter

protected void updateJitter(int timestamp)


JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.