package b4a.example;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class main_subs_2 {


public static RemoteObject  _activity_create(RemoteObject _firsttime) throws Exception{
try {
		Debug.PushSubsStack("Activity_Create (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,43);
if (RapidSub.canDelegate("activity_create")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);}
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 43;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(1024);
 BA.debugLineNum = 46;BA.debugLine="Activity.LoadLayout(\"1\")";
Debug.ShouldStop(8192);
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("1")),main.mostCurrent.activityBA);
 BA.debugLineNum = 47;BA.debugLine="cvs.Initialize(pnlDrawing)";
Debug.ShouldStop(16384);
main.mostCurrent._cvs.runVoidMethod ("Initialize",(Object)((main.mostCurrent._pnldrawing.getObject())));
 BA.debugLineNum = 51;BA.debugLine="edtIp.Text=\"192.168.0.21\"";
Debug.ShouldStop(262144);
main.mostCurrent._edtip.runMethod(true,"setText",RemoteObject.createImmutable(("192.168.0.21")));
 BA.debugLineNum = 53;BA.debugLine="StartService(Get_data)";
Debug.ShouldStop(1048576);
main.mostCurrent.__c.runVoidMethod ("StartService",main.processBA,(Object)((main.mostCurrent._get_data.getObject())));
 BA.debugLineNum = 65;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_pause(RemoteObject _userclosed) throws Exception{
try {
		Debug.PushSubsStack("Activity_Pause (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,343);
if (RapidSub.canDelegate("activity_pause")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);}
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 343;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 345;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_resume() throws Exception{
try {
		Debug.PushSubsStack("Activity_Resume (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,127);
if (RapidSub.canDelegate("activity_resume")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_resume");}
 BA.debugLineNum = 127;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(1073741824);
 BA.debugLineNum = 128;BA.debugLine="SetState";
Debug.ShouldStop(-2147483648);
_setstate();
 BA.debugLineNum = 129;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btn_ping_click() throws Exception{
try {
		Debug.PushSubsStack("Btn_ping_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,350);
if (RapidSub.canDelegate("btn_ping_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btn_ping_click");}
RemoteObject _p = RemoteObject.declareNull("anywheresoftware.b4a.phone.Phone");
RemoteObject _sb = RemoteObject.declareNull("anywheresoftware.b4a.keywords.StringBuilderWrapper");
int _i = 0;
RemoteObject _stdout = RemoteObject.declareNull("anywheresoftware.b4a.keywords.StringBuilderWrapper");
RemoteObject _stderr = RemoteObject.declareNull("anywheresoftware.b4a.keywords.StringBuilderWrapper");
RemoteObject _list1 = null;
RemoteObject _list = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _data = RemoteObject.createImmutable("");
RemoteObject _list2 = null;
 BA.debugLineNum = 350;BA.debugLine="Sub Btn_ping_Click";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 351;BA.debugLine="Dim p As Phone";
Debug.ShouldStop(1073741824);
_p = RemoteObject.createNew ("anywheresoftware.b4a.phone.Phone");Debug.locals.put("p", _p);
 BA.debugLineNum = 352;BA.debugLine="Dim sb As StringBuilder";
Debug.ShouldStop(-2147483648);
_sb = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");Debug.locals.put("sb", _sb);
 BA.debugLineNum = 353;BA.debugLine="sb.Initialize";
Debug.ShouldStop(1);
_sb.runVoidMethod ("Initialize");
 BA.debugLineNum = 356;BA.debugLine="For i = 1 To 50";
Debug.ShouldStop(8);
{
final int step4 = 1;
final int limit4 = 50;
_i = 1 ;
for (;(step4 > 0 && _i <= limit4) || (step4 < 0 && _i >= limit4) ;_i = ((int)(0 + _i + step4))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 358;BA.debugLine="p.Shell(\"ping -c1 -w1 192.168.0.\" & i ,Null,sb,N";
Debug.ShouldStop(32);
_p.runVoidMethod ("Shell",(Object)(RemoteObject.concat(RemoteObject.createImmutable("ping -c1 -w1 192.168.0."),RemoteObject.createImmutable(_i))),(Object)((main.mostCurrent.__c.getField(false,"Null"))),(Object)((_sb.getObject())),(Object)((main.mostCurrent.__c.getField(false,"Null"))));
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 365;BA.debugLine="Dim stdout As StringBuilder";
Debug.ShouldStop(4096);
_stdout = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");Debug.locals.put("stdout", _stdout);
 BA.debugLineNum = 366;BA.debugLine="stdout.Initialize";
Debug.ShouldStop(8192);
_stdout.runVoidMethod ("Initialize");
 BA.debugLineNum = 367;BA.debugLine="Dim stderr As StringBuilder";
Debug.ShouldStop(16384);
_stderr = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");Debug.locals.put("stderr", _stderr);
 BA.debugLineNum = 368;BA.debugLine="stderr.Initialize";
Debug.ShouldStop(32768);
_stderr.runVoidMethod ("Initialize");
 BA.debugLineNum = 370;BA.debugLine="Try";
Debug.ShouldStop(131072);
try { BA.debugLineNum = 371;BA.debugLine="p.Shell(\"cat\", Array As String(\"/proc/net/arp\"),";
Debug.ShouldStop(262144);
_p.runVoidMethod ("Shell",(Object)(BA.ObjectToString("cat")),(Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {RemoteObject.createImmutable("/proc/net/arp")})),(Object)((_stdout.getObject())),(Object)((_stderr.getObject())));
 BA.debugLineNum = 372;BA.debugLine="Dim list1() As String= Regex.Split(Chr(10),stdou";
Debug.ShouldStop(524288);
_list1 = main.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 10))))),(Object)(BA.ObjectToString(_stdout)));Debug.locals.put("list1", _list1);Debug.locals.put("list1", _list1);
 BA.debugLineNum = 373;BA.debugLine="Dim list As List";
Debug.ShouldStop(1048576);
_list = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");Debug.locals.put("list", _list);
 BA.debugLineNum = 375;BA.debugLine="list.Initialize";
Debug.ShouldStop(4194304);
_list.runVoidMethod ("Initialize");
 BA.debugLineNum = 376;BA.debugLine="list.Clear";
Debug.ShouldStop(8388608);
_list.runVoidMethod ("Clear");
 BA.debugLineNum = 378;BA.debugLine="For Each data As String In list1";
Debug.ShouldStop(33554432);
{
final RemoteObject group17 = _list1;
final int groupLen17 = group17.getField(true,"length").<Integer>get()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_data = group17.getArrayElement(true,RemoteObject.createImmutable(index17));Debug.locals.put("data", _data);
Debug.locals.put("data", _data);
 BA.debugLineNum = 379;BA.debugLine="Dim list2() As String=Regex.Split(\"    \",data)";
Debug.ShouldStop(67108864);
_list2 = main.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString("    ")),(Object)(_data));Debug.locals.put("list2", _list2);Debug.locals.put("list2", _list2);
 BA.debugLineNum = 380;BA.debugLine="If list2(5).Trim <> \"00:00:00:00:00:00\" Then";
Debug.ShouldStop(134217728);
if (RemoteObject.solveBoolean("!",_list2.getArrayElement(true,BA.numberCast(int.class, 5)).runMethod(true,"trim"),BA.ObjectToString("00:00:00:00:00:00"))) { 
 BA.debugLineNum = 381;BA.debugLine="ListView1.AddSingleLine(list2(0).Trim & \";\" &";
Debug.ShouldStop(268435456);
main.mostCurrent._listview1.runVoidMethod ("AddSingleLine",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(_list2.getArrayElement(true,BA.numberCast(int.class, 0)).runMethod(true,"trim"),RemoteObject.createImmutable(";"),_list2.getArrayElement(true,BA.numberCast(int.class, 5)).runMethod(true,"trim")))));
 BA.debugLineNum = 382;BA.debugLine="Log(list2(0).Trim & \";\" & list2(5).Trim)";
Debug.ShouldStop(536870912);
main.mostCurrent.__c.runVoidMethod ("LogImpl","21179680",RemoteObject.concat(_list2.getArrayElement(true,BA.numberCast(int.class, 0)).runMethod(true,"trim"),RemoteObject.createImmutable(";"),_list2.getArrayElement(true,BA.numberCast(int.class, 5)).runMethod(true,"trim")),0);
 BA.debugLineNum = 383;BA.debugLine="list.Add(list2(0).Trim & \";\" & list2(5).Trim)";
Debug.ShouldStop(1073741824);
_list.runVoidMethod ("Add",(Object)((RemoteObject.concat(_list2.getArrayElement(true,BA.numberCast(int.class, 0)).runMethod(true,"trim"),RemoteObject.createImmutable(";"),_list2.getArrayElement(true,BA.numberCast(int.class, 5)).runMethod(true,"trim")))));
 };
 }
}Debug.locals.put("data", _data);
;
 Debug.CheckDeviceExceptions();
} 
       catch (Exception e26) {
			BA.rdebugUtils.runVoidMethod("setLastException",main.processBA, e26.toString()); BA.debugLineNum = 392;BA.debugLine="Msgbox(LastException.Message, \"No arp at this ti";
Debug.ShouldStop(128);
main.mostCurrent.__c.runVoidMethodAndSync ("Msgbox",(Object)(BA.ObjectToCharSequence(main.mostCurrent.__c.runMethod(false,"LastException",main.mostCurrent.activityBA).runMethod(true,"getMessage"))),(Object)(BA.ObjectToCharSequence(RemoteObject.createImmutable("No arp at this time"))),main.mostCurrent.activityBA);
 };
 BA.debugLineNum = 408;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnconnect_click() throws Exception{
try {
		Debug.PushSubsStack("btnConnect_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,238);
if (RapidSub.canDelegate("btnconnect_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnconnect_click");}
 BA.debugLineNum = 238;BA.debugLine="Sub btnConnect_Click";
Debug.ShouldStop(8192);
 BA.debugLineNum = 239;BA.debugLine="If Starter.connected = False Then";
Debug.ShouldStop(16384);
if (RemoteObject.solveBoolean("=",main.mostCurrent._starter._connected /*RemoteObject*/ ,main.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 240;BA.debugLine="If edtIp.Text.Length = 0 Then";
Debug.ShouldStop(32768);
if (RemoteObject.solveBoolean("=",main.mostCurrent._edtip.runMethod(true,"getText").runMethod(true,"length"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 241;BA.debugLine="ToastMessageShow(\"Please enter the server ip ad";
Debug.ShouldStop(65536);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Please enter the server ip address.")),(Object)(main.mostCurrent.__c.getField(true,"True")));
 BA.debugLineNum = 242;BA.debugLine="Return";
Debug.ShouldStop(131072);
if (true) return RemoteObject.createImmutable("");
 }else {
 BA.debugLineNum = 244;BA.debugLine="CallSub2(Starter, \"ConnectToServer\", edtIp.Text";
Debug.ShouldStop(524288);
main.mostCurrent.__c.runMethodAndSync(false,"CallSubNew2",main.processBA,(Object)((main.mostCurrent._starter.getObject())),(Object)(BA.ObjectToString("ConnectToServer")),(Object)((main.mostCurrent._edtip.runMethod(true,"getText"))));
 };
 }else {
 BA.debugLineNum = 247;BA.debugLine="CallSub(Starter, \"Disconnect\")";
Debug.ShouldStop(4194304);
main.mostCurrent.__c.runMethodAndSync(false,"CallSubNew",main.processBA,(Object)((main.mostCurrent._starter.getObject())),(Object)(RemoteObject.createImmutable("Disconnect")));
 };
 BA.debugLineNum = 249;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static void  _btnsend_click() throws Exception{
try {
		Debug.PushSubsStack("btnSend_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,147);
if (RapidSub.canDelegate("btnsend_click")) { b4a.example.main.remoteMe.runUserSub(false, "main","btnsend_click"); return;}
ResumableSub_btnSend_Click rsub = new ResumableSub_btnSend_Click(null);
rsub.resume(null, null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_btnSend_Click extends BA.ResumableSub {
public ResumableSub_btnSend_Click(b4a.example.main parent) {
this.parent = parent;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
b4a.example.main parent;
RemoteObject _data_file_command = RemoteObject.createImmutable("");
RemoteObject _data_file_read_conso = RemoteObject.createImmutable("");
RemoteObject _conf_network = RemoteObject.createImmutable("");
RemoteObject _tplink_entete = RemoteObject.createImmutable("");
RemoteObject _data_array = null;
RemoteObject _file_name = RemoteObject.createImmutable("");
RemoteObject _result = RemoteObject.createImmutable(false);

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("btnSend_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,147);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 BA.debugLineNum = 160;BA.debugLine="bb.Initialize";
Debug.ShouldStop(-2147483648);
parent.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_initialize" /*RemoteObject*/ ,main.processBA);
 BA.debugLineNum = 163;BA.debugLine="Dim data_file_command As String=\"on_ascii2.txt\"";
Debug.ShouldStop(4);
_data_file_command = BA.ObjectToString("on_ascii2.txt");Debug.locals.put("data_file_command", _data_file_command);Debug.locals.put("data_file_command", _data_file_command);
 BA.debugLineNum = 164;BA.debugLine="Dim data_file_read_conso As String=\"Demande_conso";
Debug.ShouldStop(8);
_data_file_read_conso = BA.ObjectToString("Demande_conso_live.txt");Debug.locals.put("data_file_read_conso", _data_file_read_conso);Debug.locals.put("data_file_read_conso", _data_file_read_conso);
 BA.debugLineNum = 165;BA.debugLine="Dim conf_Network As String=\"network_conf_ascii_en";
Debug.ShouldStop(16);
_conf_network = BA.ObjectToString("network_conf_ascii_entete.txt");Debug.locals.put("conf_Network", _conf_network);Debug.locals.put("conf_Network", _conf_network);
 BA.debugLineNum = 166;BA.debugLine="Dim tplink_entete As String=\"Tplink_ascii_entete0";
Debug.ShouldStop(32);
_tplink_entete = BA.ObjectToString("Tplink_ascii_entete0_ascii.txt");Debug.locals.put("tplink_entete", _tplink_entete);Debug.locals.put("tplink_entete", _tplink_entete);
 BA.debugLineNum = 167;BA.debugLine="Dim data_array() As Byte";
Debug.ShouldStop(64);
_data_array = RemoteObject.createNewArray ("byte", new int[] {0}, new Object[]{});Debug.locals.put("data_array", _data_array);
 BA.debugLineNum = 168;BA.debugLine="Dim file_name As String=tplink_entete";
Debug.ShouldStop(128);
_file_name = _tplink_entete;Debug.locals.put("file_name", _file_name);Debug.locals.put("file_name", _file_name);
 BA.debugLineNum = 173;BA.debugLine="login=edttLog.Text";
Debug.ShouldStop(4096);
parent.mostCurrent._login = parent.mostCurrent._edttlog.runMethod(true,"getText");
 BA.debugLineNum = 174;BA.debugLine="Password=edtpass.text";
Debug.ShouldStop(8192);
parent.mostCurrent._password = parent.mostCurrent._edtpass.runMethod(true,"getText");
 BA.debugLineNum = 181;BA.debugLine="If login.Contains(\"&\") Then";
Debug.ShouldStop(1048576);
if (true) break;

case 1:
//if
this.state = 4;
if (parent.mostCurrent._login.runMethod(true,"contains",(Object)(RemoteObject.createImmutable("&"))).<Boolean>get().booleanValue()) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 BA.debugLineNum = 182;BA.debugLine="login=StrUtil.Stuff(login,\"\\u0026\",\"&\")";
Debug.ShouldStop(2097152);
parent.mostCurrent._login = parent.mostCurrent._strutil.runMethod(true,"_vvvvvvv2",(Object)(parent.mostCurrent._login),(Object)(BA.ObjectToString("\\u0026")),(Object)(RemoteObject.createImmutable("&")));
 if (true) break;
;
 BA.debugLineNum = 185;BA.debugLine="If login.Contains(\"'\") Then";
Debug.ShouldStop(16777216);

case 4:
//if
this.state = 7;
if (parent.mostCurrent._login.runMethod(true,"contains",(Object)(RemoteObject.createImmutable("'"))).<Boolean>get().booleanValue()) { 
this.state = 6;
}if (true) break;

case 6:
//C
this.state = 7;
 BA.debugLineNum = 186;BA.debugLine="login=StrUtil.Stuff(login,\"\\u0027\",\"&\")";
Debug.ShouldStop(33554432);
parent.mostCurrent._login = parent.mostCurrent._strutil.runMethod(true,"_vvvvvvv2",(Object)(parent.mostCurrent._login),(Object)(BA.ObjectToString("\\u0027")),(Object)(RemoteObject.createImmutable("&")));
 if (true) break;
;
 BA.debugLineNum = 190;BA.debugLine="If Password.Contains(\"&\") Then";
Debug.ShouldStop(536870912);

case 7:
//if
this.state = 10;
if (parent.mostCurrent._password.runMethod(true,"contains",(Object)(RemoteObject.createImmutable("&"))).<Boolean>get().booleanValue()) { 
this.state = 9;
}if (true) break;

case 9:
//C
this.state = 10;
 BA.debugLineNum = 191;BA.debugLine="Password= StrUtil.Stuff(Password,\"\\u0026\",\"&\")";
Debug.ShouldStop(1073741824);
parent.mostCurrent._password = parent.mostCurrent._strutil.runMethod(true,"_vvvvvvv2",(Object)(parent.mostCurrent._password),(Object)(BA.ObjectToString("\\u0026")),(Object)(RemoteObject.createImmutable("&")));
 if (true) break;
;
 BA.debugLineNum = 194;BA.debugLine="If Password.Contains(\"'\") Then";
Debug.ShouldStop(2);

case 10:
//if
this.state = 13;
if (parent.mostCurrent._password.runMethod(true,"contains",(Object)(RemoteObject.createImmutable("'"))).<Boolean>get().booleanValue()) { 
this.state = 12;
}if (true) break;

case 12:
//C
this.state = 13;
 BA.debugLineNum = 195;BA.debugLine="Password= StrUtil.Stuff(Password,\"\\u0027\",\"&\")";
Debug.ShouldStop(4);
parent.mostCurrent._password = parent.mostCurrent._strutil.runMethod(true,"_vvvvvvv2",(Object)(parent.mostCurrent._password),(Object)(BA.ObjectToString("\\u0027")),(Object)(RemoteObject.createImmutable("&")));
 if (true) break;

case 13:
//C
this.state = -1;
;
 BA.debugLineNum = 210;BA.debugLine="Wait For (load_data(file_name)) complete (result";
Debug.ShouldStop(131072);
parent.mostCurrent.__c.runVoidMethod ("WaitFor","complete", main.processBA, anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "main", "btnsend_click"), _load_data(_file_name));
this.state = 14;
return;
case 14:
//C
this.state = -1;
_result = (RemoteObject) result.getArrayElement(true,RemoteObject.createImmutable(0));Debug.locals.put("result", _result);
;
 BA.debugLineNum = 213;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
if (true) break;

            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static void  _complete(RemoteObject _result) throws Exception{
}
public static RemoteObject  _encode_data(RemoteObject _data) throws Exception{
try {
		Debug.PushSubsStack("encode_data (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,291);
if (RapidSub.canDelegate("encode_data")) { return b4a.example.main.remoteMe.runUserSub(false, "main","encode_data", _data);}
RemoteObject _key = RemoteObject.createImmutable(0);
RemoteObject _data_next = null;
RemoteObject _data_byte_encrypted = RemoteObject.createImmutable(0);
RemoteObject _network = RemoteObject.createImmutable("");
RemoteObject _scan_network = RemoteObject.createImmutable("");
RemoteObject _get_info = RemoteObject.createImmutable("");
RemoteObject _set_off = RemoteObject.createImmutable("");
RemoteObject _other = RemoteObject.createImmutable("");
RemoteObject _conso_live = RemoteObject.createImmutable("");
RemoteObject _get_time = RemoteObject.createImmutable("");
RemoteObject _entete_format = null;
RemoteObject _data2 = RemoteObject.createImmutable((byte)0);
RemoteObject _data3 = null;
RemoteObject _data1 = RemoteObject.createImmutable((byte)0);
RemoteObject _byte1 = null;
Debug.locals.put("data", _data);
 BA.debugLineNum = 291;BA.debugLine="Sub encode_data(data() As Byte)";
Debug.ShouldStop(4);
 BA.debugLineNum = 292;BA.debugLine="Dim key As Int=144  '144 'Dernier octet encodé de";
Debug.ShouldStop(8);
_key = BA.numberCast(int.class, 144);Debug.locals.put("key", _key);Debug.locals.put("key", _key);
 BA.debugLineNum = 294;BA.debugLine="Dim data_next() As Byte";
Debug.ShouldStop(32);
_data_next = RemoteObject.createNewArray ("byte", new int[] {0}, new Object[]{});Debug.locals.put("data_next", _data_next);
 BA.debugLineNum = 295;BA.debugLine="Dim data_byte_encrypted As Int";
Debug.ShouldStop(64);
_data_byte_encrypted = RemoteObject.createImmutable(0);Debug.locals.put("data_byte_encrypted", _data_byte_encrypted);
 BA.debugLineNum = 300;BA.debugLine="Dim network As String= Chr(34) & \"netif\" & Chr(34";
Debug.ShouldStop(2048);
_network = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("netif"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("set_stainfo"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("key_type"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),RemoteObject.createImmutable("3"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 44))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("password"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent._password,main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 44))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("ssid"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent._login,main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("network", _network);Debug.locals.put("network", _network);
 BA.debugLineNum = 301;BA.debugLine="Dim scan_network As String= Chr(34) & \"netif\" & C";
Debug.ShouldStop(4096);
_scan_network = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("netif"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("get_scaninfo"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("refresh"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),RemoteObject.createImmutable("1"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("scan_network", _scan_network);Debug.locals.put("scan_network", _scan_network);
 BA.debugLineNum = 302;BA.debugLine="Dim get_info As String=  Chr(34) & \"system\" & Chr";
Debug.ShouldStop(8192);
_get_info = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("system"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("get_sysinfo"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("get_info", _get_info);Debug.locals.put("get_info", _get_info);
 BA.debugLineNum = 303;BA.debugLine="Dim set_off As String= Chr(34) & \"system\" & Chr(3";
Debug.ShouldStop(16384);
_set_off = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("system"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("set_relay_state"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("state"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),RemoteObject.createImmutable("1"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("set_off", _set_off);Debug.locals.put("set_off", _set_off);
 BA.debugLineNum = 304;BA.debugLine="Dim other As String= Chr(34) & \"system\" & Chr(34)";
Debug.ShouldStop(32768);
_other = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("system"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("set_led_off"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("off"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),RemoteObject.createImmutable("0"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("other", _other);Debug.locals.put("other", _other);
 BA.debugLineNum = 305;BA.debugLine="Dim conso_live As String= Chr(34) & \"emeter\" & Ch";
Debug.ShouldStop(65536);
_conso_live = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("emeter"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("get_realtime"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("conso_live", _conso_live);Debug.locals.put("conso_live", _conso_live);
 BA.debugLineNum = 306;BA.debugLine="Dim get_time As String= Chr(34) & \"time\" & Chr(34";
Debug.ShouldStop(131072);
_get_time = RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("time"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),RemoteObject.createImmutable("get_time"),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 34))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 58))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 123))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))),main.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 125))));Debug.locals.put("get_time", _get_time);Debug.locals.put("get_time", _get_time);
 BA.debugLineNum = 308;BA.debugLine="data_next= bconv.StringToBytes(network,\"ASCII\")";
Debug.ShouldStop(524288);
_data_next = main.mostCurrent._bconv.runMethod(false,"StringToBytes",(Object)(_network),(Object)(RemoteObject.createImmutable("ASCII")));Debug.locals.put("data_next", _data_next);
 BA.debugLineNum = 311;BA.debugLine="Dim entete_format(4) As Byte";
Debug.ShouldStop(4194304);
_entete_format = RemoteObject.createNewArray ("byte", new int[] {4}, new Object[]{});Debug.locals.put("entete_format", _entete_format);
 BA.debugLineNum = 313;BA.debugLine="entete_format(3)=data_next.Length + data.Length '";
Debug.ShouldStop(16777216);
_entete_format.setArrayElement (BA.numberCast(byte.class, RemoteObject.solve(new RemoteObject[] {_data_next.getField(true,"length"),_data.getField(true,"length")}, "+",1, 1)),BA.numberCast(int.class, 3));
 BA.debugLineNum = 315;BA.debugLine="bb.Append(entete_format)";
Debug.ShouldStop(67108864);
main.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_append" /*RemoteObject*/ ,(Object)(_entete_format));
 BA.debugLineNum = 317;BA.debugLine="For Each data2 As Byte In data";
Debug.ShouldStop(268435456);
{
final RemoteObject group15 = _data;
final int groupLen15 = group15.getField(true,"length").<Integer>get()
;int index15 = 0;
;
for (; index15 < groupLen15;index15++){
_data2 = group15.getArrayElement(true,RemoteObject.createImmutable(index15));Debug.locals.put("data2", _data2);
Debug.locals.put("data2", _data2);
 BA.debugLineNum = 318;BA.debugLine="Dim data3(1) As Byte";
Debug.ShouldStop(536870912);
_data3 = RemoteObject.createNewArray ("byte", new int[] {1}, new Object[]{});Debug.locals.put("data3", _data3);
 BA.debugLineNum = 319;BA.debugLine="data3(0)=data2";
Debug.ShouldStop(1073741824);
_data3.setArrayElement (_data2,BA.numberCast(int.class, 0));
 BA.debugLineNum = 320;BA.debugLine="bb.Append(data3)";
Debug.ShouldStop(-2147483648);
main.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_append" /*RemoteObject*/ ,(Object)(_data3));
 }
}Debug.locals.put("data2", _data2);
;
 BA.debugLineNum = 326;BA.debugLine="For Each data1 As Byte In data_next";
Debug.ShouldStop(32);
{
final RemoteObject group20 = _data_next;
final int groupLen20 = group20.getField(true,"length").<Integer>get()
;int index20 = 0;
;
for (; index20 < groupLen20;index20++){
_data1 = group20.getArrayElement(true,RemoteObject.createImmutable(index20));Debug.locals.put("data1", _data1);
Debug.locals.put("data1", _data1);
 BA.debugLineNum = 327;BA.debugLine="data_byte_encrypted=Bit.Xor(data1,key) 'Mask FF";
Debug.ShouldStop(64);
_data_byte_encrypted = main.mostCurrent.__c.getField(false,"Bit").runMethod(true,"Xor",(Object)(BA.numberCast(int.class, _data1)),(Object)(_key));Debug.locals.put("data_byte_encrypted", _data_byte_encrypted);
 BA.debugLineNum = 328;BA.debugLine="Dim byte1(1) As Byte";
Debug.ShouldStop(128);
_byte1 = RemoteObject.createNewArray ("byte", new int[] {1}, new Object[]{});Debug.locals.put("byte1", _byte1);
 BA.debugLineNum = 329;BA.debugLine="byte1(0)=data_byte_encrypted";
Debug.ShouldStop(256);
_byte1.setArrayElement (BA.numberCast(byte.class, _data_byte_encrypted),BA.numberCast(int.class, 0));
 BA.debugLineNum = 330;BA.debugLine="key=byte1(0)";
Debug.ShouldStop(512);
_key = BA.numberCast(int.class, _byte1.getArrayElement(true,BA.numberCast(int.class, 0)));Debug.locals.put("key", _key);
 BA.debugLineNum = 331;BA.debugLine="bb.Append(byte1)";
Debug.ShouldStop(1024);
main.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_append" /*RemoteObject*/ ,(Object)(_byte1));
 }
}Debug.locals.put("data1", _data1);
;
 BA.debugLineNum = 335;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 21;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 22;BA.debugLine="Private edtIp As FloatLabeledEditText";
main.mostCurrent._edtip = RemoteObject.createNew ("anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper");
 //BA.debugLineNum = 23;BA.debugLine="Private lblMyIp As Label";
main.mostCurrent._lblmyip = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
 //BA.debugLineNum = 24;BA.debugLine="Private btnConnect As Button";
main.mostCurrent._btnconnect = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
 //BA.debugLineNum = 25;BA.debugLine="Private lblStatus As Label";
main.mostCurrent._lblstatus = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
 //BA.debugLineNum = 26;BA.debugLine="Private edtAge As FloatLabeledEditText";
main.mostCurrent._edtage = RemoteObject.createNew ("anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper");
 //BA.debugLineNum = 27;BA.debugLine="Private edtName As FloatLabeledEditText";
main.mostCurrent._edtname = RemoteObject.createNew ("anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper");
 //BA.debugLineNum = 28;BA.debugLine="Private btnSend As Button";
main.mostCurrent._btnsend = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
 //BA.debugLineNum = 29;BA.debugLine="Private cvs As Canvas";
main.mostCurrent._cvs = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.CanvasWrapper");
 //BA.debugLineNum = 30;BA.debugLine="Private pnlDrawing As Panel";
main.mostCurrent._pnldrawing = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
 //BA.debugLineNum = 31;BA.debugLine="Dim bconv As ByteConverter";
main.mostCurrent._bconv = RemoteObject.createNew ("anywheresoftware.b4a.agraham.byteconverter.ByteConverter");
 //BA.debugLineNum = 32;BA.debugLine="Private Btn_ping As Button";
main.mostCurrent._btn_ping = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
 //BA.debugLineNum = 33;BA.debugLine="Private conf_wifi As MLwifi";
main.mostCurrent._conf_wifi = RemoteObject.createNew ("wifi.MLwifi");
 //BA.debugLineNum = 34;BA.debugLine="Private ListView1 As ListView";
main.mostCurrent._listview1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.ListViewWrapper");
 //BA.debugLineNum = 35;BA.debugLine="Dim bb As B4XBytesBuilder";
main.mostCurrent._bb = RemoteObject.createNew ("b4a.example.b4xbytesbuilder");
 //BA.debugLineNum = 36;BA.debugLine="Private edtpass As FloatLabeledEditText";
main.mostCurrent._edtpass = RemoteObject.createNew ("anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper");
 //BA.debugLineNum = 37;BA.debugLine="Private edttLog As FloatLabeledEditText";
main.mostCurrent._edttlog = RemoteObject.createNew ("anywheresoftware.b4a.objects.FloatLabeledEditTextWrapper");
 //BA.debugLineNum = 38;BA.debugLine="Dim Password As String";
main.mostCurrent._password = RemoteObject.createImmutable("");
 //BA.debugLineNum = 39;BA.debugLine="Dim login As String";
main.mostCurrent._login = RemoteObject.createImmutable("");
 //BA.debugLineNum = 40;BA.debugLine="Dim StrUtil As StringFunctions";
main.mostCurrent._strutil = RemoteObject.createNew ("adr.stringfunctions.stringfunctions");
 //BA.debugLineNum = 41;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _load_data(RemoteObject _file_name) throws Exception{
try {
		Debug.PushSubsStack("load_data (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,214);
if (RapidSub.canDelegate("load_data")) { return b4a.example.main.remoteMe.runUserSub(false, "main","load_data", _file_name);}
ResumableSub_load_data rsub = new ResumableSub_load_data(null,_file_name);
rsub.remoteResumableSub = anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSubForFilter();
rsub.resume(null, null);
return RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.keywords.Common.ResumableSubWrapper"), rsub.remoteResumableSub);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static class ResumableSub_load_data extends BA.ResumableSub {
public ResumableSub_load_data(b4a.example.main parent,RemoteObject _file_name) {
this.parent = parent;
this._file_name = _file_name;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
b4a.example.main parent;
RemoteObject _file_name;
RemoteObject _reader = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
RemoteObject _data_array = null;

@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
		Debug.PushSubsStack("load_data (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,214);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;

    while (true) {
try {

        switch (state) {
            case -1:
{
parent.mostCurrent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,RemoteObject.createImmutable(null));return;}
case 0:
//C
this.state = 1;
Debug.locals.put("file_name", _file_name);
 BA.debugLineNum = 216;BA.debugLine="Dim reader As InputStream = File.OpenInput(File.D";
Debug.ShouldStop(8388608);
_reader = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
_reader = parent.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(parent.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirDefaultExternal")),(Object)(_file_name));Debug.locals.put("reader", _reader);Debug.locals.put("reader", _reader);
 BA.debugLineNum = 217;BA.debugLine="Dim data_array(reader.BytesAvailable) As Byte";
Debug.ShouldStop(16777216);
_data_array = RemoteObject.createNewArray ("byte", new int[] {_reader.runMethod(true,"BytesAvailable").<Integer>get().intValue()}, new Object[]{});Debug.locals.put("data_array", _data_array);
 BA.debugLineNum = 219;BA.debugLine="Try";
Debug.ShouldStop(67108864);
if (true) break;

case 1:
//try
this.state = 6;
this.catchState = 5;
this.state = 3;
if (true) break;

case 3:
//C
this.state = 6;
this.catchState = 5;
 BA.debugLineNum = 220;BA.debugLine="reader.ReadBytes(data_array,0,reader.BytesAvaila";
Debug.ShouldStop(134217728);
_reader.runVoidMethod ("ReadBytes",(Object)(_data_array),(Object)(BA.numberCast(int.class, 0)),(Object)(_reader.runMethod(true,"BytesAvailable")));
 BA.debugLineNum = 221;BA.debugLine="bconv.LittleEndian=False";
Debug.ShouldStop(268435456);
parent.mostCurrent._bconv.runMethod(true,"setLittleEndian",parent.mostCurrent.__c.getField(true,"False"));
 BA.debugLineNum = 222;BA.debugLine="encode_data(data_array)";
Debug.ShouldStop(536870912);
_encode_data(_data_array);
 BA.debugLineNum = 223;BA.debugLine="Dim data_array(bb.Length) As Byte";
Debug.ShouldStop(1073741824);
_data_array = RemoteObject.createNewArray ("byte", new int[] {parent.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_getlength" /*RemoteObject*/ ).<Integer>get().intValue()}, new Object[]{});Debug.locals.put("data_array", _data_array);
 BA.debugLineNum = 224;BA.debugLine="data_array=bb.SubArray(0)";
Debug.ShouldStop(-2147483648);
_data_array = parent.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_subarray" /*RemoteObject*/ ,(Object)(BA.numberCast(int.class, 0)));Debug.locals.put("data_array", _data_array);
 BA.debugLineNum = 226;BA.debugLine="CallSub2(Starter, \"SendData\", data_array)";
Debug.ShouldStop(2);
parent.mostCurrent.__c.runMethodAndSync(false,"CallSubNew2",main.processBA,(Object)((parent.mostCurrent._starter.getObject())),(Object)(BA.ObjectToString("SendData")),(Object)((_data_array)));
 BA.debugLineNum = 227;BA.debugLine="NewData(data_array)";
Debug.ShouldStop(4);
_newdata(_data_array);
 BA.debugLineNum = 228;BA.debugLine="Return True";
Debug.ShouldStop(8);
Debug.CheckDeviceExceptions();if (true) {
parent.mostCurrent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.mostCurrent.__c.getField(true,"True")));return;};
 Debug.CheckDeviceExceptions();
if (true) break;

case 5:
//C
this.state = 6;
this.catchState = 0;
 BA.debugLineNum = 230;BA.debugLine="Log(LastException)";
Debug.ShouldStop(32);
parent.mostCurrent.__c.runVoidMethod ("LogImpl","2917520",BA.ObjectToString(parent.mostCurrent.__c.runMethod(false,"LastException",main.mostCurrent.activityBA)),0);
 BA.debugLineNum = 231;BA.debugLine="Return False";
Debug.ShouldStop(64);
if (true) {
parent.mostCurrent.__c.runVoidMethod ("ReturnFromResumableSub",this.remoteResumableSub,(parent.mostCurrent.__c.getField(true,"False")));return;};
 if (true) break;
if (true) break;

case 6:
//C
this.state = -1;
this.catchState = 0;
;
 BA.debugLineNum = 236;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
if (true) break;
}} 
       catch (Exception e0) {
			
if (catchState == 0)
    throw e0;
else {
    state = catchState;
BA.rdebugUtils.runVoidMethod("setLastException",main.processBA, e0.toString());}
            }
        }
    }
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}
public static RemoteObject  _newdata(RemoteObject _data) throws Exception{
try {
		Debug.PushSubsStack("NewData (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,251);
if (RapidSub.canDelegate("newdata")) { return b4a.example.main.remoteMe.runUserSub(false, "main","newdata", _data);}
RemoteObject _key = RemoteObject.createImmutable(0);
RemoteObject _data_byte_decrypted = RemoteObject.createImmutable(0);
RemoteObject _pos = RemoteObject.createImmutable(0);
RemoteObject _message = RemoteObject.createImmutable("");
RemoteObject _byte1 = null;
RemoteObject _carac = RemoteObject.createImmutable("");
Debug.locals.put("data", _data);
 BA.debugLineNum = 251;BA.debugLine="Public Sub NewData (data() As Byte)";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 253;BA.debugLine="Dim key As Int=171";
Debug.ShouldStop(268435456);
_key = BA.numberCast(int.class, 171);Debug.locals.put("key", _key);Debug.locals.put("key", _key);
 BA.debugLineNum = 255;BA.debugLine="Dim data_byte_decrypted As Int";
Debug.ShouldStop(1073741824);
_data_byte_decrypted = RemoteObject.createImmutable(0);Debug.locals.put("data_byte_decrypted", _data_byte_decrypted);
 BA.debugLineNum = 256;BA.debugLine="Dim pos As Int=0";
Debug.ShouldStop(-2147483648);
_pos = BA.numberCast(int.class, 0);Debug.locals.put("pos", _pos);Debug.locals.put("pos", _pos);
 BA.debugLineNum = 259;BA.debugLine="Dim message As String=\"\"";
Debug.ShouldStop(4);
_message = BA.ObjectToString("");Debug.locals.put("message", _message);Debug.locals.put("message", _message);
 BA.debugLineNum = 260;BA.debugLine="For pos = 4 To data.Length-1";
Debug.ShouldStop(8);
{
final int step5 = 1;
final int limit5 = RemoteObject.solve(new RemoteObject[] {_data.getField(true,"length"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_pos = BA.numberCast(int.class, 4) ;
for (;(step5 > 0 && _pos.<Integer>get().intValue() <= limit5) || (step5 < 0 && _pos.<Integer>get().intValue() >= limit5) ;_pos = RemoteObject.createImmutable((int)(0 + _pos.<Integer>get().intValue() + step5))  ) {
Debug.locals.put("pos", _pos);
 BA.debugLineNum = 262;BA.debugLine="data_byte_decrypted=Bit.Xor(Bit.And(data(pos), 0";
Debug.ShouldStop(32);
_data_byte_decrypted = main.mostCurrent.__c.getField(false,"Bit").runMethod(true,"Xor",(Object)(main.mostCurrent.__c.getField(false,"Bit").runMethod(true,"And",(Object)(BA.numberCast(int.class, _data.getArrayElement(true,_pos))),(Object)(BA.numberCast(int.class, 0xff)))),(Object)(_key));Debug.locals.put("data_byte_decrypted", _data_byte_decrypted);
 BA.debugLineNum = 263;BA.debugLine="Dim byte1(1) As Byte";
Debug.ShouldStop(64);
_byte1 = RemoteObject.createNewArray ("byte", new int[] {1}, new Object[]{});Debug.locals.put("byte1", _byte1);
 BA.debugLineNum = 264;BA.debugLine="byte1(0)=data_byte_decrypted";
Debug.ShouldStop(128);
_byte1.setArrayElement (BA.numberCast(byte.class, _data_byte_decrypted),BA.numberCast(int.class, 0));
 BA.debugLineNum = 266;BA.debugLine="Dim carac As String = bconv.StringFromBytes(byte";
Debug.ShouldStop(512);
_carac = main.mostCurrent._bconv.runMethod(true,"StringFromBytes",(Object)(_byte1),(Object)(RemoteObject.createImmutable("ASCII")));Debug.locals.put("carac", _carac);Debug.locals.put("carac", _carac);
 BA.debugLineNum = 267;BA.debugLine="key=data(pos)";
Debug.ShouldStop(1024);
_key = BA.numberCast(int.class, _data.getArrayElement(true,_pos));Debug.locals.put("key", _key);
 BA.debugLineNum = 268;BA.debugLine="message=message & carac";
Debug.ShouldStop(2048);
_message = RemoteObject.concat(_message,_carac);Debug.locals.put("message", _message);
 BA.debugLineNum = 269;BA.debugLine="bb.Append(byte1)";
Debug.ShouldStop(4096);
main.mostCurrent._bb.runClassMethod (b4a.example.b4xbytesbuilder.class, "_append" /*RemoteObject*/ ,(Object)(_byte1));
 }
}Debug.locals.put("pos", _pos);
;
 BA.debugLineNum = 272;BA.debugLine="Log(message)";
Debug.ShouldStop(32768);
main.mostCurrent.__c.runVoidMethod ("LogImpl","21048597",_message,0);
 BA.debugLineNum = 289;BA.debugLine="End Sub";
Debug.ShouldStop(1);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}

public static void initializeProcessGlobals() {
    
    if (main.processGlobalsRun == false) {
	    main.processGlobalsRun = true;
		try {
		        main_subs_0._process_globals();
starter_subs_0._process_globals();
get_data_subs_0._process_globals();
b4xcollections_subs_0._process_globals();
main.myClass = BA.getDeviceClass ("b4a.example.main");
starter.myClass = BA.getDeviceClass ("b4a.example.starter");
get_data.myClass = BA.getDeviceClass ("b4a.example.get_data");
b4xbitset.myClass = BA.getDeviceClass ("b4a.example.b4xbitset");
b4xbytesbuilder.myClass = BA.getDeviceClass ("b4a.example.b4xbytesbuilder");
b4xcollections.myClass = BA.getDeviceClass ("b4a.example.b4xcollections");
b4xorderedmap.myClass = BA.getDeviceClass ("b4a.example.b4xorderedmap");
b4xset.myClass = BA.getDeviceClass ("b4a.example.b4xset");
		
        } catch (Exception e) {
			throw new RuntimeException(e);
		}
    }
}public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 15;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 16;BA.debugLine="Private ser As B4XSerializator";
main._ser = RemoteObject.createNew ("anywheresoftware.b4a.randomaccessfile.B4XSerializator");
 //BA.debugLineNum = 17;BA.debugLine="Type MyMessage (Name As String, Age As Int, Image";
;
 //BA.debugLineNum = 18;BA.debugLine="Dim rp As RuntimePermissions";
main._rp = RemoteObject.createNew ("anywheresoftware.b4a.objects.RuntimePermissions");
 //BA.debugLineNum = 19;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _setstate() throws Exception{
try {
		Debug.PushSubsStack("SetState (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,131);
if (RapidSub.canDelegate("setstate")) { return b4a.example.main.remoteMe.runUserSub(false, "main","setstate");}
 BA.debugLineNum = 131;BA.debugLine="Public Sub SetState";
Debug.ShouldStop(4);
 BA.debugLineNum = 132;BA.debugLine="btnSend.Enabled = Starter.connected";
Debug.ShouldStop(8);
main.mostCurrent._btnsend.runMethod(true,"setEnabled",main.mostCurrent._starter._connected /*RemoteObject*/ );
 BA.debugLineNum = 134;BA.debugLine="If Starter.connected Then";
Debug.ShouldStop(32);
if (main.mostCurrent._starter._connected /*RemoteObject*/ .<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 135;BA.debugLine="btnConnect.Text = \"Disconnect\"";
Debug.ShouldStop(64);
main.mostCurrent._btnconnect.runMethod(true,"setText",BA.ObjectToCharSequence("Disconnect"));
 BA.debugLineNum = 136;BA.debugLine="lblStatus.Text = \"Connected\"";
Debug.ShouldStop(128);
main.mostCurrent._lblstatus.runMethod(true,"setText",BA.ObjectToCharSequence("Connected"));
 }else {
 BA.debugLineNum = 138;BA.debugLine="btnConnect.Text = \"Connect\"";
Debug.ShouldStop(512);
main.mostCurrent._btnconnect.runMethod(true,"setText",BA.ObjectToCharSequence("Connect"));
 BA.debugLineNum = 139;BA.debugLine="lblStatus.Text = \"Disconnected\"";
Debug.ShouldStop(1024);
main.mostCurrent._lblstatus.runMethod(true,"setText",BA.ObjectToCharSequence("Disconnected"));
 };
 BA.debugLineNum = 141;BA.debugLine="lblMyIp.Text = \"My ip: \" & Starter.server.GetMyWi";
Debug.ShouldStop(4096);
main.mostCurrent._lblmyip.runMethod(true,"setText",BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("My ip: "),main.mostCurrent._starter._server /*RemoteObject*/ .runMethod(true,"GetMyWifiIP"))));
 BA.debugLineNum = 142;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _test_stream() throws Exception{
try {
		Debug.PushSubsStack("test_stream (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,143);
if (RapidSub.canDelegate("test_stream")) { return b4a.example.main.remoteMe.runUserSub(false, "main","test_stream");}
 BA.debugLineNum = 143;BA.debugLine="Sub test_stream";
Debug.ShouldStop(16384);
 BA.debugLineNum = 145;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
}