Multi timer

bridged with qdn.public.neutrino
Post Reply
Trong Nguyen

Multi timer

Post by Trong Nguyen » Thu Oct 16, 2003 3:18 pm

Hi all,

In QNX Neutrino, I can not set the multi-timer.
alway the latest timer will be received.

sigevent.sig_value.sival_int = MY_VALUE;
sigevent.sig_notify = SIGEV_PULSE;
sigevent.sig_coid = ConnectAttach();
sigevent.sig_priority = getprio(0);
sigevent.sig_code = _PULSE_CODE_MINAVAIL;

then start timer_create & timer_setting.

Do you know how to initialize the event to receive the
multi-timer ?

Thanks


Trong

Xiaodan Tang

Re: Multi timer

Post by Xiaodan Tang » Thu Oct 16, 2003 3:32 pm

Trong Nguyen <tnguyen@aquilamsl.com> wrote in message
news:bmmbqj$d4c$1@inn.qnx.com...
Hi all,

In QNX Neutrino, I can not set the multi-timer.
alway the latest timer will be received.

sigevent.sig_value.sival_int = MY_VALUE;
sigevent.sig_notify = SIGEV_PULSE;
sigevent.sig_coid = ConnectAttach();
sigevent.sig_priority = getprio(0);
sigevent.sig_code = _PULSE_CODE_MINAVAIL;
timer_create(..., &sigevent);

sigevent.sig_value.sival_int=MY_VALUE2;
timer_create(..., &sigevent);

start the 2 timer, and you should be able to decided which timer
goes off, from "MY_VALUE" or "MY_VALUE2" .

-xtang
then start timer_create & timer_setting.

Do you know how to initialize the event to receive the
multi-timer ?

Thanks


Trong

Trong Nguyen

Re: Multi timer

Post by Trong Nguyen » Thu Oct 16, 2003 4:05 pm

Thanks xtang,

I want to start both timer 1 & 2.....
Then I received alway 1 message
which has MyMessage.value.sival_int = MY_VALUE ;
and period time = time od timer 2...

I do not see what's wrong ?

Trong

"Xiaodan Tang" <xtang@qnx.com> wrote in message
news:bmmdie$mll$1@nntp.qnx.com...
Trong Nguyen <tnguyen@aquilamsl.com> wrote in message
news:bmmbqj$d4c$1@inn.qnx.com...
Hi all,

In QNX Neutrino, I can not set the multi-timer.
alway the latest timer will be received.

sigevent.sig_value.sival_int = MY_VALUE;
sigevent.sig_notify = SIGEV_PULSE;
sigevent.sig_coid = ConnectAttach();
sigevent.sig_priority = getprio(0);
sigevent.sig_code = _PULSE_CODE_MINAVAIL;

timer_create(..., &sigevent);

sigevent.sig_value.sival_int=MY_VALUE2;
timer_create(..., &sigevent);

start the 2 timer, and you should be able to decided which timer
goes off, from "MY_VALUE" or "MY_VALUE2" .

-xtang


then start timer_create & timer_setting.

Do you know how to initialize the event to receive the
multi-timer ?

Thanks


Trong



Post Reply

Return to “qdn.public.neutrino”