Event Driven programming in C 
Author Message
 Event Driven programming in C

I think a typical implementation is to use an event tree. I believe
basically you are really talking about servicing multiple tasks. But you did
not mention what is different about your modules/ functions. Do they contain
code that moves through states of an algorithm or "flows" according to a
program or script? Usually a process producing events does so in order to
let something or somebody know that it is changing states. An event tree is
simply ordered by function or other process category and by possible
outcomes or events.  It's purpose is to generate appropriate respnse for
each event type so there is no need to dynamically alter the tree. You
should design an event tree to have a broad as possible base and as few or
short branches as possible. The reason is obvious- every trunk and branch
has a dependancy, and once grown the tree is very hard to prune.


Quote:
> Suppose I have three modules/functions, each with its own event queue.
> What are the principles of writing an event-driven simulation where
> functions can post signals/events, and an event controller dispatches
those
> signals on the appropriate event queue.

> Any advice and/or pointers to resources on the implemention details, is
> greatly appreciated.

> Thank you.



Tue, 19 Mar 2002 03:00:00 GMT  
 Event Driven programming in C
On Sat, 2 Oct 1999 09:49:07 -0400, "Islam Guemey"

Quote:

>It's a direct link networking simulation, more precisely a Stop-and-Wait
>protocol.
>Without getting bogged down with that, here's what I have in mind:

>the 3 functions/modules/entities are a sender, a channel, and a receiver.

>Whenever a sender sends something to channel, it should "sleep" or wait.
>Now the channel posts an event on the receiver's event queue that there is a
>"FrameArrival".
>The Receiver in turn sends an "ACKnowledgment bit/message" to the channel
>everytime it succesfully receives a message/frame.
>Again the channel function now should post an event on the sender's event
>queue that an "ACK" is being sent.
>At this point the sender "wakes up" and starts to send another message/frame
>through the channel.

>The specs for this simulation is to behave as an event-driven program.
>That'll control the flow of those events. This event handling, sequencing,
>is what I'm looking for information or resources about.

Hi Islam.
The sorts of functions that accomplish these kinds of things are
implementation specific. You haven't mentioned your OS or compiler but
if you can find a news group for those items that would be where to
ask.
Regards,
Greg Martin.


Wed, 20 Mar 2002 03:00:00 GMT  
 Event Driven programming in C

Quote:
Islam Guemey writes:
>Suppose I have three modules/functions, each with its own event queue.
>What are the principles of writing an event-driven simulation where
>functions can post signals/events, and an event controller dispatches those
>signals on the appropriate event queue.

>Any advice and/or pointers to resources on the implemention details, is
>greatly appreciated.

I have some thought on how one might do this in C++.  And of course pipple are
always saying you can do most anything in C that you can do in C++ so you could
convert the basic ideas if you are not C++ fluent.

But I can't post the code here. If you're interested post your question in
comp.lang.c++.  



Wed, 20 Mar 2002 03:00:00 GMT  
 Event Driven programming in C
could you please email me personally about the ideas you have?
I'd really appreciate it.

Quote:

>Islam Guemey writes:

>>Suppose I have three modules/functions, each with its own event queue.
>>What are the principles of writing an event-driven simulation where
>>functions can post signals/events, and an event controller dispatches
those
>>signals on the appropriate event queue.

>>Any advice and/or pointers to resources on the implemention details, is
>>greatly appreciated.

>I have some thought on how one might do this in C++.  And of course pipple
are
>always saying you can do most anything in C that you can do in C++ so you
could
>convert the basic ideas if you are not C++ fluent.

>But I can't post the code here. If you're interested post your question in
>comp.lang.c++.



Fri, 22 Mar 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Event Driven programming in C

2. Sources on event driven programming using C?

3. What is an event-driven c program?

4. Resize Window on Page_Load Event (aspx.cs)

5. Newbie: separate big .cs file into small .cs files

6. Problem #30 on http://cs.nmu.edu/programming/c/problems.htm

7. SoftEng or CS Graduate Program Search

8. FS: Programming and CS Books --- CHEAP

9. 1995 UT IEEE CS National Programming Contest

10. Good CS Programs

11. IEEE CS National Programming Contest [Addendum3]

12. 1993 IEEE CS National Programming Contest Notice

 

 
Powered by phpBB® Forum Software