|
@@ -36,19 +36,29 @@ public class send extends TimerTask {
|
36
|
36
|
|
37
|
37
|
}
|
38
|
38
|
//byte[] data = {"abcdefghijklmnopqrxtuvwxyz"};
|
39
|
|
- String data = "BLUECELL";
|
|
39
|
+ public String data = "BLUECELL";
|
40
|
40
|
byte[] buffers = data.getBytes();
|
41
|
|
-
|
|
41
|
+ int test_i = 0;
|
42
|
42
|
@Override
|
43
|
43
|
public void run() {
|
44
|
44
|
try {
|
45
|
|
- String testdata = String.valueOf((this.mAcitivity).Send_Test());
|
46
|
|
- Log.d("send.class / run", testdata);
|
47
|
|
-// byteArrayOutputStream.write(data, 0, 5);
|
48
|
|
-// dos.writeChars(testdata);
|
49
|
45
|
|
50
|
|
- dos.write(buffers, 0, buffers.length);
|
51
|
|
- Log.d("send.class / 메시지 전송", "성공");
|
|
46
|
+ if(this.mAcitivity.isSend_Status() == true) {
|
|
47
|
+ String testdata = String.valueOf((this.mAcitivity).Send_Test());
|
|
48
|
+ Log.d("send.class / run", testdata);
|
|
49
|
+ // byteArrayOutputStream.write(data, 0, 5);
|
|
50
|
+ // dos.writeChars(testdata);
|
|
51
|
+
|
|
52
|
+ //dos.write(buffers, 0, buffers.length);
|
|
53
|
+ dos.write(0xbe);
|
|
54
|
+
|
|
55
|
+ for(int i = 0; i < 50; i++)
|
|
56
|
+ dos.write(i);
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+ Log.d("send.class / 메시지 전송", "성공");
|
|
60
|
+ this.mAcitivity.isSend_Set(false);
|
|
61
|
+ }
|
52
|
62
|
}catch(Exception e){
|
53
|
63
|
Log.e("send.class / 전송 객체 초기화","실패");
|
54
|
64
|
}
|