[ace-users] Timer is never called using the ACE_Reactor on Windows CE 4.2

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Sun Aug 12 15:15:12 CDT 2007


Hi Bjoern,

   Thanks for using the PRF.

>ACE VERSION: 5.5.4

Please upgrade to ACE+TAO+CIAO x.5.10 (i.e., ACE 5.5.10, TAO 1.5.10, and
CIAO 0.5.10), which you can download from

http://download.dre.vanderbilt.edu

under the heading: "Latest Beta Kit".

The DOC groups at Washington University, UC Irvine, and Vanderbilt
University only provide "best effort" support for non-sponsors for the
latest release, as described in

http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html

Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out

http://www.dre.vanderbilt.edu/support.html

for a list of companies that will provide you with ACE+TAO commercial
support.

Thanks,

        Doug

>HOST MACHINE and OPERATING SYSTEM:
>Windows CE 4.2 (Pocket PC 2003)
>
>COMPILER NAME AND VERSION (AND PATCHLEVEL):
>
>Visual Studio 2005 SP1 (Pocket PC 2003 SDK)
>
>THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
>specific file, simply state which one]:
>
>#include "config-win32.h"
>
>AREA/CLASS/EXAMPLE AFFECTED:
>
>ACE_Reactor (ACE_WFMO_Reactor I assume)
>
>DOES THE PROBLEM AFFECT:
>	COMPILATION?
>	LINKING?
>	EXECUTION?
>		Yes
>	OTHER (please specify)?
>
>SYNOPSIS:
>If I schedule a timer on an ACE_Reactor in Windows CE, the timer is
>never called.
>
>DESCRIPTION:
>
>It seems the ACE_WFMO_Reactor doesn't work on Windows CE 4.2. If I
>schedule a timer on an ACE_Reactor the timer's event handler is never
>called. I currently use ACE 5.5.4 but I've also tried ACE 5.5.10,
>which I can see has some changes in WFMO_Reactor.cpp, but it also
>fails to call the timer. I've been reading this post for a workaround:
> 
>http://groups.google.com/group/comp.soft-sys.ace/browse_thread/thread/d5d2500cd6d4d493/815b8bac44670f98?lnk=gst&q=ace+5.5+windowsce&rnum=3&hl=en
>
>But the timer is still not called with the above fix for ACE 5.5.4.
>Are anyone using the ACE_Reactor successfully on Windows CE?
>
>REPEAT BY:
>
>I've pasted a Win32 app for Windows CE at this end of this post.
>
>SAMPLE FIX/WORKAROUND:
>
>None that I'm aware of.
>
>
>Kind regards
>
>Bjoern D. Rasmussen
>
>Win32 sample application which fails to call the TimerHandler class
>using the ACE_Reactor:
>
>#include "stdafx.h"
>#include <windows.h>
>#include <commctrl.h>
>
>#include <ace/ACE.h>
>#include <ace/Reactor.h>
>#include <ace/Thread_Manager.h>
>#include <ace/Event_Handler.h>
>
>class TimerHandler : public ACE_Event_Handler
>{
>public:
>	virtual int handle_timeout(const ACE_Time_Value& tv, const void* arg)
>	{
>		OutputDebugString(_T("TIMER EVENT\r\n"));
>		return 0;
>	}
>	virtual int handle_close(ACE_HANDLE handle, ACE_Reactor_Mask
>close_mask)
>	{
>		delete this;
>		return 0;
>	}
>};
>
>static ACE_THR_FUNC_RETURN event_loop (void *arg)
>{
>  ACE_Reactor::instance()->owner (ACE_OS::thr_self ());
>  ACE_Reactor::instance()->run_reactor_event_loop ();
>  return 0;
>}
>
>int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmdLine,
>int nCmdShow)
>{
>	int ret;
>	ret = ACE::init();
>	ret = ACE_Thread_Manager::instance ()->spawn(event_loop, 0);
>	ACE_Time_Value interval(1);
>	ret = ACE_Reactor::instance()->schedule_timer(new TimerHandler(), 0,
>interval, interval);
>
>	MessageBox(0, L"Wait for timer to do its work", L"Wait Dlg", MB_OK);
>	ACE_Reactor::instance()->end_reactor_event_loop();
>	return 0;
>}
>


-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list