Hello!!!
Ich have a Problem with reading a kompletly NMEA-protocol like "§GPGGA,..." (see Help 'StrSplit') from a server.
The Server sends every two seconds a NMEA-protokoll. Ich can see this in a Control-Monitor and the server allows every client to take this data. But in the 'filestream.ReadString' there are only some parts of the protocol. Sometimes parts out of the middle or something from the end. Only the first read is correct and begins with "GPGGA,...." With the folowing code i always checked the length of the string. This is every time different between 5 or 10 and perhaps 60 to 80.
I have tested the timer with 500,1000 and 2000 ms, but no different.
If i don't know, where the string begins, I can not take the parameters with 'StrSplit' to use them.
Here the nessesary parts of my code:
I use the components Network.dll and BinaryFile.dll
Sub App_Start
..
Timer1.Enabled=true
Client.New1
Client.Connect("87.139.78.???",11112)
..
end sub
Sub Timer1_Tick
..
if Client.DataAvailable=true then
filestream.New1(Client.Getstream,false)
Protokoll=filestream.ReadString
Label1.Text=Protokoll
Label2.Text=StrLength(Protokoll)
end if
..
end sub
:sign0085:
I trie to find an answer for two weeks, but nothing.....
Thanks for help!!!
Ich have a Problem with reading a kompletly NMEA-protocol like "§GPGGA,..." (see Help 'StrSplit') from a server.
The Server sends every two seconds a NMEA-protokoll. Ich can see this in a Control-Monitor and the server allows every client to take this data. But in the 'filestream.ReadString' there are only some parts of the protocol. Sometimes parts out of the middle or something from the end. Only the first read is correct and begins with "GPGGA,...." With the folowing code i always checked the length of the string. This is every time different between 5 or 10 and perhaps 60 to 80.
I have tested the timer with 500,1000 and 2000 ms, but no different.
If i don't know, where the string begins, I can not take the parameters with 'StrSplit' to use them.
Here the nessesary parts of my code:
I use the components Network.dll and BinaryFile.dll
Sub App_Start
..
Timer1.Enabled=true
Client.New1
Client.Connect("87.139.78.???",11112)
..
end sub
Sub Timer1_Tick
..
if Client.DataAvailable=true then
filestream.New1(Client.Getstream,false)
Protokoll=filestream.ReadString
Label1.Text=Protokoll
Label2.Text=StrLength(Protokoll)
end if
..
end sub
:sign0085:
I trie to find an answer for two weeks, but nothing.....
Thanks for help!!!