From: Fred P. <fre...@ni...> - 2002-11-27 21:38:30
|
EMC developers, I set up a simple example application that shows the API concept. I suggest we use this to test out the "make config" technique and to figure out how best to deal with RTL v. RTAI. I attached the 4-K .tar.gz file. Expand with "tar xzvf example.tar.gz" and you'll get an example/ directory. Run ./config to generate the Makefile.inc, and "make" to do the compile. ./config checks if your "uname" has a -rtl or -rtai suffix and sets a Makefile.inc symbol accordingly. I don't think this will work in the long run but it's something to consider. Most of the work was on the API and the RTL implementation. See rtproc.c for calls to the API. Note that there are no #ifdef RTL statements here-- everything has been API'ed via calls to rtapi_XXX, and these functions are implemented in rtl_api.c and rtai_api.c (the first is fairly complete, the second is stubbed). See what you think about this. If we get this application working with both RTL and RTAI, and Linux 2.2.X, 2.4.X, etc. with make config, we can try our hand at redoing the EMC code to follow this. I also added a .indent.pro file that the "indent" program runs to clean up the formatting on the .c and .h files. This is run during the "make clean" target. This sort of enforces coding conventions. --Fred -- Frederick M. Proctor Group Leader, Control Systems Group National Institute of Standards and Technology 100 Bureau Drive, Stop 8230 Gaithersburg, MD 20899-8230 301-975-3425 (voice) 301-990-9688 (fax) fre...@ni... (email) |