Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Data trigger with timeout doesn't fire in VB.NET

1 view
Skip to first unread message

Neil Clark

unread,
Nov 20, 2002, 8:13:47 AM11/20/02
to
Hello,

I'm using APAX v1 .12 in VB.NET.

If I add a data trigger with the timeout parameter > 0, the OnDataTrigger
event doesn't fire for either the data trigger or the timeout.
If I set the timeout = 0, the event is fired as expected.

There's some sample code below that demonstrates the problem. Paste it into
a new form with an apax control and 2 buttons.

Thanks in advance

Neil


--------------
Dim intConnectTrigger As Integer

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

With AxApax1

.DeviceType = APAX1.TxApxDeviceType.dtDirect

intConnectTrigger = .AddDataTrigger("CONNECT", 0, 200, True, True)

.CommPort = 3

.PortOpen()

.PutStringCRLF("ATDT08456091317")

Console.WriteLine(TimeString() & " --> Dialling...")

.EnableDataTrigger(intConnectTrigger)

End With

End Sub

Private Sub Button2_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button2.Click

With AxApax1

.DTR = False

.Close()

End With

End Sub

Private Sub AxApax1_OnDataTrigger(ByVal sender As Object, ByVal e As
AxApax1.IApaxEvents_OnDataTriggerEvent) Handles AxApax1.OnDataTrigger

If e.index = intConnectTrigger Then

If e.timeout Then

Console.WriteLine(TimeString() & " --> Connect trigger timed out")

Else

Console.WriteLine(TimeString() & " --> Connect trigger received")

End If

End If

e.reEnable = True

End Sub

Mike Welch [TurboPower Software]

unread,
Nov 21, 2002, 12:05:13 PM11/21/02
to
Neil,
Just got VB.NET installed on my new system, but I can duplicate the
problem. Can you post the dispatcher log? That should point me in the
right direction.

--
Mike Welch (TurboPower Software)
God Bless America

"Neil Clark" <neil....@commidea.com> wrote in message
news:bEj8aZJk...@tpsmail01.turbopower.net...

Don Hill

unread,
Nov 22, 2002, 4:48:18 PM11/22/02
to
Neil,

The Timeout value is in ticks (18 per second). It looks like you are setting
the Timeout value for about 180 ticks - about ten seconds. When there is no
timeout, it takes about 25 seconds to get the connection. Around 600 in the
Timeout should work good.

--
Don Hill (TurboPower Software)


"Neil Clark" <neil....@commidea.com> wrote in message

news:9l1Zz8gk...@tpsmail01.turbopower.net...
> Mike,
> There are 2 logs attached. One was generated with the timeout set, the
other
> without.
> Thanks
> Neil
>
> "Mike Welch [TurboPower Software]"
<please@keep_it_in_the_newsgroup.thanks>
> wrote in message news:c5ABoAY...@tpsmail01.turbopower.net...

0 new messages