package fr.ntr; public class Packets { static final int PACKET_SIZE = 100; private int startTimeSending; private int endTimeSending; private int durationSending; private int bitsNumberRemaining; public Packets(int startTimeSending){ this.bitsNumberRemaining = PACKET_SIZE; this.startTimeSending = startTimeSending; } public double getBitsNumberRemaining() { return bitsNumberRemaining; } public int getStartTimeSending() { return startTimeSending; } public void setStartTimeSending(int startTimeSending) { this.startTimeSending = startTimeSending; } public int getEndTimeSending() { return endTimeSending; } public void setEndTimeSending(int endTimeSending) { this.endTimeSending = endTimeSending+1; } public void setDurationSending(int ticks){ this.durationSending = ticks - startTimeSending; } public int getDurationSending() { return durationSending; } public void decreaseBitsNumberRemaining(int d) { this.bitsNumberRemaining -= d; } }