This repository has been archived on 2023-08-28. You can view files and clone it, but cannot push or open issues or pull requests.
ntr-interferences/src/main/java/fr/ntr/Packets.java
2023-03-24 12:12:18 +01:00

47 lines
1.0 KiB
Java

package fr.ntr;
public class Packets {
static final int packetSize = 100;
private int startTimeSending;
private int endTimeSending;
private int durationSending;
private int bitsNumberRemaining;
public Packets(int startTimeSending){
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;
}
}