||Now a day, most of programs having UI interfaces. Whether it is a website program or an operating system, the process of the programs is determined by the user′s operating. So that, the interaction between the program and the user is more and more important. The design of such programs is often using event-driven design.|
Event-driven programming is a common programming paradigm in which the flow of program is determined by the event such as user motions or messages from other programs. How difficult it is to design the event-driven programs is also depending on the programming language. Programming languages like C#, JAVA, PYTHON, etc., are easier to design event-driven programs because of the supporting of language itself. However, one of widely using language: C language, because of the lack of language-based support, can only design event-driven programs by the experience from designers.
This research will present a tool which is called “C Event Dispatcher”(CED) to assist programmers in writing event-driven programs in C language. The feature of CED tool is that it use different way to trigger the event handler. Without using timeout and signal, it use conditional expression to trigger the handler, giving user more flexibility to design event-driven program. User can use the mechanism of conditional expression to monitor a event variable, calling the event handler depending on the condition of the event variable. The CED tool also support the publish–subscribe pattern, increasing the flexibility of event-driven architecture and the maintainability of the code. The finite-state machine built by CED tool can dynamically decrease and increase the states in the finite-state machine. This advantage is suitable for using on the embedded system. It can make the embedded system more flexible and maintainable.
|| "TIOBE Programming Community Index," [Online]. Available: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html. [Accessed 8 5 2019].|
 F. Long, D. Mohindra, R. C. Seacord, D. F. Sutherland and D. Svoboda, Java Coding Guidelines, Addison-Wesley, 2013.
 M. Ferber, S. Hunold, B. Krellner, T. Rauber, T. Reichel and G. Rünger, "Reducing the Class Coupling of Legacy Code by a Metrics-Based Relocation of Class Members," CEE-SET′09 Proceedings of the 4th IFIP TC 2 Central and East European conference on Advances in Software Engineering Techniques, pp. 202-214 , 12-14 10 2009.
 S. Hansen, T. Fossum, U. -. Parkside and S. -. Potsdam, Event Based Programming, Kenosha WI, 2010.
 E. Czaplicki and S. N. Chong, "Asynchronous Functional Reactive Programming for GUIs," 34th ACM SIGPLAN Conference on Programming Language Design and Implementation - PLDI ’13, Seattle Washington, pp. 411-422, 16-22 June 2013.
 J. Kopják and J. Kovács, "Event driven software modeling of combinational logic network based control programs," 2012 IEEE 16th International Conference on Intelligent Engineering Systems (INES), 30 July 2012.
 R. A. Sayle, "A Superoptimizer Analysis of Multiway Branch Code Generation," Proceedings of the GCC Developers’ Summit, 17-19 June 2008.
 N. P. Dash, R. Dasgupta, J. Chepada and A. Halder, "Event Driven Programming for Embedded Systems-A Finite State Machine Based Approach," ICONS 2011, The Sixth International Conference on Systems, January 2011.
 J. Kopják and J. Kovács, "Event-driven control program models running on embedded systems," 2011 6th IEEE International Symposium on Applied Computational Intelligence and Informatics (SACI), 09 June 2011.
 E. Cheong, J. Liebman, J. Liu 且 F. Zhao, “TinyGALS: a programming model for event-driven embedded systems,” SAC ′03 Proceedings of the 2003 ACM symposium on Applied computing, pp. 698-704, 09 - 12 March 2003 .
 M. Samek, "Who Moved My State?," 2 2018. [Online]. Available: http://www.drdobbs.com/who-moved-my-state/184401643.
 G. Kraszewski, "Event Driven Programming, Notifications," [Online]. Available: http://krashan.ppa.pl/mph/event-driven-programming-notifications. [Accessed 3 5 2019].
 "GLib The Main Event Loop," [Online]. Available: https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html. [Accessed 10 4 2019].
 "libevent – an event notification library," [Online]. Available: https://libevent.org/. [Accessed 21 4 2019].
 J. v. Hoof, "How EDA extends SOA and why it is important," 3 2019. [Online].
 M. Samek, "State Machines for Event-Driven Systems," 2 2018. [Online]. Available: https://barrgroup.com/Embedded-Systems/How-To/State-Machines-Event-Driven-Systems.
 M. Richards, Software Architecture Patterns, O′Reilly Media, February 2015.
 X. Li, "Ncurses Programming Guide," [Online]. Available: http://www.cs.ukzn.ac.za/~hughm/os/notes/ncurses.html. [Accessed 28 4 2019].
 P. T. Eugster, R. Guerraoui and J. Sventek, "Distributed Asynchronous Collections: Abstractions for Publish/Subscribe Interaction," ECOOP 2000: ECOOP 2000 — Object-Oriented Programming, pp. 252-276, 12 May 2000.
 C. Pautasso and E. Wilde, "Why is the web loosely coupled?: a multi-faceted metric for service design," WWW ′09 Proceedings of the 18th international conference on World wide web, 20 - 24 April 2009.
 N. Josuttis, SOA in Practice: The Art of Distributed System Design, O′Reilly, 2007.
 K. M. Chandy and M. Charpentier, "Towards a Theory of Events," Inaugural International Conference on Distributed Event-Based Systems, June 2007.
 T. Niemann, "Lex & Yacc," [Online]. Available: https://www.epaperpress.com/lexandyacc/. [Accessed 10 5 2019].
 O. Levina and V. Stantchev, "Realizing Event-Driven SOA," 2009 Fourth International Conference on Internet and Web Applications and Services, 12 June 2009.
 M. Welsh, "The Staged Event-Driven Architecture for Highly-Concurrent Server Applications," Ph.D. Qualifying Examination Proposal.
 徐健智, “On the Model and System Design for Online Tabletop Games,” 國立交通大學，博士論文, 2006.
 "libsigc++ Callback Framework for C++," [Online]. Available: https://libsigcplusplus.github.io/libsigcplusplus/. [Accessed 21 4 2019].