few warning suppression
This commit is contained in:
parent
5586326358
commit
5572ae7aab
@ -9,14 +9,12 @@ import fr.ntr.User;
|
|||||||
|
|
||||||
public class RoundRobin extends Scheduler {
|
public class RoundRobin extends Scheduler {
|
||||||
|
|
||||||
private String name;
|
|
||||||
private int index;
|
private int index;
|
||||||
|
|
||||||
private List<User> users;
|
private final List<User> users;
|
||||||
private ResourceBlock[][] frame;
|
private final ResourceBlock[][] frame;
|
||||||
|
|
||||||
public RoundRobin(String name, int index, ResourceBlock[][] frame, List<User> users) {
|
public RoundRobin(int index, ResourceBlock[][] frame, List<User> users) {
|
||||||
this.name = name;
|
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.frame = frame;
|
this.frame = frame;
|
||||||
this.users = users;
|
this.users = users;
|
||||||
@ -42,7 +40,7 @@ public class RoundRobin extends Scheduler {
|
|||||||
users.get(index).getPacketsSent().add(users.get(index).getPacketsToSend().get(0));
|
users.get(index).getPacketsSent().add(users.get(index).getPacketsToSend().get(0));
|
||||||
users.get(index).getPacketsToSend().remove(users.get(index).getPacketsToSend().get(0));
|
users.get(index).getPacketsToSend().remove(users.get(index).getPacketsToSend().get(0));
|
||||||
//on ajoute l'utilisateur a la frame
|
//on ajoute l'utilisateur a la frame
|
||||||
User user = UserSelection(ts, sp, users);
|
User user = UserSelection(ts, sp);
|
||||||
frame[ts][sp].setUser(user);
|
frame[ts][sp].setUser(user);
|
||||||
frame[ts][sp].setBandwidth(user.getBandwidthTable()[ts][sp]);
|
frame[ts][sp].setBandwidth(user.getBandwidthTable()[ts][sp]);
|
||||||
}
|
}
|
||||||
@ -54,10 +52,9 @@ public class RoundRobin extends Scheduler {
|
|||||||
/**
|
/**
|
||||||
* @param ts Time slot (int)
|
* @param ts Time slot (int)
|
||||||
* @param sp Sous porteuse(int)
|
* @param sp Sous porteuse(int)
|
||||||
* @param Users (List<User>)
|
|
||||||
* Return the user in function of TS and SP selected
|
* 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) {
|
||||||
//compte le nombre de bloc attribue
|
//compte le nombre de bloc attribue
|
||||||
for (int i = 0; i < ts; i++){
|
for (int i = 0; i < ts; i++){
|
||||||
for (int j = 0; j < sp; j++) {
|
for (int j = 0; j < sp; j++) {
|
||||||
|
Reference in New Issue
Block a user