RTLI Example
The RTLI example shows an interpretive RTLI can be used to drive a real-time
system within its deterministic requirements yet sill allow for quick
modification of the human-computer interface. The example also shows
how a FIFO can be used to connect an interpretive real-time application
with the real-time module. FIFOs are often used to connect a non-real-time
human-computer interface to a real-time application, or for data logging
to a storage device. The experimental example allows users to control the
internal speaker of a computer by modifying the interrupt frequency driving
the speaker.
This example requires the following:
RTAI should be installed and a RTAI patched kernel should be running.
A web server should be installed along with Ch CGI.
Files used in the example:
common.h:
Header file containing shared variable names.
fifo_app.c:
Source code for the command line version of the real-time application.
fifo_app_gui.c:
Source code for the gui version of the real-time application.
fifo_task.c:
Source code for the real-time task.
rtai_fifo.html:
Website HTML for the Web-based control interface.
fifo_app_cgi.ch:
Ch CGI code for Web-based control.
speaker_freq.chf:
Ch function file that changes the frequency output for the speaker.
speaker_off.chf:
Ch function file that disables the speaker.
speaker_on.chf:
Ch function file that enables the speaker.
common.h
fifo_app.c
fifo_app_cgi.ch
fifo_app_gui.c
fifo_task.c
rtai_fifo.html
speaker_freq.chf
speaker_off.chf
speaker_on.chf
| Download the Example: | zip | tar |
Screenshots:
Running the speaker functions at the command line.
Using the Gtk GUI version of the real-time application.
Using the Web-based Interface version of the real-time application.
Result from the Web-based Interface.