In VB6 there is a event driven command called OnCommEvent which takes care
of those waiting milliseconds automatically for you, is there any thing like
it on C#?

I.E.

' The OnComm event is used for trapping communications events and errors.
Private Static Sub MSComm1_OnComm()
    Dim EVMsg$
    Dim ERMsg$
    
    ' Branch according to the CommEvent property.
    Select Case MSComm1.CommEvent
        ' Event messages.
        Case comEvReceive
            Dim Buffer As Variant
            Buffer = MSComm1.Input
            Debug.Print "Receive - " & StrConv(Buffer, vbUnicode)
            ShowData txtTerm, (StrConv(Buffer, vbUnicode))

Etc...Etc...blablabla

What will be the equivalent on C# if any?

Alex (N3GX)

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon Brown (HB9DRV)
Sent: Monday, October 23, 2006 2:43 PM
To: A.R.S. - W5AMI
Cc: Flex Radio
Subject: Re: [Flexradio] CAT experimenting

50ms is *not* enough, use 1 second. Think about it - you are the foreground 
process getting all those nice priority boots from the hamsters running 
inside your PC, the poor old SDR console code is chugging along doing many 
things. You'll have to wait longer and give it a better chance of catching 
up.

What I do is try a command three times until I get an understandable result,

even if it's an error.

Use Portmon, watch another program talking to SDR, compare the Portmon log 
to your own. Portmon comes from www.sysinternals.com . It's free - like the 
best things.

Simon Brown, HB9DRV

----- Original Message ----- 
From: "A.R.S. - W5AMI" <[EMAIL PROTECTED]>
>
> Yes, I realized that not long after I posted my last message.  I'm now
> letting it sleep 50 ms before trying to read the input buffer and that
> helps a lot, but still it misses some never returning anything.  Maybe
> I need to increase my sleep time a bit, I could sure use it ;)
> 

_______________________________________________
FlexRadio mailing list
FlexRadio@flex-radio.biz
http://mail.flex-radio.biz/mailman/listinfo/flexradio_flex-radio.biz
Archive Link: http://www.mail-archive.com/flexradio%40flex-radio.biz/
FlexRadio Homepage: http://www.flex-radio.com


_______________________________________________
FlexRadio mailing list
FlexRadio@flex-radio.biz
http://mail.flex-radio.biz/mailman/listinfo/flexradio_flex-radio.biz
Archive Link: http://www.mail-archive.com/flexradio%40flex-radio.biz/
FlexRadio Homepage: http://www.flex-radio.com

Reply via email to