Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim UDPSocket1 As UDPSocket
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Packet As UDPPacket
Dim msg As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
UDPSocket1.Initialize("UDP", 0, 8000)
If FirstTime Then
Dim fdata() As Byte
fdata = "ini".GetBytes("UTF8")
Packet.Initialize(fdata, "10.48.5.1", "2130")
UDPSocket1.Send(Packet)
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub UDP_PacketArrived (Packet1 As UDPPacket)
Dim msg1 As Char
msg = BytesToString(Packet1.Data, Packet1.Offset, Packet1.Length, "UTF8")
'msg1=msg.CharAt(17)
Log(msg)
Msgbox(msg,"dato")
End Sub