Click here to Skip to main content
15,895,192 members
Home / Discussions / C#
   

C#

 
Questionmulti threading problem??? Pin
mr.mohsen9-Aug-08 6:02
mr.mohsen9-Aug-08 6:02 
AnswerRe: multi threading problem??? Pin
Frank Horn9-Aug-08 6:38
Frank Horn9-Aug-08 6:38 
GeneralRe: multi threading problem??? Pin
mr.mohsen9-Aug-08 11:20
mr.mohsen9-Aug-08 11:20 
GeneralRe: multi threading problem??? Pin
Mark Salsbery9-Aug-08 11:24
Mark Salsbery9-Aug-08 11:24 
GeneralRe: multi threading problem??? Pin
Mycroft Holmes9-Aug-08 14:11
professionalMycroft Holmes9-Aug-08 14:11 
QuestionGetting all Forms in the project Pin
mrcooll9-Aug-08 5:48
mrcooll9-Aug-08 5:48 
AnswerRe: Getting all Forms in the project Pin
Wendelius9-Aug-08 6:00
mentorWendelius9-Aug-08 6:00 
QuestionHow to get a particular number of bytes or a null terminated string from serial port? [modified] Pin
CelestialCoder9-Aug-08 4:42
CelestialCoder9-Aug-08 4:42 
Hello

I am basically a Micro controller programmer trying to learn C# for controlling my devices through serial port.(USB is next target).
I have seen serialport control and its events in C#2008. Also I went through some example projects in Code project. They seem to be not using that control. They are using coding only using Serialport class of dot net.
Let me express some of my basic doubts. (My doubts arise out of my comparatively low speed and sequential programming experience in Micro controllers- so it seems to me)

Suppose I need to do a task when I received 20 bytes from serial port. I understood that data received is in a buffer. But I need to act only when a particular number of bytes is received. Or a particular character or null is received.I have seen the time out property, but in my case data may come at different quantity. So time out may not be practical. How I can realize this requirement?

In another situation sometimes a packet of 30 bytes arrives in a strech - means sequentially and stops. Means that packet ends and there will be a pause of substantial time before next packet comes. Here I need to get informed that one packet received and stopped, so my task will jump in. In micro controllers I use interrupts and all. Here it seems to me that more easy and flexible options are available. but I don't get the clue.

Any guidelines for where I to look or follow which method?

With Regards
Roy Thomas

"..this file is known as source file probably because it is a source of frustration and anxiety!" - Chuck Sphar - In book 'C# 2005 for Dummies'.

modified on Saturday, August 9, 2008 10:57 AM

AnswerRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
Searril9-Aug-08 5:00
Searril9-Aug-08 5:00 
GeneralRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
CelestialCoder9-Aug-08 5:06
CelestialCoder9-Aug-08 5:06 
GeneralRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
CelestialCoder12-Aug-08 1:56
CelestialCoder12-Aug-08 1:56 
GeneralRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
CelestialCoder13-Aug-08 17:36
CelestialCoder13-Aug-08 17:36 
QuestionC# windows application deployment error Pin
vishnukamath9-Aug-08 3:40
vishnukamath9-Aug-08 3:40 
QuestionCounting number of characters Pin
Zafar Sultan9-Aug-08 3:35
Zafar Sultan9-Aug-08 3:35 
AnswerRe: Counting number of characters Pin
User 66589-Aug-08 4:43
User 66589-Aug-08 4:43 
QuestionMobile programming Pin
ali zaidi9-Aug-08 3:25
ali zaidi9-Aug-08 3:25 
AnswerRe: Mobile programming Pin
mr.mohsen9-Aug-08 6:09
mr.mohsen9-Aug-08 6:09 
QuestionOnchange event is not triggering events on text elements in c# Pin
Nupur2069-Aug-08 3:03
Nupur2069-Aug-08 3:03 
QuestionHow can I copy a block of memory? Pin
CopperCircle9-Aug-08 2:22
CopperCircle9-Aug-08 2:22 
AnswerRe: How can I copy a block of memory? Pin
User 66589-Aug-08 2:29
User 66589-Aug-08 2:29 
GeneralRe: How can I copy a block of memory? Pin
CopperCircle9-Aug-08 2:39
CopperCircle9-Aug-08 2:39 
GeneralRe: How can I copy a block of memory? Pin
Guffa9-Aug-08 7:53
Guffa9-Aug-08 7:53 
GeneralRe: How can I copy a block of memory? Pin
CopperCircle9-Aug-08 11:47
CopperCircle9-Aug-08 11:47 
AnswerRe: How can I copy a block of memory? Pin
Guffa9-Aug-08 22:17
Guffa9-Aug-08 22:17 
GeneralRe: How can I copy a block of memory? Pin
CopperCircle10-Aug-08 0:21
CopperCircle10-Aug-08 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.