Re: SDL-News: how can a queue in SDL (or queue in C which can be used in TAU) delay each signal without specifying the signal names?


Subject: Re: SDL-News: how can a queue in SDL (or queue in C which can be used in TAU) delay each signal without specifying the signal names?
joan.martin#philips.com
Date: Tue Jul 20 2004 - 11:10:48 GMT


Hi Gary,

To model M/M/1 you could proceed in two ways:
Every element in the queue has associated a time to be send. Every time
you serve a new element from the queue you check when the next element
should be served and set a timer properly: SET (NOW + (txtime - NOW),
sendTimer). When the timer expires (you catch the signal) you can remove
the send the element and check the next element in the queue.
Every time a new element is inserted into the queue you set a timer as
follows:
                SET (txtime, sendTimer(elementToSend))
The timer should previously be declared as
TIMER sendTimer(elementType)
In this way you can reuse the same name of the signal (you are using the
same timer), because you are passing the element to send as a parameter.
You can have as many concurrent timers as you want.

Best regards,
Joan

_______________________________________________________
Joan Martin
Philips Research Laboratories
Weisshausstr. 2
D-52066 Aachen, Germany
Phone: +49.241.6003-552
E-mail: joan.martin#philips.com
Research Group 'Connectivity Systems'

"D Wang, Electrical & Electronic Engineering" <Diyu.Wang#bristol.ac.uk>
Sent by:
owner-sdlnews#sdl-forum.org
07/20/04 11:28 AM
Please respond to "D Wang, Electrical & Electronic Engineering"

 
        To: sdlnews#sdl-forum.org
        cc: (bcc: Joan Martin/ACN/RESEARCH/PHILIPS)
        Subject: SDL-news: how can a queue in SDL (or queue in C which can be used in TAU)
delay each signal without specifying the signal names?
        Classification:

Become an SDL Forum Society member <http://www.sdl-forum.org/Society/members.htm>
The originator of this message is responsible for its content.
-----From "D Wang, Electrical & Electronic Engineering"
<Diyu.Wang#bristol.ac.uk> to sdlnews -----

Dear friends,

I need to build a queue in SDL (or TAU) to model m/m/1. The queue delays
each signal for a period and then send the signal out. I read the help
document several times, but cannot solve the problem:

How can SDL *recognise* different signals (e.g. sigA, sigB) with one set
of
commands? That is, how can the SDL queue (or C queue which can be used in
TAU) delay each signal without specifying the signal names?

It seems SDL can only deal with each signal explicitly by its signal name,

right? and even each signal need to have different names when being sent
into and out from the queue, otherwise the queue will receive the same
signal again and again as a self-message.

I appreciate every piece of help on how such a queue can be done in SDL or

TAU.

Thank you very much.

Gary
--End text from "D Wang, Electrical & Electronic Engineering"
<Diyu.Wang#bristol.ac.uk> to sdlnews ---
For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>
or (iff this does not answer your question) email:
owner-sdlnews#sdl-forum.org


Hi Gary,

To model M/M/1 you could proceed in two ways:

  1. Every element in the queue has associated a time to be send.  Every time you serve a new element from the queue you check when the next element should be served and set a timer properly:  SET (NOW + (txtime - NOW), sendTimer). When the timer expires (you catch the signal) you can remove the send the element and check the next element in the queue.
  2. Every time a new element is inserted into the queue you set a timer as follows:
                    SET (txtime, sendTimer(elementToSend))
    The timer should previously be declared as
    TIMER    sendTimer(elementType)
    In this way you can reuse the same name of the signal (you are using the same timer), because you are passing the element to send as a parameter. You can have as many concurrent timers as you want.

    Best regards,
    Joan

    _______________________________________________________
    Joan Martin
    Philips Research Laboratories
    Weisshausstr. 2
    D-52066 Aachen, Germany
    Phone: +49.241.6003-552
    E-mail: joan.martin#philips.com
    Research Group 'Connectivity Systems'








    "D Wang, Electrical & Electronic Engineering" <Diyu.Wang#bristol.ac.uk>

    Sent by:
    owner-sdlnews#sdl-forum.org

    07/20/04 11:28 AM
    Please respond to "D Wang, Electrical & Electronic Engineering"

           
            To:        sdlnews#sdl-forum.org
            cc:        (bcc: Joan Martin/ACN/RESEARCH/PHILIPS)
            Subject:        SDL-News: how can a queue in SDL (or queue in C which can be used in TAU) delay each signal without specifying the signal names?

            Classification:        




    Become an SDL Forum Society member <http://www.sdl-forum.org/Society/members.htm>
    The originator of this message is responsible for its content.
    -----From "D Wang, Electrical & Electronic Engineering" <Diyu.Wang#bristol.ac.uk> to sdlnews  -----


    Dear friends,

    I need to build a queue in SDL (or TAU) to model m/m/1. The queue delays
    each signal for a period and then send the signal out. I read the help
    document several times, but cannot solve the problem:

    How can SDL *recognise* different signals (e.g. sigA, sigB) with one set of
    commands? That is, how can the SDL queue (or C queue which can be used in
    TAU) delay each signal without specifying the signal names?

    It seems SDL can only deal with each signal explicitly by its signal name,
    right? and even each signal need to have different names when being sent
    into and out from the queue, otherwise the queue will receive the same
    signal again and again as a self-message.

    I appreciate every piece of help on how such a queue can be done in SDL or
    TAU.

    Thank you very much.

    Gary
    --End text from "D Wang, Electrical & Electronic Engineering" <Diyu.Wang#bristol.ac.uk> to sdlnews ---
    For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>
    For help, email "majordomo#sdl-forum.org" with the body of your email as:
       help
    or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org


--End text from joan.martin#philips.com to sdlnews --- For extra SDL Forum Society benefits join at



This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:50 GMT