package b4a.bbb;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class cockpit_subs_0 {


public static RemoteObject  _activity_create(RemoteObject _firsttime) throws Exception{
try {
		Debug.PushSubsStack("Activity_Create (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,35);
if (RapidSub.canDelegate("activity_create")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","activity_create", _firsttime);}
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 35;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(4);
 BA.debugLineNum = 38;BA.debugLine="Activity.LoadLayout(\"HomeControl1\")";
Debug.ShouldStop(32);
cockpit.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("HomeControl1")),cockpit.mostCurrent.activityBA);
 BA.debugLineNum = 41;BA.debugLine="Param.read_file_setup(\"setup.txt\")";
Debug.ShouldStop(256);
cockpit.mostCurrent._param.runVoidMethod ("_read_file_setup" /*RemoteObject*/ ,cockpit.mostCurrent.activityBA,(Object)(RemoteObject.createImmutable("setup.txt")));
 BA.debugLineNum = 42;BA.debugLine="load_sensor";
Debug.ShouldStop(512);
_load_sensor();
 BA.debugLineNum = 43;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
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 (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,49);
if (RapidSub.canDelegate("activity_pause")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","activity_pause", _userclosed);}
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 49;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(65536);
 BA.debugLineNum = 51;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
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 (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,45);
if (RapidSub.canDelegate("activity_resume")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","activity_resume");}
 BA.debugLineNum = 45;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(4096);
 BA.debugLineNum = 47;BA.debugLine="End Sub";
Debug.ShouldStop(16384);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btn_setup_sensor_click() throws Exception{
try {
		Debug.PushSubsStack("Btn_setup_sensor_Click (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,111);
if (RapidSub.canDelegate("btn_setup_sensor_click")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","btn_setup_sensor_click");}
 BA.debugLineNum = 111;BA.debugLine="Sub Btn_setup_sensor_Click";
Debug.ShouldStop(16384);
 BA.debugLineNum = 113;BA.debugLine="End Sub";
Debug.ShouldStop(65536);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _button1_click() throws Exception{
try {
		Debug.PushSubsStack("Button1_Click (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,115);
if (RapidSub.canDelegate("button1_click")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","button1_click");}
 BA.debugLineNum = 115;BA.debugLine="Sub Button1_Click";
Debug.ShouldStop(262144);
 BA.debugLineNum = 117;BA.debugLine="End Sub";
Debug.ShouldStop(1048576);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _button22_click() throws Exception{
try {
		Debug.PushSubsStack("Button22_Click (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,127);
if (RapidSub.canDelegate("button22_click")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","button22_click");}
 BA.debugLineNum = 127;BA.debugLine="Sub Button22_Click";
Debug.ShouldStop(1073741824);
 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  _clv_sensor_itemclick(RemoteObject _index,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("clv_sensor_ItemClick (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,58);
if (RapidSub.canDelegate("clv_sensor_itemclick")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","clv_sensor_itemclick", _index, _value);}
Debug.locals.put("Index", _index);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 58;BA.debugLine="Sub clv_sensor_ItemClick (Index As Int, Value As O";
Debug.ShouldStop(33554432);
 BA.debugLineNum = 60;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _clv1_itemclick(RemoteObject _index,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("clv1_ItemClick (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,123);
if (RapidSub.canDelegate("clv1_itemclick")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","clv1_itemclick", _index, _value);}
Debug.locals.put("Index", _index);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 123;BA.debugLine="Sub clv1_ItemClick (Index As Int, Value As Object)";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 125;BA.debugLine="End Sub";
Debug.ShouldStop(268435456);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _clv2_itemclick(RemoteObject _index,RemoteObject _value) throws Exception{
try {
		Debug.PushSubsStack("clv2_ItemClick (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,119);
if (RapidSub.canDelegate("clv2_itemclick")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","clv2_itemclick", _index, _value);}
Debug.locals.put("Index", _index);
Debug.locals.put("Value", _value);
 BA.debugLineNum = 119;BA.debugLine="Sub clv2_ItemClick (Index As Int, Value As Object)";
Debug.ShouldStop(4194304);
 BA.debugLineNum = 121;BA.debugLine="End Sub";
Debug.ShouldStop(16777216);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _createlistitem(RemoteObject _text,RemoteObject _width,RemoteObject _height) throws Exception{
try {
		Debug.PushSubsStack("CreateListItem (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,89);
if (RapidSub.canDelegate("createlistitem")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","createlistitem", _text, _width, _height);}
RemoteObject _p = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
RemoteObject _info_temp = null;
Debug.locals.put("Text", _text);
Debug.locals.put("Width", _width);
Debug.locals.put("Height", _height);
 BA.debugLineNum = 89;BA.debugLine="Sub CreateListItem(Text As String, Width As Int, H";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 91;BA.debugLine="Dim p As Panel";
Debug.ShouldStop(67108864);
_p = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");Debug.locals.put("p", _p);
 BA.debugLineNum = 92;BA.debugLine="Dim info_temp() As String=Regex.Split(\";\",Text)";
Debug.ShouldStop(134217728);
_info_temp = cockpit.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(";")),(Object)(_text));Debug.locals.put("info_temp", _info_temp);Debug.locals.put("info_temp", _info_temp);
 BA.debugLineNum = 93;BA.debugLine="p.Initialize(\"\")";
Debug.ShouldStop(268435456);
_p.runVoidMethod ("Initialize",cockpit.mostCurrent.activityBA,(Object)(RemoteObject.createImmutable("")));
 BA.debugLineNum = 96;BA.debugLine="p.SetLayout(0, 0, Width, Height)";
Debug.ShouldStop(-2147483648);
_p.runVoidMethod ("SetLayout",(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 0)),(Object)(_width),(Object)(_height));
 BA.debugLineNum = 97;BA.debugLine="p.LoadLayout(\"List_sensor\")";
Debug.ShouldStop(1);
_p.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("List_sensor")),cockpit.mostCurrent.activityBA);
 BA.debugLineNum = 102;BA.debugLine="lbl_icone_sensor.Text=cs.Initialize.Typeface(Type";
Debug.ShouldStop(32);
cockpit.mostCurrent._lbl_icone_sensor.runMethod(true,"setText",BA.ObjectToCharSequence(cockpit.mostCurrent._cs.runMethod(false,"Initialize").runMethod(false,"Typeface",(Object)(cockpit.mostCurrent.__c.getField(false,"Typeface").runMethod(false,"getFONTAWESOME"))).runMethod(false,"Color",(Object)(BA.numberCast(int.class, 0xff01ff20))).runMethod(false,"Size",(Object)(BA.numberCast(int.class, 40))).runMethod(false,"Append",(Object)(BA.ObjectToCharSequence(cockpit.mostCurrent.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 0xf2c9)))))).runMethod(false,"PopAll").getObject()));
 BA.debugLineNum = 104;BA.debugLine="lbl_name.Text=info_temp(0)";
Debug.ShouldStop(128);
cockpit.mostCurrent._lbl_name.runMethod(true,"setText",BA.ObjectToCharSequence(_info_temp.getArrayElement(true,BA.numberCast(int.class, 0))));
 BA.debugLineNum = 105;BA.debugLine="lbl_T_live.Text = \"20.0\"";
Debug.ShouldStop(256);
cockpit.mostCurrent._lbl_t_live.runMethod(true,"setText",BA.ObjectToCharSequence("20.0"));
 BA.debugLineNum = 106;BA.debugLine="lbl_T_Consigne.Text = info_temp(1)";
Debug.ShouldStop(512);
cockpit.mostCurrent._lbl_t_consigne.runMethod(true,"setText",BA.ObjectToCharSequence(_info_temp.getArrayElement(true,BA.numberCast(int.class, 1))));
 BA.debugLineNum = 107;BA.debugLine="Btn_setup_sensor.Text = \"Setup\"";
Debug.ShouldStop(1024);
cockpit.mostCurrent._btn_setup_sensor.runMethod(true,"setText",BA.ObjectToCharSequence("Setup"));
 BA.debugLineNum = 108;BA.debugLine="Return p";
Debug.ShouldStop(2048);
if (true) return _p;
 BA.debugLineNum = 109;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 13;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 17;BA.debugLine="Private clv_sensor As CustomListView";
cockpit.mostCurrent._clv_sensor = RemoteObject.createNew ("b4a.example3.customlistview");
 //BA.debugLineNum = 18;BA.debugLine="Dim cs As CSBuilder";
cockpit.mostCurrent._cs = RemoteObject.createNew ("anywheresoftware.b4a.objects.CSBuilder");
 //BA.debugLineNum = 21;BA.debugLine="Private Btn_setup_sensor As B4XView";
cockpit.mostCurrent._btn_setup_sensor = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
 //BA.debugLineNum = 22;BA.debugLine="Private lbl_icone_sensor As B4XView";
cockpit.mostCurrent._lbl_icone_sensor = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
 //BA.debugLineNum = 23;BA.debugLine="Private lbl_name As B4XView";
cockpit.mostCurrent._lbl_name = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
 //BA.debugLineNum = 24;BA.debugLine="Private lbl_T_Consigne As B4XView";
cockpit.mostCurrent._lbl_t_consigne = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
 //BA.debugLineNum = 25;BA.debugLine="Private lbl_T_live As B4XView";
cockpit.mostCurrent._lbl_t_live = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper");
 //BA.debugLineNum = 33;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _lbaddsensor_click() throws Exception{
try {
		Debug.PushSubsStack("lbAddSensor_Click (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,54);
if (RapidSub.canDelegate("lbaddsensor_click")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","lbaddsensor_click");}
 BA.debugLineNum = 54;BA.debugLine="Sub lbAddSensor_Click";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 55;BA.debugLine="StartActivity(Setup)";
Debug.ShouldStop(4194304);
cockpit.mostCurrent.__c.runVoidMethod ("StartActivity",cockpit.processBA,(Object)((cockpit.mostCurrent._setup.getObject())));
 BA.debugLineNum = 56;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _load_sensor() throws Exception{
try {
		Debug.PushSubsStack("load_sensor (cockpit) ","cockpit",4,cockpit.mostCurrent.activityBA,cockpit.mostCurrent,62);
if (RapidSub.canDelegate("load_sensor")) { return b4a.bbb.cockpit.remoteMe.runUserSub(false, "cockpit","load_sensor");}
int _i = 0;
RemoteObject _data = null;
 BA.debugLineNum = 62;BA.debugLine="Sub load_sensor";
Debug.ShouldStop(536870912);
 BA.debugLineNum = 64;BA.debugLine="For i=0 To Param.list_Read.Size-1";
Debug.ShouldStop(-2147483648);
{
final int step1 = 1;
final int limit1 = RemoteObject.solve(new RemoteObject[] {cockpit.mostCurrent._param._list_read /*RemoteObject*/ .runMethod(true,"getSize"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step1 > 0 && _i <= limit1) || (step1 < 0 && _i >= limit1) ;_i = ((int)(0 + _i + step1))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 65;BA.debugLine="Dim data() As String =Regex.Split(\";\", Param.lis";
Debug.ShouldStop(1);
_data = cockpit.mostCurrent.__c.getField(false,"Regex").runMethod(false,"Split",(Object)(BA.ObjectToString(";")),(Object)(BA.ObjectToString(cockpit.mostCurrent._param._list_read /*RemoteObject*/ .runMethod(false,"Get",(Object)(BA.numberCast(int.class, _i))))));Debug.locals.put("data", _data);Debug.locals.put("data", _data);
 BA.debugLineNum = 67;BA.debugLine="If data(0).Contains(\"[\")=False Then";
Debug.ShouldStop(4);
if (RemoteObject.solveBoolean("=",_data.getArrayElement(true,BA.numberCast(int.class, 0)).runMethod(true,"contains",(Object)(RemoteObject.createImmutable("["))),cockpit.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 69;BA.debugLine="clv_sensor.add(CreateListItem(data(1) &\";\" & da";
Debug.ShouldStop(16);
cockpit.mostCurrent._clv_sensor.runVoidMethod ("_add",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), _createlistitem(RemoteObject.concat(_data.getArrayElement(true,BA.numberCast(int.class, 1)),RemoteObject.createImmutable(";"),_data.getArrayElement(true,BA.numberCast(int.class, 3))),cockpit.mostCurrent._clv_sensor.runMethod(false,"_asview").runMethod(true,"getWidth"),cockpit.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 80)))).getObject()),(Object)((RemoteObject.createImmutable(""))));
 };
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 73;BA.debugLine="End Sub";
Debug.ShouldStop(256);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 7;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 11;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}