Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## PER.rover.control
Class Reliapack

    java.lang.Object
      PER.rover.control.Reliapack

public class Reliapack
extends java.lang.Object

Internal class for communication - it is called by reliagram and handles the low level packet transceiving and tracking.

Field Summary
`static int` | `HEADER_LENGTH`
`static int` | `MAX_SEQUENCE_NUMBER`

Constructor Summary
`Reliapack(byte[] data, int dataLength, int seqNum, Datapack resp)` Creates a new instance of Reliapack
`Reliapack(java.net.DatagramPacket pack)`

Method Summary
`void` | `addPacket(java.net.DatagramPacket pack)`
`static java.net.DatagramPacket` | `getAckPacket(java.net.DatagramPacket p)`
`byte[]` | `getData()`
`java.net.DatagramPacket[]` | `getDatagrams()`
`static int` | `getOffset(java.net.DatagramPacket p)`
`static int` | `getResponseRetryNum(java.net.DatagramPacket p)`
`int` | `getResponseSeqNum()`
`static int` | `getResponseSeqNum(java.net.DatagramPacket p)`
`static int` | `getRetryNum(java.net.DatagramPacket p)`
`long` | `getRetryTime()`
`int` | `getSeqNum()`
`static int` | `getSeqNum(java.net.DatagramPacket p)`
`int` | `getTotalLength()`
`static int` | `getTotalLength(java.net.DatagramPacket p)`
`long` | `idleTime()`
`boolean` | `isComplete()`
`boolean` | `isFullyAcked(java.net.DatagramPacket ackPacket)`
`static void` | `setOffset(java.net.DatagramPacket p, int offset)`
`static void` | `setResponseRetryNum(java.net.DatagramPacket p, int retryNum)`
`static void` | `setResponseSeqNum(java.net.DatagramPacket p, int seqNum)`
`static void` | `setRetryNum(java.net.DatagramPacket p, int retryNum)`
`void` | `setRetryTime(long time)`
`static void` | `setSeqNum(java.net.DatagramPacket p, int seqNum)`
`static void` | `setTotalLength(java.net.DatagramPacket p, int length)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HEADER_LENGTH

    public static final int HEADER_LENGTH

See Also:
  Constant Field Values

### MAX_SEQUENCE_NUMBER

    public static final int MAX_SEQUENCE_NUMBER

See Also:
  Constant Field Values

Constructor Detail

### Reliapack

    public Reliapack(byte[] data,
                     int dataLength,
                     int seqNum,
                     Datapack resp)

  Creates a new instance of Reliapack

### Reliapack

    public Reliapack(java.net.DatagramPacket pack)

Method Detail

### addPacket

    public void addPacket(java.net.DatagramPacket pack)

### isComplete

    public boolean isComplete()

### getDatagrams

    public java.net.DatagramPacket[] getDatagrams()

### idleTime

    public long idleTime()

### isFullyAcked

    public boolean isFullyAcked(java.net.DatagramPacket ackPacket)

### getData

    public byte[] getData()

### getAckPacket

    public static java.net.DatagramPacket getAckPacket(java.net.DatagramPacket p)

### setRetryTime

    public void setRetryTime(long time)

### getRetryTime

    public long getRetryTime()

### setSeqNum

    public static void setSeqNum(java.net.DatagramPacket p,
                                 int seqNum)

### setRetryNum

    public static void setRetryNum(java.net.DatagramPacket p,
                                   int retryNum)

### setResponseSeqNum

    public static void setResponseSeqNum(java.net.DatagramPacket p,
                                         int seqNum)

### setResponseRetryNum

    public static void setResponseRetryNum(java.net.DatagramPacket p,
                                           int retryNum)

### setOffset

    public static void setOffset(java.net.DatagramPacket p,
                                 int offset)

### setTotalLength

    public static void setTotalLength(java.net.DatagramPacket p,
                                      int length)

### getSeqNum

    public int getSeqNum()

### getSeqNum

    public static int getSeqNum(java.net.DatagramPacket p)

### getRetryNum

    public static int getRetryNum(java.net.DatagramPacket p)

### getResponseSeqNum

    public int getResponseSeqNum()

### getResponseSeqNum

    public static int getResponseSeqNum(java.net.DatagramPacket p)

### getResponseRetryNum

    public static int getResponseRetryNum(java.net.DatagramPacket p)

### getOffset

    public static int getOffset(java.net.DatagramPacket p)

### getTotalLength

    public int getTotalLength()

### getTotalLength

    public static int getTotalLength(java.net.DatagramPacket p)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD