From b0242e670e64c8084a6254b79af79271afcc4d37 Mon Sep 17 00:00:00 2001 From: Quentin Legot Date: Fri, 3 Mar 2023 11:09:13 +0100 Subject: [PATCH] Add User structure, fix scheduler --- Main.java | 0 src/main/java/fr/ntr/User.java | 29 +++++++++++++++++++ src/main/java/fr/ntr/scheduler/Scheduler.java | 4 ++- 3 files changed, 32 insertions(+), 1 deletion(-) delete mode 100644 Main.java diff --git a/Main.java b/Main.java deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/java/fr/ntr/User.java b/src/main/java/fr/ntr/User.java index d0aed96..c5dac1c 100644 --- a/src/main/java/fr/ntr/User.java +++ b/src/main/java/fr/ntr/User.java @@ -1,4 +1,33 @@ package fr.ntr; +import java.util.ArrayList; +import java.util.List; + public class User { + + private final double distance; + private final double[][] bandwidthTable; + private final List packetsToSend; + private final List packetsSent; + + public User(double distance) { + this.distance = distance; + this.bandwidthTable = new double[1][1]; // TODO: 03/03/2023 Changer valeurs + this.packetsToSend = new ArrayList<>(); + this.packetsSent = new ArrayList<>(); + + } + + public void generateBandwidth() { + + } + + public void createPackets() { + + } + + public double calculateDelta() { + return 0d; + } + } diff --git a/src/main/java/fr/ntr/scheduler/Scheduler.java b/src/main/java/fr/ntr/scheduler/Scheduler.java index 9c56d51..2357a36 100644 --- a/src/main/java/fr/ntr/scheduler/Scheduler.java +++ b/src/main/java/fr/ntr/scheduler/Scheduler.java @@ -3,5 +3,7 @@ package fr.ntr.scheduler; public abstract class Scheduler { public abstract void scheduling(); - protected abstract void TraitementDOnnées(); + protected void TraitementDonnées() { + + } }