javadoc and few warning suppression

This commit is contained in:
iboyeau 2023-03-24 11:55:39 +01:00
parent b816e3d93e
commit 81f9739a8c
3 changed files with 19 additions and 13 deletions

View File

@ -1,9 +1,7 @@
package fr.ntr;
import fr.ntr.scheduler.MaxSNR;
import fr.ntr.scheduler.Scheduler;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

View File

@ -32,6 +32,12 @@ public class MaxSNR extends Scheduler {
}
}
/**
* @param ts Time slot (int)
* @param sp Sous porteuse(int)
* @param Users (List<User>)
* Return
*/
private User selectionUtilisateur(int sp, int ts, List<User> Users) {
double MaxSnr = 0.0;
User userMax = null;

View File

@ -34,17 +34,17 @@ public class RoundRobin extends Scheduler {
index = random.nextInt(users.size());
//Pour chaque time slot et sous porteuses
for (int Ts = 0; Ts < Cell.getTimeSlotNb(); Ts++) {
for(int Sp = 0; Sp < Cell.getSubCarrierNb(); Sp++) {
for (int ts = 0; ts < Cell.getTimeSlotNb(); ts++) {
for(int sp = 0; sp < Cell.getSubCarrierNb(); sp++) {
if (users.get(index).getPacketsToSend().size() != 0) {
// on enlève le packet transmis de la liste
// TODO Verify sub the packet send need Set packet
users.get(index).getPacketsSent().add(users.get(index).getPacketsToSend().get(0));
users.get(index).getPacketsToSend().remove(users.get(index).getPacketsToSend().get(0));
//on ajoute l'utilisateur a la frame
User user = UserSelection(Ts, Sp, users);
frame[Ts][Sp].setUser(user);
frame[Ts][Sp].setBandwidth(user.getBandwidthTable()[Ts][Sp]);
User user = UserSelection(ts, sp, users);
frame[ts][sp].setUser(user);
frame[ts][sp].setBandwidth(user.getBandwidthTable()[ts][sp]);
}
}
@ -52,13 +52,15 @@ public class RoundRobin extends Scheduler {
}
/**
* Entry Time slot (int), Sous porteuse(int), and users ( List<User>)
* @param ts Time slot (int)
* @param sp Sous porteuse(int)
* @param Users (List<User>)
* Return the user in function of TS and SP selected
*/
private User UserSelection(int Ts, int Sp, List<User> users) {
private User UserSelection(int ts, int sp, List<User> Users) {
//compte le nombre de bloc attribue
for (int i = 0; i < Ts; i++){
for (int j = 0; j < Sp; j++) {
for (int i = 0; i < ts; i++){
for (int j = 0; j < sp; j++) {
index++;
}
}