RKH
Preparing the application files


Prev: Basics
Next: Identifying, generating and sending events

The sample code for the example presented above ported to x86 is located in the directory demo/80x86/ahsm/. It contains the Visual Studio project files to build the application. Also, emulates a ISR and a simple event-loop like a cooperative scheduler using the native priority scheme among other RKH services. See Installation section about RKH files. The application files are listed below:

  • "my.h": contains the declaration of active object structure, signals, and other facilities shared among the components of the application. See the "my.h" file.
  • "my.c": this module implements the my state machine, which illustrates all aspects of implementing state machines with RKH framework. Please correlate this implementation with the my state diagram in Figure 1. Note that the rkhcfg.h file defines the function prototype of actions. See Configuration section about of available options. See the "my.c" file.
  • "main.c": contains the main() function along with an example for using the RKH trace facility. See the "main.c" file.
  • "rkhcfg.h": adapts and configures RKH. See Configuration section. In the demo/ directory there are other rkhcfg.h files already in existence and it's suggested that these are used as a reference.
  • "bsp.h": contains the interface to the board support package and is located in the application directory. See the "bsp.h" file.
  • "bsp.c": contains the implementation of the board-specific functions. See the "bsp.c" file.


Prev: Basics
Next: Identifying, generating and sending events