HighTechTalks DotNet Forums  

LargeIntervalTimer question

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss LargeIntervalTimer question in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Andy Baker
 
Posts: n/a

Default LargeIntervalTimer question - 08-14-2009 , 09:28 AM






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

Reply With Quote
  #2  
Old   
Chris Tacke, MVP
 
Posts: n/a

Default Re: LargeIntervalTimer question - 08-14-2009 , 04:47 PM






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" <abaker (AT) NOSPAMvanputer (DOT) com> wrote

Quote:
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

Reply With Quote
  #3  
Old   
Andy Baker
 
Posts: n/a

Default Re: LargeIntervalTimer question - 08-17-2009 , 05:11 AM



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

Quote:
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" <abaker (AT) NOSPAMvanputer (DOT) com> wrote in message
news:082dncG756eF7xjXnZ2dnUVZ8midnZ2d (AT) brightview (DOT) co.uk...
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


Reply With Quote
  #4  
Old   
Chris Tacke, MVP
 
Posts: n/a

Default Re: LargeIntervalTimer question - 08-18-2009 , 03:28 PM



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" <abaker (AT) NOSPAMvanputer (DOT) com> wrote

Quote:
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-B127-EFE865BF9DDC (AT) microsoft (DOT) com...
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" <abaker (AT) NOSPAMvanputer (DOT) com> wrote in message
news:082dncG756eF7xjXnZ2dnUVZ8midnZ2d (AT) brightview (DOT) co.uk...
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




Reply With Quote
  #5  
Old   
Paul G. Tobey [eMVP]
 
Posts: n/a

Default Re: LargeIntervalTimer question - 08-18-2009 , 04:19 PM



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

Quote:
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" <abaker (AT) NOSPAMvanputer (DOT) com> wrote in message
news:NNmdnUifDs7ftxTXnZ2dnUVZ8rmdnZ2d (AT) brightview (DOT) co.uk...
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-B127-EFE865BF9DDC (AT) microsoft (DOT) com...
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" <abaker (AT) NOSPAMvanputer (DOT) com> wrote in message
news:082dncG756eF7xjXnZ2dnUVZ8midnZ2d (AT) brightview (DOT) co.uk...
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





Reply With Quote
  #6  
Old   
Fergus O'Donnell
 
Posts: n/a

Default Cancelling CeRunAppAtTime and LargeIntervalTimer - 11-04-2009 , 01:50 PM



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

Reply With Quote
  #7  
Old   
Joel Ivory Johnson
 
Posts: n/a

Default Re: Cancelling CeRunAppAtTime and LargeIntervalTimer - 11-20-2009 , 10:56 PM



The proper way would be to specify NULL for the time.

"Fergus O'Donnell" wrote in message
news:2009114145030fergus.odonnell (AT) bluetreeservices (DOT) co.uk...
Quote:
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

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.