Re: SDL-News: SDL channels


Subject: Re: SDL-News: SDL channels
From: Anders Olsen (anders#tdr.dk )
Date: Wed Dec 10 1997 - 11:39:00 GMT


The originator of this message is responsible for its content.
-----From anders#tdr.dk (Anders Olsen) to sdlnews -----

Dear Tariq
I would suggest that you use a channel substructure containing one
block containing one process which contain a service for each
of the signals to be delayed on the channel. This way, you can
even have different delay for each of the signals.

Below is shown a possible way using service types and
context parameters, parameterised with the signal to be
delayed and parameterized with the delay value.

service type sSIGX<signal SIGX;synonym delay duration>;
gate g in with SIGX;out with SIGX;
timer t(natural) :=delay;
dcl timercounter natural := 0; /* used to generate a unique timer instance for each signal */
  start;
  nextstate s;
  state s;
    input t();
      output SIGX via g;
    nextstate -;
    input SIGX;
      set(t(counter));
      task counter := counter+1;
    nextstate -;
  endstate;
endservice type;

But you should be aware that channel substructures should mainly be used if
you can do the routing solely by using channels and signal routes instead of
using PiD values. Otherwise the use of a channel substructure will not be
transparent to the sender and receiver. For example, the above service does
not automatically know the PiD value of the 'real' receiver so no
destination process is mentioned in the output. To do this, additional
book keeping is necessary.

I hope this could be of any help

Regards
Anders Olsen

-----End text from anders#tdr.dk (Anders Olsen) to sdlnews -----
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



This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT