File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 9
9
10
10
public class ThreadClient extends Thread
11
11
{
12
- private final int SERVER_PORT = 9090 ;
12
+ private final int SERVER_PORT = 3385 ;
13
13
public int dataFlag ;
14
14
public int finishFlag ;
15
15
private Window gui ;
@@ -81,7 +81,7 @@ public void run()
81
81
try
82
82
{
83
83
this .SERVER_IP = this .gui .txt_server_ip .getText ();
84
- socket = new Socket (SERVER_IP , SERVER_PORT );
84
+ socket = new Socket (this . SERVER_IP , SERVER_PORT );
85
85
out = new DataOutputStream (socket .getOutputStream ());
86
86
in = new DataInputStream (socket .getInputStream ());
87
87
}
@@ -91,8 +91,8 @@ public void run()
91
91
e .printStackTrace ();
92
92
this .alive = false ;
93
93
}
94
-
95
-
94
+
95
+
96
96
while (this .alive )
97
97
{
98
98
// Enviar Finish y Data Flags
@@ -106,8 +106,8 @@ public void run()
106
106
System .out .println ("Error enviando la señalización al servidor" );
107
107
e .printStackTrace ();
108
108
}
109
-
110
-
109
+
110
+
111
111
if (finishFlag == 1 )
112
112
{
113
113
// Terminar todo el hilo adecuadamente (cerrar la conexión)
@@ -151,10 +151,9 @@ else if(dataFlag == 1)
151
151
System .out .println ("No se pudo hacer la lectura de la señal o la transferencia del finish" );
152
152
e .printStackTrace ();
153
153
break ;
154
- //this.alive = false;
155
154
}
156
155
}
157
- // System.out.println("u_temp="+u_temp+" u_flow="+u_flow+" outemp="+out_temp+" outFlow="+out_flow+" time="+time_value);
156
+ System .out .println ("u_temp=" +u_temp +" u_flow=" +u_flow +" outemp=" +out_temp +" outFlow=" +out_flow +" time=" +time_value + " setTemp=" + setpoint_temp + " setFlow=" + setpoint_flow );
158
157
// Actualizar gráficos con los nuevos valores
159
158
this .UpdateChart ();
160
159
}
You can’t perform that action at this time.
0 commit comments