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

LargeIntervalTimer question

16 views
Skip to first unread message

Andy Baker

unread,
Aug 14, 2009, 10:28:45 AM8/14/09
to
Our VB2005 CE5 application uses the OpenNETCF LargeIntervalTimer to wake
itself up during the night and perform some houskeeping tasks. We recently
received a new device from a different manufacturer where it didn't work. I
posted here about this and was advised that the LargeIntervalTimer used
CeRunAppAtTime(). I contacted the manufacturer who have since implemented
CeRunAppAtTime() in their device image and it now works.
I wrote a simple test application for the device to display a message on
screen after 5 minutes. The problem I now have is that the timer is not
cancelling itself even after I have exited the application and the device is
waking up every 5 minutes. My other devices do not behave in this way - it
wakes up at the FirstEventTime and after the first Interval but then no
more. Is there another function that I need them to implement in order to
cancel the timer?
Thanks in advance.

Andy Baker


Chris Tacke, MVP

unread,
Aug 14, 2009, 5:47:11 PM8/14/09
to
Sounds like they still have a bug in their timer implementation.
CeRunAppAtEvent is called with something like EVENT_NONE to cancel the
pending event (check the source to see exactly what it calls) and it sounds
like they are not handling that.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"Andy Baker" <aba...@NOSPAMvanputer.com> wrote in message
news:082dncG756eF7xjX...@brightview.co.uk...

Andy Baker

unread,
Aug 17, 2009, 6:11:38 AM8/17/09
to
Hi Chris

Thanks for the reply. I have added a cancel option to my test application
(that calls CeRunAppAtTime() rather than using the LargeIntervalTimer) and
it cancels the running of the application but not the waking up.

Do they need to implement CeRunAppAtEvent() as well as CeRunAppAtTime() in
order to get the LIT working?

Andy Baker


"Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com> wrote in message
news:B72B5046-86E2-4043...@microsoft.com...

Chris Tacke, MVP

unread,
Aug 18, 2009, 4:28:01 PM8/18/09
to
I'm not sure - I'd have to look at the CE source to know for sure and I
don't have time to do that. It's quite possible.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

"Andy Baker" <aba...@NOSPAMvanputer.com> wrote in message

news:NNmdnUifDs7ftxTX...@brightview.co.uk...

Paul G. Tobey [eMVP]

unread,
Aug 18, 2009, 5:19:04 PM8/18/09
to
CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
hardware, so that calls into the OEM's code to set the alarms, since how
that's done is hardware-specific. I don't think that CeRunAppAtEvent() does
anything like this (it's not hardware-specific, so, when a serial driver
indicates that a serial device is connected, it fires the application, but
that's all really high-level; it's not detecting the serial connection
itself).

Paul T.

"Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com> wrote in message

news:FC55F00B-D12E-4A4C...@microsoft.com...

ferguso'donnell

unread,
Nov 4, 2009, 2:50:33 PM11/4/09
to
I was able to cancel the LargeIntervalTimer using Timer.Enabled = false.
The only way I could cancel an event set up using CeRunAppAtTime, was to set it to a date far in the future (say year 2027).
This definitely worked in the short term.
Hopefully the PDA will no longer be in regular use by 2027 and the event will not have consequences.


Paul G. Tobey [eMVP] wrote:

CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the

18-Aug-09

CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
hardware, so that calls into the OEM's code to set the alarms, since how

that is done is hardware-specific. I do not think that CeRunAppAtEvent() does
anything like this (it is not hardware-specific, so, when a serial driver


indicates that a serial device is connected, it fires the application, but

that is all really high-level; it is not detecting the serial connection
itself).

Paul T.

Previous Posts In This Thread:

On Friday, August 14, 2009 10:28 AM
Andy Baker wrote:

LargeIntervalTimer question


Our VB2005 CE5 application uses the OpenNETCF LargeIntervalTimer to wake
itself up during the night and perform some houskeeping tasks. We recently

received a new device from a different manufacturer where it did not work. I


posted here about this and was advised that the LargeIntervalTimer used
CeRunAppAtTime(). I contacted the manufacturer who have since implemented
CeRunAppAtTime() in their device image and it now works.
I wrote a simple test application for the device to display a message on
screen after 5 minutes. The problem I now have is that the timer is not
cancelling itself even after I have exited the application and the device is
waking up every 5 minutes. My other devices do not behave in this way - it
wakes up at the FirstEventTime and after the first Interval but then no
more. Is there another function that I need them to implement in order to
cancel the timer?
Thanks in advance.

Andy Baker

On Friday, August 14, 2009 5:47 PM
Chris Tacke, MVP wrote:

Sounds like they still have a bug in their timer implementation.
Sounds like they still have a bug in their timer implementation.
CeRunAppAtEvent is called with something like EVENT_NONE to cancel the
pending event (check the source to see exactly what it calls) and it sounds
like they are not handling that.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

On Monday, August 17, 2009 6:11 AM
Andy Baker wrote:

Hi ChrisThanks for the reply.
Hi Chris

Thanks for the reply. I have added a cancel option to my test application
(that calls CeRunAppAtTime() rather than using the LargeIntervalTimer) and
it cancels the running of the application but not the waking up.

Do they need to implement CeRunAppAtEvent() as well as CeRunAppAtTime() in
order to get the LIT working?

Andy Baker

On Tuesday, August 18, 2009 4:28 PM
Chris Tacke, MVP wrote:

I'm not sure - I'd have to look at the CE source to know for sure and I don't

I am not sure - I'd have to look at the CE source to know for sure and I
do not have time to do that. it is quite possible.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

On Tuesday, August 18, 2009 5:19 PM


Paul G. Tobey [eMVP] wrote:

CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
hardware, so that calls into the OEM's code to set the alarms, since how

that is done is hardware-specific. I do not think that CeRunAppAtEvent() does
anything like this (it is not hardware-specific, so, when a serial driver


indicates that a serial device is connected, it fires the application, but

that is all really high-level; it is not detecting the serial connection
itself).

Paul T.

EggHeadCafe - Software Developer Portal of Choice
Dr. Dotnetsky's Cool .NET Tips and Tricks # 19
http://www.eggheadcafe.com/tutorials/aspnet/186c09db-bbcf-4f3d-8f57-bb41f7f8a8be/dr-dotnetskys-cool-net.aspx

Joel Ivory Johnson

unread,
Nov 20, 2009, 11:56:34 PM11/20/09
to
The proper way would be to specify NULL for the time.

"Fergus O'Donnell" wrote in message
news:2009114145030f...@bluetreeservices.co.uk...

0 new messages