FAQ | Points | Add... | Recent posts | Search | Register | Log in


visual c++ 2008 serialPort(DataRecived)


Post new topic  Reply to topic      Main Page -> Forum Index -> Programming Generally -> visual c++ 2008 serialPort(DataRecived)
Author
Message
Stepel
Poziom 18
Poziom 18


Joined: 28 Sep 2005
Posts: 460
Location: Piaseczno

Post#1 Post from the author of the topic 28 Mar 2009 17:47   

visual c++ 2008 serialPort(DataRecived)


Witam, czy ktoś z was oprogramowywał zdarzenie DataRecived w tym komponencie i za jego pomocą odbierał dane ? Ja tylko odbierałem za pomocą timera i serialPort1->ReadLine(); natomiast ten timer i otwieranie i zamykanie portu koliduje mi trochę. Jeśli ktoś miał do czynienia i udało mu się tym zdarzeniem DataRecived to prosiłbym o jakąs wskazówkę.

Pozdrawiam
Wojtek S.
Back to top
   
Google

Google Adsense


Post# Post from the author of the topic 28 Mar 2009 17:47   





Back to top
   
speedy_94
Poziom 12
Poziom 12


Joined: 25 Jul 2008
Posts: 93
Location: Poznań

Post#2 28 Mar 2009 18:27   

Re: visual c++ 2008 serialPort(DataRecived)


Witam.

Generalnie to zdarzenie informuje o tym, że przyszły jakieś dane. Po tym, jak zostanie wykonane, musisz zrobić to samo, co w zdarzeniu timera - odczytać bufor portu.
Ale szczerze mówiąc, mam pewne wątpliwości co do niego - w dokumentacji nie ma ściśle określonych okoliczności wywołania go, co może skończyć się jakimiś konfliktami.
Nadzieje daje drugi parametr - SerialDataReceivedEventArgs e - zawiera własność EventType, która identyfikuje, czy zdarzenie zostało wywołane przez przyjście normalnego znaku, czy też znaku EOF. Można ignorować zdarzenia, gdy e.EventType = SerialData.Chars, a odbierać znaki tylko, gdy e.EventType = SerialData.Eof.
Back to top
   
Google

Google Adsense


Post# 28 Mar 2009 18:27   





Back to top
   
Stepel
Poziom 18
Poziom 18


Joined: 28 Sep 2005
Posts: 460
Location: Piaseczno

Post#3 Post from the author of the topic 28 Mar 2009 20:37   

Re: visual c++ 2008 serialPort(DataRecived)


nie moge użyć serialData.xxxx chyba ze to jest z jakiegos System:: itd itd.. szukam metody by jak najprościej obierdać dane.. tu chyba trzeba czegoś jeszcze użyć ;/ no mam to serialData ale tak samo program sie kompiluje dziala, wysyla dane ale nic nie wyswietla..co powinien odebrac
Back to top
   
Google

Google Adsense


Post# Post from the author of the topic 28 Mar 2009 20:37   





Back to top
   
speedy_94
Poziom 12
Poziom 12


Joined: 25 Jul 2008
Posts: 93
Location: Poznań

Post#4 29 Mar 2009 21:16   

Re: visual c++ 2008 serialPort(DataRecived)


To jest z System.IO.Ports - musisz tego używać. MSDN dobra rzecz ;).
Back to top
   
Stepel
Poziom 18
Poziom 18


Joined: 28 Sep 2005
Posts: 460
Location: Piaseczno

Post#5 Post from the author of the topic 29 Mar 2009 21:35   

Re: visual c++ 2008 serialPort(DataRecived)


no zrobilem z tym ale nadal w richTextBoxie sie nie dodaje :) chyba jednak czegos tam brakuje? moze cos z invoke?
Back to top
   
Google

Google Adsense


Post# Post from the author of the topic 29 Mar 2009 21:35   





Back to top
   
Demoman
Poziom 13
Poziom 13


Joined: 03 Dec 2003
Posts: 135
Location: -

Post#6 29 Mar 2009 22:22   

Re: visual c++ 2008 serialPort(DataRecived)


w .net 3.5 SerialPort jest... (tu trzeba by przeklnąć na tych kolesi od "tego") zepsuty...

Gdzieś był o tym art, jak znajdę to wrzucę.

Zalecają używanie .net 2.0 do obsługi SerialPort


Chore...


edit:
proszę: Link

Więc zalecam używać 2.0, chyba że się chce pozbyć COM'a z komputerka
Back to top
   
Post new topic  Reply to topic      Main Page -> Forum Index -> Programming Generally -> visual c++ 2008 serialPort(DataRecived)
Page 1 of 1
Similar topics
Visual 2005 i "SerialPort" (5)
MySQL, posnet - Visual C++ 6 / Visual Studio 2005/2008 (7)
Visual basic kontrolka serialport jak wysłać chara (8)
[Visual Basic] Kontrloka SerialPort i budowa terminala RS232 (8)
[VISUAL C#] kontrolka serialport-bytestoread i odbiór danych (8)
VB 2008 Exspres odbieranie RS232 SerialPort (4)
[Visual C++] Obsługa kontrolki SerialPort. (1)
Obsługa SerialPort w Visual studio (8)
Vscrollbar - visual c# 2008 (2)
[VISUAL BASIC]Visual Basic 2008 DataGridView (4)

Page generation time: 0.164 seconds


FAQ || Administrator || Moderators || Widgets and banners || Contact
elektroda.pl topic RSS feed