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)
God Bless America
"Neil Clark" <neil....@commidea.com> wrote in message
news:bEj8aZJk...@tpsmail01.turbopower.net...
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...