Computer and Modernization

Previous Articles     Next Articles

 A Programming Framework of Event-driven Finite State Machine

  

  1. Department of Computer Engineering, Henan Polytechnic Institute, Nanyang 473000, China
  • Received:2014-01-13 Online:2014-06-13 Published:2014-06-25

Abstract: In modern programming, network protocol, game roles modeling and many other issues which include complex state switches can be described in finite state machine. In this paper, the theory of finite state machine is combined with event-driven model, a reusable code template is designed to dynamically manage the state switch sense. This method makes logic of the code module clear and the system healthy.

Key words:  finite state machine, event-driven, state switch, reusable framework