S
Stephan Steiner
Hi
I'm using a timer that is triggered each second to perform a countdown. Once
the countdown hits one, I reduce the timer interval by a safety margin, and
the next time the timer callback kicks in, I turn on packet reception in my
program. The next timer interval is one second plus the safety margin, and
is reset once the first packet containing an indicator of the next data
transmission is received. This mechanism works accurately on my client
software running on a pc, it is always in synch with the server, even though
they run on different machines (the client is even connected through a
wlan). However, if I do the same on PocketPC, if I show the counter in the
GUI I can already see that it doesn't match the countdown on the client and
the server PC, and sure enough, the PDA gets out of synch quite often (it
manages to catch up eventually, but the whole point of my data transmission
mechanism is that a client listens at the beginning of the data transfer,
and shuts down as soon as it has all the data it needs). My first thought
was increasing the priority of the underlying thread of my timer
(Threading.Timer), but I didn't find a way to expose that thread and as
there is no other timer class I'm aware off, I'm a bit stuck here. I know I
could increase the leeway period to several seconds and I'd be sure to get
all the data I want, but that would effectively equal to doubling the
listening time and render my whole transmission scheme 50% less effective
(and require twice as much power... wlan uptime is expensive) and that would
just about break my neck.
Any help in that matter would be very welcome.
Regards
Stephan
I'm using a timer that is triggered each second to perform a countdown. Once
the countdown hits one, I reduce the timer interval by a safety margin, and
the next time the timer callback kicks in, I turn on packet reception in my
program. The next timer interval is one second plus the safety margin, and
is reset once the first packet containing an indicator of the next data
transmission is received. This mechanism works accurately on my client
software running on a pc, it is always in synch with the server, even though
they run on different machines (the client is even connected through a
wlan). However, if I do the same on PocketPC, if I show the counter in the
GUI I can already see that it doesn't match the countdown on the client and
the server PC, and sure enough, the PDA gets out of synch quite often (it
manages to catch up eventually, but the whole point of my data transmission
mechanism is that a client listens at the beginning of the data transfer,
and shuts down as soon as it has all the data it needs). My first thought
was increasing the priority of the underlying thread of my timer
(Threading.Timer), but I didn't find a way to expose that thread and as
there is no other timer class I'm aware off, I'm a bit stuck here. I know I
could increase the leeway period to several seconds and I'd be sure to get
all the data I want, but that would effectively equal to doubling the
listening time and render my whole transmission scheme 50% less effective
(and require twice as much power... wlan uptime is expensive) and that would
just about break my neck.
Any help in that matter would be very welcome.
Regards
Stephan