Hallo everybody:
I have some questions about Seiral communication with GPS. I am using the "Serial Port" in Windows application form of Visual studio 2005.
In one second I receive several messages from port. each message has different number of bytes. I know the time in one second when the data arrive. How can I make sure I receive correctly?
my codes is like this:
Port2->Write(Oa,0,18); //after this command, i get messages in one second
Sleep(20);
Port2->Read(Oa_responce1,0,50);
Sleep(30)
Port2->Read(Oa_responce2,0,30);
is that correct?
And how can I check the data i have received? I only find the "textbox->text=Port2->Readnewline()". But I can only display string type. How can i display one wchar? such as Oa_responce1(5)?
Thanks a lot!!!