Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
bounceur committed Nov 8, 2019
1 parent f26fb38 commit 2ce118d
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 62 deletions.
15 changes: 0 additions & 15 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

7 changes: 7 additions & 0 deletions log
@@ -0,0 +1,7 @@
Script
000 Adding Sensor: Id=1, name=S1
000 Adding Sensor: Id=2, name=S2
000 Adding Sensor: Id=3, name=S3
000 Adding Sensor: Id=4, name=S4
000 Adding Sensor: Id=5, name=S5
000 Adding Sensor: Id=6, name=S6
12 changes: 7 additions & 5 deletions src/cupcarbon/CupCarbon.java
Expand Up @@ -76,16 +76,11 @@ public void start(Stage mainStage) throws Exception {
}

CupActionStack.init();
setProxy();

setUserAgentStylesheet(STYLESHEET_MODENA);

mainStage.setTitle("CupCarbon "+CupCarbonVersion.VERSION);
mainStage.getIcons().add(new Image(getClass().getResourceAsStream("cupcarbon_logo_small.png")));





//stage.setMaximized(true);
FXMLLoader loader = new FXMLLoader();
Expand All @@ -95,6 +90,7 @@ public void start(Stage mainStage) throws Exception {
Scene scene = new Scene(panneau);
mainStage.setScene(scene);
mainStage.show();

}

public static void main(String[] args) {
Expand All @@ -105,6 +101,10 @@ public static void main(String[] args) {
SolverProxyParams.port = args[2];
}

setProxy();
//CupCarbonServer server = new CupCarbonServer();
//server.start();

launch(args);
}

Expand Down Expand Up @@ -155,6 +155,8 @@ public void run() {
} catch (IOException e) {
return false;
}


}
// -----

Expand Down
27 changes: 27 additions & 0 deletions src/cupcarbon/CupCarbonClient.java
@@ -0,0 +1,27 @@
package cupcarbon;

import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;

public class CupCarbonClient {

public static void main(String args[]) throws UnknownHostException, IOException {
Socket socket = new Socket("localhost", 3000);
PrintStream p = new PrintStream(socket.getOutputStream());
Scanner scan = new Scanner(System.in);
String str;
System.out.print("sCupCarbon >> ");
while (!(str = scan.nextLine()).equals("exit")) {
System.out.println("> " + str);
System.out.print("sCupCarbon >> ");
p.print(str + "\n");
}
scan.close();
p.close();
socket.close();
}

}
2 changes: 1 addition & 1 deletion src/cupcarbon/CupCarbonController.java
Expand Up @@ -2297,7 +2297,7 @@ public void setCurrentRadio() {
CupAction action = new CupActionModifSensorCurrentRadio(sensor, currentRadioModule, newRadioModule);
block.addAction(action);
currentDevice = sensor;
VisibilityLauncher.calculate(sensor);
//VisibilityLauncher.calculate(sensor);
}
}
CupActionStack.add(block);
Expand Down
25 changes: 0 additions & 25 deletions src/cupcarbon/CupClient.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/device/MessageEventList.java
Expand Up @@ -147,7 +147,7 @@ public double getMin() {
return min;
}

public void drawChannelLinks(Graphics g) {
public void drawChannelLinks(Graphics g) {
for(List<MessageEvent> messageEventList : messageEventLists) {
if(messageEventList.size()>0) {
Graphics2D g2 = (Graphics2D) g;
Expand Down
2 changes: 1 addition & 1 deletion src/geometry/DPoint.java
Expand Up @@ -3,7 +3,7 @@
public class DPoint {

private double x;
private double y;
private double y;

public DPoint() {
super();
Expand Down
3 changes: 2 additions & 1 deletion src/senscript/Command_SEND.java
Expand Up @@ -162,7 +162,8 @@ public double execute() {
WisenSimulation.simLog.add("S" + sensor.getId() + " is writing the message : \"" + message + "\" in its buffer.");
writtenInUART = true ;
executing = true;
double ratio = 1.0/(sensor.getUartDataRate());
//double ratio = 1.0/(sensor.getUartDataRate());
double ratio = 0.1E-20;
return (ratio * (messageLength*8)) ;
}

Expand Down
7 changes: 3 additions & 4 deletions src/visibility/VisibilityZones.java
Expand Up @@ -81,10 +81,10 @@ public void run() {
double deg = 0.0;
for (int i = 0; i < nPoint; i++) {
if(sensorNode.getCurrentRadioModule().getStandard() == RadioModule.ZIGBEE_802_15_4)
zoneOfInterest.set(sensorNode.getLatitude() + 0.001 * Math.cos(deg),sensorNode.getLongitude() + 0.0015 * Math.sin(deg), 0, i);
zoneOfInterest.set(sensorNode.getLatitude() + 0.001 * Math.cos(deg), sensorNode.getLongitude() + 0.0015 * Math.sin(deg), 0, i);

//if(sensorNode.getCurrentRadioModule().getStandard() == RadioModule.LORA)
// zoneOfInterest.set(sensorNode.getLatitude() + 0.01 * Math.cos(deg),sensorNode.getLongitude() + 0.015 * Math.sin(deg), 0, i);
if(sensorNode.getCurrentRadioModule().getStandard() == RadioModule.LORA)
zoneOfInterest.set(sensorNode.getLatitude() + 0.05 * Math.cos(deg), sensorNode.getLongitude() + 0.075 * Math.sin(deg), 0, i);

//if(sensorNode.getCurrentRadioModule().getStandard() == RadioModule.WIFI_802_11)
// zoneOfInterest.set(sensorNode.getLatitude() + 0.002 * Math.cos(deg),sensorNode.getLongitude() + 0.003 * Math.sin(deg), 0, i);
Expand Down Expand Up @@ -189,7 +189,6 @@ public void run() {
int k = 0;
for (double[] v : visibilityPointList) {
zone.set(v[0], v[1], 0, k++);

}

// -----------------------------------------------------------------------------------------
Expand Down
18 changes: 9 additions & 9 deletions utils/recent.rec
@@ -1,10 +1,10 @@
/Users/bounceur/Desktop/tmp/test#test.cup
/Users/bounceur/Desktop/cupcarbon_projects/tmp2#tmp2.cup
/Users/bounceur/Desktop/battery_cupcarbon#battery_cupcarbon.cup
/Users/bounceur/Desktop/tmp cupcarbon/projet1#projet1.cup
/Users/bounceur/Desktop/cupcarbon_projects/dlpcn_minfind#dlpcn_minfind.cup
/Users/bounceur/Desktop/cupcarbon_projects/tmp4#tmp4.cup
/Users/bounceur/Desktop/tmp#tmp.cup
/Users/bounceur/Downloads/mobility#mobility.cup
/Users/bounceur/Documents/senscripttest#senscripttest.cup
/Users/bounceur/Desktop/av#av.cup
/Users/bounceur/Desktop/cupcarbon_projects/mobility#mobility.cup
/Users/bounceur/Desktop/cupcarbon_projects/dotro#dotro.cup
/Users/bounceur/Desktop/cupcarbon_projects/minfind#minfind.cup
/Users/bounceur/Desktop/cupcarbon_projects/flf#flf.cup
/Users/bounceur/Desktop/cupcarbon_projects/dlpcn#dlpcn.cup
/Users/bounceur/Desktop/cupcarbon_projects/boundary_brogo#boundary_brogo.cup
/Users/bounceur/Desktop/cupcarbon_projects/logo#logo.cup
/Users/bounceur/Desktop/cupcarbon_projects/rbrogo#rbrogo.cup
/Users/bounceur/Desktop/cupcarbon_projects/rand#rand.cup

0 comments on commit 2ce118d

Please sign in to comment.