Subject: RE: SDL-News: sub-state machine and persistent state (by Frend Patrick-BPF005 <BPF005#motorola.com)


Subject: Subject: RE: SDL-News: sub-state machine and persistent state (by Frend Patrick-BPF005 From: Rick Reed TSE (rickreed#tseng.co.uk)
Date: Fri Feb 14 2003 - 20:12:53 GMT


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 Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews -----

The following was sent by Frend Patrick-BPF005 <BPF005#motorola.com> to
sdlnews, but as that email address is not a member of SDLNEWS the input was
Bounced:

-----Original Message-----
From: Frend Patrick-BPF005=20
Sent: 13 February 2003 10:17
To: sdlnews#sdl-forum.org
Subject: RE: SDL-news: sub-state machine and persistent state

I've done the thing with procedures to implement a large number of
state-machine instances where there is a limit to the number of processes.
(e.g. processes mapped directly to OS tasks)

Basically in an array, store the state of each instance. Receive the signal
and parameters in the process. Identify the element in the array where the
state is stored. Send a mirror signal to yourself and call the procedure.

In the procedure, restore the current state from the state variable using a
decision. Also send yourself a transitionDone signal.

In the restored state, receive the mirror signal and do what you need to
do ending in the next state.

In the next-state receive the transition-done signal, store the state into
the state variable, and exit the procedure.

If you have a telelogic tight integration for a RTOS, this allows you to
implement multiple instances of multiple state machines within a single
process. Basically it's a simple scheduling algoriythm within a process.
Doesn't use anything that won't run in a telelogic tight RTOS = integration.

I've attached a very simple, non working, non complete , example in
telelogic Tau4.3 format.

--End text from Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews ---
For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>



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