Commit c94f41d7 authored by Rita Sousa's avatar Rita Sousa

Fixed previous commit

parent 4d45f5c8
......@@ -152,11 +152,11 @@ public class NFRTool {
//
// Node 2 definition:
nodeName = "xavier-ric";
ipWifi = "182.168.137.179";
ipLte = "172.10.0.4";
ipEth = "192.168.60.65"; // TODO: check value
cpuThreshold = 0;
energyThreshold = 0;
String ipWifi = "182.168.137.179";
String ipLte = "172.10.0.4";
String ipEth = "192.168.60.65"; // TODO: check value
float cpuThreshold = 0;
float energyThreshold = 0;
signalWifi = -30;
numCores = 8;
......@@ -199,6 +199,15 @@ Worker worker2B = new Worker(node2, pid2B, active2B, appB, cpuUsage2B, energyUsa
//node2.addWorker(worker2B);
appB.addWorker(worker2B);
// CommunicationLink21 definition
final float delayRtt = 0;
final float plr = 0;
CommunicationLink communicationLink21 = new CommunicationLink(node1, node2, node1.getIpWifi(), node2.getIpEth(),
delayRtt, plr);
node1.addCommunicationLink(communicationLink21);
node2.addCommunicationLink(communicationLink21);
// Get node by alias
......@@ -206,11 +215,11 @@ appB.addWorker(worker2B);
// Create master
Master master = new Master(node, 111, localIP);
master.setApplication(app);
master.setApplication(appA);
master.makePersistent();
// Set master of application
app.setMaster(master);
appA.setMaster(master);
addWorkersToSystem(node, appA, localIP);
// TODO: After finalizing the system, insert the Workers creation here including
......@@ -218,7 +227,7 @@ appB.addWorker(worker2B);
// Print application information
System.out.println("=== Application information ===");
System.out.println(app.toString());
System.out.println(appA.toString());
system.makePersistent("system");
return node;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment